/* EDUBAY · app học trên điện thoại (/hoc/). Ưu tiên một tay cầm: nút lớn, chữ rõ, thanh tab dưới đáy. */
@font-face{font-family:"Plus Jakarta Sans";src:url(../brand/PlusJakartaSans-vi.woff2?v=2) format("woff2");font-weight:200 800;font-display:swap}
:root{--ink:#101828;--ink2:#1D2939;--fg:#101828;--fg2:#475467;--o:#F2551D;--o-d:#C4320A;--o-l:#FFF1EB;--bg:#F3F5F8;--card:#fff;--card2:#F9FAFB;--line:#EAECF0;--mute:#667085;--faint:#98A2B3;--ok:#079455;--ok-l:#ECFDF3;--btn:#101828;--btn-fg:#fff;--hero:#101828;--glass:rgba(255,255,255,.9);--press:#F2F4F7;--warn-l:#FFFAEB;--r:18px;--tab:64px;--sb:env(safe-area-inset-bottom,0px);--st:env(safe-area-inset-top,0px);
 --orange:#F2551D;--orange-2:#FF6A33;--accent:#F2551D;--deep:#1D2939;--line-2:#D0D5DD;--muted:#667085;--paper:#F2F4F7;--white:#fff;--sage-soft:#EAECF0;--sh-2:0 1px 3px rgba(16,24,40,.08),0 12px 32px -14px rgba(16,24,40,.22);--ease:cubic-bezier(.2,.7,.2,1);--ease-out:cubic-bezier(.16,1,.3,1);--focus:#101828;color-scheme:light}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--fg:#F2F4F7;--fg2:#D0D5DD;--o-d:#FF8A5B;--o-l:rgba(242,85,29,.16);--bg:#0B1220;--card:#151F31;--card2:#1B2638;--line:#243045;--mute:#98A2B3;--faint:#667085;--ok:#47CD89;--ok-l:rgba(71,205,137,.14);--btn:#F2F4F7;--btn-fg:#101828;--hero:#1B2638;--glass:rgba(16,24,40,.86);--press:#1B2638;--warn-l:rgba(247,144,9,.14);color-scheme:dark}}
:root[data-theme=dark]{--fg:#F2F4F7;--fg2:#D0D5DD;--o-d:#FF8A5B;--o-l:rgba(242,85,29,.16);--bg:#0B1220;--card:#151F31;--card2:#1B2638;--line:#243045;--mute:#98A2B3;--faint:#667085;--ok:#47CD89;--ok-l:rgba(71,205,137,.14);--btn:#F2F4F7;--btn-fg:#101828;--hero:#1B2638;--glass:rgba(16,24,40,.86);--press:#1B2638;--warn-l:rgba(247,144,9,.14);color-scheme:dark}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg)}
body{margin:0;font:400 16px/1.5 "Plus Jakarta Sans",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--fg);background:var(--bg);-webkit-tap-highlight-color:transparent;overscroll-behavior-y:contain}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
h1,h2,h3,p{margin:0}
h1,h2{text-wrap:balance;letter-spacing:-.02em}
.i{width:22px;height:22px;flex:none}
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.eba-skip{position:absolute;left:12px;top:-60px;z-index:50;background:var(--ink);color:#fff;padding:10px 14px;border-radius:10px}
.eba-skip:focus{top:calc(var(--st) + 10px)}
:focus-visible{outline:3px solid var(--o);outline-offset:2px;border-radius:10px}

.eba-main{max-width:600px;margin:0 auto;padding:calc(var(--st) + 14px) 16px calc(var(--tab) + var(--sb) + 28px);display:flex;flex-direction:column;gap:14px}
.eba-muted{color:var(--mute);font-size:14px}
.eba-card{background:var(--card);border-radius:var(--r);padding:16px;box-shadow:0 1px 2px rgba(16,24,40,.05)}

/* Nút */
.eba-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 18px;border:0;border-radius:14px;background:var(--btn);color:var(--btn-fg);font-weight:700;font-size:16px;cursor:pointer;transition:transform .12s,background-color .15s}
.eba-btn:active{transform:scale(.98)}
.eba-btn--lg{min-height:54px;font-size:16.5px}
.eba-btn--sm{min-height:38px;padding:8px 14px;font-size:14px;border-radius:12px}
.eba-btn--ghost{background:var(--card);color:var(--fg);box-shadow:inset 0 0 0 1.5px var(--line)}
.eba-btn .i{width:20px;height:20px}
.eba-wide{width:100%}
.eba-clamp span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.eba-link{display:inline-flex;align-items:center;gap:8px;font-weight:600;color:var(--o-d);padding:10px 0}
.eba-link .i{width:18px;height:18px}
.eba-link--center{align-self:center}

/* Đầu màn hình */
.eba-top{display:flex;align-items:center;gap:10px;padding:4px 0 2px}
.eba-top h1{font-size:27px;font-weight:800;line-height:1.2}
.eba-top p{color:var(--mute);font-size:14px}
.eba-back{display:grid;place-items:center;width:42px;height:42px;margin-left:-6px;border-radius:50%;flex:none}
.eba-back:active{background:var(--line)}
.eba--course .eba-top h1{font-size:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.eba-hello{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 0}
.eba-hello p{color:var(--mute);font-size:15px}
.eba-hello h1{font-size:28px;font-weight:800;line-height:1.15}
.eba-avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;overflow:hidden;background:var(--ink);color:#fff;font-weight:700;font-size:17px}
.eba-avatar img{width:100%;height:100%;object-fit:cover}
.eba-avatar--lg{width:60px;height:60px;font-size:22px}

/* Cảnh báo */
.eba-alert{display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:16px;background:var(--o-l);color:var(--fg)}
.eba-alert>.i:first-child{color:var(--o-d)}
.eba-alert span{flex:1;min-width:0;display:flex;flex-direction:column}
.eba-alert b{font-size:15px}
.eba-alert small{color:var(--mute);font-size:13px}
.eba-alert--warn{background:var(--warn-l)}
.eba-alert--warn>.i:first-child{color:#B54708}

/* Học tiếp */
.eba-resume{background:var(--hero);color:#fff;border-radius:22px;overflow:hidden;box-shadow:0 18px 40px -22px rgba(16,24,40,.6)}
.eba-resume-cover{position:relative;display:block;aspect-ratio:16/9;overflow:hidden}
.eba-resume-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.eba-resume-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,var(--hero))}
.eba-play{position:absolute;z-index:1;right:14px;bottom:10px;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--o);color:#fff;box-shadow:0 0 0 8px rgba(242,85,29,.25)}
.eba-play .i{width:26px;height:26px;margin-left:3px}
.eba-resume-body{padding:2px 16px 16px;display:flex;flex-direction:column;gap:6px}
.eba-resume-body small{color:#FDB59A;font-weight:700;font-size:13px;letter-spacing:.02em}
.eba-resume-body h2{font-size:21px;font-weight:800;line-height:1.25}
.eba-resume-body p{color:rgba(255,255,255,.68);font-size:14px}
.eba-resume .eba-btn{margin-top:8px;background:var(--o)}
.eba-resume .eba-bar small,.eba-resume .eba-bar b{color:rgba(255,255,255,.8)}
.eba-resume .eba-bar span{background:rgba(255,255,255,.16)}

/* Thanh tiến độ */
.eba-bar{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 10px;margin-top:4px}
.eba-bar span{height:8px;border-radius:9px;background:var(--line);overflow:hidden}
.eba-bar i{display:block;height:100%;border-radius:inherit;background:var(--o);min-width:4px}
.eba-bar b{font-size:13px}
.eba-bar small{grid-column:1/-1;color:var(--mute);font-size:12.5px}

/* Tuần này */
.eba-week-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.eba-week h2{font-size:17px;font-weight:800}
.eba-streak{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:700;color:var(--mute);background:var(--bg);padding:5px 10px;border-radius:99px}
.eba-streak .i{width:16px;height:16px}
.eba-streak.is-on{color:var(--o-d);background:var(--o-l)}
.eba-days{list-style:none;margin:0 0 12px;padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;text-align:center}
.eba-days i{display:grid;place-items:center;width:100%;max-width:38px;aspect-ratio:1;margin:0 auto 4px;border-radius:50%;background:var(--bg);box-shadow:inset 0 0 0 1.5px var(--line)}
.eba-days .i{width:18px;height:18px;stroke-width:3}
.eba-days .on i{background:var(--o);color:#fff;box-shadow:none}
.eba-days .today i{box-shadow:inset 0 0 0 2px var(--fg)}
.eba-days .today.on i{box-shadow:0 0 0 3px var(--o-l)}
.eba-days span{font-size:12px;color:var(--mute);font-weight:600}
.eba-days .today span{color:var(--fg)}

/* Danh sách khóa */
.eba-sec{display:flex;align-items:baseline;justify-content:space-between;margin-top:8px}
.eba-sec h2{font-size:18px;font-weight:800}
.eba-sec a{font-size:14px;font-weight:600;color:var(--o-d);padding:6px 0}
.eba-list{display:flex;flex-direction:column;gap:10px}
.eba-crow{display:flex;align-items:center;gap:12px;background:var(--card);border-radius:var(--r);padding:10px 10px 10px 10px;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.eba-crow:active{background:var(--press)}
.eba-crow img{width:92px;height:58px;aspect-ratio:auto;object-fit:cover;border-radius:12px;flex:none}
.eba-crow-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.eba-crow strong{font-size:15px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.eba-crow small{color:var(--mute);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eba-crow>.i{color:var(--faint);width:20px;height:20px}
.eba-crow .eba-bar small{display:none}

.eba-start h2{font-size:19px;font-weight:800;margin-bottom:6px}
.eba-start p{color:var(--mute);margin-bottom:14px}
.eba-start{display:flex;flex-direction:column}

/* Trang khóa */
.eba-chero{background:var(--card);border-radius:22px;overflow:hidden;display:flex;flex-direction:column;gap:12px;padding-bottom:16px;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.eba-chero>img{aspect-ratio:16/8;height:auto;object-fit:cover;width:100%}
.eba-chero-body{display:flex;align-items:center;gap:14px;padding:0 16px}
.eba-chero-body strong{display:block;font-size:17px}
.eba-chero-body small{color:var(--mute);font-size:13.5px}
.eba-chero .eba-btn{width:auto;margin:0 16px}
.eba-ring{--p:0;flex:none;display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:conic-gradient(var(--o) calc(var(--p)*1%),var(--line) 0)}
.eba-ring b{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:var(--card);font-size:14px}

.eba-ch{background:var(--card);border-radius:var(--r);overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.05);interpolate-size:allow-keywords}
.eba-ch summary{list-style:none;display:flex;align-items:center;gap:10px;padding:15px 16px;cursor:pointer;min-height:56px}
.eba-ch summary::-webkit-details-marker{display:none}
.eba-ch summary>span{flex:1;min-width:0;display:flex;flex-direction:column}
.eba-ch summary strong{font-size:15.5px;line-height:1.3}
.eba-ch summary small{color:var(--mute);font-size:13px}
.eba-ch summary>.i{color:var(--faint);transition:rotate .2s}
.eba-ch[open] summary>.i{rotate:180deg}
.eba-ch-ok{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--ok);color:#fff}
.eba-ch-ok .i{width:14px;height:14px;stroke-width:3}
.eba-ch::details-content{height:0;overflow:clip;transition:height .25s,content-visibility .25s allow-discrete}
.eba-ch[open]::details-content{height:auto}
.eba-lessons{list-style:none;margin:0;padding:0 0 6px;border-top:1px solid var(--line)}
.eba-lessons a,.eba-lessons .row{display:flex;align-items:center;gap:12px;padding:12px 16px;min-height:60px}
.eba-lessons a:active{background:var(--press)}
.eba-lessons .st{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;flex:none;background:var(--bg);font-size:12.5px;font-weight:700;color:var(--mute)}
.eba-lessons .st em{font-style:normal}
.eba-lessons .st .i{width:16px;height:16px}
.eba-lessons .t{flex:1;min-width:0;display:flex;flex-direction:column}
.eba-lessons .t strong{font-size:15px;font-weight:600;line-height:1.35}
.eba-lessons .t small{color:var(--mute);font-size:12.5px}
.eba-lessons a>.i{color:var(--faint);width:18px;height:18px}
.eba-lessons .done .st{background:var(--ok-l);color:var(--ok)}
.eba-lessons .done .st .i{stroke-width:3}
.eba-lessons .done .t strong{color:var(--fg2)}
.eba-lessons .cur{background:var(--o-l)}
.eba-lessons .cur .st{background:var(--o);color:#fff}
.eba-lessons .cur small{color:var(--o-d);font-weight:600}
.eba-lessons .locked{opacity:.55}

/* Tôi */
.eba-me{display:flex;align-items:center;gap:14px}
.eba-me strong{display:block;font-size:18px}
.eba-me small{color:var(--mute);font-size:14px;word-break:break-all}
.eba-stats{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.eba-stats li{background:var(--card);border-radius:16px;padding:12px;text-align:center;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.eba-stats b{display:block;font-size:22px;font-weight:800}
.eba-stats span{font-size:12.5px;color:var(--mute)}
.eba-menu{background:var(--card);border-radius:var(--r);overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.eba-menu>a,.eba-menu>button{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;min-height:54px;background:none;border:0;text-align:left;cursor:pointer;font-size:15.5px;font-weight:600}
.eba-menu>*+*{border-top:1px solid var(--line)}
.eba-menu>a:active,.eba-menu>button:active{background:var(--press)}
.eba-menu span{flex:1;min-width:0;display:flex;flex-direction:column}
.eba-menu small{color:var(--mute);font-weight:400;font-size:13px}
.eba-menu .i:first-child{color:var(--mute)}
.eba-menu .i:last-child{color:var(--faint);width:18px;height:18px}
.eba-menu--danger a{color:#B42318}
.eba-menu--danger .i:first-child{color:#B42318}
.eba-ver{text-align:center;margin-top:4px}

/* Thanh tab */
.eba-tabs{position:fixed;z-index:30;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(3,1fr);padding:0 max(8px,env(safe-area-inset-left)) var(--sb);background:var(--glass);-webkit-backdrop-filter:saturate(1.8) blur(18px);backdrop-filter:saturate(1.8) blur(18px);border-top:1px solid var(--line)}
.eba-tabs a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:var(--tab);font-size:12.5px;font-weight:600;color:var(--faint)}
.eba-tabs a[aria-current]{color:var(--fg)}
.eba-tabs a[aria-current] .i{color:var(--o)}
.eba-tabs a:active .i{scale:.9}

/* Gợi ý cài app */
.eba-install{position:fixed;z-index:31;left:12px;right:12px;bottom:calc(var(--tab) + var(--sb) + 10px);max-width:576px;margin:0 auto;display:flex;align-items:center;gap:12px;padding:12px;background:var(--card);border-radius:18px;box-shadow:0 20px 40px -12px rgba(16,24,40,.35),0 0 0 1px var(--line)}
.eba-install[hidden]{display:none}
.eba-install-ic img{border-radius:11px}
.eba-install>div{flex:1;min-width:0;display:flex;flex-direction:column}
.eba-install strong{font-size:14.5px;line-height:1.3}
.eba-install span{font-size:12.5px;color:var(--mute)}
.eba-x{display:grid;place-items:center;width:32px;height:32px;border:0;background:none;border-radius:50%;color:var(--mute);cursor:pointer;margin:-6px -4px -6px -6px}
.eba-x .i{width:18px;height:18px}
.eba-guest .eba-install,.eba--offline .eba-install{bottom:calc(var(--sb) + 12px)}

.eba-sheet{border:0;background:var(--card);color:var(--fg);overflow-y:auto;overscroll-behavior:contain;border-radius:24px 24px 0 0;padding:22px 20px calc(18px + var(--sb));margin:auto 0 0;width:100%;max-width:100%;max-height:90dvh;box-shadow:0 -10px 40px rgba(16,24,40,.25)}
.eba-sheet::backdrop{background:rgba(16,24,40,.45)}
.eba-sheet h2{font-size:20px;font-weight:800;margin-bottom:12px}
.eba-sheet>ol{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:12px}
.eba-sheet>ol>li{display:flex;align-items:center;gap:10px;font-size:15.5px;line-height:1.4;flex-wrap:wrap}
.eba-sheet>ol>li .i{width:20px;height:20px;color:#0A84FF}
.eba-sheet>ol .n{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--ink);color:#fff;font-size:13px;font-weight:700;flex:none}
.eba-sheet p{margin-bottom:14px}
@media (min-width:640px){.eba-sheet{border-radius:24px;margin:auto;max-width:440px}}

/* Khách / ngoại tuyến */
.eba-guest{min-height:100dvh;justify-content:center;padding-bottom:calc(var(--sb) + 28px)}
.eba-guest-in{display:flex;flex-direction:column;gap:12px;text-align:center;align-items:center;padding:20px 6px}
.eba-logo{margin-bottom:22px}
.eba-guest h1{font-size:30px;font-weight:800;line-height:1.15}
.eba-guest p{color:var(--mute);margin-bottom:12px;max-width:34ch}
.eba-center{min-height:100dvh;justify-content:center}
.eba-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:28px 18px}
.eba-empty>.i{width:44px;height:44px;color:var(--mute)}
.eba-empty h1,.eba-empty h2{font-size:21px;font-weight:800}
.eba-empty p{color:var(--mute);max-width:36ch}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* ======================================================================
 * Bản cao cấp (giai đoạn 1): cỡ chữ, chuyển màn mượt, phòng học, chúc mừng, hướng dẫn lần đầu
 * ==================================================================== */

/* Cỡ chữ: phóng to phần nội dung và thanh điều khiển (không phóng trình phát video). */
html[data-size=l] :is(.eba-main,.eba-z,.eba-tabs,.eba-sheet>*,.eba-onb-in,.eba-done-in,.eba-ltop){zoom:1.12}
html[data-size=xl] :is(.eba-main,.eba-z,.eba-tabs,.eba-sheet>*,.eba-onb-in,.eba-done-in,.eba-ltop){zoom:1.25}

/* Chuyển màn mượt giữa các màn của app (Chrome, Safari 18+). Thanh tab đứng yên. */
@view-transition{navigation:auto}
::view-transition-old(root){animation:eba-out .16s ease both}
::view-transition-new(root){animation:eba-in .22s cubic-bezier(.16,1,.3,1) both}
.eba-tabs{view-transition-name:eba-tabs}
@keyframes eba-out{to{opacity:0}}
@keyframes eba-in{from{opacity:0;transform:translateY(6px)}}
@media (prefers-reduced-motion:reduce){@view-transition{navigation:none}}

.eba-btn--hot{background:var(--o);color:#fff}
.eba-btn--hot:active{background:var(--o-d)}
.eba-btn--ghost-d{background:transparent;color:var(--mute);min-height:44px;font-weight:600}
.eba-btn[aria-busy=true]{opacity:.7}
.eba-grow{flex:1;min-width:0}
.eba-ic-btn{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;background:none;color:inherit;cursor:pointer;flex:none}
.eba-ic-btn:active{background:var(--press)}
.eba-ic-btn--box{width:54px;height:54px;border-radius:14px;background:var(--card2);box-shadow:inset 0 0 0 1.5px var(--line)}
.eba-ch summary{-webkit-user-select:none;user-select:none}

/* ---------- Phòng học ---------- */
.eba--lesson{background:var(--card)}
.eba-lhead{position:sticky;top:0;z-index:20;background:var(--card);padding-top:var(--st)}
.has-video .eba-lhead{background:#0B1220;color:#fff}
.eba-ltop{display:flex;align-items:center;gap:6px;height:54px;padding:0 6px;max-width:900px;margin:0 auto}
.has-video .eba-ltop .eba-ic-btn:active{background:rgba(255,255,255,.12)}
.eba-ltop-t{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.eba-ltop-t strong{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eba-ltop-t small{font-size:12px;opacity:.7}
.eba-stage{max-width:900px;margin:0 auto}
.eba-stage .ebp{border-radius:0}
.eba-lmain{max-width:720px;margin:0 auto;padding:18px 16px calc(96px + var(--sb));display:flex;flex-direction:column;gap:14px}
.eba-lhd small{display:block;font-size:12.5px;font-weight:700;letter-spacing:.03em;color:var(--o-d);text-transform:uppercase;margin-bottom:4px}
.eba-lhd h1{font-size:24px;font-weight:800;line-height:1.25}
.eba-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.eba-chips span{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;color:var(--mute);background:var(--card2);padding:5px 10px;border-radius:99px}
.eba-chips span[hidden]{display:none}
.eba-chips .i{width:15px;height:15px}
.eba-chips .ok{color:var(--ok);background:var(--ok-l)}

.eba-seg{position:sticky;top:calc(var(--st) + 54px);z-index:5;display:flex;gap:4px;padding:4px;margin:0 -4px;background:var(--card2);border-radius:14px;overflow-x:auto;scrollbar-width:none}
.has-video .eba-seg{top:var(--st)}
.has-video .eba-lhead{position:relative}
.eba-stage .ebp-tools{margin:8px 12px 10px;max-width:none}
.eba-seg::-webkit-scrollbar{display:none}
.eba-seg button{flex:1 0 auto;min-height:42px;padding:0 9px;border:0;border-radius:11px;background:none;font-weight:700;font-size:14.5px;color:var(--mute);cursor:pointer;white-space:nowrap}
.eba-seg button[aria-selected=true]{background:var(--card);color:var(--fg);box-shadow:0 1px 3px rgba(16,24,40,.12)}
.eba-seg b{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:10px;background:var(--o-l);color:var(--o-d);font-size:12px;margin-left:2px}
.eba-panel{display:flex;flex-direction:column;gap:12px}
.eba-panel[hidden]{display:none}

.eba-prose{font-size:17px;line-height:1.7;color:var(--fg)}
.eba-prose>*{margin:0 0 .9em}
.eba-prose h2{font-size:21px;font-weight:800;margin-top:1.3em;line-height:1.3}
.eba-prose h3{font-size:18px;font-weight:800;margin-top:1.2em}
.eba-prose ul,.eba-prose ol{padding-left:1.3em}
.eba-prose li{margin:.3em 0}
.eba-prose li::marker{color:var(--o)}
.eba-prose a{color:var(--o-d);text-decoration:underline;text-underline-offset:3px}
.eba-prose img{border-radius:12px}
.eba-prose blockquote{margin:0 0 1em;padding:12px 14px;border-left:4px solid var(--o);background:var(--card2);border-radius:0 12px 12px 0}
.eba-prose code{font-size:.92em;background:var(--card2);padding:2px 6px;border-radius:6px}
.eba-prose pre{overflow-x:auto;background:var(--card2);padding:12px;border-radius:12px;font-size:14px}

.eba-say{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 14px;border:0;border-radius:99px;background:var(--o-l);color:var(--o-d);font-weight:700;font-size:14.5px;cursor:pointer}
.eba-say .i{width:19px;height:19px}
.eba-say.on{background:var(--o);color:#fff}
.eba-say[hidden]{display:none}
.eba-example{padding:14px;border-radius:16px;background:var(--o-l)}
.eba-example small{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--o-d);margin-bottom:4px}
.eba-example .i{width:16px;height:16px}
.eba-example p{font-size:16px;line-height:1.6}
.eba-next-step{display:flex;align-items:center;gap:12px;width:100%;padding:14px;border:0;border-radius:16px;background:var(--card2);box-shadow:inset 0 0 0 1.5px var(--line);text-align:left;cursor:pointer}
.eba-next-step span{flex:1;display:flex;flex-direction:column}
.eba-next-step b{font-size:16px}
.eba-next-step small{color:var(--mute);font-size:13.5px}
.eba-next-step>.i:first-child{color:var(--o)}
.eba-next-step>.i:last-child{color:var(--faint)}
.eba-q{font-size:16.5px;font-weight:700;line-height:1.45}
.eba-area{width:100%;min-height:150px;padding:14px;border:1.5px solid var(--line);border-radius:14px;background:var(--card2);color:var(--fg);font-family:inherit;font-size:16px;line-height:1.6;resize:vertical;field-sizing:content}
.eba-area:focus{outline:none;border-color:var(--o);box-shadow:0 0 0 4px var(--o-l)}
.eba-hint{font-size:14px;color:var(--mute);line-height:1.55}
.eba-save{font-size:13px;color:var(--mute);text-align:center;padding:4px 0}
.eba-save.ok{color:var(--ok)}
.eba-save.err{color:#D92D20}
.ebp-marks{display:flex;flex-direction:column;gap:6px}

.eba-lbar{position:fixed;z-index:30;left:0;right:0;bottom:0;display:flex;gap:10px;padding:10px 14px calc(10px + var(--sb));background:var(--glass);-webkit-backdrop-filter:saturate(1.8) blur(18px);backdrop-filter:saturate(1.8) blur(18px);border-top:1px solid var(--line)}
.eba-lbar>*{max-width:720px}
.eba-lbar .eba-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eba-locked{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:26px 18px;background:var(--card2)}
.eba-locked>.i{width:40px;height:40px;color:var(--mute)}
.eba-locked h2{font-size:19px;font-weight:800}
.eba-locked p{color:var(--mute)}

/* ---------- Bảng trượt ---------- */
.eba-sheet{transition:translate .28s cubic-bezier(.16,1,.3,1),overlay .28s allow-discrete,display .28s allow-discrete}
.eba-sheet[open]{translate:0 0}
@starting-style{.eba-sheet[open]{translate:0 100%}}
.eba-sheet-hd{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.eba-sheet-hd h2{font-size:19px;font-weight:800;margin:0;line-height:1.3}
.eba-sheet-hd .eba-ic-btn{margin-right:-8px;background:var(--card2)}
.eba-sheet--list{padding-left:0;padding-right:0;max-height:85dvh;display:none;flex-direction:column;overflow:hidden}
.eba-sheet--list .eba-sheet-scroll{flex:1;min-height:0}
.eba-sheet--list[open]{display:flex}
.eba-sheet--list .eba-sheet-hd,.eba-sheet--list>.eba-bar{padding:0 18px}
.eba-sheet--list>.eba-bar{margin-bottom:12px}
.eba-sheet-scroll{overflow-y:auto;overscroll-behavior:contain;padding:0 12px;display:flex;flex-direction:column;gap:10px}
.eba-sheet-scroll .eba-ch{background:var(--card2);box-shadow:none}
.eba-lessons .here{background:var(--o-l)}
.eba-lessons .here .st{background:var(--o);color:#fff}
.eba-lessons .here.done .st{background:var(--ok);color:#fff}
.eba-sheet::before{content:"";display:block;width:40px;height:5px;border-radius:3px;background:var(--line);margin:-10px auto 14px}

.eba-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:6px 0 16px}
.eba-choice button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:76px;padding:8px;border:0;border-radius:14px;background:var(--card2);box-shadow:inset 0 0 0 1.5px var(--line);font-weight:700;font-size:14px;cursor:pointer;color:var(--fg)}
.eba-choice button[aria-checked=true]{box-shadow:inset 0 0 0 2.5px var(--o);background:var(--o-l)}
.eba-choice .aa{font-weight:800;line-height:1}
.eba-choice .i{width:24px;height:24px}

/* ---------- Chúc mừng ---------- */
.eba-done{border:0;padding:0;margin:0;width:100%;max-width:100%;height:100%;max-height:100%;background:#101828;color:#fff}
.eba-done::backdrop{background:#101828}
.eba-done[open]{animation:eba-pop .35s cubic-bezier(.16,1,.3,1)}
@keyframes eba-pop{from{opacity:0;transform:scale(.96)}}
.eba-done-in{min-height:100%;max-width:480px;margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:calc(var(--st) + 48px) 22px calc(var(--sb) + 22px)}
.eba-done-ic{display:grid;place-items:center;width:96px;height:96px;border-radius:50%;background:var(--o);box-shadow:0 0 0 12px rgba(242,85,29,.18),0 0 0 26px rgba(242,85,29,.07);margin-bottom:14px}
.eba-done-ic .i{width:48px;height:48px;stroke-width:3}
.eba-done[open] .eba-done-ic{animation:eba-ring .6s .1s cubic-bezier(.34,1.56,.64,1) both}
@keyframes eba-ring{from{transform:scale(.4);opacity:0}}
.eba-done h2{font-size:27px;font-weight:800}
.eba-done p{color:#D0D5DD;font-size:15.5px;max-width:32ch}
.eba-done-stats{list-style:none;margin:8px 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
.eba-done-stats li{background:rgba(255,255,255,.07);border-radius:16px;padding:12px 6px}
.eba-done-stats b{display:block;font-size:24px;font-weight:800}
.eba-done-stats span{font-size:12.5px;color:#D0D5DD}
.eba-done-next{width:100%;text-align:left;background:rgba(255,255,255,.06);border-radius:16px;padding:12px 14px}
.eba-done-next small{color:#FDB59A;font-size:12.5px;font-weight:700}
.eba-done-next strong{display:block;font-size:16px;line-height:1.35}
.eba-done-acts{margin-top:auto;width:100%;display:flex;flex-direction:column;gap:4px;padding-top:12px}
.eba-done .eba-btn--ghost-d{color:#D0D5DD}
.eba-count i{font-style:normal;font-weight:600;opacity:.85;min-width:2.2em;text-align:left}
.eba-count i:empty{display:none}

/* ---------- Hướng dẫn lần đầu ---------- */
.eba-onb{border:0;padding:0;margin:0;width:100%;max-width:100%;height:100%;max-height:100%;background:var(--bg);color:var(--fg)}
.eba-onb::backdrop{background:var(--bg)}
.eba-onb-in{min-height:100%;max-width:480px;margin:0 auto;display:flex;flex-direction:column;gap:14px;padding:calc(var(--st) + 26px) 20px calc(var(--sb) + 18px)}
.eba-onb-dots{list-style:none;margin:0 0 10px;padding:0;display:flex;gap:6px}
.eba-onb-dots li{flex:1;height:5px;border-radius:3px;background:var(--line);transition:background-color .3s}
.eba-onb-dots li.on{background:var(--o)}
.eba-onb section{display:flex;flex-direction:column;gap:12px}
.eba-onb section[hidden]{display:none}
.eba-onb h2{font-size:28px;font-weight:800;line-height:1.2}
.eba-onb p{color:var(--mute);font-size:16.5px;line-height:1.55}
.eba-onb-logo{border-radius:18px}
.eba-onb-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.eba-onb-list li{display:flex;gap:14px;align-items:flex-start;background:var(--card);border-radius:16px;padding:14px}
.eba-onb-list .i{width:26px;height:26px;color:var(--o);margin-top:2px}
.eba-onb-list span{display:flex;flex-direction:column;font-size:15px;color:var(--mute);line-height:1.45}
.eba-onb-list b{font-size:16.5px;color:var(--fg)}
.eba-onb-preview{background:var(--card);border-radius:16px;padding:16px;font-size:17px;line-height:1.55}
html[data-size=l] .eba-onb-preview{font-size:19px}
html[data-size=xl] .eba-onb-preview{font-size:21.5px}
.eba-onb-big{display:grid;place-items:center;width:84px;height:84px;border-radius:26px;background:var(--o);color:#fff}
.eba-onb-big .i{width:40px;height:40px;margin-left:4px}
.eba-onb-acts{margin-top:auto;display:flex;flex-direction:column;gap:6px;padding-top:12px}
.eba-onb-acts .eba-btn--ghost{box-shadow:none;background:transparent;color:var(--mute)}

@media (min-width:760px){.eba-lmain{padding-bottom:calc(110px + var(--sb))}.eba-lbar{justify-content:center}}
@media (prefers-reduced-motion:reduce){.eba-sheet{transition:none}}
.eba--lesson .ebp-frame.is-mini{inset:auto 12px calc(88px + var(--sb)) auto;width:min(230px,58vw)}

/* ======================================================================
 * Giai đoạn 2: mục tiêu ngày, huy hiệu, tìm bài, chương vừa xong
 * ==================================================================== */
.eba-goal{display:flex;align-items:center;gap:16px}
.eba-goal-ring{--p:0;flex:none;display:grid;place-items:center;width:78px;height:78px;border-radius:50%;background:conic-gradient(var(--o) calc(var(--p)*1%),var(--line) 0);transition:--p .6s}
.eba-goal-ring b{display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:var(--card);font-size:22px;font-weight:800;line-height:1}
.eba-goal-ring small{font-size:12px;font-weight:600;color:var(--mute)}
.eba-goal-ring.is-met{background:var(--ok)}
.eba-goal-ring.is-met b{color:var(--ok)}
.eba-goal-ring .i{width:30px;height:30px;stroke-width:3}
.eba-goal-t{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.eba-goal-t h2{font-size:17px;font-weight:800}
.eba-goal-t p{color:var(--mute);font-size:14px;line-height:1.45}
.eba-mini-link{border:0;background:none;padding:6px 0 0;color:var(--o-d);font-weight:700;font-size:14px;cursor:pointer}
.eba-days .met i{box-shadow:0 0 0 3px var(--ok-l);background:var(--ok)}
.eba-sec>span{font-size:14px;font-weight:600}

.eba-search{display:flex;align-items:center;gap:10px;min-height:50px;padding:0 14px;border-radius:14px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line)}
.eba-sheet .eba-search{background:var(--card2)}
.eba-search:focus-within{box-shadow:inset 0 0 0 2px var(--o)}
.eba-search .i{color:var(--mute);width:20px;height:20px}
.eba-search input{flex:1;min-width:0;border:0;background:none;outline:none;font:inherit;font-size:16px;color:var(--fg);padding:12px 0}
.eba-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.eba-search-empty{text-align:center;color:var(--mute);font-size:14.5px;padding:10px}
.eba-search-empty[hidden],.eba-ch[hidden],.eba-lessons li[hidden]{display:none}

.eba-badges{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.eba-badges li{display:flex;flex-direction:column;gap:3px;padding:14px;border-radius:16px;background:var(--card);box-shadow:0 1px 2px rgba(16,24,40,.05)}
.eba-badges .ic{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--card2);color:var(--faint);margin-bottom:6px}
.eba-badges .on .ic{background:var(--o-l);color:var(--o)}
.eba-badges b{font-size:14.5px;line-height:1.3}
.eba-badges small{font-size:12.5px;color:var(--mute);line-height:1.35}
.eba-badges li:not(.on) b{color:var(--mute)}
.eba-badges .on small{color:var(--ok);font-weight:600}

.eba-done-badge{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:12px 14px;border-radius:16px;background:rgba(242,85,29,.16);box-shadow:inset 0 0 0 1.5px rgba(242,85,29,.45)}
.eba-done-badge[hidden]{display:none}
.eba-done-badge>.i{width:32px;height:32px;color:#FDB59A}
.eba-done-badge small{display:block;color:#FDB59A;font-size:12.5px;font-weight:700}
.eba-done-badge strong{font-size:16px}
.eba-done[open] .eba-done-badge:not([hidden]){animation:eba-ring .6s .35s cubic-bezier(.34,1.56,.64,1) both}

.eba-onb .eba-choice{grid-template-columns:1fr;gap:8px}
.eba-onb [data-pref=goal] button{flex-direction:row;justify-content:flex-start;gap:12px;min-height:58px;padding:0 16px;font-size:15.5px}
.eba-onb [data-pref=goal] .aa{font-size:22px;min-width:1.6em;text-align:left}
.eba-goal-ring b{display:flex;align-items:baseline;justify-content:center;gap:1px}

/* ======================================================================
 * Giai đoạn 3: nhắc học, vân tay / Face ID, học không cần mạng
 * ==================================================================== */
.eba-push{display:flex;flex-direction:column;gap:10px;margin:4px 0 16px;padding-top:14px;border-top:1px solid var(--line)}
.eba-push[hidden]{display:none}
.eba-push .eba-q{margin:0}
.eba-push-st{font-size:14px;color:var(--mute);line-height:1.5}
.eba-choice--4{grid-template-columns:repeat(4,minmax(0,1fr));margin:0}
.eba-choice--4 button{min-height:52px}
.eba-choice--4 .aa{font-size:16px!important}
.eba-push-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.eba-push-acts[hidden]{display:none}
.eba-push .eba-btn[hidden]{display:none}
.eba-sheet .eba-hint[hidden]{display:none}

.eba-pk-login .i,.eba-offer-ic .i,.eba-pk-row>.i{width:22px;height:22px}
.eba-pk-login[hidden]{display:none}
.eba-pk-err{color:#D92D20;font-size:14px;max-width:34ch;margin:0}
.eba-pk-err[hidden]{display:none}
.eba-offer{display:flex;gap:12px;align-items:flex-start;padding:14px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--o-l)}
.eba-offer[hidden]{display:none}
.eba-offer-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--o-l);color:var(--o);flex:none;font-weight:800;font-size:20px}
.eba-offer strong{display:block;font-size:15.5px}
.eba-offer small{display:block;color:var(--mute);font-size:13px;line-height:1.45}
.eba-offer-acts{display:flex;gap:6px;margin-top:10px}
.eba-pk-row{display:flex;align-items:center;gap:12px;padding:14px 16px;min-height:54px}
.eba-pk-row>.i{color:var(--ok)}
.eba-pk-row span{flex:1;min-width:0;display:flex;flex-direction:column;font-weight:600;font-size:15.5px}
.eba-pk-row small{font-weight:400;color:var(--mute);font-size:13px}
.eba-pk-row .eba-mini-link{padding:6px 4px;color:#D92D20}
.eba-menu>button[hidden],.eba-pk-none[hidden]{display:none}
.eba-pk-none{margin:0;padding:14px 16px;color:var(--mute);font-size:14px}
.eba-menu>.eba-pk-none:only-child{border-top:0}

.eba-dl{display:flex;align-items:center;gap:12px}
.eba-dl[hidden]{display:none}
.eba-dl-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--card2);color:var(--mute);flex:none}
.eba-dl.is-done .eba-dl-ic{background:var(--ok-l);color:var(--ok)}
.eba-dl-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.eba-dl-t strong{font-size:15.5px}
.eba-dl-t small{color:var(--mute);font-size:13px;line-height:1.4}
.eba-dl-bar{display:block;height:6px;border-radius:4px;background:var(--line);overflow:hidden;margin-top:6px}
.eba-dl-bar[hidden]{display:none}
.eba-dl-bar i{display:block;height:100%;width:0;background:var(--o);transition:width .3s}
.eba-dl .eba-mini-link{padding:0 2px}
.eba-dl .eba-mini-link[hidden]{display:none}

.eba-offline-note{display:flex;gap:8px;align-items:flex-start;margin:0;padding:12px 14px;border-radius:14px;background:var(--warn-l);font-size:14px;line-height:1.45}
.eba-offline-note[hidden]{display:none}
.eba-offline-note .i{width:20px;height:20px;color:#B54708;flex:none}
.eba-dl{flex-wrap:wrap;row-gap:10px}.eba-dl-t{flex:1 1 calc(100% - 56px)}.eba-dl .eba-btn{margin-left:56px}
/* Logo: bản sáng trên nền tối */
.eba-logo--d{display:none}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .eba-logo--l{display:none}:root:not([data-theme=light]) .eba-logo--d{display:block}}
:root[data-theme=dark] .eba-logo--l{display:none}:root[data-theme=dark] .eba-logo--d{display:block}

/* Hiệu năng cuộn: thanh cố định không làm mờ nền (điện thoại phải vẽ lại mỗi khung hình) – dùng nền đặc. */
.eba-tabs,.eba-lbar{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:var(--card)}
