*{box-sizing:border-box}body{margin:0;background:#f6f8fc;color:#182840;font:16px Kanit,"Noto Sans Thai",Tahoma,system-ui,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;background:white;border:1px solid #dbe3ee;border-radius:10px;padding:10px 16px;color:inherit}button.active,.primary{background:#1266dc;color:white}header{background:white;border-bottom:1px solid #e0e7ef;padding:18px 5%;display:flex;justify-content:space-between;align-items:center;gap:15px}header b{font-size:24px;color:#1266dc}nav{display:flex;gap:8px;flex-wrap:wrap}main{max-width:1250px;margin:auto;padding:28px 24px}.banner{background:#1266dc;color:white;padding:25px 30px;border-radius:18px;margin-bottom:28px}.banner h1{margin:0;font-size:28px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:20px}.card{background:white;border:1px solid #dde4ee;border-radius:15px;overflow:hidden;display:flex;flex-direction:column}.cover{padding:28px 22px;background:var(--tint);height:155px;color:var(--color);font-size:28px;font-weight:600}.cover small{font-size:16px;display:block}.body{padding:18px;flex:1}.body h3{margin:4px 0 16px}.muted{color:#58667c;font-size:14px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:15px 0}progress{width:100%;accent-color:#1266dc;height:8px}.layout{display:grid;grid-template-columns:310px 1fr;gap:24px}.panel{background:white;padding:22px;border:1px solid #dde4ee;border-radius:14px}.lesson{display:block;width:100%;text-align:left;margin:7px 0}.player{background:#101c2b;aspect-ratio:16/9;border-radius:14px;display:grid;place-items:center;color:white;overflow:hidden}.player video{width:100%;height:100%}label{display:block;margin:14px 0 6px}input,select,textarea{width:100%;padding:11px;border:1px solid #ccd7e5;border-radius:8px;background:white}input[type=checkbox]{width:auto}textarea{min-height:85px}.form{max-width:620px;margin:auto}.notice{background:#fff1ca;padding:12px 20px;font-size:14px}.tabs{display:flex;gap:8px;margin:18px 0}.empty{padding:32px;text-align:center;color:#58667c}@media(max-width:760px){header{align-items:flex-start;flex-direction:column}.layout{display:flex;flex-direction:column}.layout aside{order:2}main{padding:20px 15px}nav :is(button,a){padding:8px 12px}.banner{padding:20px}.banner h1{font-size:24px}}

body{padding-bottom:100px}header{justify-content:center}header nav{position:fixed;bottom:0;left:0;right:0;z-index:100;background:#fff;border-top:1px solid #dce4ef;display:flex;justify-content:center;gap:0;padding:8px 16px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #18284008}header nav :is(button,a){border:0;background:transparent;color:#5b6a82;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:130px;min-height:60px;font-size:14px}header nav :is(button,a).active{background:#eef5ff;color:#1266dc}header nav svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}header nav :is(button,a):focus-visible{outline:2px solid #1266dc;outline-offset:-2px}@media(max-width:760px){header{align-items:center}header nav{flex-wrap:nowrap;padding-left:8px;padding-right:8px}header nav :is(button,a){width:25%;max-width:130px;padding:7px 8px}}

.learning-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:30px;margin-top:20px;align-items:start}.sidebar-shell{background:#eaf0f8;border:1px solid #ccd8e9;border-radius:18px;padding:12px;display:flex;flex-direction:column;gap:12px}.course-info{background:#fff;border:1px solid #d5e2f2;border-radius:12px;padding:20px;min-height:180px}.course-info h2{font-size:22px;margin:0 0 8px}.course-info p{margin:8px 0}.content-card{background:white;border:1px solid #d5ddea;border-radius:12px;padding:10px;min-height:410px}.learning-tabs{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 1fr;border-bottom:1px solid #e0e5ed;margin-bottom:14px}.learning-tabs button{border:0;border-radius:0;background:transparent;padding:13px 4px;color:#5b6a82}.learning-tabs button[aria-selected=true]{color:#1266dc}.tab-line{position:absolute;bottom:-1px;left:0;width:50%;height:3px;background:#1266dc;border-radius:3px;transition:transform .28s ease}.chapter-card{border:1px solid #dbe2ed;border-radius:10px;margin-bottom:10px;overflow:hidden;background:#fff}.chapter-card.current-chapter{border-color:#87b6fa;box-shadow:0 0 0 1px #87b6fa;background:#f5f9ff}.chapter-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;border:0;border-radius:0;padding:13px 12px;text-align:left;background:#f3f6fb;font-weight:500}.current-chapter .chapter-heading{background:#e8f1ff;color:#105dbb}.chevron{width:9px;height:9px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(-45deg);transition:transform .2s;margin:4px 5px 0}.chapter-heading[aria-expanded=false] .chevron{transform:rotate(45deg);margin-top:0}.chapter-items[hidden]{display:none}.chapter-items .lesson{margin:0;padding:13px 12px;border:0;border-top:1px solid #e3e9f2;border-radius:0;background:transparent;font-size:15px}.chapter-items .lesson.active{color:#1266dc;background:#e6efff;border-left:3px solid #1266dc}.chapter-heading small{display:block;font-size:12px;font-weight:400}.file-row{width:100%;border:0;border-top:1px solid #e3e9f2;border-radius:0;text-align:left;padding:13px 12px;background:transparent;display:block;color:inherit;text-decoration:none;font-size:14px}.video-heading h2{font-size:28px;margin:0 0 6px}.video-heading p{font-size:20px;margin:0 0 18px}.lesson-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:18px;flex-wrap:wrap}.lesson-actions button:disabled{opacity:.4;cursor:default}.demo-screen{text-align:center;padding:25px}.demo-screen strong{display:block;font-size:25px;margin-bottom:10px}.demo-play{border:1px solid #61748c;border-radius:50%;width:62px;height:62px;margin:0 auto 18px;display:grid;place-items:center;background:#22344b;color:white;font-size:26px}.demo-file-note{font-size:14px;color:#58667c;margin:12px 0}.demo-toast{position:fixed;bottom:110px;left:50%;transform:translateX(-50%);background:#182840;color:white;padding:12px 20px;border-radius:12px;z-index:110;max-width:90%;text-align:center}
@media(min-width:1101px) and (hover:hover) and (pointer:fine){body{padding-bottom:0}header{position:sticky;top:0;z-index:100;justify-content:space-between}header nav{position:static;width:auto;border:0;box-shadow:none;padding:0;gap:8px}header nav :is(button,a){width:auto;min-height:44px;flex-direction:row;padding:10px 16px}header nav svg{width:21px;height:21px}.demo-toast{bottom:30px}}
@media(max-width:760px){.learning-layout{grid-template-columns:minmax(0,1fr);gap:20px}.learning-layout .video-column{grid-row:1}.sidebar-shell{padding:10px}.content-card{min-height:0}.video-heading h2{font-size:24px}.video-heading p{font-size:18px}.lesson-actions{gap:8px}.lesson-actions button{font-size:14px;padding:9px 11px}}
@media(prefers-reduced-motion:reduce){.tab-line,.chevron{transition:none}}

/* ---- ส่วนที่เพิ่มสำหรับระบบจริง ---- */
.notice{background:#fff1ca;padding:12px 20px;font-size:14px;text-align:center}
.google-btn{display:inline-flex;align-items:center;gap:10px;background:#fff;color:#182840;border:1px solid #cfd9e7;border-radius:999px;padding:12px 22px;text-decoration:none;font-weight:500}
.google-btn:hover{background:#f3f7fd}.google-btn svg{width:20px;height:20px}
.lesson{display:flex;align-items:center;justify-content:space-between;gap:8px}
.lesson .tick{width:18px;height:18px;flex:none;border:1.5px solid #b7c4d6;border-radius:50%;display:grid;place-items:center;color:transparent}
.lesson.done .tick{background:#1266dc;border-color:#1266dc;color:#fff}
.tick svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.file-row{display:flex;align-items:center;gap:10px}.file-row svg,.demo-play svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.demo-play svg{width:26px;height:26px;fill:currentColor;stroke:none}
.player .loading{color:#9fb1c8;font-size:15px}
.tbl{width:100%;border-collapse:collapse;font-size:14px;background:#fff;border:1px solid #dde4ee;border-radius:12px;overflow:hidden}
.tbl th,.tbl td{padding:11px 12px;text-align:left;border-bottom:1px solid #edf1f6;vertical-align:middle}.tbl th{background:#f3f6fb;font-weight:500}
.tbl-wrap{overflow-x:auto}
.badge{display:inline-block;font-size:12px;padding:3px 10px;border-radius:999px;background:#eef2f8;color:#53647c}.badge.on{background:#e1f4e6;color:#1e6a3f}.badge.off{background:#fff1c9;color:#8a5a00}
.admin-tabs{display:flex;gap:8px;margin:14px 0 22px;flex-wrap:wrap}
.editor{display:grid;gap:18px;max-width:900px}
.sec{background:#fff;border:1px solid #dde4ee;border-radius:14px;padding:20px}.sec h2{margin:0 0 4px;font-size:19px}
.chip-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.chip-row button{padding:6px 12px;font-size:13px;border-radius:999px}
.ch-box{border:1px solid #dbe2ed;border-radius:12px;padding:14px;margin-top:14px;background:#f8fafd}
.ch-head,.ls-row,.fl-row{display:flex;gap:8px;align-items:center}
.ch-head input{font-weight:500}.ls-row,.fl-row{margin-top:10px;flex-wrap:wrap;background:#fff;border:1px solid #e3e9f2;border-radius:10px;padding:10px}
.ls-row .nm,.fl-row .nm{flex:2 1 200px}.ls-row .src,.fl-row .src{flex:3 1 260px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ls-row .src input[type=url]{flex:1 1 180px}
.mini{padding:6px 10px;font-size:13px;border-radius:8px}.danger{color:#b43a3a;border-color:#efc9c9}
.uploaded{font-size:13px;color:#1e6a3f;word-break:break-all}.progress-txt{font-size:13px;color:#53647c}
.sticky-save{position:sticky;bottom:84px;background:#ffffffee;backdrop-filter:blur(4px);border:1px solid #dde4ee;border-radius:14px;padding:12px 16px;display:flex;gap:10px;justify-content:flex-end;align-items:center;flex-wrap:wrap}
@media(min-width:1101px) and (hover:hover) and (pointer:fine){.sticky-save{bottom:16px}}
.sr{position:absolute;left:-9999px}

/* ---- กระจกฝ้า + hover (liquid glass) ---- */
:root{--glass:rgba(255,255,255,.58);--glass-strong:rgba(255,255,255,.78);--glass-edge:rgba(255,255,255,.75);--glass-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 10px 30px -12px rgba(24,40,64,.18),0 2px 6px rgba(24,40,64,.04);--ease:cubic-bezier(.22,.8,.24,1)}
body{background:radial-gradient(60vmax 45vmax at 8% -5%,#dbe8ff 0,transparent 60%),radial-gradient(50vmax 40vmax at 100% 10%,#ece4ff 0,transparent 58%),radial-gradient(55vmax 40vmax at 40% 105%,#d9f1f0 0,transparent 60%),#f6f8fc;background-attachment:fixed}
header{background:var(--glass-strong);border-bottom-color:rgba(255,255,255,.7)}
header nav{background:var(--glass-strong)}
@supports((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
 header,header nav,.sticky-save{-webkit-backdrop-filter:blur(18px) saturate(1.6);backdrop-filter:blur(18px) saturate(1.6)}
 header,header nav{background:rgba(255,255,255,.62)}
 .card,.sidebar-shell,.panel,.sec,.tbl{-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4)}
}
.card,.panel,.sec{background:var(--glass);border:1px solid var(--glass-edge);box-shadow:var(--glass-shadow)}
.sidebar-shell{background:rgba(234,240,248,.55);border:1px solid var(--glass-edge);box-shadow:var(--glass-shadow)}
.course-info,.content-card{background:var(--glass-strong);border-color:rgba(255,255,255,.8)}
.card{position:relative;isolation:isolate;transition:transform .45s var(--ease),box-shadow .45s var(--ease),border-color .3s}
.card::before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0;transition:opacity .35s;background:radial-gradient(260px circle at var(--mx,50%) var(--my,30%),rgba(255,255,255,.75),rgba(255,255,255,0) 62%);mix-blend-mode:soft-light}
.card::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:inherit;opacity:0;transition:opacity .35s;box-shadow:inset 0 0 0 1px rgba(255,255,255,.9),inset 0 1px 0 rgba(255,255,255,1);background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.35) 48%,transparent 60%) no-repeat;background-size:250% 100%;background-position:120% 0}
.cover{transition:transform .6s var(--ease)}
@media(hover:hover) and (pointer:fine){
 .card:hover{transform:translateY(-6px);border-color:#fff;box-shadow:0 1px 0 #fff inset,0 24px 44px -18px rgba(18,102,220,.28),0 8px 18px -8px rgba(24,40,64,.12)}
 .card:hover::before,.card:hover::after{opacity:1}
 .card:hover::after{background-position:-40% 0;transition:opacity .35s,background-position .9s var(--ease)}
 .card:hover .cover{transform:scale(1.04)}
 button{transition:background .25s,box-shadow .3s var(--ease),transform .25s var(--ease),border-color .25s,color .25s}
 button:not(.primary):not(:disabled):not(.active):hover{background:rgba(255,255,255,.85);border-color:#fff;box-shadow:0 6px 16px -8px rgba(18,102,220,.35)}
 .primary:not(:disabled):hover{box-shadow:0 8px 22px -6px rgba(18,102,220,.55),0 0 0 4px rgba(18,102,220,.12);transform:translateY(-1px)}
 button:not(:disabled):active{transform:scale(.97)}
 header nav :is(button,a):not(.active):hover{background:rgba(18,102,220,.07);color:#1266dc}
 .chapter-heading:hover{background:#e9f0fb}
 .chapter-items .lesson:not(.active):hover,.file-row:hover{background:rgba(18,102,220,.06);box-shadow:none;transform:none}
 .tbl tbody tr{transition:background .2s}.tbl tbody tr:hover{background:rgba(18,102,220,.05)}
}
@media(prefers-reduced-motion:reduce){.card,.cover,button{transition:none}.card:hover{transform:none}.card:hover .cover{transform:none}.card::after{display:none}}
@media(min-width:1101px) and (hover:hover) and (pointer:fine){header nav{background:transparent!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}}

/* ---- ความยาว / เปอร์เซ็นรายบทและคอร์ส ---- */
.lesson .meta{display:flex;align-items:center;gap:10px;flex:none}
.lesson .dur{font-size:12px;color:#5b6a82;font-variant-numeric:tabular-nums}
.course-stat{font-size:14px;color:#3d5170;margin:12px 0 6px}
progress.thin{display:block;height:5px;width:100%;border:0;border-radius:99px;overflow:hidden;background:#e3eaf4;appearance:none;-webkit-appearance:none}
progress.thin::-webkit-progress-bar{background:#e3eaf4;border-radius:99px}
progress.thin::-webkit-progress-value{background:#1266dc;border-radius:99px;transition:width .4s var(--ease)}
progress.thin::-moz-progress-bar{background:#1266dc;border-radius:99px}
.chapter-card>progress.thin{border-radius:0;height:4px}
.chapter-heading small{margin-top:3px;color:#58667c}.current-chapter .chapter-heading small{color:#3d6fb4}

/* ---- dropdown ของเว็บเอง ---- */
.cs{position:relative;width:100%}
.cs-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;padding:11px 12px;border:1px solid #ccd7e5;border-radius:8px;background:rgba(255,255,255,.85)}
.cs-btn svg{width:16px;height:16px;fill:none;stroke:#58667c;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:none;transition:transform .25s var(--ease)}
.cs.open .cs-btn{border-color:#1266dc;box-shadow:0 0 0 3px rgba(18,102,220,.14)}.cs.open .cs-btn svg{transform:rotate(180deg)}
.cs-btn:focus-visible{outline:2px solid #1266dc;outline-offset:1px}
.cs-list{position:absolute;z-index:60;left:0;right:0;top:calc(100% + 6px);min-width:100%;max-height:260px;overflow:auto;margin:0;padding:6px;list-style:none;background:rgba(255,255,255,.92);border:1px solid #fff;border-radius:12px;box-shadow:0 18px 40px -12px rgba(24,40,64,.28),0 2px 8px rgba(24,40,64,.08);-webkit-backdrop-filter:blur(16px) saturate(1.5);backdrop-filter:blur(16px) saturate(1.5);animation:csin .18s var(--ease)}
.cs-list[hidden]{display:none}
.cs-list li{padding:10px 12px;border-radius:8px;cursor:pointer;font-size:15px;display:flex;justify-content:space-between;gap:10px;outline:none}
.cs-list li:hover,.cs-list li:focus{background:rgba(18,102,220,.09)}
.cs-list li[aria-selected=true]{color:#1266dc;font-weight:500}
.cs-list li[aria-selected=true]::after{content:"";width:6px;height:11px;border:solid #1266dc;border-width:0 2px 2px 0;transform:rotate(45deg) translateY(-2px);flex:none;margin-right:4px}
@keyframes csin{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}
.filter-row{display:flex;gap:12px;flex-wrap:wrap;margin:15px 0 22px}.filter-row input{flex:1 1 240px;max-width:380px}.filter-row .cs{width:220px;flex:none}

/* ---- กล่องยืนยัน ---- */
.modal-bg{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:16px;background:rgba(24,40,64,.32);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);animation:mfade .18s ease}
.modal-bg.out{opacity:0;transition:opacity .18s}
.modal{width:100%;max-width:410px;background:rgba(255,255,255,.92);border:1px solid #fff;border-radius:20px;padding:26px;box-shadow:0 30px 70px -20px rgba(24,40,64,.45);animation:mpop .26s var(--ease)}
.modal h3{margin:0 0 8px;font-size:20px}.modal p{margin:0 0 22px;color:#3d5170;line-height:1.6}
.modal-actions{display:flex;justify-content:flex-end;gap:10px}
.primary.danger-fill{background:#c43d3d}.primary.danger-fill:hover{box-shadow:0 8px 22px -6px rgba(196,61,61,.55),0 0 0 4px rgba(196,61,61,.14)!important}
@keyframes mfade{from{opacity:0}}@keyframes mpop{from{opacity:0;transform:translateY(10px) scale(.96)}}

/* ---- หน้าหลัก ---- */
main{max-width:1180px}
.hero{position:relative;overflow:hidden;isolation:isolate;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:28px;align-items:center;padding:34px 36px;border-radius:26px;color:#fff;background:linear-gradient(125deg,#0f5bd0 0%,#2f7fee 55%,#69a8ff 100%);box-shadow:0 24px 50px -24px rgba(18,102,220,.6),0 1px 0 rgba(255,255,255,.4) inset;margin-bottom:22px}
.hero::before,.hero::after{content:"";position:absolute;z-index:-1;border-radius:50%;filter:blur(2px);pointer-events:none}
.hero::before{width:380px;height:380px;right:-90px;top:-170px;background:radial-gradient(circle,rgba(255,255,255,.38),rgba(255,255,255,0) 68%);animation:drift 14s ease-in-out infinite alternate}
.hero::after{width:300px;height:300px;left:30%;bottom:-190px;background:radial-gradient(circle,rgba(190,170,255,.5),rgba(190,170,255,0) 68%);animation:drift 18s ease-in-out infinite alternate-reverse}
.hero-main{background-image:radial-gradient(rgba(255,255,255,.2) 1px,transparent 1.3px);background-size:18px 18px;background-position:-9px -9px;margin:-34px 0 -34px -36px;padding:34px 0 34px 36px;-webkit-mask-image:linear-gradient(100deg,#000 25%,transparent 95%);mask-image:linear-gradient(100deg,#000 25%,transparent 95%)}
.hero-main>*{position:relative}
.hero-hello{margin:0 0 4px;font-size:16px;opacity:.9}.hero h1{margin:0;font-size:38px;line-height:1.2;font-weight:600;word-break:break-word}
.hero-sub{margin:10px 0 0;font-size:17px;opacity:.92}
.chips{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.chip{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;border-radius:999px;font-size:14px;background:rgba(8,38,96,.28);border:1px solid rgba(255,255,255,.45);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.chip svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hero-landing{grid-template-columns:minmax(0,1fr);padding:56px 44px}.hero-landing .hero-main{mask-image:none;-webkit-mask-image:none;background:none;margin:0;padding:0;max-width:640px}.hero-landing h1{font-size:44px}
@keyframes drift{to{transform:translate(-40px,30px) scale(1.1)}}

.resume{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px;border-radius:20px;color:#182840;text-decoration:none;background:rgba(255,255,255,.9);border:1px solid #fff;box-shadow:0 18px 40px -18px rgba(8,40,100,.5);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);transition:transform .45s var(--ease),box-shadow .45s var(--ease)}
.resume-tag{font-size:12px;font-weight:500;color:#1266dc;letter-spacing:.02em}
.resume-cover{align-self:flex-start;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:500;background:var(--tint);color:var(--color)}
.resume strong{font-size:19px;line-height:1.35;font-weight:500}.resume .muted{font-size:14px}
.resume-go{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14px;color:#3d5170;margin-top:2px}
.go-btn{display:inline-flex;align-items:center;gap:6px;background:#1266dc;color:#fff;padding:8px 14px;border-radius:999px;transition:box-shadow .3s var(--ease),transform .3s var(--ease)}
.go-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s var(--ease)}

.stat-grid,.feat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}
.feat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.tile,.resume,.card{--mx:50%;--my:30%}
.tile{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;gap:2px;padding:18px;border-radius:18px;background:var(--glass);border:1px solid var(--glass-edge);box-shadow:var(--glass-shadow);-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);transition:transform .45s var(--ease),box-shadow .45s var(--ease)}
.tile::before,.resume::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0;transition:opacity .35s;background:radial-gradient(240px circle at var(--mx) var(--my),rgba(18,102,220,.12),rgba(18,102,220,0) 65%)}
.tile-ic{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e4efff;color:#1266dc;margin-bottom:10px}.tile-ic svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tile-ic.sm{width:34px;height:34px;margin:0;flex:none;border-radius:10px}.tile-ic.sm svg{width:18px;height:18px}
.stat strong{font-size:26px;line-height:1.2;font-weight:600}.stat-l{font-size:15px;font-weight:500}.tile .muted{font-size:13px}
.stat:nth-child(2) .tile-ic{background:#e1f4e6;color:#277649}.stat:nth-child(3) .tile-ic{background:#efe7fb;color:#6b43b5}.stat:nth-child(4) .tile-ic{background:#fff1c9;color:#a36a00}
.feat h3{margin:4px 0 4px;font-size:18px;font-weight:500}.feat p{margin:0;color:#53647c;font-size:15px;line-height:1.6}

.two-col{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:16px;margin-bottom:30px}
.panel-g{background:var(--glass);border:1px solid var(--glass-edge);box-shadow:var(--glass-shadow);border-radius:18px;padding:20px;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.ph{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}.ph h2{margin:0 0 14px;font-size:19px}.sec-h{margin:8px 0 14px}.sec-h h2{margin:0}
.week{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;align-items:end;height:170px}
.wk{display:flex;flex-direction:column;align-items:center;gap:6px;height:100%}
.wk-bar{flex:1;width:100%;max-width:42px;display:flex;align-items:flex-end;background:rgba(18,102,220,.06);border-radius:10px;overflow:hidden}
.wk-bar i{display:block;width:100%;border-radius:10px;background:linear-gradient(180deg,#6aa6ff,#1266dc);transition:height .6s var(--ease)}
.wk-n{font-size:13px;height:16px;color:#3d5170;font-variant-numeric:tabular-nums}.wk-d{font-size:13px;color:#5b6a82}
.wk.today .wk-d{color:#1266dc;font-weight:600}.wk.today .wk-bar{background:rgba(18,102,220,.12)}
.rec-list{display:flex;flex-direction:column;gap:4px;margin:-6px}
.rec{display:flex;gap:12px;align-items:center;padding:10px 8px;border-radius:12px;text-decoration:none;color:inherit;transition:background .25s}
.rec-t{display:flex;flex-direction:column;min-width:0}.rec-t strong{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rec-t .muted{font-size:13px}
.empty-state{grid-column:1/-1;text-align:center;padding:40px 20px;background:var(--glass);border:1px dashed #b9cbe4;border-radius:18px}.empty-state svg{width:130px;margin-bottom:8px}.empty-state h3{margin:0 0 6px}.empty-state p{margin:0 auto;max-width:420px}
.done-txt{color:#277649;font-weight:500}

@media(hover:hover) and (pointer:fine){
 .tile:hover,.resume:hover{transform:translateY(-4px);box-shadow:0 1px 0 #fff inset,0 20px 40px -18px rgba(18,102,220,.3)}
 .tile:hover::before,.resume:hover::before{opacity:1}
 .resume:hover .go-btn{box-shadow:0 8px 20px -6px rgba(18,102,220,.6)}.resume:hover .go-btn svg{transform:translateX(3px)}
 .rec:hover{background:rgba(18,102,220,.07)}
 .wk:hover .wk-bar i{filter:brightness(1.12)}
}
@media(max-width:900px){.hero{grid-template-columns:minmax(0,1fr);padding:26px 22px}.hero-main{margin:-26px -22px -4px;padding:26px 22px 4px;-webkit-mask-image:none;mask-image:none}.hero h1{font-size:30px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feat-grid{grid-template-columns:minmax(0,1fr)}.two-col{grid-template-columns:minmax(0,1fr)}.hero-landing{padding:36px 22px}.hero-landing h1{font-size:32px}}
@media(max-width:480px){.stat strong{font-size:22px}.tile{padding:14px}.filter-row .cs{width:100%}}
@media(prefers-reduced-motion:reduce){.hero::before,.hero::after{animation:none}.cs-list,.modal,.modal-bg{animation:none}}
/* แก้: ลวดลายจุดต้องไม่บังตัวอักษร (ย้ายไปไว้ที่ ::before) */
.hero-main{background:none!important;margin:0!important;padding:0!important;-webkit-mask-image:none!important;mask-image:none!important;position:relative}
.hero-main::before{content:"";position:absolute;z-index:-1;pointer-events:none;inset:-34px -8% -34px -36px;background-image:radial-gradient(rgba(255,255,255,.22) 1px,transparent 1.3px);background-size:18px 18px;-webkit-mask-image:linear-gradient(100deg,#000 15%,transparent 90%);mask-image:linear-gradient(100deg,#000 15%,transparent 90%)}
.hero-landing .hero-main::before{inset:-56px -44px -56px -44px}
@media(max-width:900px){.hero-main::before{inset:-26px -22px -12px -22px}}
.two-col>.panel-g:first-child{display:flex;flex-direction:column}.two-col .week{flex:1;height:auto;min-height:170px}
.cs-btn:hover{border-color:#9fb4d0!important;background:#fff!important;box-shadow:none!important}.cs.open .cs-btn:hover{border-color:#1266dc!important;box-shadow:0 0 0 3px rgba(18,102,220,.14)!important}
html{scroll-padding-top:96px}
@media(max-width:1100px),(hover:none){html{scroll-padding-top:16px;scroll-padding-bottom:96px}}
/* ให้รายการ dropdown ลอยเหนือส่วนถัดไป (กล่องกระจกแต่ละอันเป็น stacking context แยกกัน) */
.sec:has(.cs.open),.panel:has(.cs.open),.tile:has(.cs.open){position:relative;z-index:70}

/* ---- วัตถุตกแต่งลอยใน hero ---- */
.fx{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.fxo{position:absolute;width:var(--s);margin:calc(var(--s)/-2) 0 0 calc(var(--s)/-2);transform:translate(calc(var(--px,0)*var(--d)*-1px),calc(var(--py,0)*var(--d)*-1px)) rotate(var(--r));transition:transform .5s var(--ease)}
.fxo svg{display:block;width:100%;height:auto;filter:drop-shadow(0 12px 14px rgba(6,36,96,.3));animation:bob 7s ease-in-out infinite;animation-delay:var(--t)}
.hero-main,.hero .resume{position:relative;z-index:1}
@keyframes bob{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-12px) rotate(4deg)}}
.hero-landing{min-height:340px;align-items:center}
@media(max-width:900px){.fxo{opacity:.4}.fxo.fx-lg{display:none}.fxo{--s:54px!important}.hero-landing{min-height:340px;align-items:center}}

/* ---- เคล็ดลับ ---- */
.tip{display:flex;gap:16px;align-items:center;padding:14px 20px;margin-bottom:16px;border-radius:18px;background:linear-gradient(100deg,rgba(255,244,196,.75),rgba(255,255,255,.55));border:1px solid var(--glass-edge);box-shadow:var(--glass-shadow);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.tip-o{flex:none;width:46px}.tip-o svg{display:block;width:100%;animation:bob 5s ease-in-out infinite;filter:drop-shadow(0 6px 8px rgba(160,110,0,.3))}
.tip strong{font-size:15px;font-weight:500;color:#8a5a00}.tip p{margin:2px 0 0;color:#3d5170;font-size:15px;line-height:1.5}

/* ---- วงแหวนเป้าหมาย ---- */
.goal{display:flex;align-items:center;gap:22px;flex-wrap:wrap;flex:1}
.goal-panel{display:flex;flex-direction:column}
.ring{position:relative;width:132px;height:132px;flex:none}.ring svg{width:100%;height:100%}
.ring-bg{fill:none;stroke:rgba(18,102,220,.12);stroke-width:11}
.ring-fg{fill:none;stroke:#1266dc;stroke-width:11;stroke-linecap:round;transition:stroke-dasharray .8s var(--ease)}
.ring.hit .ring-fg{stroke:#2fae6a}
.ring-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring-c strong{font-size:32px;line-height:1;font-weight:600}.ring-c strong small{font-size:16px;font-weight:400;color:#5b6a82}.ring-c span{font-size:13px;color:#5b6a82;margin-top:2px}
.goal-txt{flex:1;min-width:150px}.goal-txt p{margin:0 0 12px;color:#3d5170;line-height:1.5}
.stepper{display:inline-flex;align-items:center;gap:10px;padding:4px;border-radius:999px;background:rgba(18,102,220,.07);font-size:14px}
.stepper button{width:30px;height:30px;padding:0;border-radius:50%;line-height:1;font-size:18px;display:grid;place-items:center}
.stepper button:disabled{opacity:.4;cursor:default}.stepper span{min-width:84px;text-align:center}

/* ---- แผนที่การเรียน ---- */
.heat{display:flex;gap:8px;align-items:flex-start}
.heat-d{display:grid;grid-template-rows:repeat(7,1fr);gap:5px;font-size:11px;color:#5b6a82;padding-top:0;height:calc(7*28px + 6*5px)}.heat-d span{line-height:28px}
.heat-g{flex:1;min-width:0;display:grid;grid-template-rows:repeat(7,28px);grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:5px}
.hm{display:block;border-radius:7px;background:rgba(18,102,220,.07)}.hm.pad{background:none}
.hm.w{background:rgba(18,102,220,.17)}.hm.l1{background:#bcd6fb}.hm.l2{background:#79aef5}.hm.l3{background:#3d86ea}.hm.l4{background:#1266dc}
.heat-g .hm{transition:transform .25s var(--ease)}.heat-g .hm:not(.pad):hover{transform:scale(1.18)}
.heat-lg{display:flex;align-items:center;gap:5px;justify-content:flex-end;margin-top:12px;font-size:12px;color:#5b6a82}.heat-lg .hm{width:14px;height:14px;border-radius:4px}

/* ---- เหรียญรางวัล ---- */









@keyframes shine{0%,60%{left:-60%}100%{left:130%}}
@media(hover:hover) and (pointer:fine){}
@keyframes wiggle{30%{transform:rotate(-12deg) scale(1.1)}60%{transform:rotate(8deg) scale(1.1)}}

/* ---- ขั้นตอน (หน้าแรกก่อนล็อกอิน) ---- */
.steps{list-style:none;margin:0 0 26px;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;counter-reset:s}
.step{gap:4px}.step strong{font-weight:500;font-size:17px}.step .muted{font-size:14px;line-height:1.5}
.step-n{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;margin-bottom:8px;background:#1266dc;color:#fff;font-weight:500;box-shadow:0 6px 14px -6px rgba(18,102,220,.7)}
@media(max-width:900px){.bdg-grid,.steps{grid-template-columns:repeat(2,minmax(0,1fr))}.heat-g{grid-template-rows:repeat(7,22px)}.heat-d{height:calc(7*22px + 6*5px)}.heat-d span{line-height:22px}.goal{justify-content:center}}
@media(max-width:480px){.ring{width:116px;height:116px}}
@media(prefers-reduced-motion:reduce){.fxo svg,.tip-o svg,.fxo{transition:none}}

/* ---- ตัวอย่างหน้าเรียน (หน้าแรกก่อนล็อกอิน) ---- */
.mock{border-radius:16px;overflow:hidden;background:#fff;border:1px solid #e1e8f2;box-shadow:0 14px 30px -18px rgba(24,40,64,.35)}
.mk-video{position:relative;aspect-ratio:16/7;background:linear-gradient(135deg,#1b2b46,#34507e);display:grid;place-items:center}
.mk-play{width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.5);position:relative}
.mk-play::after{content:"";position:absolute;left:18px;top:13px;border-left:15px solid #fff;border-top:10px solid transparent;border-bottom:10px solid transparent}
.mk-bar{position:absolute;left:14px;right:14px;bottom:12px;height:4px;border-radius:2px;background:rgba(255,255,255,.25)}.mk-bar i{display:block;width:42%;height:100%;border-radius:2px;background:#69a8ff}
.mk-body{padding:14px 16px 16px;display:grid;gap:8px}
.mk-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.mk-top strong{font-weight:500}
.mk-tag{font-size:12px;padding:2px 10px;border-radius:999px;background:#eef2f8;color:#53647c}
.mk-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 12px;border-radius:10px;background:#f3f6fb;font-size:14px}
.mk-row .meta{display:flex;align-items:center;gap:8px}.mk-row .dur{font-size:12px;color:#5b6a82}
.mk-row .tick{width:18px;height:18px;border:1.5px solid #b7c4d6;border-radius:50%;display:grid;place-items:center;color:transparent}
.mk-row.on .tick{background:#1266dc;border-color:#1266dc;color:#fff}
.land-mid{align-items:stretch}
.steps-v{grid-template-columns:minmax(0,1fr);gap:16px;margin:0}
.steps-v li{display:flex;gap:14px;align-items:flex-start}.steps-v .step-n{margin:0;flex:none}
.steps-v strong{display:block;font-weight:500;font-size:17px}.steps-v .muted{font-size:14px}
.steps-panel{position:relative;display:flex;flex-direction:column;overflow:hidden}
.steps-panel .steps-v{flex:1;justify-content:flex-start;gap:22px;position:relative;z-index:1}
.pdeco{position:absolute;pointer-events:none;z-index:0}.pdeco svg{display:block;width:100%;animation:bob 7s ease-in-out infinite;filter:drop-shadow(0 10px 12px rgba(24,40,64,.25))}
.pd1{width:96px;right:30px;bottom:26px;transform:rotate(-8deg)}.pd2{width:48px;right:150px;bottom:92px}.pd3{width:70px;right:120px;bottom:20px}.pd2 svg{animation-delay:-2s}.pd3 svg{animation-delay:-4s}
@media(max-width:900px){.pdeco{display:none}}
.steps-panel .steps-v{align-content:start}
.pd1{width:128px;right:44px;bottom:30px}.pd2{width:56px;right:200px;bottom:150px}.pd3{width:92px;right:176px;bottom:28px}

/* ---- การ์ดคอร์ส (ดีไซน์ใหม่) ---- */
.cc{border-radius:20px;overflow:hidden}
.cc .cover{position:relative;overflow:hidden;height:112px;padding:16px;display:block;font-size:inherit;font-weight:inherit;background:linear-gradient(135deg,color-mix(in srgb,var(--color) 20%,#fff) 0%,var(--tint) 60%,#fff 130%)}
.cc .cover::before,.cc .cover::after{content:"";position:absolute;border-radius:50%;pointer-events:none}
.cc .cover::before{width:150px;height:150px;right:-40px;bottom:-80px;background:color-mix(in srgb,var(--color) 16%,transparent)}
.cc .cover::after{width:84px;height:84px;left:42%;top:-46px;background:rgba(255,255,255,.45)}
.cv-book{position:absolute;right:14px;bottom:-14px;width:82px;color:var(--color);opacity:.2;transform:rotate(-12deg);transition:transform .6s var(--ease)}
.cv-book svg{display:block;width:100%;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.cv-subj{position:relative;z-index:1;display:inline-flex;align-items:center;gap:7px;padding:5px 13px 5px 10px;border-radius:999px;background:rgba(255,255,255,.78);color:var(--color);font-size:14px;font-weight:500;box-shadow:0 2px 8px -4px rgba(24,40,64,.25)}
.cv-subj i{width:8px;height:8px;border-radius:50%;background:var(--color)}
.cv-ring{position:absolute;z-index:1;right:14px;top:12px;width:46px;height:46px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.82);box-shadow:0 4px 12px -6px rgba(24,40,64,.35)}
.cv-ring svg{position:absolute;inset:1px;width:44px;height:44px}
.cv-ring .rg-bg{fill:none;stroke:color-mix(in srgb,var(--color) 16%,#fff);stroke-width:4}
.cv-ring .rg-fg{fill:none;stroke:var(--color);stroke-width:4;stroke-linecap:round}
.cv-ring b{position:relative;font-size:11.5px;font-weight:600;color:var(--color);font-variant-numeric:tabular-nums}
.cv-ring.full{background:var(--color)}.cv-ring.full .rg-bg{stroke:rgba(255,255,255,.3)}.cv-ring.full .rg-fg{stroke:#fff}.cv-ring.full b{color:#fff;font-size:15px}
.cv-ring.lock svg{position:static;width:20px;height:20px;fill:none;stroke:#58667c;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cc .body{display:flex;flex-direction:column;gap:8px;padding:16px 18px 18px}
.cc .body h3{margin:0;font-size:18px;line-height:1.35;font-weight:500;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cdesc{margin:0;color:#58667c;font-size:14px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cmeta{display:flex;flex-wrap:wrap;gap:6px}
.cmeta span{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;background:rgba(18,102,220,.07);color:#3d5170;font-size:13px}
.cmeta svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cmeta .draft{background:#fff1c9;color:#8a5a00}
.cfoot{margin-top:auto;padding-top:8px;display:flex;flex-direction:column;gap:6px}
.cstat{font-size:13px;color:#53647c}
.cbtn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:4px;padding:10px 16px;border-radius:12px;font-weight:500}
.cbtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s var(--ease)}
.cc .grid,.grid:has(.cc){grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
@media(hover:hover) and (pointer:fine){.cc:hover .cv-book{transform:rotate(-4deg) scale(1.12)}.cc:hover .cbtn svg{transform:translateX(3px)}.cc:hover .cover{transform:none}}

/* ---- แผนที่การเรียน: คอลัมน์ตรงกับสัปดาห์จริง + ชื่อเดือน + วันนี้ ---- */
.heat-d{height:auto;display:grid;grid-template-rows:repeat(7,28px);gap:5px;margin-top:19px}.heat-d span{line-height:28px}
.heat-b{flex:1;min-width:0}
.heat-m{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:5px;height:14px;margin-bottom:5px;font-size:11px;color:#5b6a82}.heat-m span{white-space:nowrap;line-height:14px}
.hm.today{box-shadow:0 0 0 2px #fff,0 0 0 4px #1266dc}
.heat-lg{justify-content:space-between;flex-wrap:wrap;gap:8px}.heat-scale{display:inline-flex;align-items:center;gap:5px}.heat-note{color:#5b6a82}
@media(max-width:900px){.heat-d{grid-template-rows:repeat(7,22px)}.heat-d span{line-height:22px}.heat-m span{font-size:10px}}

/* ---- หน้าคอร์ส: แบนเนอร์ + ช่องว่างสำหรับคอร์สถัดไป ---- */
.phero{position:relative;overflow:hidden;isolation:isolate;padding:30px 34px;border-radius:24px;margin-bottom:20px;background:linear-gradient(120deg,#e6f0ff 0%,#efe7ff 58%,#e2f5f1 100%);border:1px solid #fff;box-shadow:var(--glass-shadow)}
.phero::before,.phero::after{content:"";position:absolute;z-index:-1;border-radius:50%;pointer-events:none}
.phero::before{width:300px;height:300px;right:-60px;top:-150px;background:radial-gradient(circle,rgba(255,255,255,.9),rgba(255,255,255,0) 68%);animation:drift 14s ease-in-out infinite alternate}
.phero::after{width:220px;height:220px;left:30%;bottom:-130px;background:radial-gradient(circle,rgba(150,180,255,.35),rgba(150,180,255,0) 68%);animation:drift 18s ease-in-out infinite alternate-reverse}
.phero-main{position:relative;z-index:1;max-width:680px}
.phero h1{margin:0;font-size:34px;line-height:1.2}.phero-sub{margin:6px 0 0;color:#3d5170;font-size:16px}
.phero .chip{background:rgba(255,255,255,.7);border-color:#fff;color:#2c4263}
.phero .chips{margin-top:16px}
.phero .fxo svg{filter:drop-shadow(0 10px 12px rgba(24,40,64,.22))}
.slot{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;padding:28px 18px;min-height:300px;border:1.5px dashed #b9cbe4!important;background:rgba(255,255,255,.4)!important;box-shadow:none!important;transform:none!important}
.slot::before,.slot::after{display:none!important}
.slot strong{font-weight:500;font-size:17px;color:#3d5170}.slot .muted{font-size:14px;max-width:200px}
.slot-o{width:64px;margin-bottom:6px}.slot-o svg{display:block;width:100%;animation:bob 6s ease-in-out infinite;filter:drop-shadow(0 8px 10px rgba(24,40,64,.2))}
@media(max-width:900px){.phero{padding:22px 20px}.phero h1{font-size:28px}.slot{min-height:200px}}

/* ---- แถบชวนติดตั้งแอป + โหมดแอป ---- */
#install{max-width:1180px;margin:14px auto 0;padding:0 16px}
.ibar{display:flex;align-items:center;gap:14px;padding:12px 16px;border-radius:18px;background:var(--glass-strong);border:1px solid var(--glass-edge);box-shadow:var(--glass-shadow);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);flex-wrap:wrap}
.ibar img{border-radius:11px;flex:none;box-shadow:0 6px 14px -8px rgba(18,102,220,.7)}
.ibar-t{flex:1;min-width:180px;display:flex;flex-direction:column}.ibar-t strong{font-weight:500}.ibar-t span{font-size:14px;color:#53647c;display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.ibar-t svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ibar-b{display:flex;gap:8px}.ibar-b button{padding:8px 16px;border-radius:999px}
.pf-install{margin:18px 0 6px}.pf-install svg{width:16px;height:16px;vertical-align:-3px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.pf-install p{margin:0;line-height:1.6}
@media(display-mode:standalone){header{padding-top:calc(18px + env(safe-area-inset-top))}body{overscroll-behavior-y:none}}
@media(min-width:1100px){#install{padding:0 24px}}

/* ---- โปรไฟล์ ---- */
.av{--c1:#4f95f5;--c2:#0f5bd0;display:inline-grid;place-items:center;flex:none;border-radius:50%;padding:3px;background:linear-gradient(135deg,var(--c1),var(--c2));box-shadow:0 6px 16px -8px var(--c2)}
.av-in{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:#fff}.av-in svg{display:block;width:62%;height:auto}
.av.sm{width:26px;height:26px;padding:2px;box-shadow:none}
.av.lg{width:104px;height:104px;padding:5px;box-shadow:0 14px 28px -12px var(--c2)}
header nav :is(button,a) .av.sm{margin-right:0}
.pf-hero{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;gap:22px;flex-wrap:wrap;padding:28px 32px;border-radius:24px;margin-bottom:20px;border:1px solid #fff;box-shadow:var(--glass-shadow);background:linear-gradient(120deg,color-mix(in srgb,var(--c1) 22%,#fff) 0%,#fff 62%,color-mix(in srgb,var(--c2) 14%,#fff) 100%);transition:background .5s}
.pf-hero::before{content:"";position:absolute;z-index:-1;width:320px;height:320px;right:-80px;top:-160px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--c1) 35%,transparent),transparent 68%);animation:drift 14s ease-in-out infinite alternate}
.pf-av{position:relative;z-index:1;cursor:pointer;border-radius:50%;outline-offset:4px;-webkit-tap-highlight-color:transparent}
.pf-av .av{animation:bob 6s ease-in-out infinite}
.pf-av .av.pop{animation:avpop .55s var(--ease)}
@keyframes avpop{0%{transform:scale(.8) rotate(-12deg)}55%{transform:scale(1.12) rotate(6deg)}100%{transform:scale(1) rotate(0)}}
.pf-id{position:relative;z-index:1;flex:1;min-width:220px}
.pf-hello{margin:0 0 2px;color:#53647c;font-size:15px}.pf-id h1{margin:0;font-size:32px;line-height:1.2;word-break:break-word}.pf-sub{margin:6px 0 0;color:#3d5170}
.pf-hero .chips{margin-top:14px}.pf-hero .chip{background:rgba(255,255,255,.75);border-color:#fff;color:#2c4263}
.pf-bd{position:relative;z-index:1;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:14px 20px 14px 16px;border-radius:18px;background:rgba(255,255,255,.78);border:1px solid #fff;box-shadow:0 10px 24px -14px rgba(24,40,64,.35);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.pf-bd-ic{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#fff1c9;color:#a36a00;margin-bottom:4px}.pf-bd-ic svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pf-bd strong{font-size:20px;font-weight:500;line-height:1.2}.pf-bd span:last-child{font-size:13px;color:#53647c}
.pf-bd.today{background:linear-gradient(135deg,#fff7d6,#ffe9ef)}
.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}.confetti i{position:absolute;top:-12px;width:7px;height:11px;border-radius:2px;opacity:.9;animation:fall linear infinite}
@keyframes fall{to{transform:translateY(170px) rotate(540deg);opacity:0}}
.pf-stats{margin-bottom:20px}
.pf-cols{margin-bottom:30px;align-items:start}.pf-one{max-width:620px;margin:0 auto 30px}
.pf-form label{display:block;margin:14px 0 6px;font-size:15px;color:#3d5170}.pf-form form>label:first-child{margin-top:0}
.pf-form .row{margin:20px 0 0}.pf-form .primary{padding:11px 22px;border-radius:12px}
.av-pick{display:flex;gap:8px;flex-wrap:wrap}
.av-o{width:52px;height:52px;padding:8px;border-radius:14px;background:rgba(255,255,255,.7);transition:transform .3s var(--ease),box-shadow .3s var(--ease),border-color .3s}
.av-o svg{display:block;width:100%;height:100%}
.av-o.on{border-color:#1266dc;box-shadow:0 0 0 3px rgba(18,102,220,.16);background:#fff}
.av-colors{display:flex;gap:10px;flex-wrap:wrap}
.av-c{width:34px;height:34px;padding:0;border-radius:50%;border:3px solid #fff;background:linear-gradient(135deg,var(--c1),var(--c2));box-shadow:0 0 0 1px #cfd9e7;transition:transform .3s var(--ease),box-shadow .3s var(--ease)}
.av-c.on{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--c2)}
@media(hover:hover) and (pointer:fine){.av-o:hover,.av-c:hover{transform:translateY(-3px) scale(1.06)}.pf-av:hover .av{filter:brightness(1.06)}.pf-av:hover .av-in svg{animation:wiggle .6s var(--ease)}}
.pf-row{display:flex;gap:12px;align-items:flex-start;padding:12px 4px;border-bottom:1px solid rgba(24,40,64,.07)}
.pf-row .rec-t{min-width:0}.pf-row .rec-t strong{white-space:normal}.pf-row .muted{font-size:13px;word-break:break-all}
.pf-side .pf-install{margin:2px 0 0}.pf-side .pf-install button{margin-top:6px}
.pf-out{margin-top:16px}.pf-out button{width:100%;border-radius:12px;color:#b43a3a;border-color:#efc9c9;background:rgba(255,255,255,.7)}
@media(max-width:900px){.pf-hero{padding:22px 20px}.pf-id h1{font-size:26px}.av.lg{width:88px;height:88px}.pf-bd{width:100%;flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 12px}.pf-bd-ic{margin:0}}
@media(prefers-reduced-motion:reduce){.pf-av .av,.confetti i,.pf-hero::before{animation:none}}

/* ---- กันส่อง: เลือกข้อความ/ลากรูปไม่ได้ (ยกเว้นช่องกรอก) + ฉากบังตอนเปิด DevTools ---- */
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.detail-t,.doc,.doc *,.can-select,.can-select *,.url-warn{-webkit-user-select:text;user-select:text}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text}
img,video,svg{-webkit-user-drag:none}




/* มือถือ/แท็บเล็ต: backdrop-filter บน header ทำให้ nav แบบ fixed ไปติดกับ header แทนขอบจอ จึงเอาออก */
@media not all and (min-width:1101px) and (hover:hover) and (pointer:fine){header{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:rgba(255,255,255,.92)}}
@media(max-width:760px){header nav{justify-content:space-around}header nav :is(button,a){flex:1;width:auto;max-width:none}.phero .fxo,.hero .fxo{opacity:.22}}

/* ===== แจ้งเตือนให้เข้าเรียน ===== */
.pf-rem{margin-bottom:30px}
.rem-row{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;justify-content:space-between;padding:12px 4px;border-bottom:1px solid rgba(24,40,64,.07)}
.dchips{display:flex;gap:6px;flex-wrap:wrap}
.dchip{width:38px;height:38px;padding:0;border-radius:50%;font-size:14px;border:1px solid #dbe3ee;background:rgba(255,255,255,.8);color:#53647c;transition:background .15s,color .15s,transform .15s}
.dchip.on{background:#1266dc;border-color:#1266dc;color:#fff}.dchip:active{transform:scale(.92)}
.dchip:focus-visible,.rem-time:focus-visible{outline:2px solid #1266dc;outline-offset:2px}
.rem-at{display:flex;gap:8px;align-items:center}.rem-time{width:auto;padding:8px 10px}
.rem-actions{margin:14px 0 0;gap:10px}
.rem-warn{background:#fff1c9;color:#7a5200;border-radius:10px;padding:10px 14px;font-size:14px;margin:8px 0}
@media(max-width:520px){.dchip{width:34px;height:34px;font-size:13px}.rem-at{width:100%;justify-content:space-between}.rem-time{flex:1}}

/* ===== หน้าพื้นที่ R2 / ผู้สร้างคอร์ส ===== */
.sto .sto-row{cursor:pointer}.sto .sto-row:focus-visible{outline:2px solid #1266dc;outline-offset:-2px}
.sto tfoot td{background:#f3f6fb;font-weight:500}
.sto-det td{background:rgba(243,246,251,.7)}
.sto-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}.sto-list li{display:flex;justify-content:space-between;gap:12px;font-size:14px}
.sto-note{margin-top:14px;font-size:13px;line-height:1.7}

.cs-up{position:relative;z-index:50}

/* คัดลอกอีเมลในหน้าผู้ใช้ */
.mailcp{display:inline-flex;align-items:center;gap:6px;padding:2px 6px;margin:-2px -6px;border:0;background:transparent;border-radius:8px;color:inherit;font-size:inherit;text-align:left;word-break:break-all}
.mailcp svg{width:14px;height:14px;flex:none;fill:none;stroke:#8a98ad;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.mailcp:hover{background:rgba(18,102,220,.08)}.mailcp:hover svg{stroke:#1266dc}.mailcp:focus-visible{outline:2px solid #1266dc}

/* ช่องเพิ่มอีเมลทีละรายการ */
.mail-add{display:flex;gap:8px;align-items:stretch}.mail-add .mail-in{flex:1;min-width:0}.mail-add button{flex:none;padding:0 18px}
.mail-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;min-height:20px}
.mchip{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:4px 4px 4px 12px;border-radius:999px;background:rgba(18,102,220,.09);color:#14478f;font-size:14px;border:1px solid rgba(18,102,220,.16)}
.mchip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mchip button{flex:none;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:#14478f;font-size:18px;line-height:1}
.mchip button:hover{background:rgba(18,102,220,.18)}.mchip button:focus-visible{outline:2px solid #1266dc}

/* ตัวหมุนระหว่างโหลดวิดีโอ + คำเตือนไฟล์ที่อาจโหลดช้า */
.player{position:relative}
.vload{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:rgba(16,28,43,.45);color:#fff;font-size:15px;text-align:center;padding:16px;pointer-events:none}
.vload.on{display:flex}
.vspin{width:38px;height:38px;border-radius:50%;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;animation:vspin .8s linear infinite}
@keyframes vspin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.vspin{animation-duration:2.4s}}
.slow-warn{display:block;flex-basis:100%;margin-top:6px;padding:8px 12px;border-radius:10px;background:#fff1c9;color:#7a5200;font-size:13px;line-height:1.6;word-break:break-word}

/* long chapters: bounded lesson list */
.chapter-items{max-height:min(60vh,520px);overflow-y:auto;overscroll-behavior:contain}

/* users table → cards on phones */
@media(max-width:760px){
.utbl,.utbl tbody{display:block;border:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
.utbl thead{display:none}
.utbl tr{display:grid;grid-template-columns:repeat(3,auto);gap:4px 14px;justify-content:start;background:#fff;border:1px solid #dde4ee;border-radius:14px;padding:12px 14px;margin-bottom:10px}
.utbl td{display:block;padding:0;border:0;min-width:0}
.utbl .u-name{grid-column:1/-1;font-weight:500;font-size:16px}
.utbl .u-mail{grid-column:1/-1;margin-bottom:6px}
.utbl .mailcp{word-break:break-all;text-align:left;margin:0 -6px}
.utbl td[data-l]::before{content:attr(data-l);display:block;font-size:11px;color:#5b6a82}
.utbl .u-act{grid-column:1/-1;text-align:left!important;margin-top:8px}
}

/* brand lockup */
header .brand{display:inline-flex;align-items:center;gap:9px}header .brand img{display:block;width:30px;height:30px}

.cs.up .cs-list{top:auto;bottom:calc(100% + 6px)}

/* ตารางทั่วไป (จัดการคอร์ส / ผู้สร้าง / พื้นที่ R2) → การ์ดบนมือถือ */
@media(max-width:760px){
.tbl.rt,.tbl.rt tbody,.tbl.rt tfoot{display:block;border:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
.tbl.rt thead{display:none}
.tbl.rt tr{display:block;background:#fff;border:1px solid #dde4ee;border-radius:14px;padding:10px 14px;margin-bottom:10px}
.tbl.rt td{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:5px 0;border:0;text-align:right}
.tbl.rt td[data-l]::before{content:attr(data-l);color:#5b6a82;font-size:13px;text-align:left;flex:none}
.tbl.rt td:first-child{display:block;text-align:left;font-weight:500;font-size:16px;padding-bottom:6px}
.tbl.rt td:first-child::before{display:block;margin-bottom:2px}
.tbl.rt td:last-child:not([data-l]){justify-content:flex-start;padding-top:8px}
.tbl.rt td.empty{display:block;text-align:center}
}

/* policy / footer / consent */
.doc{max-width:760px;margin:20px auto;line-height:1.75}.doc h2{font-size:18px;margin:22px 0 6px}.doc ul{padding-left:20px;margin:6px 0}.doc li{margin:4px 0}
.foot{text-align:center;padding:6px 16px 28px;font-size:13px}.foot a{color:#5d6b82}
.chk{display:flex;gap:10px;align-items:flex-start;font-size:14px;margin:14px 0 0}.chk input{width:20px;height:20px;margin-top:2px;flex:none}
.pf-data{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

.un-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #edf1f6}.un-n{flex:1;min-width:0;word-break:break-all}

/* หน้าเรียน: iPad แนวตั้ง/จอกลางซ้อนคอลัมน์ให้วิดีโอใหญ่ และจอใหญ่กว้างขึ้น */
@media(max-width:1000px){.learning-layout{grid-template-columns:minmax(0,1fr);gap:20px}.learning-layout .video-column{grid-row:1}}
@media(min-width:1300px){main.wide{max-width:1640px}.learning-layout{grid-template-columns:360px minmax(0,1fr)}}
.player{max-height:calc(100vh - 150px)}.player video{object-fit:contain}
.lesson-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#btn-done.is-done{background:#e7f6ec;border-color:#bfe6cb;color:#17653a}
.auto-next{display:inline-flex;gap:8px;align-items:center;font-size:14px;color:#5d6b82;margin-left:auto}.auto-next input{width:18px;height:18px}
.nextup{position:absolute;left:12px;right:12px;bottom:12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:rgba(16,28,43,.88);color:#fff;border:1px solid rgba(255,255,255,.18);border-radius:12px;padding:12px 14px;backdrop-filter:blur(6px);z-index:5}
.nextup>div{flex:1 1 180px;min-width:0}.nextup small{display:block;opacity:.8}.nextup strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}


/* ===== รอบปรับปรุงตามรีวิว (a11y / ประสิทธิภาพ / หน้าผู้ใช้) ===== */
.skip{position:absolute;left:8px;top:-60px;z-index:500;background:#1266dc;color:#fff;padding:10px 16px;border-radius:10px;text-decoration:none}.skip:focus{top:8px}
header .brand{--bc:#1266dc;font-size:24px;font-weight:700;color:var(--bc);text-decoration:none}
header nav a{text-decoration:none;cursor:pointer}
#app:focus{outline:none}
.detail-t{white-space:pre-line;overflow-wrap:anywhere}.detail-t a{color:#0f5bd0;text-decoration:underline}
.url-warn{display:block;color:#9a5b00;background:#fff4d6;border-radius:8px;padding:6px 10px;margin-top:6px;font-size:13px;line-height:1.4}.url-warn:empty{display:none}
.noaccess{justify-content:flex-start}.noaccess form{margin:0}
.btnlink{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border:1px solid #dbe3ee;border-radius:10px;background:#fff;color:inherit;text-decoration:none}
.is-bad{outline:2px solid #d33!important;outline-offset:1px;background:#fff5f5!important}
.demo-toast.top{bottom:auto;top:78px}
.u-search{display:flex;gap:8px;margin:0 0 12px;flex-wrap:wrap}.u-search input{flex:1 1 220px;width:auto}
.pager{display:flex;gap:12px;align-items:center;justify-content:center;margin:16px 0}
.is-sus td{opacity:.62}.is-sus td.u-act{opacity:1}
.u-act{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(pointer:coarse){button.mini,.mini,.ls-row button,.ch-head button,.fl-row button,.goal button,.av-pick button,.mailcp,.chip-row button,.u-act button{min-height:44px;min-width:44px}.ls-row,.ch-head,.fl-row{gap:8px}}
/* มือถือแนวนอน: ย่อแถบเมนูล่างให้เหลือพื้นที่เรียน */
@media(max-height:500px) and (orientation:landscape) and (pointer:coarse){header nav :is(button,a){min-height:44px;flex-direction:row;gap:8px;padding:4px 8px;font-size:13px}header nav svg{width:20px;height:20px}header{padding:6px 5%}header .brand{font-size:18px}header .brand img{width:24px;height:24px}body{padding-bottom:56px}.sticky-save{bottom:60px}.demo-toast{bottom:64px}}
/* เครื่องเก่า/ประหยัดข้อมูล: ปิดเอฟเฟกต์หนัก */
@media(max-width:700px),(prefers-reduced-data:reduce){.fxo,.fxo *{animation:none!important}*{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}body{background-attachment:scroll!important}header,header nav{background:rgba(255,255,255,.97)}}
@supports not (background:color-mix(in srgb,red,blue)){.cc .cover{background:var(--tint)}.cc .cover::before{background:rgba(255,255,255,.4)}.cv-ring .rg-bg{stroke:#e3ebf7}.pf-hero{background:linear-gradient(120deg,#e9f1ff,#fff)}.pf-hero::before{background:none}}
@supports not selector(:has(*)){.sec,.panel,.tile{position:relative}.cs.open{z-index:70}.cc .grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}}

.foot .copy{margin:6px auto 0;max-width:640px;font-size:12.5px;line-height:1.5;color:#58667c;padding:0 16px}


/* ===== รอบฟีเจอร์: วันหมดอายุสิทธิ์ / อุปกรณ์ / ธีม / 404 / นับถอยหลัง ===== */
.cexp{display:flex;align-items:center;gap:6px;font-size:13px;color:#2f7a4f;margin:2px 0 10px}.cexp svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cexp.soon{color:#a36a00}.cexp.bad{color:#b43a3a}
.course-info .cexp{margin:6px 0 2px}
.pf-dev{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.dev{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e2e9f3;border-radius:12px;background:rgba(255,255,255,.6)}.dev.cur{border-color:#9ec2fa;background:#f2f7ff}
.dev-ic{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#e8f1ff;color:#1266dc;flex:none}.dev-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dev-t{flex:1;min-width:0;display:flex;flex-direction:column}.dev-t strong{font-weight:500;font-size:14.5px}.dev-t em{font-style:normal;font-size:11.5px;background:#1266dc;color:#fff;border-radius:999px;padding:2px 8px;margin-left:6px;vertical-align:middle}.dev-t small{color:#58667c;font-size:12.5px;word-break:normal}
.pf-seg{display:inline-flex;border:1px solid #cdd8e8;border-radius:12px;overflow:hidden;margin-top:8px}.pf-seg button{border:0;border-radius:0;padding:8px 14px;background:transparent;min-height:40px}.pf-seg button[aria-pressed=true]{background:#1266dc;color:#fff}

/* นับถอยหลังตอนถัดไป */
.nextup .nx-ring{width:46px;height:46px;flex:none;position:relative}.nextup .nx-ring svg{width:46px;height:46px;transform:rotate(-90deg)}.nx-ring circle{fill:none;stroke-width:3.4}.nx-ring .bg{stroke:rgba(255,255,255,.22)}.nx-ring .fg{stroke:#ffb800;stroke-linecap:round;stroke-dasharray:100.5;stroke-dashoffset:0;animation:nxcount var(--nx,5s) linear forwards}.nx-ring b{position:absolute;inset:0;display:grid;place-items:center;font-size:17px;color:#fff}
@keyframes nxcount{to{stroke-dashoffset:100.5}}

/* หน้า 404 */
.nf{position:relative;overflow:hidden;isolation:isolate;text-align:center;padding:clamp(34px,7vw,72px) 20px 40px;border-radius:28px;min-height:min(74vh,640px);display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(160deg,#eaf2ff 0%,#f7f4ff 55%,#fff6e0 100%);border:1px solid #fff;box-shadow:0 30px 70px -30px rgba(18,60,140,.35)}
.nf-sky{position:absolute;inset:0;z-index:-1;pointer-events:none}.nf-blob{position:absolute;border-radius:50%;filter:blur(40px);opacity:.55;animation:nfdrift 16s ease-in-out infinite alternate}.nf-blob.b1{width:340px;height:340px;left:-80px;top:-100px;background:#9ec2fa}.nf-blob.b2{width:300px;height:300px;right:-70px;bottom:-90px;background:#c9b6ff;animation-delay:-5s}.nf-blob.b3{width:220px;height:220px;right:22%;top:-60px;background:#ffd98a;animation-delay:-9s;opacity:.4}
.nf .st{position:absolute;width:6px;height:6px;border-radius:50%;background:#1266dc;opacity:.4;animation:nftw 3.4s ease-in-out infinite}.nf .st:nth-child(odd){background:#ffb800}
.nf .s1{left:8%;top:18%}.nf .s2{left:18%;top:70%;animation-delay:-1s}.nf .s3{left:30%;top:12%;animation-delay:-2s}.nf .s4{left:44%;top:84%;animation-delay:-.5s}.nf .s5{left:62%;top:10%;animation-delay:-1.6s}.nf .s6{left:74%;top:76%;animation-delay:-2.4s}.nf .s7{left:88%;top:22%;animation-delay:-.8s}.nf .s8{left:93%;top:58%;animation-delay:-2.9s}.nf .s9{left:4%;top:50%;animation-delay:-1.3s}.nf .s10{left:52%;top:48%;animation-delay:-2.2s;display:none}
.nf-obj{position:absolute;width:clamp(44px,7vw,74px);height:clamp(44px,7vw,74px);display:grid;place-items:center;border-radius:20px;background:rgba(255,255,255,.7);box-shadow:0 14px 30px -12px rgba(18,60,140,.4);color:#1266dc;animation:nffloat 7s ease-in-out infinite}.nf-obj svg{width:56%;height:56%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nf-obj.o1{left:9%;top:16%;--dp:16;--rt:-12deg}.nf-obj.o2{right:10%;top:20%;color:#7c4dff;animation-delay:-2.5s;--dp:-20;--rt:10deg}.nf-obj.o3{right:16%;bottom:14%;color:#ffa800;animation-delay:-4.5s;--dp:24;--rt:6deg}
.nf-num{display:flex;align-items:center;justify-content:center;gap:clamp(2px,1.2vw,14px);font-size:clamp(110px,24vw,230px);line-height:1;font-weight:700;letter-spacing:-.04em}
.nf-num .dg{background:linear-gradient(160deg,#4f95f5,#7c4dff);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;filter:drop-shadow(0 18px 24px rgba(79,70,229,.28));animation:nffloat 6s ease-in-out infinite}.nf-num .dg:last-child{animation-delay:-3s}
.nf-ring{width:.92em;height:.92em;flex:none;overflow:visible;animation:nffloat 6s ease-in-out infinite;animation-delay:-1.5s;filter:drop-shadow(0 18px 22px rgba(79,70,229,.25))}.nf-ring .orbit{transform-origin:256px 256px;animation:nforbit 8s linear infinite}.nf-ring .q{animation:nfpulse 3s ease-in-out infinite;transform-origin:256px 280px}
.nf-t{font-size:clamp(26px,5vw,40px);margin:6px 0 8px}.nf-msg{margin:0 auto;max-width:520px;font-size:17px;color:#41526b}.nf-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin:24px 0 14px}.nf-actions .btnlink{min-height:48px;padding:12px 24px;font-size:16px;border-radius:14px}.nf-actions .primary{background:#1266dc;color:#fff;border-color:#1266dc;box-shadow:0 14px 26px -12px rgba(18,102,220,.7)}.nf-hint{max-width:480px;margin:0 auto;font-size:13.5px;color:#58667c}
@keyframes nffloat{0%,100%{translate:0 0}50%{translate:0 -14px}}@keyframes nforbit{to{transform:rotate(360deg)}}@keyframes nftw{0%,100%{opacity:.15;scale:.7}50%{opacity:.8;scale:1.25}}@keyframes nfdrift{to{transform:translate(40px,30px)}}@keyframes nfpulse{0%,100%{scale:1}50%{scale:1.06}}
@media(prefers-reduced-motion:reduce){.nf *,.nf-ring .orbit,.nextup .nx-ring .fg{animation:none!important}}
@media(max-width:620px){.nf-obj.o1{left:4%;top:5%}.nf-obj.o2{right:4%;top:6%}.nf-obj.o3{display:none}}
.pf-seg{align-self:flex-start}

/* ---- วันหมดอายุสิทธิ์ในตัวแก้ไขคอร์ส ---- */
.exp-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;margin-top:8px}
.exp-lb{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;color:#4a5a73;font-weight:500}
.exp-lb svg,.mexp svg,.exp-et svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.exp-ctl{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px}
.exp-ctl input:not([type=hidden]){width:auto!important;min-width:0;margin:0!important;padding:8px 12px!important;font-size:14px!important;border:1px solid #ccd7e5;border-radius:10px;background:#fff;color:inherit;font-family:inherit}
.exp-ctl .exp-n{width:92px!important}
.exp-n-w,.exp-d-w{display:none;align-items:center;gap:6px}
.exp-ctl[data-mode="n"] .exp-n-w,.exp-ctl[data-mode="d"] .exp-d-w{display:inline-flex}
.mail-chips{display:flex;flex-wrap:wrap;gap:8px}
.mchip{padding:4px 4px 4px 12px}
.mchip .mc-t{min-width:0}
.mchip .mexp,.mexp{display:inline-flex;align-items:center;gap:4px;flex:none;padding:2px 9px;border-radius:999px;border:1px solid transparent;background:#eef2f8;color:#4a5a73;font-size:12px;line-height:1.5;font-family:inherit;cursor:default;width:auto!important;height:auto!important}
button.mexp{cursor:pointer}button.mexp:hover{filter:brightness(.96)}
.mexp.ok{background:#e4f5ea;color:#1f6b3f}.mexp.soon{background:#fff1d6;color:#8a5a00}.mexp.bad{background:#fde4e4;color:#a82f2f}
.mail-tools{margin-top:8px;font-size:13px}
.linkbtn{border:0;background:none;padding:2px 0;color:#1266dc;font-size:13.5px;text-decoration:underline;text-underline-offset:3px;cursor:pointer;width:auto!important}
.exp-edit{margin-top:12px;padding:14px;border-radius:14px;border:1px solid rgba(18,102,220,.25);background:linear-gradient(180deg,rgba(18,102,220,.07),rgba(18,102,220,.03));display:grid;gap:10px;animation:expin .18s ease-out}
.exp-et{display:grid;gap:2px}.exp-et strong{display:inline-flex;align-items:center;gap:6px;overflow-wrap:anywhere}.exp-et .muted{font-size:12.5px}
.exp-ea{display:flex;gap:8px}
@keyframes expin{from{opacity:0;transform:translateY(-4px)}}
@media(prefers-reduced-motion:reduce){.exp-edit{animation:none}}

.mchip button.mexp,.mchip span.mexp{width:auto;height:auto;border-radius:999px;font-size:12px;line-height:1.5;padding:2px 9px;border:1px solid transparent}
.mchip button.mexp:hover{background:#e0e8f4}.mchip button.mexp.ok:hover{background:#d3efdc}.mchip button.mexp.soon:hover{background:#ffe8bd}.mchip button.mexp.bad:hover{background:#fbd3d3}

/* ---- ปกคอร์ส (สัดส่วน 2:1 แนะนำ 1200×600) ---- */
.cc .cover{height:auto;aspect-ratio:2/1;min-height:112px}
.cc .cover .cv-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.cc .cover.has-img::before,.cc .cover.has-img::after{display:none}
.cc .cover.has-img::after{display:block;inset:0;width:auto;height:auto;left:0;top:0;border-radius:0;background:linear-gradient(180deg,rgba(0,0,0,.18),rgba(0,0,0,0) 45%)}
.cc .cover.has-img .cv-subj{background:rgba(255,255,255,.9)}
.cov-ed{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.cov-prev{flex:0 0 min(100%,320px);aspect-ratio:2/1;border-radius:14px;overflow:hidden;border:1px solid #dbe3ee;background:#f1f5fb}
.cov-prev img{display:block;width:100%;height:100%;object-fit:cover}
.cov-empty{height:100%;display:flex;align-items:center;justify-content:center;gap:10px;color:#6b7b93;text-align:center;font-size:14px;line-height:1.4;background:repeating-linear-gradient(135deg,#f4f7fc 0 12px,#eef3fa 12px 24px)}
.cov-empty svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.cov-side{flex:1 1 220px;min-width:0}.cov-side p{margin:10px 0 0;font-size:13px;line-height:1.55}
.cov-btns{display:flex;gap:8px;flex-wrap:wrap}
.cov-pick{display:inline-flex;align-items:center;gap:7px;margin:0;border:1px solid #dbe3ee;border-radius:10px;padding:8px 14px;cursor:pointer;background:#fff;font-weight:500}
.cov-pick svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cov-pick.busy{opacity:.55;pointer-events:none}
.cov-modal{max-width:640px}
.cov-frame{position:relative;width:100%;aspect-ratio:2/1;border-radius:14px;overflow:hidden;background:#e9eef6;cursor:grab;touch-action:none;outline-offset:3px;box-shadow:inset 0 0 0 1px rgba(24,40,64,.12)}
.cov-frame.grab{cursor:grabbing}
.cov-frame canvas{display:block;width:100%;height:100%}
.cov-frame::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 33.33% 0/1px 100% no-repeat,linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 66.66% 0/1px 100% no-repeat,linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 0 33.33%/100% 1px no-repeat,linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 0 66.66%/100% 1px no-repeat}
.cov-zoom{display:flex;align-items:center;gap:12px;margin-top:12px;font-size:14px}.cov-zoom input{flex:1;margin:0;padding:0;border:0;background:none;accent-color:#1266dc}
.dom-note{margin:12px 0 0;font-size:13.5px}

/* ---- ตัวเลือกวันที่/เวลาของเว็บเอง ---- */
.pk{position:relative;display:inline-block;max-width:100%}
.pk-date{display:block}.pk-time{width:128px}
.pk-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;padding:11px 12px;border:1px solid #ccd7e5;border-radius:8px;background:rgba(255,255,255,.85);color:inherit;font-weight:400}
.pk-btn:hover{border-color:#9fb4d0;background:#fff}.pk-btn[aria-expanded="true"]{border-color:#1266dc;box-shadow:0 0 0 3px rgba(18,102,220,.14)}
.pk-btn:focus-visible{outline:2px solid #1266dc;outline-offset:1px}
.pk-btn svg{width:16px;height:16px;flex:none;fill:none;stroke:#58667c;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pk-t.ph{color:#7c8aa0}
.exp-ctl .pk-btn,.exp-ctl .cs-btn{padding:8px 12px;border-radius:10px;font-size:14px}
.exp-ctl .cs{min-width:168px}.exp-n-w .cs{min-width:92px}.exp-d-w .pk{min-width:160px}
.pk-pop{position:fixed;z-index:400;width:296px;max-width:calc(100vw - 16px);padding:12px;border-radius:16px;background:rgba(255,255,255,.96);border:1px solid #fff;box-shadow:0 24px 54px -14px rgba(24,40,64,.38),0 2px 10px rgba(24,40,64,.1);-webkit-backdrop-filter:blur(16px) saturate(1.5);backdrop-filter:blur(16px) saturate(1.5);animation:mpop .18s var(--ease)}
.pk-hd{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:8px}
.pk-nav{width:34px;height:34px;padding:0;display:grid;place-items:center;border-radius:10px;border:0;background:transparent}
.pk-nav:hover,.pk-ttl:hover{background:rgba(18,102,220,.08)}
.pk-nav svg{width:18px;height:18px;fill:none;stroke:#3d5170;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transform:rotate(90deg)}.pk-nav.next svg{transform:rotate(-90deg)}
.pk-ttl{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;padding:6px 10px;border-radius:10px;font-size:15.5px;font-weight:500;color:inherit}
.pk-ttl svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.pk-wk,.pk-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}
.pk-wk span{font-size:12px;color:#6b7b93;padding:4px 0}
.pk-d{aspect-ratio:1;padding:0;border:0;border-radius:50%;background:transparent;font-size:14px;color:inherit;font-variant-numeric:tabular-nums}
.pk-d:hover:not(:disabled){background:rgba(18,102,220,.1)}
.pk-d.today{box-shadow:inset 0 0 0 1.5px #1266dc}
.pk-d.sel{background:#1266dc;color:#fff;box-shadow:none}.pk-d:disabled{color:#b6c1d1;cursor:not-allowed}
.pk-ft{display:flex;justify-content:space-between;align-items:center;margin-top:8px;padding-top:8px;border-top:1px solid #e3eaf4}
.pk-years{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;max-height:240px;overflow:auto;padding:2px}
.pk-y{padding:8px 0;border:0;border-radius:10px;background:transparent;font-size:14px;color:inherit}.pk-y:hover{background:rgba(18,102,220,.1)}.pk-y.cur{background:#1266dc;color:#fff}
.pk-time-w{display:flex;align-items:stretch;justify-content:center;gap:6px}
.pk-pop:has(.pk-time-w){width:220px}
.pk-col{display:flex;flex-direction:column;gap:2px;height:210px;overflow:auto;padding:2px;flex:1;scrollbar-width:thin}
.pk-colon{align-self:center;font-weight:600;color:#6b7b93}
.pk-c{padding:8px 0;border:0;border-radius:10px;background:transparent;font-size:15px;color:inherit;font-variant-numeric:tabular-nums}.pk-c:hover{background:rgba(18,102,220,.1)}.pk-c.sel{background:#1266dc;color:#fff}
@media(max-width:520px){.rem-at .pk-time{flex:1;width:auto}}
@media(prefers-reduced-motion:reduce){.pk-pop{animation:none}}

/* ---- โลโก้ (brand): กิมมิกตอน hover/โฟกัส/แตะ ---- */
header .brand{position:relative;overflow:visible}
header .brand .bm{position:relative;display:grid;place-items:center;width:30px;height:30px;flex:none}
header .brand .bm img{position:relative;z-index:1;transition:transform .7s cubic-bezier(.34,1.56,.64,1)}
header .brand .bm::before{content:"";position:absolute;inset:-7px;border-radius:50%;background:conic-gradient(#ffb300,#ff6ec7,#7c4dff,#1266dc,#2fbf71,#ffb300);filter:blur(8px);opacity:0;transform:scale(.5);transition:opacity .4s,transform .5s cubic-bezier(.34,1.56,.64,1)}
header .brand .bm::after{content:"";position:absolute;inset:-2px;border-radius:50%;border:2px solid #ffb300;opacity:0;pointer-events:none}
header .brand .bt{position:relative;display:inline-block}
header .brand .bt::after{content:"";position:absolute;left:0;bottom:-3px;height:3px;width:100%;border-radius:3px;background:linear-gradient(90deg,#ffb300,#ff6ec7,#7c4dff,#1266dc);transform:scaleX(0);transform-origin:left;transition:transform .5s cubic-bezier(.22,1,.36,1)}
header .brand .bfx{position:absolute;left:15px;top:50%;width:0;height:0;pointer-events:none;z-index:5}
header .brand .bo{position:absolute;left:0;top:0;width:var(--s);height:var(--s);margin:calc(var(--s) / -2) 0 0 calc(var(--s) / -2);opacity:0;transform:translate(0,0) scale(.2) rotate(0);transition:transform .6s cubic-bezier(.34,1.56,.64,1) var(--dl),opacity .25s ease var(--dl)}
header .brand .bo i{display:block;width:100%;height:100%;filter:drop-shadow(0 4px 6px rgba(24,40,64,.28))}
header .brand .bo svg{display:block;width:100%;height:100%}
header .brand .bsp{position:absolute;left:var(--x);top:var(--y);width:9px;height:9px;margin:-4.5px;opacity:0;background:#ffc233;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}
@keyframes brand-glow{to{transform:scale(1) rotate(360deg)}}
@keyframes brand-ring{0%{opacity:.9;transform:scale(1)}100%{opacity:0;transform:scale(2.3)}}
@keyframes brand-shine{from{background-position:130% 0}to{background-position:-30% 0}}
@keyframes brand-bob{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-4px) rotate(4deg)}}
@keyframes brand-tw{0%,100%{opacity:0;transform:scale(.3) rotate(0)}50%{opacity:1;transform:scale(1) rotate(90deg)}}
@media(hover:hover){
 header .brand:hover .bm img,header .brand:focus-visible .bm img{transform:rotate(360deg) scale(1.16)}
 header .brand:hover .bm::before,header .brand:focus-visible .bm::before{opacity:.5;transform:scale(1);animation:brand-glow 3s linear infinite}
 header .brand:hover .bm::after,header .brand:focus-visible .bm::after{animation:brand-ring 1.3s ease-out infinite}
 header .brand:hover .bt,header .brand:focus-visible .bt{color:transparent;background:linear-gradient(105deg,var(--bc) 32%,#ff9d00 44%,#ff5fb0 50%,#8a5cff 56%,var(--bc) 68%) 130% 0/250% 100%;-webkit-background-clip:text;background-clip:text;animation:brand-shine 1.6s ease-out forwards}
 header .brand:hover .bt::after,header .brand:focus-visible .bt::after{transform:scaleX(1)}
 header .brand:hover .bo,header .brand:focus-visible .bo{opacity:1;transform:translate(var(--dx),var(--dy)) scale(1) rotate(var(--r))}
 header .brand:hover .bo i,header .brand:focus-visible .bo i{animation:brand-bob 2.4s ease-in-out var(--bd) infinite}
 header .brand:hover .bsp,header .brand:focus-visible .bsp{animation:brand-tw 1.2s ease-in-out var(--sd) infinite}
}
header .brand.pop .bm img{transform:rotate(360deg) scale(1.16)}
header .brand.pop .bm::before{opacity:.5;transform:scale(1);animation:brand-glow 3s linear infinite}
header .brand.pop .bm::after{animation:brand-ring 1.3s ease-out 2}
header .brand.pop .bt{color:transparent;background:linear-gradient(105deg,var(--bc) 32%,#ff9d00 44%,#ff5fb0 50%,#8a5cff 56%,var(--bc) 68%) 130% 0/250% 100%;-webkit-background-clip:text;background-clip:text;animation:brand-shine 1.6s ease-out forwards}
header .brand.pop .bt::after{transform:scaleX(1)}
header .brand.pop .bo{opacity:1;transform:translate(var(--dx),var(--dy)) scale(1) rotate(var(--r))}
header .brand.pop .bo i{animation:brand-bob 2.4s ease-in-out var(--bd) infinite}
header .brand.pop .bsp{animation:brand-tw 1.2s ease-in-out var(--sd) 2}
header .brand:active .bm img{transform:scale(.88)}
@media(prefers-reduced-motion:reduce){header .brand .bfx,header .brand .bm::before,header .brand .bm::after{display:none}header .brand .bm img{transition:none}header .brand:hover .bm img,header .brand.pop .bm img{transform:none}header .brand:hover .bt,header .brand.pop .bt{animation:none;background:none;color:var(--bc);-webkit-text-fill-color:currentColor}}

/* ---- หน้า 404: กิมมิกตอน hover ---- */
.nf::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:var(--sp,0);transition:opacity .5s;background:radial-gradient(380px circle at var(--mx,50%) var(--my,40%),rgba(255,255,255,.85),rgba(255,236,190,.35) 45%,transparent 70%)}
.nf-sky{transform:translate(calc(var(--px,0) * -14px),calc(var(--py,0) * -10px));transition:transform .5s cubic-bezier(.22,1,.36,1)}
.nf-num{transform:translate(calc(var(--px,0) * 7px),calc(var(--py,0) * 5px));transition:transform .5s cubic-bezier(.22,1,.36,1)}
.nf-obj{cursor:pointer;transform:translate(calc(var(--px,0) * var(--dp,10) * 1px),calc(var(--py,0) * var(--dp,10) * 1px)) rotate(var(--rt,0deg));transition:transform .5s cubic-bezier(.22,1,.36,1),scale .45s cubic-bezier(.34,1.56,.64,1),rotate .45s cubic-bezier(.34,1.56,.64,1),box-shadow .3s,background .3s}
.nf-obj:hover{scale:1.28;rotate:-10deg;background:rgba(255,255,255,.95);box-shadow:0 0 0 7px rgba(255,255,255,.55),0 22px 40px -12px currentColor}
.nf .st{transform:scale(calc(1 + var(--g,0) * 1.8));box-shadow:0 0 calc(var(--g,0) * 16px) calc(var(--g,0) * 3px) currentColor;color:#1266dc;transition:transform .25s,box-shadow .25s}.nf .st:nth-child(odd){color:#ffb800}
.nf-num .dg{display:inline-block;cursor:default;transition:transform .6s cubic-bezier(.34,1.8,.5,1),filter .4s}
.nf-num .dg:hover{transform:translateY(-22px) rotate(-7deg) scale(1.08);filter:hue-rotate(55deg) drop-shadow(0 26px 30px rgba(255,120,60,.35))}
.nf-num .dg:last-child:hover{transform:translateY(-22px) rotate(7deg) scale(1.08)}
.nf-ring{cursor:pointer}
.nf-ring>path:not(.q){transform-origin:256px 256px}
.nf-ring:hover>path:not(.q){animation:nfspin 1s cubic-bezier(.3,1.35,.5,1)}
.nf-ring:hover .orbit{animation-duration:1.1s}
.nf-ring:hover .q{animation:nfwig .6s ease-in-out infinite}
.nf-t{display:inline-block;--tc:#182840;color:var(--tc);transition:letter-spacing .4s}
.nf-t:hover{background:linear-gradient(105deg,var(--tc) 30%,#ff9d00 42%,#ff5fb0 50%,#8a5cff 58%,var(--tc) 70%) 130% 0/250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:nfshine 1.4s ease-out forwards;letter-spacing:.02em}
.nf-msg{transition:color .3s,transform .4s cubic-bezier(.22,1,.36,1)}.nf-msg:hover{transform:scale(1.03);color:#1266dc}
.nf-actions .btnlink{position:relative;overflow:hidden;transform:translate(var(--bx,0px),var(--by,0px));transition:transform .3s cubic-bezier(.22,1,.36,1),box-shadow .3s,background .3s,border-color .3s}
.nf-actions .btnlink::after{content:"";position:absolute;top:0;bottom:0;left:-70%;width:45%;background:linear-gradient(105deg,transparent,rgba(255,255,255,.65),transparent);transform:skewX(-20deg);transition:left .7s cubic-bezier(.22,1,.36,1);pointer-events:none}
.nf-actions .btnlink:hover{transform:translate(var(--bx,0px),calc(var(--by,0px) - 3px));box-shadow:0 18px 30px -12px rgba(18,102,220,.55)}
.nf-actions .btnlink:hover::after{left:130%}
.nf-actions .btnlink:active{transform:translate(var(--bx,0px),var(--by,0px)) scale(.96)}
.nf-hint{transition:color .3s}.nf-hint:hover{color:#1266dc}
.nf-sp{position:absolute;z-index:3;pointer-events:none;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}
@keyframes nfspin{to{transform:rotate(360deg)}}@keyframes nfwig{0%,100%{rotate:0deg}25%{rotate:-8deg}75%{rotate:8deg}}@keyframes nfshine{from{background-position:130% 0}to{background-position:-30% 0}}
@media(prefers-reduced-motion:reduce){.nf-sky,.nf-num,.nf-obj{transform:none!important}.nf-obj:hover,.nf-num .dg:hover{scale:1;rotate:0deg;transform:none}.nf-sp{display:none}.nf-t:hover{animation:none;background:none;color:var(--tc);-webkit-text-fill-color:currentColor}.nf-ring:hover>path,.nf-ring:hover .q{animation:none}.nf-actions .btnlink::after{display:none}}
@media(hover:none){.nf::after{display:none}}
/* รายการอุปกรณ์: จอแคบให้ปุ่มลงบรรทัดใหม่ ข้อความไม่โดนบีบ */
.dev{flex-wrap:wrap}.dev-t{flex:1 1 150px}.dev-t strong,.dev-t small{overflow-wrap:anywhere}.dev>.mini{white-space:nowrap}
@media(max-width:560px){.dev>.mini{flex:1 0 100%;order:3;margin-top:2px}.dev-t em{display:inline-block;margin:0 0 0 6px}}

/* ---- หน้า สำรองข้อมูล ---- */
.bk-own{border:1px solid #dbe5f5;border-radius:14px;background:rgba(255,255,255,.7);padding:14px 16px;margin:14px 0}
.bk-hd,.bk-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.bk-hd{padding-bottom:10px;border-bottom:1px solid #e2e9f3}
.bk-row{padding:10px 0;border-bottom:1px dashed #e2e9f3}.bk-row:last-child{border-bottom:0;padding-bottom:0}
.bk-n{min-width:0;flex:1 1 220px;overflow-wrap:anywhere}.bk-btns{display:flex;gap:8px;flex-wrap:wrap}
.bk-btns .btnlink{display:inline-flex;align-items:center;text-decoration:none}
.bk-note{font-size:13px;line-height:1.7;margin-top:16px}
.wm-note{font-size:13.5px;margin:0 0 10px}
.two-col>*,.hero>*{min-width:0}
.remember{justify-content:center;text-align:left;max-width:360px;margin:14px auto 0;font-size:14px}.remember .rm-sub{font-size:12.5px;color:#5b6a82}
.hero-landing .remember{justify-content:flex-start;margin:14px 0 0;color:#fff}.hero-landing .remember .rm-sub{color:rgba(255,255,255,.82)}
.cv-arch{position:absolute;z-index:2;right:14px;bottom:10px;width:38px;height:38px;padding:0;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.9);border:1px solid rgba(24,40,64,.12);color:var(--color);box-shadow:0 4px 12px -6px rgba(24,40,64,.35)}
.cv-arch svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cv-arch:hover{background:#fff;transform:scale(1.07)}.cv-arch:disabled{opacity:.5}
.card.archived{opacity:.78}.card.archived .cover{filter:saturate(.55)}
.manage-link{display:inline-flex;align-items:center;gap:7px;margin-left:auto;align-self:center}.manage-link svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.verr{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:rgba(16,28,43,.88);color:#fff;text-align:center;padding:18px}.verr strong{font-size:17px}.verr span{font-size:14px;opacity:.85}.verr button{margin-top:4px}
@media(max-width:620px){.ch-head{flex-wrap:wrap}.ch-head input{flex:1 1 calc(100% - 70px);min-width:0}}
.upl-btn{margin:0;border:1px solid #dbe3ee;border-radius:8px;padding:6px 10px;cursor:pointer;background:#fff}
.ch-tg{flex:none;width:34px;height:34px;padding:0;display:grid;place-items:center;border-radius:50%}.ch-tg svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease}
.ch-box.folded .ch-tg svg{transform:rotate(-90deg)}
.ch-sum{display:block;width:100%;margin-top:8px;text-align:left;font-size:14px;color:#58667c;background:transparent;border:1px dashed #cfd9e8;border-radius:10px;padding:8px 12px}
.ch-sum:hover{background:#f3f7fd}
.ch-body[hidden]{display:none}

.clamp3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.more-btn{background:none;border:0;padding:2px 0;color:#0f5bd0;font-weight:600;cursor:pointer;min-height:0}.more-btn[hidden]{display:none}
@media(min-width:1000px){.sidebar-shell{position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}}
.sidebar-shell>*{flex-shrink:0}
@media(max-width:560px){.cc .cover.has-img{height:auto;aspect-ratio:2/1}}
.sto-chev{display:inline-block;width:14px;height:14px;margin-right:6px;vertical-align:-2px;transition:transform .2s}.sto-chev svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.sto-row[aria-expanded=true] .sto-chev{transform:rotate(180deg)}
.up-err{display:block;color:#b42318;font-size:13px;margin-top:4px}.slow-warn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;vertical-align:-2px}
#app.stale{opacity:.55;transition:opacity .2s;pointer-events:none}
#app.stale::before{content:"";position:fixed;left:0;top:0;height:3px;width:40%;background:#1266dc;z-index:80;animation:stbar 1s ease-in-out infinite}
@keyframes stbar{0%{left:-40%}100%{left:100%}}
@media(prefers-reduced-motion:reduce){#app.stale::before{animation:none;width:100%}}
.gen-files{padding:12px 14px;margin-bottom:12px}.gen-h{margin:0 0 8px;font-size:15px}
/* มือถือแนวนอน: หน้าเรียนให้วิดีโอสูงเต็ม */
@media(orientation:landscape) and (max-height:500px){.learning-layout .video-heading{display:none}.learning-layout .video-column{max-width:calc((100vh - 90px)*1.7778);margin-inline:auto;width:100%}body.learn-page .tabbar,body.learn-page #nav{display:none}}
/* จอสัมผัส: พื้นที่กดอย่างน้อย 40px */
@media(pointer:coarse){.mini{min-height:40px;padding-block:9px}.mc-x{min-width:40px;min-height:40px}[onclick^="setGoal"]{min-width:40px;min-height:40px}.cexp{min-height:40px}}
@media(orientation:landscape) and (max-height:500px){.learning-layout{grid-template-columns:minmax(0,1fr);margin-top:6px;gap:12px}.learning-layout .video-column{grid-row:1}.learn-page #app>button:first-child{min-height:0;padding:6px 14px;margin-bottom:0;font-size:14px}.learning-layout .video-column{max-width:calc((100vh - 100px)*1.7778)}}
.chip.ok{background:#e3f5ea;color:#1d6b3e;border-color:#b9e3c9}.chip.warn{background:#fff4dc;color:#8a5a00;border-color:#f1d9a0}
.tbl tfoot td{border-top:2px solid #dde4ee}
a.mini{display:inline-flex;align-items:center;text-decoration:none;color:inherit;cursor:pointer}
a.mini{border:1px solid #ccd5e3;background:#fff}

.needapp{display:flex;flex-direction:column;align-items:center;gap:10px;padding:34px 18px}.needapp strong{font-size:clamp(18px,3vw,23px);margin:0}.needapp>span{max-width:460px}.na-act{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin:6px 0}.na-act .btnlink{color:#16243b;font-weight:600}.na-act .primary{background:#1266dc;color:#fff;border-color:#1266dc}.na-hint{font-size:13px;opacity:.75}

.cby{margin:-2px 0 6px;font-size:.86rem;color:#41526b;line-height:1.35;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}
.course-info .cby{margin:-2px 0 6px;font-size:.92rem}
.mtag{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:99px;font-size:11.5px;line-height:1.5;white-space:nowrap;background:#eef2f8;color:#41526b}
.mtag.na{background:#fff3d6;color:#8a5a00}.mtag.ok{background:#dff5e8;color:#16643a}.mtag.wait{background:#e6efff;color:#1b4fa6}.mtag.bad{background:#fde4e4;color:#a02323}

/* ---- แถบเลื่อนแบบบาง (ทั้งหน้าและรายการบทเรียน) ---- */
*{scrollbar-width:thin;scrollbar-color:#b9c7dc transparent}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:#b9c7dc;border-radius:999px;border:3px solid transparent;background-clip:content-box;min-height:40px}
*::-webkit-scrollbar-thumb:hover{background:#7f9bc4;background-clip:content-box}
*::-webkit-scrollbar-button{display:none;width:0;height:0}
*::-webkit-scrollbar-corner{background:transparent}
.chapter-items{padding-right:2px}
/* คอร์สที่มีบทเดียว: การ์ดใหญ่ไม่เลื่อน ให้เลื่อนเฉพาะรายการตอนข้างใน */
@media(min-width:1000px){
.sidebar-shell:has(.chapter-card.solo){overflow:hidden}
.sidebar-shell:has(.chapter-card.solo)>.content-card{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.sidebar-shell:has(.chapter-card.solo)>.content-card>[role=tabpanel]:not([hidden]){flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.chapter-card.solo{display:flex;flex-direction:column;min-height:0;flex:1 1 auto}
.chapter-card.solo .chapter-items{flex:1 1 auto;min-height:0;max-height:none}
}
.quota{margin:0 0 10px;padding:8px 12px;border-radius:10px;background:#eef5ff;border:1px solid #cfe0f7;font-size:14px}
.quota.full{background:#fff6dc;border-color:#f0dd9c}.quota.over{background:#ffe9e9;border-color:#f2b9b9;color:#8a1f1f}
.over-t{color:#b3261e;font-weight:600}
.sq{margin:14px 0;padding:14px 16px;border-radius:14px;background:#eef5ff;border:1px solid #cfe0f7}
.sq-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.sq-bar{height:10px;border-radius:999px;background:#d6e4f7;overflow:hidden}.sq-bar i{display:block;height:100%;border-radius:999px;background:#1266dc;transition:width .4s var(--ease)}
.sq.over{background:#ffe9e9;border-color:#f2b9b9}.sq.over .sq-bar{background:#f5cfcf}.sq.over .sq-bar i{background:#d93b3b}
.modal p{white-space:pre-line}
.fs-note{display:block;margin-top:6px;font-size:13px;color:#4b5f7c}.fs-note.wait{color:#8a5a00}.fs-note.ok{color:#1b7a43}.fs-note.bad,.fs-note.slow{color:#b3261e}
.fs-act{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.fs-act input[type=file]{display:none}
.chip.bad{background:#ffe9e9;color:#9b1c1c;border-color:#f2b9b9}
