/* ===== MOBILE BLOCKER ===== */
        #mobile-blocker {
            display: none; position: fixed; inset: 0; z-index: 99999;
            background: linear-gradient(180deg, #F1D24B 0%, #f7e67a 40%, #faf9f6 100%);
            align-items: center; justify-content: center; flex-direction: column;
        }
        @media (max-width: 768px) {
            #mobile-blocker { display: flex; }
        }
        .mobile-blocker-card {
            background: #fff; border-radius: 24px; box-shadow: 0 12px 48px rgba(0,0,0,0.12);
            max-width: 340px; width: 88%; overflow: hidden; text-align: center;
            animation: mbSlideUp 0.6s ease;
        }
        @keyframes mbSlideUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .mobile-blocker-top {
            background: #8671d1; padding: 24px 20px 18px; text-align: center;
        }
        .mobile-blocker-logo { height: 32px; filter: brightness(0) invert(1); display: inline-block; }
        .mobile-blocker-body { padding: 28px 24px 24px; }
        .mobile-blocker-icon { margin-bottom: 16px; display: flex; justify-content: center; }
        .mobile-blocker-title {
            font-family: 'DM Sans', sans-serif; font-size: 1.2rem; font-weight: 800;
            color: #1a1a2e; margin: 0 0 12px;
        }
        .mobile-blocker-text {
            font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 500;
            color: #78716c; line-height: 1.5; margin: 0 0 8px;
        }
        .mobile-blocker-divider {
            width: 48px; height: 3px; background: #F1D24B; border-radius: 4px;
            margin: 20px auto 16px;
        }
        .mobile-blocker-social { display: flex; gap: 16px; justify-content: center; }
        .mobile-blocker-social-link {
            width: 40px; height: 40px; border-radius: 50%;
            background: #f5f3ff; display: flex; align-items: center; justify-content: center;
            color: #8671d1; transition: all 0.2s; text-decoration: none;
        }
        .mobile-blocker-social-link:hover { background: #8671d1; color: #fff; }

/* ===== BASE STYLES ===== */
        :root { --primary: #8671d1; --secondary: #F1D24B; --level-color: #8671d1; --level-color-light: #f5f3ff; }
        body { font-family: 'DM Sans', sans-serif; background-color: #faf9f6; min-height: 100vh; margin: 0; scroll-behavior: smooth; }
        #main-wrapper { width: 100%; margin: 0 auto; padding: 0; position: relative; }
        #dashboard-view, #generator-view, #study-view { padding: 0 1.5rem; max-width: 1200px; margin: 0 auto; padding-top: 1.5rem; }
        .bg-primary\/10 { background-color: rgba(134, 113, 209, 0.1); }
        .text-primary { color: #8671d1; }

        /* UI BUTTONS */
        .action-button { background-color: var(--level-color, #8671d1); color: #fff; padding: 0.75rem 1.25rem; border-radius: 0.5rem; font-weight: 700; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem; white-space: nowrap; }
        .action-button-sm { background-color: var(--level-color, #8671d1); color: #fff; padding: 0.35rem 0.5rem; border-radius: 0.5rem; font-weight: 800; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: inline-flex; align-items: center; justify-content: center; font-size: 0.6rem; white-space: nowrap; border: none; }
        .action-button-sm:hover:not(:disabled) { filter: brightness(0.9); transform: translateY(-2px); }
        .action-button-sm:disabled { background-color: #e5e7eb; color: #9ca3af; cursor: not-allowed; box-shadow: none; }
        .action-button:hover:not(:disabled) { filter: brightness(0.9); transform: translateY(-2px); }
        .action-button:disabled { background-color: #e5e7eb; color: #9ca3af; cursor: not-allowed; box-shadow: none; }

        .secondary-button { background-color: #44403c; color: white; padding: 0.5rem 1rem; border-radius: 0.375rem; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem; }
        .secondary-button-sm { background-color: transparent; color: var(--level-color, #8671d1); padding: 0.35rem 0.6rem; border-radius: 0.5rem; font-weight: 800; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; font-size: 0.6rem; border: 2px solid var(--level-color, #8671d1); }
        .secondary-button-sm:hover { background-color: var(--level-color, #8671d1); color: #fff; transform: translateY(-1px); }
        .back-button { background-color: #44403c; color: white; padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
        .back-button:hover { background-color: #292524; transform: translateY(-1px); }
        .secondary-button:hover { background-color: #292524; transform: translateY(-1px); }

        /* LEVEL HEADER BANNER */
        #level-header-banner {
            position: relative; border-radius: 0; overflow: hidden;
            background: var(--header-color, #8671D1); min-height: 140px;
        }
        .level-header-bg {
            position: absolute; inset: 0;
            background: linear-gradient(135deg, var(--header-color, #8671D1) 0%, var(--header-color-end, #6b5bb5) 100%);
        }
        .level-header-bg::before {
            content: ''; position: absolute; inset: 0;
            background: radial-gradient(circle at 85% 50%, rgba(255,255,255,0.15) 0%, transparent 60%),
                        radial-gradient(circle at 15% 80%, rgba(255,255,255,0.08) 0%, transparent 40%);
        }
        .level-header-bg::after {
            content: none;
        }
        .level-header-content {
            position: relative; z-index: 1; display: flex; align-items: center;
            justify-content: space-between; padding: 28px 32px; gap: 16px;
        }
        .level-header-left { flex: 1; }
        .level-header-tag {
            font-size: 0.65rem; font-weight: 800; letter-spacing: 0.15em;
            color: rgba(255,255,255,0.75); text-transform: uppercase; margin-bottom: 4px;
        }
        .level-header-title {
            font-size: 3rem; font-weight: 900; color: #fff; margin: 0 0 4px;
            line-height: 1.1; text-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }
        .level-header-subtitle {
            font-size: 0.85rem; font-weight: 500; color: rgba(255,255,255,0.8); margin: 0;
        }
        .level-header-right-group {
            display: flex; flex-direction: row; align-items: center; gap: 12px; flex-shrink: 0;
        }
        .level-header-buttons {
            display: flex; flex-direction: column; gap: 6px; align-items: stretch;
        }
        .level-header-badge {
            display: flex; align-items: center; gap: 6px;
            background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
            border: 1.5px solid rgba(255,255,255,0.35); border-radius: 20px;
            padding: 5px 12px; cursor: pointer; transition: all 0.2s;
            color: #fff; font-size: 0.75rem; font-weight: 800;
        }
        .level-header-badge:hover { background: rgba(255,255,255,0.35); }
        #level-header-banner.level-header-light .level-header-badge {
            background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.12); color: #1a1a2e;
        }
        #level-header-banner.level-header-light .level-header-badge:hover { background: rgba(0,0,0,0.14); }
        .level-header-icon-wrap {
            width: 100px; height: 100px; flex-shrink: 0;
            filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
            animation: headerIconFloat 3s ease-in-out infinite;
        }
        .level-header-icon-wrap img { width: 100%; height: 100%; object-fit: contain; }
        @keyframes headerIconFloat {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-6px); }
        }
        #level-header-banner.level-header-light .level-header-tag { color: rgba(0,0,0,0.5); }
        #level-header-banner.level-header-light .level-header-title { color: #1a1a2e; text-shadow: none; }
        #level-header-banner.level-header-light .level-header-subtitle { color: rgba(0,0,0,0.55); }
        .level-progress-wrap { margin-top: 12px; }
        .level-progress-track {
            width: 100%; height: 8px; background: #e7e5e4; border-radius: 999px; overflow: hidden;
        }
        .level-progress-fill {
            height: 100%; width: 0%; border-radius: 999px;
            background: var(--level-color, #8671d1); transition: width 0.6s ease;
        }
        @media (max-width: 480px) {
            .level-header-content { padding: 16px 16px; gap: 8px; }
            .level-header-title { font-size: 1.4rem; }
            .level-header-subtitle { font-size: 0.75rem; }
            .level-header-tag { font-size: 0.55rem; }
            .level-header-icon-wrap { width: 56px; height: 56px; }
            .level-header-right-group { gap: 8px; }
            .level-header-buttons { gap: 4px; }
            .level-header-badge { font-size: 0.6rem; padding: 3px 8px; gap: 4px; }
            .level-header-badge svg { width: 14px; height: 14px; }
            #level-header-banner { min-height: 100px; }
            .level-card { padding: 1rem; border-radius: 1rem; min-height: 120px; }
            .level-card .module-tag { font-size: 0.55rem; margin-bottom: 0.2rem; }
            .level-card h3 { font-size: 0.85rem !important; margin-bottom: 0.25rem !important; margin-top: 0.25rem !important; }
            .level-card p { font-size: 0.7rem !important; margin-bottom: 0.35rem !important; }
            .action-button-sm { font-size: 0.55rem; padding: 0.3rem 0.45rem; }
            .secondary-button-sm { font-size: 0.55rem; padding: 0.3rem 0.45rem; }
            .study-container { padding: 1rem; border-radius: 1rem; margin-bottom: 1rem; }
            .flashcard-container { height: 220px; max-width: 320px; }
            .challenge-box { padding: 1rem; }
            #level-cards-container { gap: 0.75rem !important; padding-bottom: 5rem !important; }
        }

        /* CARDS */
        .level-card { background-color: white; padding: 1.75rem; border-radius: 1.25rem; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 2px solid transparent; transition: all 0.2s; display: flex; flex-direction: column; justify-content: space-between; height: 100%; position: relative; min-height: 180px; }
        .level-card:not(.locked):hover { transform: scale(1.02); border-color: var(--level-color, #8671d1); }
        .level-card.locked { opacity: 0.6; background-color: #f9fafb; pointer-events: none; }
        
        /* STUDY VIEW CONTAINER */
        .study-container { background: white; border-radius: 1.5rem; padding: 2rem; box-shadow: 0 10px 40px rgba(0,0,0,0.08); margin-bottom: 2rem; }

        .module-tag { display: inline-block; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: var(--level-color, #8671d1); margin-bottom: 0.35rem; }
        .lock-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(68,64,60,0.9); padding: 1rem; border-radius: 50%; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

        /* LISTENING */
        .listening-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 0.5rem; margin-top: 0.25rem; }
        .listening-grid-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; margin-top: 0.25rem; }
        .number-btn { background: white; border: 2px solid #e2e8f0; border-radius: 0.75rem; padding: 0.5rem; text-align: center; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 55px; }
        .number-btn:hover { border-color: var(--level-color, #8671d1); transform: translateY(-2px); }
        .number-btn span.main-text { font-size: 1.1rem; font-weight: 800; }
        .number-btn span.sub-text { font-size: 0.6rem; font-weight: 600; color: var(--level-color, #8671d1); text-transform: uppercase; }
        .number-btn span.phonetic-text { font-size: 0.75rem; font-weight: 500; color: #78716c; font-style: italic; }
        .number-btn.playing { border-color: var(--level-color, #8671d1); background-color: color-mix(in srgb, var(--level-color, #8671d1) 10%, white); animation: pulse 1s infinite; }

        /* FLASHCARDS */
        .flashcard-container { perspective: 1000px; width: 100%; max-width: 400px; height: 300px; margin: 0.5rem auto; cursor: pointer; }
        .flashcard { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; }
        .flashcard.flipped { transform: rotateY(180deg); }
        .flashcard-front, .flashcard-back { position: absolute; top: 0; left: 0; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 1.5rem; padding: 1rem; box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
        .flashcard-front { background-color: var(--level-color, #8671d1); color: white; }
        .flashcard-back { background-color: var(--level-color, #8671d1); color: white; transform: rotateY(180deg); opacity: 0.85; }

        /* CHUNKS */
        .chunks-grid { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid #e2e8f0; border-radius: 1rem; overflow: hidden; background: white; text-align: left; }
        .chunks-header { background: var(--level-color, #8671d1); color: white; padding: 1rem; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; }
        .chunks-cell { padding: 0.75rem; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; font-weight: 500; font-size: 0.9rem; word-break: break-word; }
        .chunks-cell-en { color: #1e1b4b; background-color: #f8fafc; }
        .chunks-cell-pt { color: #64748b; justify-content: space-between; }
        .chunk-input { flex: 1; padding: 0.4rem 0.6rem; border: 2px solid #e2e8f0; border-radius: 0.5rem; font-size: 0.85rem; outline: none; transition: 0.2s; min-width: 0; }
        .chunk-check-btn { flex-shrink: 0; padding: 0.4rem 0.6rem; margin-left: 0.5rem; border-radius: 0.5rem; background: var(--level-color, #8671d1); color: white; font-size: 0.75rem; font-weight: 700; border: none; cursor: pointer; transition: 0.2s; }
        .chunk-check-btn:hover { background: #7161b8; }
        .chunk-input:focus { border-color: var(--level-color, #8671d1); }
        .chunk-input.correct { border-color: #22c55e; background: #f0fdf4; color: #166534; }
        .chunk-input.wrong { border-color: #ef4444; background: #fef2f2; }
        .translation-hidden { filter: blur(5px); opacity: 0.3; transition: 0.3s; user-select: none; } 
        .translation-visible { filter: blur(0); opacity: 1; user-select: text; }
        @media (max-width: 640px) {
            .chunks-grid { grid-template-columns: 1fr; }
            .chunks-header:last-of-type { display: none; }
            .chunks-header:first-of-type::after { content: " / English"; }
            .chunks-cell { padding: 0.875rem; font-size: 0.95rem; }
            .chunks-cell-pt { border-bottom: none; border-right: none; padding-bottom: 0.5rem; }
            .chunks-cell-en { border-bottom: 2px solid #e2e8f0; padding-top: 0.5rem; }
        }

        /* WORD SEARCH */
        .wordsearch-grid { display: inline-grid; gap: 1px; background: #44403c; padding: 2px; border-radius: 0.5rem; user-select: none; }
        .wordsearch-cell { width: 32px; height: 32px; background: white; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.15s; text-transform: uppercase; }
        .wordsearch-cell:hover { background: #f0e6ff; }
        .wordsearch-cell.selected { background: var(--level-color, #8671d1); color: white; }
        .wordsearch-cell.found { background: var(--level-color, #8671d1); color: white; opacity: 0.7; }
        .wordsearch-words { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; max-width: 320px; margin-top: 1rem; }
        .wordsearch-word { padding: 0.25rem 0.75rem; background: #f5f5f4; border-radius: 1rem; font-size: 0.85rem; font-weight: 600; color: #44403c; border: 2px solid #e2e8f0; }
        .wordsearch-word.found { background: var(--level-color, #8671d1); border-color: var(--level-color, #8671d1); color: white; text-decoration: line-through; }
        @media (max-width: 640px) {
            .wordsearch-cell { width: 28px; height: 28px; font-size: 14px; }
        }

        /* SCRAMBLE */
        .scramble-dropzone {
            min-height: 80px; 
            border: 2px dashed #cbd5e1; 
            border-radius: 1rem; 
            padding: 1.5rem; 
            display: flex; 
            flex-wrap: wrap; 
            align-items: center; 
            justify-content: center; 
            gap: 0.75rem; 
            background-color: #f8fafc; 
            margin-bottom: 2rem; 
            font-size: 1.25rem; 
            font-weight: 700; 
            color: var(--level-color, #8671d1);
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
        }
        .scramble-word {
            background: white; 
            border: 2px solid #e2e8f0; 
            padding: 0.75rem 1.25rem; 
            border-radius: 0.75rem; 
            cursor: pointer; 
            font-weight: 600; 
            color: #44403c; 
            transition: all 0.2s;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        .scramble-word:hover { border-color: var(--level-color, #8671d1); transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
        .scramble-word-selected {
            background: var(--level-color, #8671d1); 
            color: white;
            border: 2px solid var(--level-color, #8671d1); 
            padding: 0.5rem 1rem; 
            border-radius: 0.5rem; 
            cursor: pointer; 
            font-weight: 600; 
            transition: all 0.2s;
            margin: 0.125rem;
        }
        .scramble-word-selected:hover { background: #7161b1; border-color: #7161b1; }

        /* MISTAKE */
        .mistake-word { display: inline-block; padding: 0.2rem 0.4rem; border-radius: 0.4rem; cursor: pointer; transition: all 0.2s; border-bottom: 2px solid transparent; }
        .mistake-word:hover { background-color: #fee2e2; border-bottom-color: #ef4444; }
        .mistake-word.correct-choice { background: #dcfce7; border-color: #22c55e; }
        .mistake-word.wrong-choice { background: #fee2e2; border-color: #ef4444; text-decoration: line-through; }

        /* DICTATION */
        .dictation-input { font-size: 1.25rem; text-align: center; border: 3px solid #e2e8f0; border-radius: 1rem; width: 220px; padding: 0.5rem; outline: none; transition: 0.2s; }
        .dictation-input:focus { border-color: var(--level-color, #8671d1); }
        .dictation-input.correct { border-color: #22c55e; background: #dcfce7; }
        .dictation-input.wrong { border-color: #ef4444; background: #fee2e2; }

        /* GENERAL UI */

        .streak-container { display: flex; justify-content: center; gap: 5px; margin-bottom: 1rem; }
        .streak-bar-wrapper { width: 100%; max-width: 300px; margin: 0 auto; }
        .streak-bar-bg { width: 100%; height: 12px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
        .streak-bar-fill { height: 100%; background: var(--level-color, #8671d1); border-radius: 6px; transition: width 0.4s ease; }
        .streak-label { font-size: 0.75rem; font-weight: 700; color: #78716c; margin-bottom: 0.25rem; }

        /* QUIZ UI */
        .option-button { background-color: white; border: 2px solid #e2e8f0; color: #44403c; text-align: left; padding: 1rem; border-radius: 0.75rem; width: 100%; transition: all 0.2s; cursor: pointer; display: flex; align-items: center; gap: 1rem; }
        .option-button:hover:not(:disabled) { border-color: var(--level-color, #8671d1); background-color: color-mix(in srgb, var(--level-color, #8671d1) 8%, white); }
        .option-prefix { width: 2.2rem; height: 2.2rem; background: #fef9c3; color: #a16207; font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid #fde047; }

        .help-btn { position: absolute; top: 1rem; right: 1.5rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: white; border: 2px solid #e2e8f0; color: var(--level-color, #8671d1); font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 50; }
        .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 10000; opacity: 0; pointer-events: none; transition: 0.3s; }
        .modal-overlay.active { opacity: 1; pointer-events: auto; }
        .modal-content { background: white; border-radius: 1.5rem; padding: 1.8rem; max-width: 400px; width: 90%; transform: scale(0.9); transition: 0.3s; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
        .modal-overlay.active .modal-content { transform: scale(1); }

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

        /* LOGIN SCREEN */
        :root { --slap-yellow: #F1D24B; --slap-orange: #FF5C3D; }
        .login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box; background: #111110; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; }
        .login-page { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; z-index: 9999; }
        .login-page-left { width: 440px; flex-shrink: 0; background: #fff; display: flex; align-items: center; justify-content: center; padding: 32px; box-sizing: border-box; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
        .login-page-left::-webkit-scrollbar { display: none; }
        .login-page-right { flex: 1; background: linear-gradient(135deg, #f7e67a 0%, #F1D24B 30%, #faf0b8 70%, #fdf6d8 100%); display: flex; flex-direction: row; align-items: flex-end; justify-content: flex-start; padding: 40px 40px 0 40px; box-sizing: border-box; position: relative; overflow: hidden; }
        .login-page-right::before { content: ''; position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 65%); top: -150px; right: -150px; pointer-events: none; }
        .login-page-right::after { content: ''; position: absolute; width: 450px; height: 450px; background: radial-gradient(circle, rgba(134,113,209,0.1) 0%, transparent 65%); bottom: -100px; left: -100px; pointer-events: none; }
        .login-right-text { position: absolute; z-index: 3; left: 91px; top: 50%; transform: translateY(-50%); }
        .login-img-wrapper { position: absolute; right: 0; bottom: 0; top: 0; width: 55%; }
        .login-img-block { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 95%; height: 60%; z-index: 0; }
        .login-img-block svg { position: absolute; inset: 0; width: 100%; height: 100%; }
        .login-right-img { z-index: 1; height: 110vh; width: auto; max-width: 100%; display: block; object-fit: contain; object-position: bottom; }
        .login-slide { position: absolute; bottom: 0; right: 0; opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; pointer-events: none; }
        .login-slide.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
        .login-right-headline { font-family: 'Mango Grotesque', sans-serif; font-size: 104px; font-weight: 700; color: #1c1917; line-height: 0.88; letter-spacing: -2.5px; margin-bottom: 14px; text-transform: uppercase; }
        .typing-line { display: block; }
        .typing-char { display: inline; }
        .login-right-sub { font-size: 16px; color: #44403c; line-height: 1.6; opacity: 0.8; max-width: 260px; }
        .login-social { margin-top: 28px; }
        .login-social-label { font-size: 12px; font-weight: 700; color: #57534e; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 10px; }
        .login-social-icons { display: flex; gap: 12px; }
        .login-social-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; color: #1c1917; text-decoration: none; transition: background 0.2s, transform 0.15s; }
        .login-social-icon:hover { background: rgba(0,0,0,0.15); transform: scale(1.1); }
        .login-card { width: 100%; max-width: 380px; }
        @media (max-width: 768px) {
            .login-page { flex-direction: column; }
            .login-page-left {
                width: 100%; flex: 1; padding: 0;
                background: linear-gradient(180deg, #f7e67a 0%, #F1D24B 55%, #ffffff 55.1%);
                align-items: flex-start; justify-content: flex-start;
            }
            .login-page-right { display: none; }
            .login-card {
                max-width: 100%; width: 100%;
                display: flex; flex-direction: column; min-height: 100%;
            }
            .login-card-top {
                padding: 0 !important;
                display: flex; align-items: stretch;
            }
            .login-card-top .login-mobile-left {
                display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
                flex: 1; padding: 40px 24px; gap: 10px;
            }
            .login-mobile-tagline {
                font-size: 13px; color: #78716c; font-weight: 400; line-height: 1.5;
            }
            .login-mobile-header-social { margin-top: 4px; }
            .login-mobile-header-social .login-social-label { font-size: 9px; margin-bottom: 6px; }
            .login-mobile-header-social .login-social-icon { width: 28px; height: 28px; background: rgba(0,0,0,0.07); }
            .login-mobile-header-social .login-social-icons { gap: 8px; }
            .login-card-top .login-logo { height: 28px; }
            .login-card-top .login-mobile-photo {
                display: flex; width: 140px; flex-shrink: 0;
                overflow: visible; position: relative;
                align-items: flex-end; justify-content: center;
                align-self: flex-end; height: 70px;
            }
            .login-card-top .login-mobile-photo::before {
                content: ''; position: absolute; bottom: 0; left: 0; right: 0;
                height: 100%;
                background: linear-gradient(135deg, #8671d1 0%, #5a45b5 100%);
                z-index: 0;
            }
            .login-card-top .login-mobile-photo img {
                height: 350%; width: auto; object-fit: contain;
                object-position: bottom; display: block;
                position: relative; z-index: 2;
                filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
            }
            .login-card-body { padding: 20px 24px 20px; flex: 1; background: #fff; }
            .login-mobile-social {
                display: flex; flex-direction: column; align-items: center;
                gap: 8px; padding: 12px 24px 28px; margin-top: auto;
            }
            .login-mobile-social .login-social-label { font-size: 10px; }
            .login-mobile-social .login-social-icons { display: flex; gap: 12px; }
            .login-mobile-social .login-social-icon {
                width: 34px; height: 34px; border-radius: 50%;
                background: #f5f5f4; display: flex; align-items: center;
                justify-content: center; color: #1c1917; text-decoration: none;
            }
        }
        @media (min-width: 769px) {
            .login-mobile-tagline { display: none !important; }
            .login-mobile-sub { display: none !important; }
            .login-mobile-social { display: none !important; }
            .login-mobile-carousel { display: none !important; }
            .login-mobile-photo { display: none !important; }
            .login-mobile-left { display: contents !important; }
            .login-mobile-header-social { display: none !important; }
        }
        .login-card-top { padding: 0 0 20px; flex-shrink: 0; }
        .login-card-body { flex: 1; }
        .login-logo { height: 30px; display: block; }
        .login-title { font-size: 20px; font-weight: 800; color: #111110; margin-bottom: 4px; letter-spacing: -0.3px; }
        .login-subtitle { font-size: 13px; color: #78716c; margin-bottom: 24px; }
        .form-group { margin-bottom: 16px; }
        .form-label { display: block; font-size: 12px; font-weight: 700; color: #57534e; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
        .form-input { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e0dd; border-radius: 8px; font-size: 14px; color: #111110; outline: none; transition: border-color 0.15s, box-shadow 0.15s; background: #fafaf9; box-sizing: border-box; font-family: 'DM Sans', sans-serif; }
        .form-input:focus { border-color: var(--slap-yellow); box-shadow: 0 0 0 3px rgba(241,210,75,0.25); background: #fff; }
        .login-btn { width: 100%; padding: 12px; background: #111110; color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: background 0.15s, transform 0.1s; letter-spacing: 0.2px; font-family: 'DM Sans', sans-serif; }
        .login-btn:hover { background: #2a2a27; }
        .login-btn:active { transform: scale(0.99); }
        .login-btn:disabled { background: #a8a29e; cursor: not-allowed; }
        .login-error { font-size: 12px; color: var(--slap-orange); margin-top: 10px; text-align: center; font-weight: 600; }
        .login-error:empty { display: none; }
        .login-tabs { display: flex; gap: 4px; background: #f5f5f4; border-radius: 10px; padding: 4px; margin-bottom: 16px; }
        .tab-link { background: none; border: none; font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px 14px; border-radius: 8px; transition: all .15s; color: #78716c; flex: 1; font-family: 'DM Sans', sans-serif; }
        .tab-link.active { background: var(--slap-yellow); color: #1c1917; }
        @keyframes login-spin { to { transform: rotate(360deg); } }
        @keyframes typing-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
        .typing-cursor { display: inline-block; width: 3px; height: 0.7em; background: #1c1917; margin-left: 2px; vertical-align: baseline; animation: typing-blink 0.7s step-end infinite; }
        @keyframes check-pop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
        @keyframes check-draw { to { stroke-dashoffset: 0; } }
        .user-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: white; border: 1px solid #e2e8f0; padding: 0.35rem 0.75rem; border-radius: 2rem; font-size: 0.75rem; font-weight: 600; color: #44403c; }
        .logout-btn { background: none; border: none; color: #ef4444; font-weight: 700; font-size: 0.7rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 0.25rem; }
        .logout-btn:hover { background: #fef2f2; }
        .teacher-header-bg {
            background: linear-gradient(135deg, #8671d1 0%, #6b55c3 50%, #5a45b5 100%);
            position: relative; overflow: hidden;
        }
        .teacher-header-bg::before {
            content: ''; position: absolute; width: 300px; height: 300px;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            top: -100px; right: -50px; pointer-events: none;
        }
        .teacher-header-bg::after {
            content: ''; position: absolute; width: 200px; height: 200px;
            background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
            bottom: -60px; left: -40px; pointer-events: none;
        }
        .teacher-tab { flex: 1; padding: 0.5rem; text-align: center; font-weight: 700; font-size: 0.75rem; cursor: pointer; border: 2px solid #e7e5e4; border-radius: 0.75rem; background: white; color: #78716c; font-family: 'DM Sans', sans-serif; transition: 0.2s; }
        .teacher-tab:hover { border-color: #c4b5fd; background: #faf5ff; }
        .teacher-tab.active { background: #8671d1; color: white; border-color: #8671d1; }
        .student-card { display: flex; align-items: center; justify-content: space-between; background: white; border-radius: 0.75rem; padding: 0.75rem 1rem; cursor: pointer; transition: 0.2s; border: 1px solid #f0eef5; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
        .student-card:hover { border-color: #8671d1; background: #faf5ff; box-shadow: 0 2px 8px rgba(134,113,209,0.12); }
        .student-approved { color: #16a34a; }
        .student-pending { color: #f59e0b; }

        /* SIDEBAR */
        .app-sidebar { position: fixed; top: 0; left: 0; width: 260px; height: 100vh; background: white; border-right: 1px solid #e7e5e4; z-index: 900; display: flex; flex-direction: column; transition: transform 0.3s ease; }
        .app-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 899; }
        .app-content { margin-left: 260px; transition: margin-left 0.3s ease; }
        .sidebar-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; border-radius: 0.5rem; font-size: 0.8rem; font-weight: 600; color: #57534e; cursor: pointer; transition: 0.15s; border: none; background: none; width: 100%; text-align: left; text-decoration: none; font-family: 'DM Sans', sans-serif; }
        .sidebar-item:hover { background: #f5f3ff; color: var(--level-color, #8671d1); }
        .teacher-sidebar-nav.active { background: #f5f3ff; color: #8671d1; font-weight: 700; }
        .sidebar-toggle { display: none; position: fixed; top: 0.75rem; left: 0.75rem; z-index: 901; background: white; border: 1px solid #e7e5e4; border-radius: 0.5rem; padding: 0.4rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
        @media (max-width: 768px) {
            .app-sidebar { transform: translateX(-100%); }
            .app-sidebar.open { transform: translateX(0); }
            .app-sidebar-overlay.open { display: block; }
            .app-content { margin-left: 0; }
            .sidebar-toggle { display: flex; }
        }

/* ===== JOURNEY MAP ===== */
        .trail-bg {
            width: 100%; height: 100vh;
            background: linear-gradient(180deg, #f8f7fc 0%, #ede9fe 100%);
            position: relative; overflow: hidden;
        }
        .trail-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 24px; position: sticky; top: 0; z-index: 10;
            background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
            border-bottom: 1px solid #e9e5f5;
        }
        .trail-header-left, .trail-header-right { display: flex; align-items: center; gap: 8px; }
        .trail-header-center { flex: 1; text-align: center; }
        .trail-logo { height: 26px; }
        .trail-greeting { font-size: 20px; color: #78716c; font-weight: 500; }
        .trail-greeting strong { color: #1c1917; }
        .trail-btn-sm {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 700;
            border: 1px solid #e2e0dd; background: #fff;
            color: #44403c; cursor: pointer; font-family: 'DM Sans', sans-serif;
            transition: background 0.2s, border-color 0.2s;
        }
        .trail-btn-sm:hover { background: #f5f5f4; border-color: #d6d3d1; }
        .trail-btn-purple { background: #8671d1; color: #fff; border-color: #8671d1; }
        .trail-btn-purple:hover { background: #7561c1; }
        .trail-container {
            max-width: 100%; margin: 0 auto; padding: 0; position: relative; z-index: 1;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            height: calc(100vh - 57px); overflow: hidden;
        }
        .trail-title {
            font-family: 'Mango Grotesque', sans-serif; font-size: 92px; font-weight: 700;
            color: #1c1917; text-align: center; text-transform: uppercase; letter-spacing: -1px;
            line-height: 1; margin-bottom: 6px;
        }
        .trail-subtitle { font-size: 15px; color: #78716c; text-align: center; margin-bottom: 32px; }
        .level-scroll-wrapper {
            position: relative; width: 100%; max-width: 100%; overflow: hidden;
        }
        .level-scroll-arrow {
            position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
            width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
            background: #fff; color: #44403c;
            box-shadow: 0 2px 12px rgba(0,0,0,0.12);
            display: flex; align-items: center; justify-content: center;
            transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
            font-family: 'DM Sans', sans-serif;
        }
        .level-scroll-arrow:hover { background: #f5f3ff; box-shadow: 0 4px 20px rgba(134,113,209,0.25); }
        .level-scroll-arrow:disabled { opacity: 0; pointer-events: none; }
        .level-scroll-arrow-left { left: 12px; }
        .level-scroll-arrow-right { right: 12px; }
        .level-grid {
            display: flex; gap: 48px; overflow-x: auto; scroll-behavior: smooth;
            padding: 20px 60px 20px; scrollbar-width: none; -ms-overflow-style: none;
        }
        .level-grid::-webkit-scrollbar { display: none; }
        .level-grid > .level-card {
            border-radius: 20px; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s;
            position: relative; flex: 0 0 220px; height: 310px; min-height: 310px; max-height: 310px;
        }
        .level-grid > .level-card .jmap-snode { width: 100%; height: 100%; }
        .level-card-active {
            background: var(--card-bg); color: #fff; cursor: pointer;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }
        .level-card-active:hover {
            transform: translateY(-4px); box-shadow: 0 12px 32px rgba(134,113,209,0.3);
        }
        .level-card-locked {
            background: #fff; border: 1.5px solid #e9e5f5; cursor: default;
        }
        .level-card-locked .level-card-top,
        .level-card-locked .level-card-body,
        .level-card-locked .level-card-footer { opacity: 0.45; }
        .level-card-top {
            display: flex; flex-direction: column; align-items: center;
            padding: 8px 20px 0; position: relative; width: 100%;
        }
        .level-card-icon {
            width: 120px; height: 120px;
            display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
            overflow: hidden;
        }
        .level-card-icon img {
            width: 100%; height: 100%; object-fit: contain;
        }
        .level-card-locked .level-card-icon img { opacity: 0.5; filter: grayscale(0.4); }
        .level-card-badge {
            font-size: 10px; font-weight: 800; letter-spacing: 1px;
            background: rgba(255,255,255,0.25); padding: 4px 10px; border-radius: 20px;
        }
        .level-card-body { padding: 4px 20px 4px; text-align: center; width: 100%; }
        .level-card-name {
            font-family: 'DM Sans', sans-serif; font-size: 20px; font-weight: 800;
            display: block; line-height: 1.2; white-space: nowrap;
        }
        .level-card-active .level-card-name { color: #fff; }
        .level-card-active.level-card-light .level-card-name { color: #1a1a2e; }
        .level-card-active.level-card-light .level-card-desc { color: rgba(26,26,46,0.65); }
        .level-card-active.level-card-light .level-card-cta { color: rgba(26,26,46,0.8); }
        .level-card-active.level-card-light .level-card-badge { background: rgba(0,0,0,0.1); color: #1a1a2e; }
        .level-card-locked .level-card-name { color: #44403c; }
        .level-card-desc {
            font-size: 13px; font-weight: 500; display: block; margin-top: 2px;
        }
        .level-card-active .level-card-desc { color: rgba(255,255,255,0.75); }
        .level-card-locked .level-card-desc { color: #a8a29e; }
        .level-card-footer { padding: 4px 20px 8px; text-align: center; width: 100%; }
        .level-card-cta {
            font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
            color: rgba(255,255,255,0.9);
        }
        .level-card-lock-label { font-size: 12px; font-weight: 600; color: #a8a29e; }
        .level-card-current-tag {
            display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
            background: rgba(255,255,255,0.25); color: #fff; padding: 4px 10px; border-radius: 20px;
            margin-top: 6px;
        }
        .level-card-trophy.level-card-locked { border-color: #fef3c7; }
        @keyframes level-pulse {
            0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
            50% { transform: scale(1.04); box-shadow: 0 8px 30px rgba(0,0,0,0.18); }
        }
        .level-card-current { animation: level-pulse 2s ease-in-out infinite; }
        @keyframes wbFadeIn {
            0% { opacity: 0; transform: translateY(20px) scale(0.95); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }
        @keyframes wbCheckPop {
            0% { transform: scale(0) rotate(-45deg); opacity: 0; }
            50% { transform: scale(1.2) rotate(0deg); opacity: 1; }
            100% { transform: scale(1) rotate(0deg); opacity: 1; }
        }
        @keyframes wbCheckPulse {
            0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(67, 160, 71, 0.3); }
            50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(67, 160, 71, 0); }
        }
        .wb-check-circle {
            animation: wbCheckPulse 1.5s ease-in-out infinite;
            animation-delay: 0.6s;
        }
        .wb-check-icon {
            animation: wbCheckPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            opacity: 0;
        }
        @keyframes ltDot {
            0%, 100% { transform: scale(1); opacity: 0.4; }
            50% { transform: scale(1.5); opacity: 1; }
        }
        @keyframes ltIconBounce {
            0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
            60% { transform: scale(1.1) rotate(3deg); opacity: 1; }
            100% { transform: scale(1) rotate(0deg); opacity: 1; }
        }
        #level-transition-icon img {
            width: 100%; height: 100%; object-fit: contain;
            animation: ltIconBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }
        .level-connector { display: none; }
        .level-scroll-wrapper { position: relative; }
        .level-trail-svg {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            pointer-events: none; z-index: 0;
        }
        .level-trail-svg path { fill: none; stroke-linecap: round; }
        .level-grid { position: relative; }
        .level-grid > .level-card { position: relative; z-index: 2; }
        .jmap-snode { display: flex; flex-direction: column; justify-content: center; align-items: center; }
        .jmap-snode.jmap-current { cursor: pointer; }
        .jmap-circle { display: none; }
        .jmap-badge-active {
            font-size: 10px; font-weight: 800; color: #fff;
            background: linear-gradient(135deg, #8671d1, #a78bfa);
            padding: 4px 12px; border-radius: 20px; display: inline-block; letter-spacing: 0.5px;
        }
        @media (max-width: 768px) {
            .trail-container { min-height: calc(100vh - 57px); padding: 0; }
            .trail-title { font-size: 52px; }
            .level-grid > .level-card { flex: 0 0 190px; height: 280px; min-height: 280px; max-height: 280px; }
            .level-grid { padding: 16px 50px 16px; gap: 36px; }
        }
        @media (max-width: 480px) {
            .trail-title { font-size: 36px; }
            .level-scroll-wrapper { overflow: visible; }
            .level-scroll-arrow { display: none; }
            .level-grid {
                flex-direction: column; overflow-x: visible; overflow-y: visible;
                padding: 16px 24px; gap: 20px; align-items: center;
            }
            .level-grid > .level-card {
                flex: none; width: 100%; max-width: 280px;
                height: 180px; min-height: 180px; max-height: 180px;
            }
            .level-card-top { padding: 6px 16px 0; }
            .level-card-icon { width: 64px; height: 64px; margin-bottom: 2px; }
            .level-card-badge { font-size: 8px; padding: 3px 8px; }
            .level-card-body { padding: 2px 16px 2px; }
            .level-card-name { font-size: 17px; }
            .level-card-desc { font-size: 11px; }
            .level-card-footer { padding: 2px 16px 6px; }
            .level-card-cta { font-size: 12px; }
            .level-trail-svg { display: none; }
        }

/* ===== ACCORDION ===== */
        .accordion-item.open .accordion-content { display: block; }
        .accordion-item.open .accordion-arrow { transform: rotate(180deg); }

/* ===== JOURNEY TRAIL (STUDENT DETAIL) ===== */
        .journey-trail {
            position: relative;
            padding: 0.75rem 0 0.5rem;
        }
        .trail-line {
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 3px;
            transform: translateX(-50%);
            background: repeating-linear-gradient(to bottom, #c4b5fd 0px, #c4b5fd 6px, transparent 6px, transparent 12px);
            z-index: 0;
        }
        .trail-node {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.15rem 0;
            z-index: 1;
        }
        .trail-node.trail-left {
            margin-right: 50%;
            flex-direction: row-reverse;
            padding-right: 0;
        }
        .trail-node.trail-left .trail-label {
            text-align: right;
            align-items: flex-end;
            flex: 1;
        }
        .trail-node.trail-left .trail-circle {
            margin-right: -22px;
        }
        .trail-node.trail-right {
            margin-left: 50%;
            padding-left: 0;
        }
        .trail-node.trail-right .trail-label {
            text-align: left;
            align-items: flex-start;
            flex: 1;
        }
        .trail-node.trail-right .trail-circle {
            margin-left: -22px;
        }
        .trail-node.trail-center {
            justify-content: center;
            flex-direction: column;
            text-align: center;
            padding-top: 0.4rem;
        }
        .trail-node.trail-center .trail-label {
            align-items: center;
            margin-top: 0.25rem;
        }
        .trail-circle {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            position: relative;
            background: white;
        }
        .trail-node.current .trail-circle {
            background: linear-gradient(135deg, #8671d1, #a78bfa);
            color: white;
            box-shadow: 0 0 0 4px rgba(134,113,209,0.2), 0 4px 15px rgba(134,113,209,0.4);
        }
        .trail-node.locked .trail-circle {
            background: #ede9fe;
            color: #a8a29e;
            border: 2px dashed #d4d0ec;
        }
        .trail-circle.trail-trophy {
            background: linear-gradient(135deg, #F1D24B, #f59e0b) !important;
            color: white !important;
            border: 2px solid #F1D24B !important;
        }
        .trail-label {
            display: flex;
            flex-direction: column;
        }
        .trail-name {
            font-weight: 800;
            font-size: 0.85rem;
            color: #44403c;
            line-height: 1.2;
        }
        .trail-node.locked .trail-name { color: #a8a29e; }
        .trail-level {
            font-size: 0.65rem;
            color: #78716c;
            font-weight: 500;
        }
        .trail-node.locked .trail-level { color: #c7c5c2; }
        .trail-badge-current {
            font-size: 0.55rem;
            font-weight: 800;
            color: white;
            background: linear-gradient(135deg, #8671d1, #a78bfa);
            padding: 0.1rem 0.45rem;
            border-radius: 1rem;
            margin-top: 0.15rem;
            display: inline-block;
            width: fit-content;
            letter-spacing: 0.3px;
        }
        .pulse-glow {
            animation: pulseGlow 2s ease-in-out infinite;
        }
        @keyframes pulseGlow {
            0%, 100% { box-shadow: 0 0 0 4px rgba(134,113,209,0.2), 0 4px 15px rgba(134,113,209,0.4); }
            50% { box-shadow: 0 0 0 8px rgba(134,113,209,0.1), 0 4px 20px rgba(134,113,209,0.5); }
        }
