/* ---------- UX refresh: readable type, clearer hierarchy, friendlier controls ---------- */
/* Loaded after styles.css so it refines the base design without rewriting it. */
:root{--bg:#f6f6fb;--text:#1f1d2e;--muted:#5f5d75;--line:#e4e4f0;--soft:#eef0ff;--accent:#e0e7ff;--forest:#3730a3;--brand:#4338ca;--on-brand:#fff;--ring:#6366f1;--shadow-sm:0 1px 2px #1a16320d,0 2px 8px -2px #1a163212;--shadow-md:0 18px 40px -18px #1a163245,0 4px 12px -6px #1a16321a}
html[data-theme="dark"]{--bg:#12111c;--panel:#1c1b2b;--text:#ececf8;--muted:#a9a8c4;--line:#2e2d45;--brand:#a5b4fc;--on-brand:#1e1b4b;--soft:#272540;--accent:#3b3a73;--forest:#c7d2fe;--ring:#818cf8;--shadow-sm:0 1px 2px #0003;--shadow-md:0 18px 40px -18px #000a,0 4px 12px -6px #0006}
body{background:var(--bg);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body:before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(900px 420px at 88% -8%,#a1a7e94d,transparent 70%),radial-gradient(700px 380px at -5% 105%,#c0c3ed40,transparent 70%)}
html[data-theme="dark"] body:before{background:radial-gradient(900px 420px at 88% -8%,#322d6133,transparent 70%)}
button:focus-visible,a:focus-visible,select:focus-visible,.video-wrap:focus-visible{outline:3px solid var(--ring);outline-offset:3px}
::selection{background:#a1a7e9;color:#1e192e}

/* Sidebar */
.sidebar{width:248px;padding:28px 18px 18px}
.app-shell{margin-left:248px}
.brand{font-size:26px}
.workspace-label{font-size:11px;letter-spacing:1.6px;color:var(--muted);margin:38px 14px 12px}
.nav-item{font-size:14.5px;font-weight:550;padding:12px 14px;border-radius:12px;min-height:48px;gap:13px;margin:4px 0}
.nav-item{white-space:nowrap}
.nav-item svg{width:20px;height:20px}
.note-art{display:flex;margin-bottom:14px}
.nav-item:hover{background:var(--soft);color:var(--text)}
.nav-item.active{background:var(--brand);color:var(--on-brand);font-weight:650;box-shadow:0 10px 20px -10px #36245999}
.nav-item .nav-arrow,.nav-item:not(.active) .nav-arrow{display:none}
.nav-count{font-size:12px;font-weight:650;padding:2px 8px;border-radius:999px;background:var(--soft);color:var(--muted)}
.nav-item.active .nav-count{background:#ffffff26;color:inherit}
.sidebar-note{border-radius:18px;padding:22px 18px 14px;background:var(--soft)}
.sidebar-note strong{font-size:16px;line-height:1.4}
.sidebar-note p{font-size:13px;line-height:1.6;color:var(--muted);margin:8px 0 6px}
.text-button{font-size:14px;color:var(--brand);padding:8px 0}
.text-button span{transition:transform .15s}
.text-button:hover span{transform:translate(2px,-2px)}
.sidebar-bottom strong{font-size:13px}
.sidebar-bottom small{font-size:12px}
html[data-theme="dark"] .sidebar-note{background:var(--soft)}

/* Top bar */
.topbar{position:sticky;top:0;z-index:20;height:72px;padding:0 40px;background:color-mix(in srgb,var(--panel) 86%,transparent);backdrop-filter:blur(14px) saturate(1.1);-webkit-backdrop-filter:blur(14px) saturate(1.1)}
.topbar-path{font-size:14px}
.topbar-path strong{font-size:16px;font-weight:650;max-width:380px}
.icon-button{width:40px;height:40px;border-radius:12px}
.icon-button svg{width:20px;height:20px}
.avatar{width:36px;height:36px;font-size:14px}

/* Page frame + headings */
main{padding:36px 40px 56px;max-width:1440px}
.eyebrow{font-size:12px;letter-spacing:1.4px;color:var(--brand);opacity:.85}
.page-title{font-size:clamp(28px,3.2vw,38px);font-weight:700;letter-spacing:-1.2px;margin:8px 0 10px}
.page-description{font-size:16px;color:var(--muted);line-height:1.6}
.page-heading{margin-bottom:32px}
.small{font-size:14px;line-height:1.65}
.app-footer{font-size:13px;color:var(--muted);margin:0 40px}

/* Hero */
.hero{min-height:290px;border-radius:28px;padding:48px 52px;margin-bottom:44px;background:radial-gradient(620px 320px at 88% 0,#59468a 0,transparent 65%),linear-gradient(135deg,#221833,#30244d 58%,#3f2c68);box-shadow:0 30px 60px -32px #231a35e6}
.hero-copy{max-width:min(640px,62%)}
.hero-label{font-size:12px;letter-spacing:1.3px;font-weight:650;color:#c3c5f1;padding:7px 13px;border-radius:999px;background:#ffffff17;margin-bottom:20px}
.hero-label svg{width:14px;height:14px}
.hero h1,.hero h2{font-size:clamp(32px,4.4vw,54px);font-weight:700;line-height:1.08;letter-spacing:-1.8px;margin:0 0 16px}
.hero h1 em,.hero h2 em{color:#aab0ec;font-style:normal}
.hero p{font-size:17px;line-height:1.65;color:#c3c1d9;max-width:500px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.hero-actions .button{min-height:48px;padding:12px 22px;font-size:15px;border-radius:14px}
.hero-actions .button:not(.button-primary){background:#ffffff14;border-color:#ffffff33;color:#fff}
.hero-actions .button:not(.button-primary):not(:disabled):hover{background:#ffffff26;border-color:#ffffff55}
.hero-resume span{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hero-art{top:0;bottom:0;right:28px;width:min(420px,38%);height:auto;display:flex;align-items:center}
html[data-theme="dark"] .hero{border:1px solid #333050}

/* Discover: search + categories */
.section-head{margin:0 0 18px;flex-wrap:wrap}
.section-head h2{font-size:24px;font-weight:700;letter-spacing:-.6px}
.section-count{font-size:14px;color:var(--muted);margin-right:auto}
.search-box{width:360px;border-radius:14px;min-height:48px;background:var(--panel);box-shadow:var(--shadow-sm)}
.search-box svg{width:18px;height:18px}
.search-box input{font-size:15px;padding:13px 8px 13px 0}
.search-box kbd{font-size:12px;padding:2px 7px;border-radius:6px;color:var(--muted)}
.category-bar{gap:8px;margin:0 0 28px;padding:4px 2px}
.category-bar button{font-size:14px;font-weight:550;padding:9px 16px;border-radius:999px;color:var(--text);background:var(--panel);transition:background .15s,border-color .15s,color .15s,transform .15s}
.category-bar button:hover{border-color:var(--ring);transform:translateY(-1px)}
.category-bar button.active{background:var(--brand);border-color:var(--brand);color:var(--on-brand);font-weight:650}
.category-count{font-size:12px;margin-left:7px;opacity:.7}

/* Batch cards */
.batch-grid{gap:24px}
.batch-card{border-radius:20px;box-shadow:var(--shadow-sm)}
.batch-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-md)}
.batch-category{font-size:11.5px;padding:6px 11px;border-radius:999px;left:14px;bottom:14px}
.cover-fallback b{font-size:21px;letter-spacing:.2px}
.cover-fallback .cover-mark{width:54px;height:54px;border-radius:16px}
.cover-fallback .cover-mark svg{width:27px;height:27px}
.batch-body{padding:20px 20px 18px}
.batch-title{font-size:17px;font-weight:650;line-height:1.4;letter-spacing:-.2px;min-height:48px}
.batch-meta{font-size:13px;color:var(--muted);gap:8px 14px;flex-wrap:wrap;margin:14px 0 18px}
.batch-meta span{gap:6px}
.batch-meta svg{width:15px;height:15px}
.batch-bottom{padding-top:14px}
.batch-format{font-size:13px;color:var(--muted);gap:7px}
.batch-format i{width:7px;height:7px}
.explore-link{font-size:14px;font-weight:650;color:var(--brand);padding:6px 0;gap:8px}
.explore-link svg{width:16px;height:16px;transition:transform .2s}
.batch-card:hover .explore-link svg{transform:translateX(4px)}
.save-button{width:38px;height:38px;border-radius:11px;margin:-6px -8px 0 0;color:var(--muted)}
.save-button svg{width:19px;height:19px}
.save-button:hover{color:var(--brand)}
.save-button.saved{color:var(--brand)}
.save-button.saved svg{fill:var(--accent)}
.skeleton{height:340px;border-radius:20px}
.skeleton:before{height:190px}
.pagination{margin:36px 0 8px;gap:22px}
.pagination span{font-size:14px;font-weight:550}

/* Buttons */
.button{font-size:14px;min-height:44px;padding:10px 18px;border-radius:12px;font-weight:600;gap:9px}
.button svg{width:17px;height:17px}
.button:hover{filter:none}
.button:not(.button-primary):not(:disabled):hover{background:var(--soft);border-color:#adb0d9}
.button:disabled{opacity:.45;cursor:not-allowed}
.button-primary{color:#201b3c}
html[data-theme="dark"] .button:not(.button-primary):not(:disabled):hover{border-color:#413f60}

/* Batch, subject, chapter and lesson pages */
.breadcrumb{font-size:14px;gap:10px;margin-bottom:22px}
.breadcrumb svg{width:13px;height:13px}
.breadcrumb a{color:var(--brand);font-weight:550}
.batch-intro{padding:28px;gap:24px;border-radius:24px;box-shadow:var(--shadow-sm)}
.batch-intro img{width:168px;height:96px;border-radius:14px}
.batch-intro h1{font-size:clamp(22px,2.6vw,30px);letter-spacing:-.8px;margin:8px 0}
.batch-intro .small{font-size:15px}
.subject-grid{gap:18px}
.subject-card{padding:22px 24px;border-radius:20px;gap:18px;box-shadow:var(--shadow-sm)}
.subject-card:hover{border-color:var(--ring);box-shadow:var(--shadow-md)}
.subject-symbol{width:56px;height:56px;border-radius:16px}
.subject-symbol svg{width:26px;height:26px}
.subject-copy h3{font-size:17px;line-height:1.4;margin:0 0 6px}
.subject-copy p{font-size:14px;line-height:1.5}
.tile-arrow{color:var(--muted);transition:transform .2s,color .2s}
.tile-arrow svg{width:20px;height:20px}
.subject-card:hover .tile-arrow,.chapter-card:hover .tile-arrow{transform:translateX(4px);color:var(--brand)}
.chapter-list,.lesson-list{gap:12px}
.chapter-card{padding:18px 22px;border-radius:16px;gap:18px;box-shadow:var(--shadow-sm)}
.chapter-card:hover,.lesson-card:hover{border-color:var(--ring);box-shadow:var(--shadow-md)}
.chapter-number{font-size:15px;font-weight:650;color:var(--brand);width:46px;height:46px;border-radius:13px}
.chapter-card h3{font-size:16px;font-weight:600;margin:0 0 5px}
.chapter-card p{font-size:13.5px}
.resource-tabs{gap:8px;margin:26px 0 22px}
.resource-tabs button{font-size:14px;font-weight:550;padding:10px 20px;border-radius:999px;transition:background .15s,color .15s,border-color .15s}
.resource-tabs button:hover{border-color:var(--ring)}
.resource-tabs button.active{background:var(--brand);border-color:var(--brand);color:var(--on-brand);font-weight:650}
html[data-theme="dark"] .resource-tabs button.active{background:var(--brand);color:var(--on-brand)}
.lesson-card{padding:18px 22px;border-radius:16px;gap:18px;box-shadow:var(--shadow-sm)}
.lesson-play{width:48px;height:48px;background:var(--accent);color:#292250;transition:transform .15s,box-shadow .15s}
.lesson-play svg{width:19px;height:19px}
.lesson-play:not(:disabled):hover{transform:scale(1.08);box-shadow:0 8px 18px -8px #434cc699}
.lesson-play:disabled{background:var(--soft);color:var(--muted);cursor:not-allowed;opacity:.8}
html[data-theme="dark"] .lesson-play:not(:disabled){background:#2e2c58;color:#aab0ec}
.lesson-copy h3{font-size:16px;font-weight:600;margin:0 0 8px}
.lesson-copy p{font-size:13px;gap:14px;flex-wrap:wrap}
.lesson-badge{font-size:12px;padding:4px 9px}
.resource-links .button{font-size:13px;min-height:36px;padding:6px 12px}
.recent-progress{height:5px;border-radius:99px;margin-top:14px}
.recent-progress>span{background:linear-gradient(90deg,#5358c4,#6974ed);border-radius:99px}
.empty-state{padding:72px 24px;border-radius:24px;border-style:dashed}
.empty-state>span{padding:20px}
.empty-state>span svg{width:28px;height:28px}
.empty-state h2{font-size:22px;letter-spacing:-.5px}
.empty-state p{font-size:15px;line-height:1.7;color:var(--muted)}
.inline-loading{font-size:15px}
.pw-public-note{font-size:14px;line-height:1.8}

/* Direct player page */
.direct-layout{gap:28px;margin-top:8px}
.direct-card{padding:34px;border-radius:24px;box-shadow:var(--shadow-sm)}
.direct-card h2{font-size:26px;letter-spacing:-.7px;margin:18px 0 10px}
.direct-card label,.verification-dialog label{font-size:14px;font-weight:600}
.direct-card input,.verification-dialog input{font-size:15px;padding:14px;border-radius:12px}
.direct-card input:focus{border-color:var(--ring);outline:3px solid #6970cc40;outline-offset:0}
.or-divider{font-size:12px;letter-spacing:1.4px}
.direct-art{border-radius:24px}
.direct-art h3{font-size:22px;color:var(--text)}
.direct-art p{font-size:15px;color:var(--muted)}
html[data-theme="dark"] .direct-art h3{color:var(--text)}

/* Player dialog */
.player-dialog{border-radius:22px}
.player-top{padding:14px 22px}
.player-wordmark{font-size:19px}
.player-top-label{font-size:12px;letter-spacing:1.6px}
.player-details{padding:20px 24px 22px}
.player-details .eyebrow{font-size:12px}
.player-details h2{font-size:21px;font-weight:650;line-height:1.35;margin:8px 0 16px;letter-spacing:-.4px}
.player-shortcuts{font-size:12.5px}
.player-controls .button{font-size:14px;min-height:40px;padding:8px 16px}
#player-message{font-size:14px}
.video-clock{font-size:13px}
.playlist-heading{padding:20px 18px}
.playlist-heading strong{font-size:15px;font-weight:650}
.playlist-heading>span{font-size:13px}
.playlist-item{padding:15px 16px;gap:12px;box-shadow:inset 3px 0 0 transparent;transition:background .15s}
.playlist-item.active{box-shadow:inset 3px 0 0 #5358c4;background:var(--soft)}
.playlist-index{font-size:13px;width:22px}
.playlist-index svg{width:15px;height:15px}
.playlist-item h3{font-size:14px;font-weight:550;line-height:1.5}
.playlist-item p{font-size:12.5px}
.verification-dialog>p{font-size:14px}
#toast{font-size:14.5px;border-radius:14px;padding:14px 20px;left:calc(50% + 124px)}

@media(min-width:801px){.player-layout{grid-template-columns:minmax(0,1fr) 310px}}
@media(min-width:801px) and (max-width:1150px){.sidebar{width:224px}.app-shell{margin-left:224px}#toast{left:calc(50% + 112px)}main{padding:30px 28px 48px}.topbar{padding:0 28px}.app-footer{margin:0 28px}.hero{padding:40px 36px}.hero-copy{max-width:68%}.batch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.player-layout{grid-template-columns:minmax(0,1fr) 260px}}

@media(max-width:800px){
  .app-shell{margin-left:0}
  .sidebar{width:280px}
  .topbar{height:calc(64px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 16px 0}
  .topbar-path strong{font-size:17px;max-width:220px}
  main{padding:22px 20px calc(104px + env(safe-area-inset-bottom))}
  .page-title{font-size:28px}
  .page-description{font-size:15px}
  .hero{padding:34px 26px;min-height:0;border-radius:24px;margin-bottom:34px}
  .hero-copy{max-width:100%}
  .hero-art{width:240px;right:-70px;opacity:.28}
  .hero p{font-size:16px}
  .hero p br{display:none}
  .app-footer{margin:0 20px}
  .section-count{font-size:13px}
  .category-bar,.resource-tabs{margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px;scroll-padding:0 20px}
  .category-bar button{font-size:14px;min-height:42px;padding:0 18px}
  .resource-tabs button{min-height:42px}
  .batch-intro{padding:20px;gap:16px}
  .batch-intro img{width:110px;height:64px}
  .subject-card{padding:18px}
  .direct-card{padding:26px}
  .player-top-label{display:none}
  .player-details{padding:18px 18px 22px}
  #toast{left:50%}
  .tab-item{font-size:11.5px}
  .tab-item.active{background:var(--brand);color:var(--on-brand)}
  .tab-item.active svg{stroke-width:2.1}
}
@media(max-width:700px){
  .section-head{gap:14px}
  .search-box{width:100%;order:3}
  .search-box input{font-size:16px}
  .section-head h2{font-size:22px}
}
@media(max-width:520px){
  .hero{padding:30px 22px}
  .hero h1,.hero h2{font-size:34px;letter-spacing:-1.2px}
  .hero-actions{margin-top:22px}
  .hero-actions .button{flex:1 1 100%}
  .hero-resume span{max-width:200px}
  .batch-title{font-size:17px;min-height:0}
  .batch-meta{font-size:13px}
  .batch-format{font-size:13px}
  .explore-link{font-size:14px}
  .batch-intro{flex-wrap:wrap}
  .batch-intro img{width:100%;height:auto;aspect-ratio:1.9}
  .intro-actions{width:100%}
  .intro-actions .button{width:100%}
  .lesson-card{padding:15px 14px;gap:12px}
  .lesson-copy h3{font-size:15px}
  .lesson-copy p{font-size:13px}
  .chapter-card h3,.subject-copy h3{font-size:16px}
  .chapter-card p,.subject-copy p{font-size:13.5px}
  .breadcrumb{font-size:13px}
  .player-details h2{font-size:18px}
  .playlist-item h3{font-size:14px}
  .skeleton{height:320px}
  .skeleton:before{height:180px}
}

/* ---------- Palette: indigo + violet with a warm gold highlight ---------- */
::selection{background:#c7d2fe;color:#1e1b4b}
body:before{background:radial-gradient(900px 420px at 88% -8%,#c7d2fe66,transparent 70%),radial-gradient(700px 380px at -5% 105%,#e9d5ff55,transparent 70%)}
html[data-theme="dark"] body:before{background:radial-gradient(900px 420px at 88% -8%,#4338ca2e,transparent 70%),radial-gradient(700px 380px at -5% 105%,#7c3aed1f,transparent 70%)}
.brand-mark{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;box-shadow:0 8px 18px -8px #6366f1aa}
.brand-dot{color:#f59e0b}
.avatar{background:linear-gradient(140deg,#6366f1,#8b5cf6);color:#fff;box-shadow:0 6px 14px -6px #6366f1aa}
.nav-item.active{background:linear-gradient(135deg,#4f46e5,#6d5ae6);color:#fff;box-shadow:0 12px 22px -12px #4f46e5cc}
html[data-theme="dark"] .nav-item.active{background:linear-gradient(135deg,#6366f1,#7c6df2);color:#fff}
.nav-item.active .nav-count{background:#ffffff2e;color:#fff}
.local-dot,.status-dot{background:#22c55e}
.sidebar-note{background:linear-gradient(160deg,#eef0ff,#f3e8ff)}
html[data-theme="dark"] .sidebar-note{background:linear-gradient(160deg,#25244a,#2e2150)}
.note-art{color:#7c6df2}
.eyebrow{color:#5b4fe0;opacity:1}
html[data-theme="dark"] .eyebrow{color:#a5b4fc}

/* Hero */
.hero{background:radial-gradient(560px 300px at 90% 0,#7c6df2aa 0,transparent 65%),radial-gradient(420px 260px at 0 110%,#c026d355 0,transparent 70%),linear-gradient(135deg,#1e1b4b,#312e81 55%,#4c2a9a);box-shadow:0 30px 60px -32px #312e81f0}
.hero-label{background:#ffffff1f;color:#e0e7ff}
.hero h1 em,.hero h2 em{color:#fcd34d}
.hero p{color:#cfd3f5}
.hero-actions .button-primary{background:#fff;border-color:#fff;color:#312e81;box-shadow:0 10px 24px -10px #0006}
.hero-actions .button-primary:hover{background:#eef0ff}
html[data-theme="dark"] .hero{border:1px solid #3b3a73}

/* Controls */
.button-primary{background:linear-gradient(135deg,#4f46e5,#6d5ae6);border-color:#4f46e5;color:#fff;box-shadow:0 8px 20px -10px #4f46e5cc}
.button-primary:hover{background:linear-gradient(135deg,#4338ca,#5b48dd);box-shadow:0 10px 24px -10px #4f46e5e6}
html[data-theme="dark"] .button-primary{background:linear-gradient(135deg,#818cf8,#a78bfa);border-color:#818cf8;color:#1e1b4b}
html[data-theme="dark"] .button-primary:hover{background:linear-gradient(135deg,#a5b4fc,#c4b5fd)}
.button:not(.button-primary):not(:disabled):hover{background:var(--soft);border-color:#c7d2fe}
html[data-theme="dark"] .button:not(.button-primary):not(:disabled):hover{border-color:#4a4980}
.category-bar button.active,.resource-tabs button.active{background:linear-gradient(135deg,#4f46e5,#6d5ae6);border-color:#4f46e5;color:#fff}
html[data-theme="dark"] .category-bar button.active,html[data-theme="dark"] .resource-tabs button.active{background:linear-gradient(135deg,#818cf8,#a78bfa);border-color:#818cf8;color:#1e1b4b}
.search-box:focus-within,.direct-card input:focus{border-color:#6366f1;box-shadow:0 0 0 4px #6366f12e;outline:none}
.tab-item.active{background:#eef0ff;color:#4338ca}
html[data-theme="dark"] .tab-item.active{background:#2e2d52;color:#c7d2fe}

/* Cards + tiles */
.batch-card:hover,.subject-card:hover,.chapter-card:hover,.lesson-card:hover{border-color:#c7d2fe}
html[data-theme="dark"] .batch-card:hover,html[data-theme="dark"] .subject-card:hover,html[data-theme="dark"] .chapter-card:hover,html[data-theme="dark"] .lesson-card:hover{border-color:#4a4980}
.explore-link{color:#4338ca}
html[data-theme="dark"] .explore-link{color:#a5b4fc}
.batch-format i{background:#22c55e}
.save-button.saved{color:#f59e0b}
.save-button.saved svg{fill:#fcd34d}
.subject-symbol{background:#eef0ff;color:#5b4fe0}
.subject-symbol.hue-1{background:#fff4d6;color:#c2810a}
.subject-symbol.hue-2{background:#e0f2fe;color:#0f7fb5}
.subject-symbol.hue-3{background:#fce7f3;color:#c0359a}
html[data-theme="dark"] .subject-symbol{background:#2e2d52;color:#c7d2fe}
html[data-theme="dark"] .subject-symbol.hue-1{background:#3d3220;color:#fcd34d}
html[data-theme="dark"] .subject-symbol.hue-2{background:#1e3447;color:#7dd3fc}
html[data-theme="dark"] .subject-symbol.hue-3{background:#41243a;color:#f9a8d4}
.chapter-number{color:#4338ca;background:#eef0ff}
html[data-theme="dark"] .chapter-number{color:#c7d2fe;background:#2e2d52}
.lesson-play{background:#e0e7ff;color:#4338ca}
html[data-theme="dark"] .lesson-play:not(:disabled){background:#3b3a73;color:#e0e7ff}
.lesson-play:not(:disabled):hover{box-shadow:0 8px 18px -8px #6366f1aa}
.recent-progress>span{background:linear-gradient(90deg,#6366f1,#a78bfa)}
.loading-dot{background:#6366f1}
.empty-state>span{background:#eef0ff;color:#6366f1}
html[data-theme="dark"] .empty-state>span{background:#2e2d52;color:#a5b4fc}
.playlist-item.active{box-shadow:inset 3px 0 0 #6366f1}
.direct-art{background:linear-gradient(160deg,#eef0ff,#f3e8ff)}
html[data-theme="dark"] .direct-art{background:linear-gradient(160deg,#25244a,#2e2150)}
.direct-art .giant-play{background:#fff;border-color:#c7d2fe;color:#4f46e5;box-shadow:0 0 0 20px #e0e7ffaa,0 0 0 40px #e0e7ff66}
html[data-theme="dark"] .direct-art .giant-play{background:#3b3a73;border-color:#4f4e95;color:#e0e7ff;box-shadow:0 0 0 20px #2e2d52,0 0 0 40px #26254588}
.player-wordmark>span:last-child{color:#f59e0b}
.player-spinner{border-color:#4a4980;border-top-color:#a5b4fc}
.video-timeline input{background:linear-gradient(to right,#818cf8 0 var(--played,0%),#a3a3c2 var(--played,0%) var(--buffered,0%),#ffffff35 var(--buffered,0%) 100%)}
.video-timeline input::-webkit-slider-thumb{background:#c7d2fe;box-shadow:0 0 0 3px #818cf855}
.video-timeline input::-moz-range-thumb{background:#c7d2fe}
.vc-volume input{accent-color:#a5b4fc}
.vc-select #playback-speed{color:#c7d2fe}

/* Per-exam cover tints that no longer lean green */
.batch-cover{background:#e0e7ff}
.batch-cover[data-cat="IIT-JEE"]{background:linear-gradient(140deg,#e0e7ff,#b8c7f5)}
.batch-cover[data-cat="NEET"]{background:linear-gradient(140deg,#d9f3ec,#a8ddd0)}
.batch-cover[data-cat="BOARDS"]{background:linear-gradient(140deg,#fdf0d5,#f3d79a)}
.batch-cover[data-cat="UPSC"]{background:linear-gradient(140deg,#f1e4fb,#d4b8f0)}
.batch-cover[data-cat="GATE"]{background:linear-gradient(140deg,#e1eaf5,#b7c8de)}
.batch-cover[data-cat="BANKING"]{background:linear-gradient(140deg,#fde8dc,#f5c3a5)}
.batch-cover[data-cat="DEFENCE"]{background:linear-gradient(140deg,#e4e8f0,#bcc5d6)}
.batch-cover[data-cat="SKILLS"]{background:linear-gradient(140deg,#fce4f1,#f1b9d9)}
.batch-cover[data-cat="OTHERS"]{background:linear-gradient(140deg,#ece8fb,#cbc2f2)}
.batch-cover .cover-fallback{color:#3b3566}
html[data-theme="dark"] .batch-cover[data-cat]{background:linear-gradient(140deg,#2a2950,#201f3a)}
html[data-theme="dark"] .batch-cover .cover-fallback{color:#c7d2fe}

/* ---------- Lecture browser: chapters panel, search, sort, richer lecture rows ---------- */
.lecture-browser{display:grid;grid-template-columns:290px minmax(0,1fr);gap:28px;align-items:start}
.lecture-groups{position:sticky;top:92px;max-height:calc(100vh - 116px);display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-sm);overflow:hidden}
.lecture-groups-head{display:flex;justify-content:space-between;align-items:baseline;padding:18px 18px 12px;border-bottom:1px solid var(--line)}
.lecture-groups-head strong{font-size:15px;font-weight:650}
.lecture-groups-head span{font-size:12.5px;color:var(--muted)}
.group-list{overflow:auto;padding:8px;display:flex;flex-direction:column;gap:2px;overscroll-behavior:contain}
.group-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;border:0;background:transparent;text-align:left;padding:10px 12px;border-radius:12px;font-size:14px;font-weight:550;color:var(--text);transition:background .15s,color .15s}
.group-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.group-item em{flex-shrink:0;font-style:normal;font-size:12px;font-weight:650;color:var(--muted);background:var(--soft);padding:2px 8px;border-radius:999px}
.group-item:hover{background:var(--soft)}
.group-item.active{background:linear-gradient(135deg,#4f46e5,#6d5ae6);color:#fff}
.group-item.active em{background:#ffffff2e;color:#fff}
html[data-theme="dark"] .group-item.active{background:linear-gradient(135deg,#6366f1,#7c6df2)}
.lecture-toolbar{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.lecture-search{flex:1 1 260px;width:auto}
.lecture-select select{appearance:none;-webkit-appearance:none;min-height:48px;padding:0 40px 0 16px;border:1px solid var(--line);border-radius:14px;background:var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c7aa0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;color:var(--text);font-size:14.5px;font-weight:550;box-shadow:var(--shadow-sm);cursor:pointer;max-width:100%}
.lecture-select select:focus{border-color:#6366f1;box-shadow:0 0 0 4px #6366f12e;outline:none}
.lecture-select-group{display:none;flex:1 1 220px}
.lecture-select-group select{width:100%}
.lecture-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 2px 16px;font-size:14px;color:var(--muted)}
.lecture-summary strong{color:var(--text);font-weight:650}
.link-button{border:0;background:none;padding:6px 4px;font-size:14px;font-weight:650;color:var(--brand);text-decoration:underline;text-underline-offset:3px}
#lecture-list{transition:opacity .15s}
#lecture-list.is-loading{opacity:.45;pointer-events:none}
.lesson-kicker{display:block;font-size:12px;font-weight:650;letter-spacing:.4px;text-transform:uppercase;color:#5b4fe0;margin-bottom:4px}
html[data-theme="dark"] .lesson-kicker{color:#a5b4fc}
.lesson-copy h3{line-height:1.4}
.lesson-copy p{align-items:center}
.chip{display:inline-flex;align-items:center;font-size:11.5px;font-weight:650;line-height:1;padding:5px 9px;border-radius:999px;background:var(--soft);color:#5b5890;white-space:nowrap}
.chip-live{background:#fee2e2;color:#b91c1c}
.chip-recorded{background:#e0f2fe;color:#0369a1}
.chip-no-dpp,.chip-no-notes{background:#fef3c7;color:#92400e}
.chip-only-video{background:#f3e8ff;color:#7e22ce}
.chip-extra-lecture{background:#fce7f3;color:#be185d}
.chip-done{background:#dcfce7;color:#15803d}
html[data-theme="dark"] .chip{background:#2e2d52;color:#c7d2fe}
html[data-theme="dark"] .chip-live{background:#4a1d24;color:#fca5a5}
html[data-theme="dark"] .chip-recorded{background:#1e3447;color:#7dd3fc}
html[data-theme="dark"] .chip-no-dpp,html[data-theme="dark"] .chip-no-notes{background:#3d3220;color:#fcd34d}
html[data-theme="dark"] .chip-only-video{background:#35254d;color:#d8b4fe}
html[data-theme="dark"] .chip-extra-lecture{background:#41243a;color:#f9a8d4}
html[data-theme="dark"] .chip-done{background:#173a28;color:#86efac}
.lesson-card.is-done .lesson-play{background:#dcfce7;color:#15803d}
html[data-theme="dark"] .lesson-card.is-done .lesson-play:not(:disabled){background:#173a28;color:#86efac}
.lesson-card>.button{flex-shrink:0;white-space:nowrap}
@media(max-width:1000px){
  .lecture-browser{grid-template-columns:minmax(0,1fr)}
  .lecture-groups{display:none}
  .lecture-select-group{display:block}
}
@media(max-width:700px){
  .lecture-toolbar{flex-direction:column;gap:10px}
  .lecture-search,.lecture-select,.lecture-select-group{flex:0 0 auto}
  .lecture-search,.lecture-select,.lecture-select select{width:100%}
  .lecture-search{order:1}
  .lecture-select-group{order:2}
  .lecture-select{order:3}
  .lecture-select-group select{width:100%}
  .lecture-summary{flex-wrap:wrap}
  .lesson-card{flex-wrap:wrap}
  .lesson-card>.button{width:100%;min-height:44px}
}

/* Whole lecture row is clickable */
.lesson-card.is-clickable{cursor:pointer}
.lesson-card.is-clickable:hover .lesson-play:not(:disabled){transform:scale(1.08);box-shadow:0 8px 18px -8px #6366f1aa}
.lesson-card.is-clickable:hover>.button{background:var(--soft);border-color:#c7d2fe}
.lesson-card.is-clickable:active{transform:scale(.995)}
.lesson-copy h3{overflow-wrap:anywhere}

/* Player playlist: clearer "Up next" list */
.playlist-heading{flex-wrap:wrap;row-gap:6px;position:sticky;top:0;z-index:2;background:var(--panel)}
.playlist-hint{flex-basis:100%;margin:0;font-size:12.5px;line-height:1.5;color:var(--muted)}
.playlist-hint:empty{display:none}
.playlist-item{align-items:flex-start}
.playlist-index{display:grid;place-items:center;height:24px;margin-top:2px}
.playlist-copy{min-width:0;flex:1}
.playlist-copy .lesson-kicker{font-size:11px;margin-bottom:3px}
.playlist-copy p{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:6px 0 0}
.playlist-copy .chip{font-size:11px;padding:4px 8px}
.playlist-item.is-done .playlist-index{color:#15803d}
.playlist-item .recent-progress{margin-top:10px;height:4px}
.chip-now{background:#e0e7ff;color:#4338ca}
html[data-theme="dark"] .chip-now{background:#3b3a73;color:#e0e7ff}
.eq{display:inline-flex;align-items:flex-end;gap:2px;height:14px}
.eq i{display:block;width:3px;border-radius:2px;background:#6366f1;animation:eq-bounce 1s ease-in-out infinite}
.eq i:nth-child(1){height:60%}
.eq i:nth-child(2){height:100%;animation-delay:.2s}
.eq i:nth-child(3){height:75%;animation-delay:.4s}
@keyframes eq-bounce{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}
.eq i{transform-origin:bottom}
html[data-theme="dark"] .eq i{background:#a5b4fc}

/* Logo */
.brand-mark{width:40px;height:40px;background:none;box-shadow:none;border-radius:12px;transform:rotate(-4deg);transition:transform .25s}
.brand:hover .brand-mark{transform:rotate(3deg) scale(1.05)}
.brand-mark img{display:block;width:100%;height:100%;border-radius:12px;filter:drop-shadow(0 8px 12px #6366f155)}
.brand{gap:11px}
.brand-dot{margin-left:-10px}
.wordmark-logo{width:28px;height:28px;border-radius:9px;flex-shrink:0;margin-right:2px}
.player-wordmark>span:last-child{margin-left:-7px}
.brand{white-space:nowrap;font-size:24px;letter-spacing:-.8px;padding:0 4px}
@media(min-width:801px) and (max-width:1150px){.brand{font-size:21px;gap:9px}.brand-mark{width:36px;height:36px}}

/* ---------- Topbar: theme switch + profile ---------- */
.topbar-actions{gap:14px}
.theme-toggle{position:relative;flex-shrink:0;width:64px;height:34px;padding:0;border:1px solid #c7d2fe;border-radius:999px;background:linear-gradient(135deg,#eef0ff,#dbe2ff);cursor:pointer;transition:background .3s,border-color .3s,box-shadow .2s}
.theme-toggle:hover{box-shadow:0 0 0 4px #6366f12a}
.tt-knob{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 3px 8px -2px #4338ca66;transition:transform .3s cubic-bezier(.3,1.3,.5,1),background .3s}
.tt-icon{position:absolute;top:50%;width:26px;height:26px;margin-top:-13px;display:grid;place-items:center;transition:color .3s,transform .4s}
.tt-icon svg{width:16px;height:16px;stroke-width:2}
.tt-sun{left:3px;color:#f59e0b}
.tt-moon{right:3px;color:#7c7aa8}
.theme-toggle[aria-checked="true"]{background:linear-gradient(135deg,#25244f,#1a1940);border-color:#4a4980}
.theme-toggle[aria-checked="true"] .tt-knob{transform:translateX(30px);background:#c7d2fe;box-shadow:0 3px 10px -2px #000a}
.theme-toggle[aria-checked="true"] .tt-sun{color:#7c7aa8;transform:rotate(-60deg)}
.theme-toggle[aria-checked="true"] .tt-moon{color:#312e81}
.theme-toggle[aria-checked="false"] .tt-moon{transform:rotate(25deg)}

.profile{position:relative}
.avatar{display:grid;place-items:center;width:40px;height:40px;padding:0;border:2px solid transparent;border-radius:50%;font-size:16px;font-weight:700;color:#fff;background:linear-gradient(140deg,#6366f1,#8b5cf6) padding-box;box-shadow:0 6px 14px -6px #6366f1aa;cursor:pointer;transition:transform .15s,box-shadow .15s}
.avatar svg{width:20px;height:20px;stroke-width:2}
.avatar:hover{transform:scale(1.06);box-shadow:0 0 0 4px #6366f12e,0 6px 14px -6px #6366f1aa}
.avatar[aria-expanded="true"]{box-shadow:0 0 0 4px #6366f13d}
.profile-menu{position:absolute;right:0;top:calc(100% + 14px);z-index:60;width:344px;max-width:calc(100vw - 24px);padding:18px;border:1px solid var(--line);border-radius:22px;background:var(--panel);box-shadow:0 28px 60px -20px #1e1b4b66,0 8px 20px -10px #1e1b4b33;animation:menu-in .18s ease}
@keyframes menu-in{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}
.pm-head{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.pm-avatar{display:grid;place-items:center;flex-shrink:0;width:52px;height:52px;border-radius:50%;font-size:22px;font-weight:700;color:#fff;background:linear-gradient(140deg,#6366f1,#8b5cf6);box-shadow:0 8px 18px -8px #6366f1cc}
.pm-avatar svg{width:26px;height:26px;stroke-width:2}
.pm-head strong{display:block;font-size:17px;font-weight:700;letter-spacing:-.3px;overflow-wrap:anywhere}
.pm-head small{display:block;font-size:12.5px;color:var(--muted);margin-top:2px}
.pm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}
.pm-stats div{padding:10px 4px;border-radius:14px;background:var(--soft);text-align:center}
.pm-stats b{display:block;font-size:17px;font-weight:700;color:var(--brand);letter-spacing:-.3px}
.pm-stats span{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
.pm-resume{display:flex;align-items:center;gap:12px;width:100%;margin-bottom:14px;padding:12px;border:1px solid #c7d2fe;border-radius:16px;background:linear-gradient(135deg,#eef0ff,#f3e8ff);text-align:left;transition:transform .15s,box-shadow .15s}
.pm-resume:hover{transform:translateY(-1px);box-shadow:0 10px 22px -14px #4f46e5cc}
.pm-resume-icon{display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#4f46e5,#6d5ae6);color:#fff}
.pm-resume-icon svg{width:16px;height:16px;fill:currentColor}
.pm-resume-copy{min-width:0;flex:1}
.pm-resume-copy small{display:block;font-size:11.5px;color:var(--muted)}
.pm-resume-copy strong{display:block;font-size:14px;font-weight:650;margin:2px 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-resume .recent-progress{margin:0;height:4px;display:block}
.pm-name{margin-bottom:10px}
.pm-name label{display:block;font-size:12.5px;font-weight:650;color:var(--muted);margin-bottom:6px}
.pm-name div{display:flex;gap:8px}
.pm-name input{flex:1;min-width:0;padding:0 14px;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--text);font-size:15px}
.pm-name input:focus{border-color:#6366f1;box-shadow:0 0 0 4px #6366f12e;outline:none}
.pm-name .button{min-height:44px;padding:0 18px}
.pm-links{display:flex;flex-direction:column;gap:2px;padding-top:8px;border-top:1px solid var(--line)}
.pm-links a,.pm-links button{display:flex;align-items:center;gap:12px;width:100%;padding:11px 10px;border:0;border-radius:12px;background:transparent;text-align:left;font-size:14.5px;font-weight:550;color:var(--text);transition:background .15s,color .15s}
.pm-links svg{width:18px;height:18px;color:var(--muted)}
.pm-links em{margin-left:auto;font-style:normal;font-size:12px;font-weight:650;color:var(--muted);background:var(--soft);padding:2px 9px;border-radius:999px}
.pm-links a:hover,.pm-links button:hover:not(:disabled){background:var(--soft)}
.pm-links button:disabled{opacity:.45;cursor:not-allowed}
.pm-links button.is-confirming{background:#fee2e2;color:#b91c1c}
.pm-links button.is-confirming svg{color:#b91c1c}
html[data-theme="dark"] .theme-toggle{background:linear-gradient(135deg,#25244f,#1a1940);border-color:#4a4980}
html[data-theme="dark"] .avatar,html[data-theme="dark"] .pm-avatar{background:linear-gradient(140deg,#7c7ff5,#a78bfa);color:#1e1b4b}
html[data-theme="dark"] .pm-resume{border-color:#4a4980;background:linear-gradient(135deg,#25244a,#2e2150)}
html[data-theme="dark"] .pm-resume-icon{background:linear-gradient(135deg,#818cf8,#a78bfa);color:#1e1b4b}
html[data-theme="dark"] .profile-menu{box-shadow:0 28px 60px -20px #000c,0 8px 20px -10px #0008}
html[data-theme="dark"] .pm-links button.is-confirming{background:#4a1d24;color:#fca5a5}
html[data-theme="dark"] .pm-links button.is-confirming svg{color:#fca5a5}
@media(max-width:800px){
  .avatar{display:grid}
  .topbar-actions{gap:10px}
  .profile{position:static}
  .profile-menu{position:fixed;left:12px;right:12px;top:calc(env(safe-area-inset-top) + 68px);width:auto;max-width:none;max-height:calc(100dvh - 160px);overflow:auto}
}

/* ---------- Styled dropdowns (lecture chapter + sort) ---------- */
.lecture-select{position:relative}
.lecture-select .dd-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;border:0!important;opacity:0;pointer-events:none;overflow:hidden}
.dd{position:relative}
.dd-button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;padding:0 14px 0 16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);box-shadow:var(--shadow-sm);color:var(--text);font-size:14.5px;font-weight:600;white-space:nowrap;transition:border-color .15s,box-shadow .15s}
.dd-button:hover{border-color:#c7d2fe}
.dd-button[aria-expanded="true"],.dd-button:focus-visible{border-color:#6366f1;box-shadow:0 0 0 4px #6366f12e;outline:none}
.dd-button svg{width:18px;height:18px;color:var(--muted);transition:transform .2s}
.dd-button[aria-expanded="true"] svg{transform:rotate(180deg)}
.dd-label{overflow:hidden;text-overflow:ellipsis}
.dd-menu{position:absolute;z-index:50;top:calc(100% + 8px);right:0;min-width:100%;width:max-content;max-width:min(420px,calc(100vw - 32px));max-height:min(360px,60vh);overflow:auto;padding:6px;border:1px solid var(--line);border-radius:16px;background:var(--panel);box-shadow:0 24px 50px -18px #1e1b4b66,0 6px 16px -8px #1e1b4b33;animation:menu-in .16s ease;overscroll-behavior:contain}
.lecture-select-group .dd-menu{right:auto;left:0}
.dd-option{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:11px 12px;border:0;border-radius:10px;background:transparent;text-align:left;font-size:14.5px;font-weight:550;color:var(--text);transition:background .12s}
.dd-option span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.dd-option svg{width:17px;height:17px;flex-shrink:0;color:#4f46e5}
.dd-option:hover,.dd-option:focus-visible{background:var(--soft);outline:none}
.dd-option.is-selected{background:#eef0ff;color:#4338ca;font-weight:650}
html[data-theme="dark"] .dd-button:hover{border-color:#4a4980}
html[data-theme="dark"] .dd-menu{box-shadow:0 24px 50px -18px #000c,0 6px 16px -8px #0008}
html[data-theme="dark"] .dd-option.is-selected{background:#2e2d52;color:#c7d2fe}
html[data-theme="dark"] .dd-option svg{color:#a5b4fc}
@media(max-width:700px){.dd-menu{left:0;right:0;width:auto;max-width:none}}

/* Profile: real usage panel */
.pm-usage{margin-bottom:14px;padding:14px;border:1px solid #dfe3ff;border-radius:18px;background:linear-gradient(135deg,#eef0ff,#f5ecff)}
.pm-usage-top{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.pm-usage-top small{display:block;font-size:11.5px;font-weight:600;color:var(--muted)}
.pm-usage-top b{display:block;margin-top:3px;font-size:19px;font-weight:700;letter-spacing:-.4px;color:var(--brand);white-space:nowrap}
.pm-week{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.pm-day{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.pm-bar{display:flex;align-items:flex-end;width:100%;max-width:28px;height:54px;border-radius:9px;background:#ffffffb8;overflow:hidden}
.pm-bar i{display:block;width:100%;border-radius:9px;background:linear-gradient(180deg,#a5b4fc,#818cf8);transition:height .4s ease}
.pm-day.is-today .pm-bar i{background:linear-gradient(180deg,#7c6df2,#4f46e5)}
.pm-day em{font-style:normal;font-size:11px;font-weight:650;color:var(--muted)}
.pm-day.is-today em{color:var(--brand)}
.pm-stats{margin-bottom:10px}
.pm-stats b{font-size:16px;white-space:nowrap}
.pm-note{margin:0 0 14px;font-size:11.5px;line-height:1.55;color:var(--muted)}
html[data-theme="dark"] .pm-usage{border-color:#3b3a73;background:linear-gradient(135deg,#25244a,#2e2150)}
html[data-theme="dark"] .pm-bar{background:#ffffff14}
html[data-theme="dark"] .pm-bar i{background:linear-gradient(180deg,#8b93f0,#6366f1)}
html[data-theme="dark"] .pm-day.is-today .pm-bar i{background:linear-gradient(180deg,#c4b5fd,#818cf8)}
.profile-menu{max-height:calc(100vh - 100px);overflow:auto;overscroll-behavior:contain}

/* ---------- Subjects: rich cards, pills, tab counts ---------- */
.subject-card.is-rich{align-items:flex-start}
.subject-card.is-rich .subject-symbol{margin-top:2px}
.subject-card.is-rich .tile-arrow{align-self:center}
.subject-card.is-all{border-color:#c7d2fe;background:linear-gradient(135deg,#fff,#f3f1ff)}
html[data-theme="dark"] .subject-card.is-all{border-color:#4a4980;background:linear-gradient(135deg,var(--panel),#25244a)}
.stat-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}
.stat{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:12px;background:var(--soft);font-size:12px;font-weight:600;color:var(--muted)}
.stat b{font-size:17px;font-weight:700;letter-spacing:-.3px;color:var(--brand)}
.stat.is-empty b{color:var(--muted);opacity:.7}
.stat.is-empty{opacity:.75}
.subjects-note{margin:18px 2px 0;max-width:760px;font-size:13.5px;line-height:1.7;color:var(--muted)}
.tab-count{margin-left:8px;padding:2px 8px;border-radius:999px;font-style:normal;font-size:12px;font-weight:650;background:var(--soft);color:var(--muted)}
.resource-tabs button.active .tab-count{background:#ffffff2e;color:inherit}
.subject-pills{display:flex;flex-wrap:wrap;gap:6px;padding:12px 12px 4px}
.subject-pills[hidden]{display:none}
.pill{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:var(--panel);font-size:13px;font-weight:600;color:var(--text);transition:background .15s,border-color .15s}
.pill em{font-style:normal;font-size:11.5px;font-weight:650;color:var(--muted)}
.pill:hover{border-color:#c7d2fe;background:var(--soft)}
.pill.active{background:linear-gradient(135deg,#4f46e5,#6d5ae6);border-color:#4f46e5;color:#fff}
.pill.active em{color:#ffffffd0}
html[data-theme="dark"] .pill.active{background:linear-gradient(135deg,#6366f1,#7c6df2);border-color:#6366f1}
.group-heading{margin:10px 10px 4px;padding-top:6px;font-size:11px;font-weight:700;letter-spacing:1.3px;text-transform:uppercase;color:var(--muted)}
.chip-subject{background:#e0e7ff;color:#4338ca}
html[data-theme="dark"] .chip-subject{background:#3b3a73;color:#e0e7ff}
.lecture-select-subject{display:none}
@media(max-width:1000px){.lecture-select-subject:not([hidden]){display:block;flex:1 1 200px}}
@media(max-width:700px){.lecture-select-subject:not([hidden]){flex:0 0 auto;order:2}.lecture-select-group{order:3}.lecture-select:not(.lecture-select-group):not(.lecture-select-subject){order:4}.stat-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
.pm-head{position:relative}
.pm-edit{margin-left:auto;align-self:flex-start;width:36px;height:36px;color:var(--muted)}
.pm-edit:hover{color:var(--brand)}
.pm-edit svg{width:18px;height:18px}
.pm-cancel{margin-top:8px;padding:4px 2px}

/* Quality badge when the source offers a single version */
.vc-select.is-fixed select{appearance:none;-webkit-appearance:none;pointer-events:none;opacity:1;background:#ffffff0d;padding:6px 10px;cursor:default;text-align:center}

/* Cover tints for the class- and exam-based categories */
.batch-cover[data-cat="CLASS-6-8"]{background:linear-gradient(140deg,#ffe9d6,#fbc9a0)}
.batch-cover[data-cat="CLASS-9"]{background:linear-gradient(140deg,#dff3fd,#a9dcf5)}
.batch-cover[data-cat="CLASS-10"]{background:linear-gradient(140deg,#e1f7e8,#aee3c2)}
.batch-cover[data-cat="CLASS-11"]{background:linear-gradient(140deg,#fde4f1,#f3b5d6)}
.batch-cover[data-cat="CLASS-12"]{background:linear-gradient(140deg,#ece7fd,#c9bcf4)}
.batch-cover[data-cat="ENTRANCE"]{background:linear-gradient(140deg,#e0e7ff,#b3c0f7)}
.batch-cover[data-cat="GOVT"]{background:linear-gradient(140deg,#fff2c9,#f3d97f)}
.batch-cover[data-cat="TEACHING"]{background:linear-gradient(140deg,#ffe3e6,#f6b3bd)}
.batch-cover[data-cat="CA"]{background:linear-gradient(140deg,#eaf7cc,#c5e48a)}
.batch-cover[data-cat="MEDICAL"]{background:linear-gradient(140deg,#d6f4f6,#9ad8de)}
.batch-cover[data-cat="SKILLS"]{background:linear-gradient(140deg,#f8e4fb,#e2b3ee)}
html[data-theme="dark"] .batch-cover[data-cat]{background:linear-gradient(140deg,#2a2950,#201f3a)}

/* NextTopper and KGS (Akki) sections */
.akki-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 4px 0 26px; }
.akki-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.akki-tabs a { padding: 9px 20px; border-radius: 9px; text-decoration: none; color: var(--muted, #6b6a7c); font-weight: 650; font-size: 14px; transition: background .15s, color .15s; }
.akki-tabs a:hover { color: var(--text); }
.akki-tabs a.active { background: #5b4bff; color: #fff; box-shadow: 0 6px 14px -6px #5b4bff99; }
.akki-search { width: min(380px, 100%); }
.akki-search input { font-size: 14px; padding-top: 12px; padding-bottom: 12px; }
.akki-search > span { margin: 0 10px 0 14px; }
.akki-search svg { width: 17px; height: 17px; }
.akki-card { text-decoration: none; color: inherit; }
.akki-row { text-decoration: none; color: inherit; }
.akki-row.is-unavailable { opacity: .6; }
.akki-group { margin-top: 30px; }
.akki-group:first-child { margin-top: 0; }
.akki-about { margin: 0 0 18px; }
.akki-about summary { cursor: pointer; font-weight: 600; }
.akki-about p { margin: 8px 0 0; line-height: 1.6; }
[hidden] { display: none !important; }
@media (max-width: 640px) { .akki-toolbar { flex-direction: column; align-items: stretch; } .akki-tabs { display: flex; } .akki-tabs a { flex: 1; text-align: center; } .akki-search { width: 100%; } }
.akki-player { width: min(960px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--surface, #fff); color: inherit; }
.akki-player::backdrop { background: rgba(10, 8, 20, .7); }
.akki-player-top, .akki-player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.akki-player-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.akki-frame { aspect-ratio: 16 / 9; background: #000; }
.akki-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.akki-player-bar .small { text-align: center; }

@media (max-width: 860px) { .tabbar { grid-template-columns: repeat(5, 1fr); } .tabbar .tab-item span:last-child { font-size: 11px; } }
.akki-group .section-head { justify-content: flex-start; margin-top: 0; }
.batch-grid > [data-name] { display: flex; min-width: 0; }
.batch-grid > [data-name] > .akki-card { flex: 1; display: flex; flex-direction: column; }
.akki-card .batch-cover { flex: none; }
.akki-search + .akki-group, #akki-lectures { margin-top: 4px; } #akki-search { min-width: 0; }
.akki-group .section-count { margin-left: 0; }

/* Show every exam category at once on wide screens; small screens keep the swipeable row. */
@media (min-width: 861px) {
  .category-bar { flex-wrap: wrap; overflow: visible; row-gap: 10px; margin: 0 0 28px; padding: 4px 2px; }
}
@media (max-width: 860px) {
  .category-bar { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
}

/* Row action buttons (Play / Open PDF / Open) */
.akki-action { flex: none; min-width: 132px; min-height: 44px; padding: 0 18px; gap: 9px; border-radius: 12px; font-size: 14px; font-weight: 650; letter-spacing: -.1px; white-space: nowrap; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s, color .15s; }
.akki-action svg { width: 17px; height: 17px; flex: none; }
.akki-action:active { transform: scale(.97); }
.akki-action:disabled { opacity: .65; cursor: progress; }
.akki-action--play { color: #fff; border-color: transparent; background: linear-gradient(135deg, #4f46e5, #7058ee); box-shadow: 0 8px 18px -10px #4f46e5cc; }
.akki-action--play:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px #4f46e5e6; filter: none; }
.akki-action--pdf { color: #b42318; background: #fff1f0; border-color: #f7c9c4; }
.akki-action--pdf:hover { background: #ffe4e1; border-color: #f0a9a1; filter: none; }
.akki-action--open { color: #4338ca; background: #eef0ff; border-color: #d5d9fb; }
.akki-action--open:hover { background: #e2e6ff; border-color: #b9c0f7; filter: none; }
.akki-row:hover .akki-action--open svg { transform: translateX(2px); }
.akki-action--open svg { transition: transform .15s; }
html[data-theme="dark"] .akki-action--pdf { color: #ffb4ab; background: #3a1f24; border-color: #5c2f36; }
html[data-theme="dark"] .akki-action--open { color: #c7cbff; background: #25284d; border-color: #373b70; }
@media (max-width: 640px) {
  .akki-row { flex-wrap: wrap; }
  .akki-row > .akki-action { flex: 1 1 100%; min-height: 46px; }
}
.lesson-card > .akki-action { font-size: 14px; padding: 0 18px; min-height: 44px; }

/* Refined row actions: compact, filled play icon, soft shadow */
.akki-action { min-width: 112px; min-height: 40px; padding: 0 16px; gap: 8px; border-radius: 10px; font-size: 13.5px; font-weight: 650; }
.lesson-card > .akki-action { font-size: 13.5px; min-height: 40px; padding: 0 16px; }
.akki-action svg { width: 16px; height: 16px; }
.akki-action--play { background: #4f46e5; box-shadow: 0 1px 2px #1e1b4b33, inset 0 1px 0 #ffffff2e; }
.akki-action--play:hover { background: #4338ca; transform: translateY(-1px); box-shadow: 0 6px 14px -6px #4f46e599, inset 0 1px 0 #ffffff2e; }
.akki-action--play svg { fill: currentColor; stroke-linejoin: round; }
.akki-action--pdf svg, .akki-action--open svg { stroke-width: 1.8; }
html[data-theme="dark"] .akki-action--play { background: #6366f1; }
html[data-theme="dark"] .akki-action--play:hover { background: #7c7ff5; }
@media (max-width: 640px) { .akki-row > .akki-action { min-height: 44px; } .lesson-card > .akki-action { min-height: 44px; } }

/* Filter chips (batches, folders, chapters) */
.akki-facet { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 10px; }
.akki-facet-label { flex: none; width: 64px; padding-top: 11px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #8a8999); }
.akki-chips.category-bar { margin: 0; padding: 2px 0; gap: 8px; row-gap: 8px; flex: 1; min-width: 0; }
.akki-chips.category-bar button { font-size: 13px; min-height: 36px; padding: 0 14px; }
.akki-count { margin: 14px 0 18px; }
.akki-none { padding: 28px 0; text-align: center; }
.akki-none .button { margin-left: 8px; }
@media (max-width: 860px) {
  .akki-facet { flex-direction: column; gap: 4px; margin-bottom: 6px; }
  .akki-facet-label { width: auto; padding-top: 0; }
  .akki-chips.category-bar { width: 100%; flex: none; margin: 0 -2px; padding: 3px 2px; }
}

/* Focus mode: full-screen, distraction-free player */
.focus-toggle { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; padding: 7px 14px 7px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .15s, background .15s; }
.focus-toggle:hover { border-color: var(--ring, #8b8fd8); background: var(--soft, #f1f1fa); }
.focus-switch { position: relative; width: 32px; height: 19px; border-radius: 999px; background: #c9c9d9; transition: background .2s; flex: none; }
.focus-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0004; transition: transform .2s; }
.focus-toggle[aria-checked="true"] .focus-switch { background: #4f46e5; }
.focus-toggle[aria-checked="true"] .focus-switch::after { transform: translateX(13px); }
.player-focus-title { display: none; }
.player-top .icon-button { flex: none; }

.player-dialog.focus { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; background: #05050a; color: #f4f4fb; overflow: hidden; box-shadow: none; }
.player-dialog.focus::backdrop { background: #000; backdrop-filter: none; }
.player-dialog.focus .player-top { position: absolute; inset: 0 0 auto 0; z-index: 12; gap: 16px; padding: 16px 24px 40px; border: 0; background: linear-gradient(#000d, #0000); color: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.player-dialog.focus.focus-awake .player-top { opacity: 1; pointer-events: auto; }
.player-dialog.focus .player-wordmark { display: none; }
.player-dialog.focus .player-focus-title { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.player-dialog.focus .focus-toggle { margin-left: 0; color: #fff; border-color: #ffffff4d; }
.player-dialog.focus .focus-toggle:hover { background: #ffffff1f; }
.player-dialog.focus .icon-button { color: #fff; border-color: #ffffff4d; background: transparent; }
.player-dialog.focus .player-layout { display: block; height: 100%; }
.player-dialog.focus .player-primary { height: 100%; display: flex; align-items: center; justify-content: center; }
.player-dialog.focus .playlist, .player-dialog.focus .player-details { display: none; }
.player-dialog.focus .video-wrap { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; background: #000; }
.player-dialog.focus .video-wrap video { height: 100%; background: #000; }
.player-dialog.focus:not(.focus-awake) .video-wrap { cursor: none; }
@media (max-width: 640px) {
  .player-dialog.focus .player-top { padding: 12px 14px 32px; gap: 10px; }
  .focus-toggle { padding-right: 10px; }
  .player-dialog.focus .player-focus-title { font-size: 14px; }
}

/* Animal avatars */
.avatar.has-pet { background: var(--pet-bg) padding-box; border-color: var(--pet-ring); box-shadow: 0 6px 14px -8px var(--pet-ring); }
.avatar .pet, .pm-avatar .pet { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 22px; line-height: 1; transition: transform .2s; }
.avatar:hover .pet { transform: scale(1.18) rotate(-6deg); }
.pm-avatar.has-pet { background: var(--pet-bg); box-shadow: 0 0 0 3px var(--pet-ring), 0 8px 18px -8px var(--pet-ring); }
.pm-avatar .pet { font-size: 30px; }
.pm-pet { display: block; margin: 2px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted, #6b6a7c); }

/* ===== Subjects ===== */
.subject-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.subject-card.is-rich { --h: 232; position: relative; overflow: hidden; align-items: center; gap: 18px; padding: 20px 22px 20px 26px; border-radius: 20px; background: var(--panel); transition: transform .18s, box-shadow .18s, border-color .18s; }
.subject-card.is-rich::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: hsl(var(--h) 72% 58%); }
.subject-card.is-rich::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: hsl(var(--h) 90% 60% / .08); pointer-events: none; transition: transform .3s; }
.subject-card.is-rich:hover { transform: translateY(-3px); border-color: hsl(var(--h) 60% 75%); box-shadow: 0 16px 30px -18px hsl(var(--h) 70% 45% / .55); }
.subject-card.is-rich:hover::after { transform: scale(1.4); }
.subject-card.is-rich .subject-symbol { width: 60px; height: 60px; margin: 0; border-radius: 18px; background: linear-gradient(145deg, hsl(var(--h) 95% 95%), hsl(var(--h) 85% 88%)); color: hsl(var(--h) 62% 38%); box-shadow: inset 0 0 0 1px hsl(var(--h) 70% 84%), 0 6px 14px -8px hsl(var(--h) 70% 45% / .6); }
.subject-card.is-rich .subject-symbol svg { width: 28px; height: 28px; stroke-width: 1.8; }
.subject-card.is-rich .subject-copy { display: flex; flex-direction: column; gap: 10px; min-width: 0; z-index: 1; }
.subject-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.subject-title h3 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.3px; }
.count-pill { padding: 3px 10px; border-radius: 999px; background: hsl(var(--h) 90% 94%); color: hsl(var(--h) 60% 36%); font-size: 12px; font-weight: 650; white-space: nowrap; }
.subject-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 10px; background: var(--soft); font-size: 13px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.meta-chip b { color: var(--text); font-weight: 700; }
.meta-chip svg { width: 14px; height: 14px; color: hsl(var(--h) 60% 45%); flex: none; }
.meta-chip.is-plain { background: transparent; padding-left: 0; }
.subject-card.is-rich .tile-arrow { align-self: center; z-index: 1; color: hsl(var(--h) 55% 50%); }
.subject-card.is-all { grid-column: 1 / -1; padding: 26px 28px 26px 32px; background: linear-gradient(120deg, hsl(var(--h) 100% 97%), var(--panel) 70%); border-color: hsl(var(--h) 80% 86%); }
.subject-card.is-all .subject-symbol { width: 68px; height: 68px; }
.subject-card.is-all h3 { font-size: 21px; }
html[data-theme="dark"] .subject-card.is-rich .subject-symbol { background: linear-gradient(145deg, hsl(var(--h) 38% 26%), hsl(var(--h) 38% 19%)); color: hsl(var(--h) 90% 82%); box-shadow: inset 0 0 0 1px hsl(var(--h) 40% 34%), 0 8px 16px -10px #000; }
html[data-theme="dark"] .count-pill { background: hsl(var(--h) 40% 22%); color: hsl(var(--h) 90% 82%); }
html[data-theme="dark"] .meta-chip svg { color: hsl(var(--h) 80% 72%); }
html[data-theme="dark"] .subject-card.is-rich::before { background: hsl(var(--h) 70% 62%); }
html[data-theme="dark"] .subject-card.is-rich:hover { border-color: hsl(var(--h) 50% 42%); box-shadow: 0 18px 32px -20px hsl(var(--h) 80% 55% / .55); }
html[data-theme="dark"] .subject-card.is-all { background: linear-gradient(120deg, hsl(var(--h) 45% 17%), var(--panel) 70%); border-color: hsl(var(--h) 40% 30%); }
@media (max-width: 640px) { .subject-card.is-rich { padding: 16px 16px 16px 20px; gap: 14px; } .subject-card.is-rich .subject-symbol, .subject-card.is-all .subject-symbol { width: 52px; height: 52px; border-radius: 16px; } .subject-title h3 { font-size: 16px; } .meta-chip { font-size: 12.5px; padding: 4px 9px; } }

/* ===== Direct player ===== */
.direct-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.direct-card { display: flex; flex-direction: column; padding: 32px; }
.direct-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.direct-head h2 { margin: 0 0 4px; font-size: 24px; }
.direct-head p { margin: 0; font-size: 14px; }
.direct-badge { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, #4f46e5, #8b5cf6); color: #fff; box-shadow: 0 10px 20px -10px #4f46e5; }
.direct-badge svg { width: 24px; height: 24px; fill: currentColor; }
.format-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.format-pills span { padding: 4px 11px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.input-with-action { position: relative; display: flex; align-items: center; }
.input-with-action input { padding-left: 44px; padding-right: 96px; }
.input-icon { position: absolute; left: 14px; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.input-icon svg { width: 18px; height: 18px; }
.paste-button { position: absolute; right: 7px; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font-size: 13px; font-weight: 650; cursor: pointer; transition: background .15s, border-color .15s; }
.paste-button:hover { background: var(--soft); border-color: var(--ring, #8b8fd8); }
.paste-button svg { width: 15px; height: 15px; }
.direct-submit { min-height: 50px; margin-top: 22px; border-radius: 14px; font-size: 15px; }
.direct-submit svg { fill: currentColor; width: 16px; height: 16px; }
.direct-recent { margin-top: 20px; }
.direct-recent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.link-button { border: 0; background: none; color: var(--brand, #4f46e5); font-size: 13px; font-weight: 650; cursor: pointer; text-transform: none; letter-spacing: 0; }
.direct-recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font-size: 13px; font-weight: 550; cursor: pointer; transition: border-color .15s, background .15s; }
.recent-chip:hover { border-color: var(--ring, #8b8fd8); background: var(--soft); }
.recent-chip svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.recent-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.direct-card .or-divider { margin: 26px 0 18px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 !important; padding: 26px 18px; border: 2px dashed var(--line); border-radius: 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.dropzone:hover, .dropzone.is-over { border-color: #6366f1; background: #6366f10f; }
.dropzone.is-over { transform: scale(1.01); }
.dropzone strong { font-size: 15px; }
.dropzone small { color: var(--muted); font-size: 13px; font-weight: 450; }
.dropzone-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 14px; background: var(--soft); color: #5b4fe0; }
.dropzone-icon svg { width: 22px; height: 22px; }
.direct-art { justify-content: center; gap: 6px; padding: 40px 32px; }
.direct-art .giant-play svg { width: 34px; height: 34px; fill: currentColor; }
.direct-art h3 { margin: 34px 0 18px; }
.art-points { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; text-align: left; width: min(320px, 100%); }
.art-points li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: #ffffffb3; color: #2d2b55; font-size: 14px; font-weight: 550; }
.art-points svg { width: 18px; height: 18px; flex: none; color: #5b4fe0; }
html[data-theme="dark"] .art-points li { background: #ffffff12; color: #dcdcf5; }
html[data-theme="dark"] .art-points svg { color: #a5b4fc; }
html[data-theme="dark"] .dropzone:hover, html[data-theme="dark"] .dropzone.is-over { background: #818cf81a; border-color: #818cf8; }
@media (max-width: 860px) { .direct-layout { grid-template-columns: 1fr; } .direct-card { padding: 22px; } .direct-head h2 { font-size: 20px; } .direct-art { display: flex; padding: 28px 20px; } }
@media (max-width: 1180px) { .direct-layout { grid-template-columns: 1fr; } .direct-art { padding: 30px 24px; } .direct-art h3 { margin: 24px 0 14px; } .art-points { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 560px; } }
@media (max-width: 640px) { .art-points { grid-template-columns: 1fr; } }
.direct-head h2 { text-wrap: balance; }
.direct-card .dropzone { display: flex; font-size: inherit; }

/* ===== Embedded video-site player (YouTube, Vimeo, ...) ===== */
.embed-player { width: min(1100px, 96vw); max-height: 96dvh; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #0b0b14; color: #f4f4fb; box-shadow: 0 30px 90px #000a; }
.embed-player::backdrop { background: #0a0714cc; backdrop-filter: blur(6px); }
.embed-player .ep-top { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.embed-player .ep-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.embed-player .focus-toggle { margin-left: 0; color: #fff; border-color: #ffffff40; }
.embed-player .focus-toggle:hover { background: #ffffff1f; }
.embed-player .icon-button { color: #fff; border-color: #ffffff40; background: transparent; flex: none; }
.ep-stage { position: relative; aspect-ratio: 16 / 9; background: #000; max-height: calc(96dvh - 170px); width: 100%; margin: 0 auto; }
.ep-host, .ep-host > div, .ep-host iframe { width: 100%; height: 100%; border: 0; display: block; }
.ep-shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.ep-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: none; }
.ep-loading[hidden], .ep-message[hidden], .ep-toast[hidden], .ep-shield[hidden], .ep-controls[hidden], .ep-badge[hidden], .embed-player .vc-select[hidden] { display: none !important; }
.ep-message { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 24px; text-align: center; background: #0b0b14; font-size: 16px; line-height: 1.6; color: #d9dafc; }
.ep-toast { position: absolute; left: 50%; top: 14px; z-index: 4; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: #000b; color: #fff; font-size: 14px; font-weight: 600; pointer-events: none; }
.ep-controls { padding: 4px 18px 10px; background: #0b0b14; }
.ep-seek { width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --played: 0%; }
.ep-seek::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: linear-gradient(to right, #818cf8 var(--played), #ffffff30 var(--played)); }
.ep-seek::-moz-range-track { height: 5px; border-radius: 999px; background: #ffffff30; }
.ep-seek::-moz-range-progress { height: 5px; border-radius: 999px; background: #818cf8; }
.ep-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #818cf855; }
.ep-seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.ep-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ep-left, .ep-right { display: flex; align-items: center; gap: 6px; }
.ep-time { margin-left: 8px; font-size: 13px; font-variant-numeric: tabular-nums; color: #c9cae8; }
.ep-badge { padding: 4px 10px; border-radius: 999px; background: #ffffff1a; color: #dfe0ff; font-size: 12px; font-weight: 700; }
.embed-player .vc-button { color: #fff; }
.embed-player .vc-select select { background: #ffffff14; color: #fff; border: 1px solid #ffffff2e; border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.embed-player .vc-select select option { color: #111; }
.ep-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px 14px; background: #0b0b14; }
.ep-bar:empty { display: none; }
.embed-player .ep-bar .button { color: #fff; border-color: #ffffff33; background: transparent; }
.embed-player .ep-bar .button-primary { background: #4f46e5; border-color: #4f46e5; }

.embed-player.focus { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: #000; }
.embed-player.focus::backdrop { background: #000; backdrop-filter: none; }
.embed-player.focus .ep-stage { position: absolute; inset: 0; max-height: none; aspect-ratio: auto; height: 100%; }
.embed-player.focus .ep-top { position: absolute; inset: 0 0 auto 0; z-index: 12; padding: 16px 24px 44px; background: linear-gradient(#000d, #0000); opacity: 0; pointer-events: none; transition: opacity .25s; }
.embed-player.focus .ep-controls { position: absolute; inset: auto 0 0 0; z-index: 12; padding: 40px 24px 16px; background: linear-gradient(#0000, #000d); opacity: 0; pointer-events: none; transition: opacity .25s; }
.embed-player.focus .ep-bar { display: none; }
.embed-player.focus.awake .ep-top, .embed-player.focus.awake .ep-controls { opacity: 1; pointer-events: auto; }
.embed-player.focus:not(.awake) .ep-shield { cursor: none; }
@media (max-width: 640px) {
  .embed-player { width: 100vw; max-width: 100vw; border-radius: 0; }
  .embed-player .ep-top { padding: 10px 12px; gap: 8px; }
  .embed-player .ep-title { font-size: 14px; }
  .ep-controls { padding: 2px 12px 8px; }
  .ep-time { display: none; }
}

/* Readable native dropdown lists inside the embedded player */
.embed-player .vc-select select { color-scheme: dark; appearance: auto; cursor: pointer; font-weight: 600; min-width: 74px; }
.embed-player .vc-select select option { background: #1a1a30; color: #f4f4fb; font-size: 14px; padding: 8px 12px; }
.embed-player .vc-select select option:checked { background: #4f46e5; color: #fff; }
/* Keep the embedded video exactly 16:9 and centred so it never stretches or pillarboxes oddly */
.embed-player:not(.focus) .ep-stage { width: min(100%, calc((96dvh - 170px) * 16 / 9)); max-height: none; aspect-ratio: 16 / 9; margin-inline: auto; }
.embed-player.focus .ep-stage { width: auto; max-height: none; aspect-ratio: auto; }

/* Fullscreen of the embedded player: video fills the screen, controls fade like Focus mode */
.embed-player .ep-body:fullscreen { position: relative; width: 100%; height: 100%; background: #000; }
.embed-player .ep-body:fullscreen .ep-stage { position: absolute; inset: 0; width: auto; max-height: none; aspect-ratio: auto; height: 100%; margin: 0; }
.embed-player .ep-body:fullscreen .ep-controls { position: absolute; inset: auto 0 0 0; z-index: 12; padding: 40px 24px 16px; background: linear-gradient(#0000, #000d); opacity: 0; pointer-events: none; transition: opacity .25s; }
.embed-player.awake .ep-body:fullscreen .ep-controls { opacity: 1; pointer-events: auto; }
.embed-player:not(.awake) .ep-body:fullscreen .ep-shield { cursor: none; }
.ep-body { display: block; }

/* ===== Compact hero ===== */
.hero { min-height: 0; padding: 28px 34px; margin-bottom: 28px; border-radius: 22px; }
.hero-copy { max-width: min(620px, 66%); }
.hero-label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 5px 11px; font-size: 11px; letter-spacing: 1.1px; }
.hero h1, .hero h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -.9px; margin: 0 0 8px; }
.hero p { margin: 0; max-width: 480px; font-size: 14.5px; line-height: 1.55; }
.hero-actions { gap: 10px; margin-top: 18px; }
.hero-actions .button { min-height: 42px; padding: 9px 18px; font-size: 14px; border-radius: 12px; }
.hero-art { right: 20px; width: min(240px, 30%); opacity: .9; }
@media (max-width: 720px) {
  .hero { padding: 20px 18px; margin-bottom: 20px; border-radius: 18px; }
  .hero-copy { max-width: 100%; }
  .hero-label { font-size: 10.5px; margin-bottom: 10px; }
  .hero h1, .hero h2 { font-size: 24px; letter-spacing: -.6px; }
  .hero p { font-size: 13.5px; }
  .hero-actions { margin-top: 14px; flex-wrap: nowrap; }
  .hero-actions .button { flex: 1 1 0; min-width: 0; padding: 9px 12px; font-size: 13.5px; }
  .hero-resume span { max-width: 100px; }
  .hero-art { display: none; }
}

/* ===== Search boxes ===== */
.search-box { position: relative; display: flex; align-items: center; gap: 2px; min-height: 48px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, background .15s; }
.search-box > span { display: grid; place-items: center; margin: 0 8px 0 14px; color: var(--muted); transition: color .15s; }
.search-box:focus-within { border-color: #6366f1; box-shadow: 0 0 0 4px #6366f12e; }
.search-box:focus-within > span { color: #6366f1; }
.search-box input { flex: 1; min-width: 0; padding: 13px 4px 13px 0; border: 0; background: transparent !important; color: var(--text); font-size: 15px; outline: none; box-shadow: none; -webkit-appearance: none; appearance: none; }
.search-box input::placeholder { color: var(--muted); opacity: .85; }
.search-box input::-webkit-search-cancel-button, .search-box input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
/* Keep the browser's autofill / selection tint from painting the field light blue */
.search-box input:-webkit-autofill, .search-box input:-webkit-autofill:hover, .search-box input:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); caret-color: var(--text); transition: background-color 99999s ease-out; box-shadow: 0 0 0 1000px var(--panel) inset; }
.search-box input::selection { background: #6366f155; color: inherit; }
.search-clear { display: none; place-items: center; flex: none; width: 28px; height: 28px; margin-right: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.search-clear svg { width: 14px; height: 14px; stroke-width: 2.4; }
.search-clear:hover { background: #6366f126; color: #6366f1; }
.search-box.has-value .search-clear { display: grid; }
.search-box.has-value kbd { display: none; }
.search-box kbd { margin-right: 12px; }
html[data-theme="dark"] .search-box { background: #1b1a2e; border-color: #34324f; }
html[data-theme="dark"] .search-box:focus-within { border-color: #818cf8; box-shadow: 0 0 0 4px #818cf833; }
html[data-theme="dark"] .search-box:focus-within > span { color: #a5b4fc; }
html[data-theme="dark"] .search-box input:-webkit-autofill { box-shadow: 0 0 0 1000px #1b1a2e inset; }
html[data-theme="dark"] .search-clear { background: #2a2945; color: #b9bbe6; }
.hero-copy { max-width: min(660px, 74%); }
.hero h1, .hero h2 { font-size: clamp(22px, 2.7vw, 32px); }
.hero p { max-width: none; }
.hero-resume span { max-width: 160px; }
.hero-actions { flex-wrap: nowrap; }
@media (max-width: 720px) { .hero-copy { max-width: 100%; } .hero-actions { flex-wrap: nowrap; } }
.hero { padding: 24px 34px; }
@media (max-width: 720px) { .hero { padding: 18px 18px; } }
.lecture-groups-head { display: flex; align-items: center; gap: 10px; }
.group-flip { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .2s; }
.group-flip:hover { background: var(--soft); color: #6366f1; border-color: #6366f1; }
.group-flip.is-flipped { background: #6366f1; border-color: #6366f1; color: #fff; transform: rotate(180deg); }
.lecture-groups-head #group-total { order: 2; }
.lecture-groups-head .group-flip { order: 3; margin-left: 0; }
.lecture-groups-head strong { margin-right: auto; }

/* ---------- Profile page ---------- */
.avatar.is-active { outline: 3px solid var(--ring); outline-offset: 2px; }
.pf { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.pf-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 20px 20px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #a78bfa 0%, transparent 55%), linear-gradient(140deg, #4f46e5, #7c3aed); box-shadow: 0 22px 44px -24px #4f46e5cc; }
.pf-hero:after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; bottom: -110px; border-radius: 50%; border: 28px solid #ffffff12; pointer-events: none; }
.pf-hero-top { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.pf-avatar { flex-shrink: 0; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 24px; background: #ffffff2b; border: 2px solid #ffffff55; box-shadow: 0 10px 24px -12px #0006; }
.pf-avatar svg { width: 34px; height: 34px; stroke: #fff; stroke-width: 1.8; }
.pf-avatar.has-pet { background: var(--pet-bg); border-color: #fff; }
.pf-avatar .pet, .drawer-avatar .pet { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 40px; line-height: 1; }
.pf-who { min-width: 0; flex: 1; }
.pf-who h1 { margin: 0; font-size: 26px; letter-spacing: -.6px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-who p { margin: 6px 0 0; font-size: 13px; color: #e0e7ff; }
.pf-edit { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 1px solid #ffffff40; background: #ffffff1f; color: #fff; }
.pf-edit:active { transform: scale(.94); }
.pf-name { position: relative; z-index: 1; margin-top: 18px; display: grid; gap: 8px; }
.pf-name label { font-size: 13px; font-weight: 700; color: #eef2ff; }
.pf-name div { display: flex; gap: 8px; }
body.is-typing .tabbar { display: none; }
.pf-name input { flex: 1 1 auto; width: 0; min-width: 0; height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid #ffffff55; background: #ffffff26; color: #fff; font-size: 16px; }
.pf-name input::placeholder { color: #e0e7ffaa; }
.pf-name input:focus { outline: 2px solid #fff; outline-offset: 1px; }
.pf-save { flex: none; height: 48px; padding: 0 20px; border: 0; border-radius: 14px; background: #fff; color: #4338ca; font-weight: 800; font-size: 15px; }
.pf-pet { font-size: 13px; color: #e0e7ff; }
.pf-cancel { justify-self: start; border: 0; background: none; color: #fff; text-decoration: underline; font-size: 13px; padding: 4px 0; }
.pf-level { position: relative; z-index: 1; margin-top: 20px; padding: 14px; border-radius: 16px; background: #ffffff1c; border: 1px solid #ffffff2e; }
.pf-level-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-badge { font-size: 14px; font-weight: 800; }
.pf-level-head small { font-size: 12px; color: #e0e7ff; }
.pf-level-bar { margin-top: 10px; height: 8px; border-radius: 99px; background: #ffffff30; overflow: hidden; }
.pf-level-bar i { display: block; height: 100%; min-width: 8px; border-radius: 99px; background: linear-gradient(90deg, #fde68a, #fbbf24); }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pf-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.pf-stat b { font-size: 20px; letter-spacing: -.4px; font-weight: 800; margin-top: 6px; }
.pf-stat small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pf-stat-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; }
.pf-stat-icon svg { width: 18px; height: 18px; stroke-width: 2.1; }
.pf-stat-icon.is-time { background: #e0e7ff; color: #4338ca; }
.pf-stat-icon.is-streak { background: #fef3c7; color: #b45309; }
.pf-stat-icon.is-started { background: #dbeafe; color: #1d4ed8; }
.pf-stat-icon.is-done { background: #dcfce7; color: #15803d; }
.pf-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.pf-week-card { padding: 18px 18px 14px; }
.pf-week-card .pm-bar { background: var(--soft); height: 70px; max-width: 34px; }
.pf-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pf-card-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.pf-card-head span { font-size: 12px; color: var(--muted); font-weight: 600; }
.pf-note { margin: 12px 2px 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.pf-resume { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-sm); color: var(--text); }
.pf-resume > svg { color: var(--brand); flex-shrink: 0; }
.pf-resume-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(140deg, #6366f1, #8b5cf6); color: #fff; flex-shrink: 0; box-shadow: 0 10px 20px -12px #6366f1; }
.pf-resume-icon svg { width: 22px; height: 22px; fill: #fff; stroke: #fff; }
.pf-resume.is-empty .pf-resume-icon svg { fill: none; }
.pf-resume-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pf-resume-copy small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pf-resume-copy strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-resume .recent-progress { margin: 4px 0 0; height: 5px; display: block; }
.pf-group { display: grid; gap: 10px; }
.pf-group > h2 { margin: 0; padding: 0 4px; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 750; }
.pf-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; font: inherit; }
.pf-card > .pf-row:first-child { border-top: 0; }
.pf-row > svg:first-child { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; }
.pf-row > svg:last-child:not(:first-child) { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.pf-row.is-link:active { background: var(--soft); }
.pf-row:disabled { opacity: .5; cursor: default; }
.pf-row-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pf-row-copy strong { font-size: 15px; font-weight: 650; }
.pf-row-copy small { font-size: 12px; color: var(--muted); }
.pf-row.is-danger > svg:first-child, .pf-row.is-danger strong { color: #dc2626; }
.pf-row.is-confirming { background: #fee2e2; }
.pf-row.is-confirming strong, .pf-row.is-confirming > svg:first-child { color: #b91c1c; }
.pf-count { font-style: normal; min-width: 28px; text-align: center; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--brand); font-size: 12px; font-weight: 750; }
.pf-segment { display: flex; padding: 3px; border-radius: 12px; background: var(--soft); flex-shrink: 0; }
.pf-segment button { display: flex; align-items: center; gap: 5px; border: 0; background: none; padding: 7px 10px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pf-segment button svg { width: 15px; height: 15px; }
.pf-segment button[aria-checked="true"] { background: var(--panel); color: var(--brand); box-shadow: var(--shadow-sm); }
.pf-select { flex-shrink: 0; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--soft); color: var(--text); font-size: 14px; font-weight: 700; }
.pf-switch { flex-shrink: 0; position: relative; width: 50px; height: 30px; border: 0; border-radius: 99px; background: #cbd0e4; padding: 0; transition: background .2s; }
.pf-switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #0003; transition: transform .2s; }
.pf-switch[aria-checked="true"] { background: #6366f1; }
.pf-switch[aria-checked="true"] span { transform: translateX(20px); }
.pf-version { font-size: 14px; font-weight: 750; color: var(--muted); }
.pf-footer { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pf-footer img { border-radius: 7px; }
.pf-footer span { color: #f59e0b; margin-left: -6px; }
html[data-theme="dark"] .pf-stat-icon.is-time { background: #312e81; color: #c7d2fe; }
html[data-theme="dark"] .pf-stat-icon.is-streak { background: #451a03; color: #fcd34d; }
html[data-theme="dark"] .pf-stat-icon.is-started { background: #1e3a8a; color: #bfdbfe; }
html[data-theme="dark"] .pf-stat-icon.is-done { background: #14532d; color: #bbf7d0; }
html[data-theme="dark"] .pf-switch { background: #3b3a5c; }
html[data-theme="dark"] .pf-row.is-confirming { background: #450a0a; }
html[data-theme="dark"] .pf-row.is-confirming strong, html[data-theme="dark"] .pf-row.is-confirming > svg:first-child, html[data-theme="dark"] .pf-row.is-danger strong, html[data-theme="dark"] .pf-row.is-danger > svg:first-child { color: #fca5a5; }
@media (max-width: 520px) {
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-row .pf-row-copy small { display: none; }
  .pf-segment button { padding: 7px 9px; }
}

/* Drawer profile card */
.drawer-profile { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); color: var(--text); }
.drawer-profile > svg { width: 16px; height: 16px; color: var(--muted); }
.drawer-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; color: #fff; background: linear-gradient(140deg, #6366f1, #8b5cf6); }
.drawer-avatar.has-pet { background: var(--pet-bg); border: 2px solid var(--pet-ring); }
.drawer-avatar .pet { font-size: 24px; }
.drawer-avatar svg { width: 20px; height: 20px; }
.drawer-profile-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.drawer-profile-copy strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-profile-copy small { font-size: 11px; color: var(--muted); }

/* ---------- Phone player: a full-screen in-app page instead of a floating dialog ---------- */
.player-back, .player-now, .vc-center { display: none; }
.seek-ripple { position: absolute; z-index: 6; top: 0; bottom: 0; width: 38%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font-size: 12px; pointer-events: none; opacity: 0; }
.seek-ripple svg { width: 30px; height: 30px; stroke-width: 2.2; }
.seek-ripple b { font-weight: 700; text-shadow: 0 1px 4px #0008; }
.seek-ripple.is-left { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; background: radial-gradient(circle at 0 50%, #ffffff38, #ffffff14 60%, transparent 72%); }
.seek-ripple.is-right { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; background: radial-gradient(circle at 100% 50%, #ffffff38, #ffffff14 60%, transparent 72%); }
.seek-ripple.show { animation: seek-ripple .65s ease-out; }
@keyframes seek-ripple { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 800px), (pointer: coarse) and (max-width: 1100px) {
  .player-dialog:not(.focus) { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; background: var(--bg); box-shadow: none; overflow: hidden; }
  .player-dialog:not(.focus)[open] { display: flex; flex-direction: column; }
  .player-dialog:not(.focus)::backdrop { background: var(--bg); backdrop-filter: none; }
  .player-dialog:not(.focus) .player-top { flex: none; position: relative; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px 6px; background: var(--panel); border-bottom: 1px solid var(--line); }
  .player-dialog:not(.focus) .player-back { display: inline-flex; width: 44px; height: 44px; border: 0; border-radius: 14px; background: transparent; color: var(--text); }
  .player-dialog:not(.focus) .player-back svg { width: 24px; height: 24px; stroke-width: 2.2; transform: rotate(180deg); }
  .player-dialog:not(.focus) .player-back:active { background: var(--soft); }
  .player-dialog:not(.focus) .player-now { display: grid; gap: 1px; flex: 1; min-width: 0; }
  .player-now small { font-size: 11px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; color: var(--brand); }
  .player-now strong { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .player-dialog:not(.focus) .player-wordmark, .player-dialog:not(.focus) .focus-toggle, .player-dialog:not(.focus) #close-player { display: none; }

  /* The video stays pinned under the top bar while the details and lecture list scroll beneath it. */
  .player-dialog:not(.focus) .player-layout { display: block; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .player-dialog:not(.focus) .player-primary { display: contents; }
  .player-dialog:not(.focus) .video-wrap { position: sticky; top: 0; z-index: 6; width: 100%; aspect-ratio: 16 / 9; height: auto; min-height: 0; max-height: 46dvh; border-radius: 0; background: #000; }
  .player-dialog:not(.focus) .video-wrap video { width: 100%; height: 100%; }

  .video-play-large { display: none !important; }
  .vc-center { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; gap: clamp(28px, 11vw, 64px); pointer-events: none; opacity: 0; transition: opacity .2s; }
  .video-wrap.controls-visible .vc-center, .video-wrap.is-paused .vc-center { opacity: 1; }
  .video-wrap.controls-visible .vc-center button, .video-wrap.is-paused .vc-center button { pointer-events: auto; }
  .vc-center button { position: relative; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: #0a0612a6; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 18px -6px #000a; }
  .vc-center button:active { transform: scale(.92); }
  .vc-center-play { width: 64px; height: 64px; }
  .vc-center-play svg { width: 30px; height: 30px; fill: #fff; stroke: #fff; }
  .vc-center-skip { width: 48px; height: 48px; }
  .vc-center-skip svg { width: 22px; height: 22px; stroke-width: 2.1; }
  .vc-center-skip small { position: absolute; bottom: 5px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 800; line-height: 1; }

  .video-controls { padding: 34px 10px 6px; background: linear-gradient(transparent, #050209b8 55%, #050209e8); }
  .video-wrap #video-toggle, .video-wrap #back-ten, .video-wrap #forward-ten, .video-wrap .vc-volume, .video-wrap #pip-toggle, .video-wrap #theater-toggle { display: none; }
  .video-wrap .video-clock { margin-left: 4px; font-size: 12px; font-weight: 650; }
  .video-wrap .vc-right { gap: 6px; }
  .video-wrap .vc-select select { height: 30px; font-size: 12px; border-radius: 9px; padding: 0 8px; }
  .video-wrap .vc-button { min-width: 38px; height: 38px; border-radius: 10px; }
  .video-wrap .vc-button svg { width: 21px; height: 21px; }
  .video-timeline { height: 22px; margin-bottom: 2px; }
  .video-timeline input { height: 4px; }
  .video-timeline input::-webkit-slider-thumb { width: 16px; height: 16px; background: #fff; box-shadow: 0 0 0 4px #6366f155; }
  .video-feedback { top: 14%; padding: 8px 14px; font-size: 13px; border-radius: 99px; }

  .player-dialog:not(.focus) .player-details { padding: 16px 16px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
  .player-dialog:not(.focus) .player-details h2 { font-size: 18px; line-height: 1.4; margin: 6px 0 14px; }
  .player-dialog:not(.focus) .player-shortcuts { display: none; }
  .player-dialog:not(.focus) .player-controls { display: flex; gap: 10px; }
  .player-dialog:not(.focus) .player-controls .button { height: 46px; border-radius: 14px; font-size: 14px; font-weight: 700; }
  .player-dialog:not(.focus) .player-controls #loop-lecture { margin-left: 0; padding: 0 16px; }
  .player-dialog:not(.focus) .player-controls #next-lecture { flex: 1; }
  .player-dialog:not(.focus) .playlist { margin-top: 10px; border: 0; border-top: 1px solid var(--line); background: var(--panel); max-height: none; overflow: visible; padding-bottom: env(safe-area-inset-bottom); }
  .player-dialog:not(.focus) .playlist-heading { top: 0; }
  .player-dialog:not(.focus) .playlist-item { min-height: 64px; }

  .video-wrap:fullscreen .video-controls { padding: 50px max(18px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
  .video-wrap:fullscreen .vc-center-play { width: 76px; height: 76px; }
  .video-wrap:fullscreen .vc-center-skip { width: 56px; height: 56px; }
}

/* Phones: quality stays available in landscape/fullscreen, and controls really hide while playing
   (a tapped button keeps :focus/:hover on touch screens, which used to pin the controls open). */
@media (max-width: 800px), (pointer: coarse) and (max-width: 1100px) {
  .video-wrap .vc-quality { display: block; }
}
@media (hover: none) {
  .video-wrap:not(.controls-visible):not(.is-paused) .video-controls { opacity: 0; pointer-events: none; }
}

/* Phone turned sideways with a lecture open: the video fills the whole screen. */
.player-dialog.is-landscape { background: #000; }
.player-dialog.is-landscape::backdrop { background: #000; }
.player-dialog.is-landscape .player-top, .player-dialog.is-landscape .player-details, .player-dialog.is-landscape .playlist { display: none; }
.player-dialog.is-landscape .player-layout { overflow: hidden; }
.player-dialog.is-landscape .video-wrap { position: fixed; inset: 0; z-index: 20; width: 100vw; height: 100dvh; max-height: none; aspect-ratio: auto; background: #000; }
.player-dialog.is-landscape .video-wrap video { width: 100%; height: 100%; object-fit: contain; }
.player-dialog.is-landscape .video-controls { padding: 56px max(22px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
.player-dialog.is-landscape .vc-center-play { width: 76px; height: 76px; }
.player-dialog.is-landscape .vc-center-skip { width: 56px; height: 56px; }
.player-dialog.is-landscape .vc-center { gap: 96px; }
.player-dialog.is-landscape .video-clock { font-size: 14px; }

/* ---------- Speed chip and panel (phones) ---------- */
.vc-chip { display: none; }
.speed-panel { position: absolute; z-index: 9; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 20px)); max-height: calc(100% - 16px); overflow: auto; padding: 12px; border-radius: 18px; background: #120e1ef0; border: 1px solid #ffffff1f; box-shadow: 0 18px 40px -12px #000c; color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.speed-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; }
.speed-head strong { font-size: 14px; font-weight: 750; }
.speed-close { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px; background: #ffffff14; color: #fff; }
.speed-close svg { width: 16px; height: 16px; }
.speed-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.speed-options button { height: 40px; border: 1px solid #ffffff1f; border-radius: 12px; background: #ffffff12; color: #f4f4fb; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.speed-options button:active { transform: scale(.96); }
.speed-options button[aria-pressed="true"] { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px #6366f1; }
@media (max-width: 800px), (pointer: coarse) and (max-width: 1100px) {
  .video-wrap .vc-select:has(#playback-speed) { display: none; }
  .video-wrap .vc-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; height: 32px; padding: 0 12px; border: 1px solid #ffffff3d; border-radius: 99px; background: #ffffff1a; color: #fff; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .video-wrap .vc-chip.is-changed { background: #6366f1; border-color: #818cf8; }
  .video-wrap .vc-chip[aria-expanded="true"] { background: #fff; color: #312e81; }
  .video-wrap .vc-quality select { border-radius: 99px; height: 32px; padding: 0 12px; font-weight: 800; background: #ffffff1a; border-color: #ffffff3d; }
  .player-dialog.is-landscape .speed-panel { width: min(680px, calc(100% - 48px)); padding: 16px; }
  .player-dialog.is-landscape .speed-options { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .player-dialog.is-landscape .speed-options button { height: 46px; font-size: 13px; }
}

/* ---------- Lectures page on phones ---------- */
@media (max-width: 800px) {
  .breadcrumb { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; margin: -4px -20px 12px; padding: 0 20px; font-size: 13px; }
  .breadcrumb::-webkit-scrollbar { display: none; }
  main:has(.resource-tabs) .page-heading { margin-bottom: 12px; }
  main:has(.resource-tabs) .page-heading .eyebrow { display: none; }
  main:has(.resource-tabs) .page-title { font-size: 26px; line-height: 1.2; margin: 0; }
  main:has(.resource-tabs) .page-description { display: none; }

  main .resource-tabs { display: flex; gap: 4px; margin: 0 0 14px; padding: 4px; overflow: visible; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  main .resource-tabs button { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 0 9px; border: 0; border-radius: 12px; background: transparent; font-size: 13px; font-weight: 650; white-space: nowrap; }
  main .resource-tabs button .tab-count { font-size: 11px; padding: 1px 6px; border-radius: 99px; }
  main .resource-tabs button .tab-count.is-zero { display: none; }
  main .resource-tabs button:has(.tab-count.is-zero) { color: var(--muted); }
  main .resource-tabs button.active { box-shadow: 0 6px 14px -8px #4f46e5; }

  .lecture-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
  .lecture-toolbar .lecture-search { grid-column: 1 / -1; }
  .lecture-toolbar .lecture-select-subject:not([hidden]) { grid-column: 1 / -1; }
  .lecture-toolbar .lecture-search input { min-height: 44px; font-size: 15px; }
  .lecture-toolbar .lecture-select, .lecture-toolbar .lecture-select select { width: 100%; }
  .lecture-toolbar .lecture-select select { min-height: 42px; padding: 0 34px 0 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
  .lecture-toolbar .lecture-select:last-child select { padding-right: 30px; }
  .lecture-summary { margin: 0 2px 10px; font-size: 13px; }

  .lesson-list { gap: 10px; }
  .lesson-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; }
  .lesson-card > .button { display: none; }
  .lesson-card .lesson-play { width: 44px; height: 44px; flex-shrink: 0; }
  .lesson-card .lesson-play svg { width: 18px; height: 18px; }
  .lesson-copy { min-width: 0; flex: 1; }
  .lesson-copy .lesson-kicker { font-size: 11px; letter-spacing: .4px; }
  .lesson-copy h3 { font-size: 15.5px; line-height: 1.35; margin: 3px 0 0; }
  .lesson-copy p { gap: 6px; margin: 8px 0 0; font-size: 12px; }
  .lesson-copy .chip { font-size: 11px; padding: 3px 8px; }
  .lesson-copy .recent-progress { margin-top: 10px; height: 4px; }
  .lesson-card.is-clickable:active { transform: scale(.99); background: var(--soft); }
}

/* Phones: time and buttons sit in one slim row, and the seek line runs along the very bottom of the video
   (YouTube style), clear of the play and ±10 buttons in the middle. */
@media (max-width: 800px), (pointer: coarse) and (max-width: 1100px) {
  .video-wrap .video-controls { display: flex; flex-direction: column; padding: 28px 0 0; background: linear-gradient(transparent, #050209a6 45%, #050209e0); }
  .video-wrap .vc-controls-row { order: 1; padding: 0 12px 2px; min-height: 36px; }
  .video-wrap .video-timeline { order: 2; height: 18px; margin: 0; padding: 0 12px; align-items: flex-end; }
  .video-wrap .video-timeline input { height: 3px; margin-bottom: 6px; }
  .video-wrap .video-timeline:focus-within input, .video-wrap .video-timeline:active input { height: 5px; }
  .video-wrap .video-timeline input::-webkit-slider-thumb { width: 14px; height: 14px; }
  /* While the controls are hidden, a thin progress line stays at the bottom edge. */
  .video-wrap::after { content: ""; position: absolute; z-index: 4; left: 0; bottom: 0; height: 2px; width: var(--played, 0%); background: linear-gradient(90deg, #6366f1, #a78bfa); pointer-events: none; transition: opacity .2s; }
  .video-wrap.controls-visible::after, .video-wrap.is-paused::after { opacity: 0; }
  .player-dialog.is-landscape .video-controls { padding: 44px 0 max(4px, env(safe-area-inset-bottom)); }
  .player-dialog.is-landscape .vc-controls-row { padding: 0 max(22px, env(safe-area-inset-right)) 4px max(22px, env(safe-area-inset-left)); }
  .player-dialog.is-landscape .video-timeline { height: 24px; padding: 0 max(22px, env(safe-area-inset-right)) 0 max(22px, env(safe-area-inset-left)); }
  .player-dialog.is-landscape .video-timeline input { margin-bottom: 10px; height: 4px; }
}

@media (max-width: 800px), (pointer: coarse) and (max-width: 1100px) {
  .video-wrap .vc-controls-row, .video-wrap:fullscreen .vc-controls-row { flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .video-wrap .vc-left { flex: 0 1 auto; }
}

/* ---------- Branded loading: the Study Talk logo with a turning ring ---------- */
.player-loading { z-index: 8; gap: 14px; padding: 20px; color: #e0e7ff; background: radial-gradient(70% 90% at 50% 45%, #3730a3 0%, #1e1b4b 45%, #0b0816 100%); }
.player-loading::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 16% 20%, #8b5cf61f 0 10%, transparent 10.5%), radial-gradient(circle at 86% 82%, #6366f11a 0 14%, transparent 14.5%); pointer-events: none; }
.pl-logo { position: relative; display: grid; place-items: center; width: 84px; height: 84px; flex-shrink: 0; }
.pl-logo img { position: relative; z-index: 1; width: 58px; height: 58px; border-radius: 17px; box-shadow: 0 12px 30px -8px #6366f1cc; animation: pl-breathe 1.6s ease-in-out infinite; }
.pl-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, #a5b4fc 80%, #fbbf24 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); animation: player-spin 1s linear infinite; }
.player-loading p { position: relative; font-size: 14px; font-weight: 650; line-height: 1.5; max-width: 320px; }
.pl-dots { position: relative; display: flex; gap: 6px; }
.pl-dots i { width: 6px; height: 6px; border-radius: 50%; background: #a5b4fc; animation: pl-dot 1s ease-in-out infinite; }
.pl-dots i:nth-child(2) { animation-delay: .15s; }
.pl-dots i:nth-child(3) { animation-delay: .3s; }
.pl-brand { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .4px; color: #c7d2fe99; }
.pl-brand b { color: #fbbf24; }
@keyframes pl-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.92); } }
@keyframes pl-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 800px), (pointer: coarse) and (max-width: 1100px) {
  .player-dialog:not(.is-landscape) .player-loading { gap: 8px; }
  .player-dialog:not(.is-landscape) .pl-logo { width: 66px; height: 66px; }
  .player-dialog:not(.is-landscape) .pl-logo img { width: 46px; height: 46px; border-radius: 14px; }
  .player-dialog:not(.is-landscape) .player-loading p { font-size: 13px; }
  .player-dialog:not(.is-landscape) .pl-brand { display: none; }
}

/* Page loading: the logo breathes above the message. */
.inline-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 20px; font-size: 15px; font-weight: 600; color: var(--muted); }
.inline-loading .loading-dot { width: 48px; height: 48px; margin: 0; border-radius: 15px; background: url(/favicon.svg) center / cover no-repeat; box-shadow: 0 12px 26px -12px #6366f1; animation: pl-breathe 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pl-ring, .pl-logo img, .pl-dots i, .inline-loading .loading-dot { animation-duration: 3s; } }

/* Phones: the batch header is one compact row — small cover, name, and a round bookmark button. */
@media (max-width: 800px) {
  .batch-intro { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 12px; margin-bottom: 18px; border-radius: 18px; }
  .batch-intro img { flex: none; width: 104px; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; object-fit: cover; }
  .batch-intro > div:not(.intro-actions) { flex: 1; min-width: 0; }
  .batch-intro .eyebrow { font-size: 10.5px; letter-spacing: 1px; }
  .batch-intro h1 { font-size: 17px; line-height: 1.3; letter-spacing: -.3px; margin: 3px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .batch-intro .small { display: none; }
  .batch-intro .intro-actions { flex: none; width: auto; margin: 0; }
  .batch-intro .intro-actions .button { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 14px; font-size: 0; gap: 0; box-shadow: 0 8px 18px -10px #4f46e5; }
  .batch-intro .intro-actions .button svg { width: 20px; height: 20px; }
  .batch-intro .intro-actions .button.saved svg { fill: currentColor; }
}

/* ---------- Continue watching ---------- */
.cw { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cw-title { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.7px; }
.cw-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.cw-clear { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 700; }
.cw-clear svg { width: 16px; height: 16px; }
.cw-clear.is-confirming { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.cw-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 22px; color: #fff; cursor: pointer; background: radial-gradient(110% 120% at 100% 0%, #8b5cf6 0%, transparent 55%), linear-gradient(140deg, #312e81, #4f46e5); box-shadow: 0 20px 40px -22px #4f46e5; }
.cw-hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 200px; height: 200px; border-radius: 50%; border: 26px solid #ffffff10; pointer-events: none; }
.cw-hero:active { transform: scale(.99); }
.cw-hero-top { display: flex; align-items: center; justify-content: space-between; }
.cw-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: #ffffff22; font-size: 12px; font-weight: 700; }
.cw-badge svg { width: 14px; height: 14px; }
.cw-hero-top b { font-size: 13px; color: #fde68a; }
.cw-hero h2 { margin: 4px 0 0; font-size: 19px; line-height: 1.35; font-weight: 750; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cw-from { margin: 0; font-size: 13px; color: #e0e7ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-progress { height: 5px; border-radius: 99px; background: #ffffff2e; overflow: hidden; }
.cw-progress span { display: block; height: 100%; min-width: 4px; border-radius: 99px; background: linear-gradient(90deg, #fde68a, #fbbf24); }
.cw-hero .cw-progress { margin-top: 6px; }
.cw-hero-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.cw-hero-foot span { font-size: 12.5px; color: #e0e7ff; font-variant-numeric: tabular-nums; }
.cw-resume { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border: 0; border-radius: 14px; background: #fff; color: #4338ca; font-size: 14px; font-weight: 800; box-shadow: 0 10px 20px -12px #000; }
.cw-resume svg { width: 16px; height: 16px; fill: currentColor; }
.cw-sub { margin: 8px 4px 0; font-size: 13px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.cw-list { display: flex; flex-direction: column; gap: 10px; }
.cw-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; }
.cw-row:active { background: var(--soft); }
.cw-thumb { flex: none; position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #4338ca; background: conic-gradient(#6366f1 var(--p, 0%), #e0e7ff 0); }
.cw-thumb::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--panel); }
.cw-thumb svg { position: relative; width: 18px; height: 18px; fill: currentColor; }
.cw-copy { flex: 1; min-width: 0; }
.cw-copy h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cw-copy p { margin: 3px 0 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-row-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cw-row-foot .cw-progress { flex: 1; height: 4px; background: var(--soft); }
.cw-row-foot .cw-progress span { background: linear-gradient(90deg, #6366f1, #a78bfa); }
.cw-row-foot small { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cw-remove { flex: none; align-self: flex-start; display: grid; place-items: center; width: 32px; height: 32px; margin: -2px -2px 0 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.cw-remove svg { width: 16px; height: 16px; }
.cw-remove:active { background: var(--soft); }
html[data-theme="dark"] .cw-thumb { color: #c7d2fe; background: conic-gradient(#818cf8 var(--p, 0%), #2e2d45 0); }
html[data-theme="dark"] .cw-clear.is-confirming { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }

/* Access gate and update prompt (public/gate.js) */
.gate{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px 16px;background:radial-gradient(ellipse at top,#aab0ec55,transparent 60%),#f2f3f8f5;backdrop-filter:blur(8px);overflow-y:auto}
.gate[hidden]{display:none}
.gate-card{width:min(400px,100%);background:var(--panel);border:1px solid var(--line);border-radius:24px;padding:30px 24px 24px;text-align:center;box-shadow:0 30px 80px -20px #29224040}
.gate-mark{width:72px;height:72px;margin:0 auto 18px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(140deg,#e4e5f4,#c9cdf3);box-shadow:0 0 0 10px #aab0ec22}
.gate-mark.is-update{background:linear-gradient(140deg,#e1f3ea,#bfe6d1);box-shadow:0 0 0 10px #4caf7a22}
.gate-card h2{font-size:23px;letter-spacing:-.6px;margin:0 0 8px}
.gate-text{color:var(--muted);font-size:14px;line-height:1.6;margin:0 0 18px}
.gate-text b{color:var(--text)}
.gate-steps{text-align:left;margin:0 0 20px;padding:14px 16px 14px 36px;background:var(--bg);border-radius:14px;font-size:13px;line-height:1.9;color:var(--muted)}
.gate-steps b{color:var(--text);font-weight:650}
.gate-notes{text-align:left;white-space:pre-wrap;background:var(--bg);border-radius:14px;padding:14px 16px;margin:0 0 18px;font-size:13px;line-height:1.7;color:var(--muted);max-height:180px;overflow:auto}
.gate-card .button{min-height:48px;font-size:14px;border-radius:13px}
.gate-card .button+.button{margin-top:10px}
.gate-msg{margin:14px 0 0;font-size:13px;line-height:1.6;color:var(--muted)}
.gate-msg:empty{display:none}
html[data-theme="dark"] .gate{background:radial-gradient(ellipse at top,#5b5fb044,transparent 60%),#1b1820f5}
html[data-theme="dark"] .gate-mark{background:linear-gradient(140deg,#2c2a49,#3a3870)}
html[data-theme="dark"] .gate-mark.is-update{background:linear-gradient(140deg,#1f3a2c,#2a5a40)}
