:root{color-scheme:light;font-family:system-ui,-apple-system,Segoe UI,Roboto,Tahoma,Arial,sans-serif;line-height:1.45;-webkit-text-size-adjust:100%;text-size-adjust:100%;--bg: #f3f6fb;--surface: #ffffff;--surface-muted: #f8fafc;--border: #e2e8f0;--text: #1f2937;--text-strong: #0f172a;--text-muted: #64748b;--primary: #2563eb;--primary-strong: #1d4ed8;--primary-soft: #eff6ff;--primary-border: #c7d2fe;--focus: #93c5fd;--topbar-h: 3.5rem;--sidebar-w: 320px;--gutter: 1.5rem;--radius: 12px;--tap: 2.5rem;--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px);--safe-right: env(safe-area-inset-right, 0px)}*,*:before,*:after{box-sizing:border-box}html{-webkit-tap-highlight-color:transparent}body{margin:0;min-height:100vh;min-height:100dvh;background:var(--bg);color:var(--text);overflow-x:hidden}body.no-scroll{overflow:hidden}img,video,iframe{max-width:100%}h1,h2,h3,h4{overflow-wrap:anywhere}:focus-visible{outline:3px solid var(--focus);outline-offset:2px}input,select,textarea{font:inherit}button{border:0;background:var(--primary);color:#fff;padding:.7rem 1rem;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;touch-action:manipulation}.app-shell.dashboard-mode{min-height:100vh;min-height:100dvh}.app-topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:.75rem;height:calc(var(--topbar-h) + var(--safe-top));padding:var(--safe-top) calc(1rem + var(--safe-right)) 0 calc(1rem + var(--safe-left));background:#ffffffeb;backdrop-filter:saturate(180%) blur(8px);-webkit-backdrop-filter:saturate(180%) blur(8px);border-bottom:1px solid var(--border)}.icon-btn{display:inline-grid;place-items:center;flex-shrink:0;width:var(--tap);height:var(--tap);padding:0;border-radius:10px;background:transparent;color:var(--text-strong)}.icon-btn:hover{background:#eef2f7}.topbar-title{flex:1;min-width:0;display:flex;align-items:baseline;gap:.75rem}.topbar-brand{font-weight:800;font-size:1.1rem;color:var(--primary-strong);letter-spacing:.01em;flex-shrink:0}.topbar-context{display:none;min-width:0}.topbar-course,.topbar-lesson{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.lang-toggle-btn{background:var(--primary-soft);color:#1e3a8a;border:1px solid #bfdbfe;border-radius:999px;min-height:var(--tap);padding:0 .9rem;font-weight:700;font-size:.9rem;line-height:1}.lang-toggle-btn:hover{background:#dbeafe}.profile-avatar-btn{width:var(--tap);height:var(--tap);padding:0;border-radius:50%;border:2px solid #bfdbfe;background:#dbeafe;color:var(--primary-strong);font-size:1rem;font-weight:700;line-height:1;display:grid;place-items:center}.profile-avatar-btn:hover{background:#bfdbfe}.profile-avatar-btn.active{border-color:var(--primary);background:var(--primary);color:#fff}.dashboard-section{position:relative}.learning-layout{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:calc(100dvh - var(--topbar-h) - var(--safe-top));transition:grid-template-columns .2s ease}.learning-layout.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}.main-column{min-width:0;background:var(--surface)}.learning-sidebar{display:flex;flex-direction:column;min-width:0;background:var(--surface);border-inline-end:1px solid var(--border);padding:1rem;position:sticky;top:calc(var(--topbar-h) + var(--safe-top));height:calc(100vh - var(--topbar-h) - var(--safe-top));height:calc(100dvh - var(--topbar-h) - var(--safe-top));overflow:hidden}.learning-sidebar.collapsed{visibility:hidden;padding:0;border:0}.sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sidebar-title{margin:0;color:var(--text-strong);font-size:1.1rem}.sidebar-close-btn{display:none}.sidebar-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.sidebar-label{display:block;margin-bottom:.4rem;color:#334155;font-size:.9rem;font-weight:600}.course-dropdown{width:100%;min-height:2.75rem;padding:.6rem .75rem;border:1px solid var(--primary-border);border-radius:10px;background:var(--primary-soft);color:#1e3a8a;font-weight:600;cursor:pointer;text-overflow:ellipsis}.course-dropdown option:disabled,.course-option-disabled{color:#94a3b8;background:#f1f5f9}.course-dropdown-locked{color:var(--text-muted);background:#f1f5f9;border-color:#cbd5e1}.sidebar-subtitle{margin:1rem 0 .6rem;color:#334155}.sidebar-sections{display:flex;flex-direction:column;gap:.5rem;flex:1;min-height:0;overflow-y:auto;padding-inline-end:.15rem;padding-bottom:calc(.5rem + var(--safe-bottom));overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.sidebar-section-btn{display:grid;flex-shrink:0;width:100%;gap:.25rem;min-height:3rem;text-align:start;background:var(--primary-soft);color:#1e3a8a;border:1px solid var(--primary-border);padding:.65rem .75rem;border-radius:10px}.sidebar-section-btn.active{background:var(--primary);color:#fff;border-color:var(--primary)}.lesson-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.sidebar-section-btn .lesson-title{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lesson-score-wrap{display:inline-flex;align-items:center;gap:.35rem;flex-shrink:0}.lesson-score-label{font-size:.75rem;font-weight:700;color:#475569}.sidebar-section-btn.active .lesson-score-label{color:#dbeafe}.score-badge{flex-shrink:0;padding:.15rem .45rem;border-radius:999px;background:#fef3c7;color:#92400e;font-size:.72rem;font-weight:700;line-height:1.2;white-space:nowrap}.sidebar-section-btn.active .score-badge{background:#fff3;color:#fff7ed}.progress-bar{display:flex;align-items:center;gap:.45rem;margin-top:.15rem}.progress-bar-track{flex:1;height:6px;border-radius:999px;background:var(--primary-border);overflow:hidden}.progress-bar-fill{height:100%;border-radius:inherit;background:var(--primary);transition:width .2s ease}.progress-bar-label{min-width:2.4rem;color:var(--text-muted);font-size:.75rem;font-weight:600;text-align:end}.sidebar-section-btn.active .progress-bar-track{background:#ffffff59}.sidebar-section-btn.active .progress-bar-fill{background:#fff}.sidebar-section-btn.active .progress-bar-label{color:#dbeafe}.learning-content,.profile-page{width:100%;max-width:1100px;margin-inline:auto;padding:var(--gutter);padding-bottom:calc(var(--gutter) + var(--safe-bottom))}.content-header h2{margin:0;font-size:clamp(1.25rem,1rem + 1.2vw,1.75rem);color:var(--text-strong)}.content-header p{margin:.2rem 0 1rem;color:var(--text-muted)}.video-frame-wrapper{position:relative;aspect-ratio:16 / 9;max-height:calc(100dvh - var(--topbar-h) - var(--safe-top) - 2rem);margin-inline:auto;border-radius:var(--radius);overflow:hidden;background:var(--text-strong)}@supports not (aspect-ratio: 16 / 9){.video-frame-wrapper{height:0;padding-top:56.25%}}.video-frame-wrapper.is-audio{aspect-ratio:auto;max-height:none;height:auto;min-height:5.5rem;display:grid;place-items:center;padding:1.25rem 1rem;background:#1e293b}.video-frame-wrapper iframe,.video-frame-wrapper video{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;border:0;object-fit:contain;background:var(--text-strong)}.video-frame-wrapper.is-audio audio{width:min(100%,36rem);position:relative;z-index:1}.video-lang-badge{position:absolute;top:.65rem;inset-inline-start:.65rem;z-index:2;background:#0f172abf;color:#fff;font-size:.75rem;font-weight:700;letter-spacing:.04em;padding:.25rem .5rem;border-radius:6px;pointer-events:none}.video-missing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:grid;place-content:center;gap:.35rem;padding:1rem;text-align:center;background:#0f172ae0;color:#f8fafc}.video-missing-overlay p{margin:0}.video-missing-hint{color:#cbd5e1;font-size:.9rem;overflow-wrap:anywhere}.video-source-path{margin:.5rem 0 0;color:var(--text-muted);font-size:.85rem;overflow-wrap:anywhere}.lesson-panel{margin-top:1rem;border:1px solid var(--border);border-radius:var(--radius);padding:1rem;background:var(--surface-muted)}.lesson-panel h3{margin-top:0}.lesson-description-empty{color:#94a3b8;margin:0}.lesson-description-text{margin:0 0 .75rem;white-space:pre-wrap;line-height:1.7;overflow-wrap:anywhere}.lesson-description-text:last-child{margin-bottom:0}.lesson-description-editor{display:grid;gap:.75rem}.lesson-description-input{width:100%;min-height:6rem;padding:.75rem .85rem;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:var(--text-strong);font:inherit;line-height:1.5;resize:vertical}.lesson-description-input:focus{outline:2px solid var(--focus);outline-offset:1px;border-color:#60a5fa}.lesson-description-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.lesson-description-save{background:var(--primary-strong);color:#fff;border:0;border-radius:8px;min-height:var(--tap);padding:.5rem .9rem;font-weight:600}.lesson-description-save:hover{background:#1e40af}.lesson-description-saved{color:#15803d;font-size:.9rem;font-weight:600}.sidebar-overlay{display:none}.profile-header{display:flex;align-items:center;gap:.9rem;margin-bottom:1.25rem}.profile-avatar{flex-shrink:0;width:3.2rem;height:3.2rem;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:var(--primary-strong);font-size:1.35rem;font-weight:700}.profile-header h2{margin:0;color:var(--text-strong)}.profile-header p{margin:.2rem 0 0;color:var(--text-muted)}.profile-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:.9rem}.profile-stat-card,.profile-review-card{min-width:0;border:1px solid var(--border);border-radius:var(--radius);padding:1rem;background:var(--surface-muted)}.profile-stat-card h3,.profile-review-card h3{margin:0 0 .45rem;font-size:.95rem;color:#334155}.profile-stat-value{margin:0 0 .55rem;font-size:1.35rem;font-weight:700;color:var(--text-strong)}.profile-review-card{margin-top:.9rem}.profile-review-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.75rem}.profile-review-header h3{margin:0}.profile-review-header button{min-height:var(--tap)}.profile-review-box{width:100%;margin-top:.85rem;padding:.85rem;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#334155;resize:vertical;font:inherit;line-height:1.5}.profile-courses{margin-top:1.25rem}.profile-section-title{margin:0 0 .75rem;font-size:1.05rem;color:var(--text-strong)}.profile-course-card{border:1px solid var(--border);border-radius:var(--radius);padding:1rem;background:#fff;margin-bottom:.9rem}.profile-course-card-disabled{background:var(--surface-muted);opacity:.55;filter:grayscale(1)}.profile-course-card-disabled .profile-course-link,.profile-course-card-disabled .profile-lesson-link,.profile-course-link.is-disabled,.profile-lesson-link.is-disabled{color:#94a3b8;pointer-events:none;cursor:not-allowed;text-decoration:none}.profile-course-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.profile-course-header>div{min-width:0}.profile-course-link{font-size:1.05rem;font-weight:700;color:var(--primary-strong);text-decoration:none;overflow-wrap:anywhere}.profile-course-meta{margin:.2rem 0 0;color:var(--text-muted);font-size:.85rem}.profile-course-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem;margin:.85rem 0}.metric-label{display:block;font-size:.78rem;font-weight:600;color:#475569}.profile-lesson-list{list-style:none;margin:0;padding:0;border-top:1px solid #eef2f7}.profile-lesson-row{display:grid;grid-template-columns:minmax(0,1.4fr) auto minmax(120px,1fr) auto;align-items:center;gap:.75rem;padding:.6rem 0;border-bottom:1px solid #eef2f7}.profile-lesson-row:last-child{border-bottom:none}.profile-lesson-link{color:#1e3a8a;font-weight:600;text-decoration:none;font-size:.92rem;min-width:0;overflow-wrap:anywhere}.profile-lesson-row .score-badge,.profile-lesson-row .status-pill{justify-self:end}.profile-lesson-progress .progress-bar{margin-top:0}.status-pill{padding:.15rem .5rem;border-radius:999px;font-size:.72rem;font-weight:700;white-space:nowrap;flex-shrink:0}.status-pill.done{background:#dcfce7;color:#166534}.status-pill.in-progress{background:#dbeafe;color:#1e40af}.status-pill.not-started{background:#f1f5f9;color:#475569}@media (hover: hover){.profile-course-link:hover,.profile-lesson-link:hover{text-decoration:underline}.sidebar-section-btn:not(.active):hover{background:#e0ecff}}@media (min-width: 961px){.topbar-context{display:none}}@media (max-width: 960px){:root{--gutter: 1.25rem;--tap: 2.75rem}.learning-layout,.learning-layout.sidebar-collapsed{grid-template-columns:minmax(0,1fr)}.learning-sidebar,.learning-sidebar.collapsed{position:fixed;top:0;bottom:0;inset-inline-start:0;z-index:70;width:min(86vw,360px);height:100%;padding:calc(.75rem + var(--safe-top)) 1rem 0;padding-inline-start:calc(1rem + var(--safe-left));border:0;box-shadow:0 10px 40px #0f172a40;transition:transform .25s ease,visibility .25s}.learning-sidebar.collapsed{transform:translate(-100%);box-shadow:none}html[dir=rtl] .learning-sidebar.collapsed{transform:translate(100%)}.sidebar-close-btn{display:inline-grid}.sidebar-overlay{display:block;position:fixed;top:0;right:0;bottom:0;left:0;z-index:65;padding:0;border:0;border-radius:0;background:#0f172a73;cursor:pointer;animation:overlay-in .2s ease}.course-dropdown,.lesson-description-input,.profile-review-box{font-size:16px}.topbar-title{gap:.6rem}.topbar-context{display:block;padding-inline-start:.6rem;border-inline-start:1px solid var(--border);line-height:1.2}.topbar-course{font-weight:700;font-size:.92rem;color:var(--text-strong)}.topbar-lesson{font-size:.78rem;color:var(--text-muted)}}@media (max-width: 600px){:root{--gutter: 1rem}.app-topbar{gap:.5rem;padding-inline:calc(.5rem + var(--safe-left)) calc(.5rem + var(--safe-right))}[dir=rtl] .app-topbar{padding-inline:calc(.5rem + var(--safe-right)) calc(.5rem + var(--safe-left))}.topbar-brand{display:none}.topbar-context{padding-inline-start:0;border:0}.lang-toggle-btn{padding:0 .7rem;font-size:.85rem}.video-frame-wrapper{margin-inline:calc(var(--gutter) * -1);border-radius:0}.content-header p{margin-bottom:.75rem}.lesson-panel{padding:.85rem}.lesson-description-save{flex:1 1 auto}.profile-header{margin-bottom:1rem}.profile-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.profile-stat-card{padding:.75rem}.profile-stat-card h3{font-size:.82rem}.profile-stat-value{font-size:1.15rem}.profile-course-card{padding:.85rem}.profile-course-metrics{grid-template-columns:1fr;gap:.6rem}.profile-lesson-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title status" "progress score";gap:.35rem .75rem;padding:.7rem 0}.profile-lesson-link{grid-area:title;font-size:.95rem;padding-block:.15rem}.profile-lesson-row .status-pill{grid-area:status}.profile-lesson-progress{grid-area:progress}.profile-lesson-row .score-badge{grid-area:score}}@media (max-width: 360px){.profile-stats{grid-template-columns:1fr}.profile-course-header{flex-direction:column}}@media (max-height: 500px) and (orientation: landscape){:root{--topbar-h: 3rem}}@keyframes overlay-in{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}.auth-screen{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:calc(1.5rem + var(--safe-top)) 1rem calc(1.5rem + var(--safe-bottom));background:var(--bg);color:var(--text)}.auth-card{width:min(100%,400px);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.75rem;box-shadow:0 10px 30px #0f172a0f;display:flex;flex-direction:column;gap:.9rem}.auth-card-top{display:flex;align-items:center;justify-content:space-between;gap:1rem}.auth-title{margin:0;font-size:1.5rem;color:var(--text-strong)}.auth-muted{margin:0;color:var(--text-muted)}.auth-label{display:flex;flex-direction:column;gap:.35rem;font-weight:600;font-size:.92rem}.auth-input{font:inherit;font-weight:400;min-height:2.75rem;padding:.6rem .75rem;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:var(--text)}.auth-input:focus{outline:3px solid var(--focus);outline-offset:1px;border-color:var(--primary)}.auth-error{margin:0;color:#b42318;font-size:.92rem}.auth-submit{font:inherit;font-weight:700;min-height:2.75rem;border:0;border-radius:10px;background:var(--primary);color:#fff;cursor:pointer}.auth-submit:hover{background:var(--primary-strong)}.auth-submit:disabled{opacity:.6;cursor:default}.status-screen-actions{display:flex;gap:.5rem;justify-content:center;margin-top:.75rem}.signout-btn{background:transparent;color:var(--text-muted);border:1px solid var(--border);border-radius:999px;min-height:var(--tap);padding:0 .85rem;font-weight:600;font-size:.85rem}.signout-btn:hover{color:var(--text-strong);background:var(--surface-muted)}.practice-link{display:inline-flex;align-items:center;gap:.4rem;align-self:flex-start;min-height:var(--tap);padding:0 1rem;border-radius:999px;background:var(--primary);color:#fff;font-weight:700;text-decoration:none}.practice-link:hover{background:var(--primary-strong)}
