:root{--hkw-blue:#123b74;--hkw-deep:#092746;--hkw-gold:#e5b659;--hkw-ink:#152d4c;--hkw-muted:#6b7e94;--hkw-line:#dce6f1;--hkw-paper:#f4f8fc}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:linear-gradient(180deg,#edf4fb 0,#f8fbfe 48%,#eef4fa 100%);font-family:'Prompt','Noto Sans Thai','Sarabun',Tahoma,Arial,sans-serif;color:var(--hkw-ink);min-height:100vh}a{text-decoration:none}.hkw-header{background:rgba(255,255,255,.97);box-shadow:0 1px 16px rgba(15,44,85,.08)}.hkw-header-inner{max-width:1320px;padding:12px 4%;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}.hkw-brand{display:flex;align-items:center;gap:12px;color:var(--hkw-ink)}.hkw-brand img{width:50px;height:50px;object-fit:contain;border-radius:50%}.hkw-brand strong{display:block;font-size:1.08rem}.hkw-brand small{display:block;font-size:.74rem;color:#64758c}.hkw-home{color:#315578;font-weight:700;padding:10px 14px;border-radius:12px}.hkw-home:hover{background:#edf4fb;color:#123b74}.hkw-hero{background:linear-gradient(120deg,#0a315e,#164f8b);color:#fff;padding:38px 4% 76px}.hkw-hero-inner,.hkw-main{max-width:1180px;margin:auto}.hkw-kicker{font-size:.73rem;letter-spacing:.18em;color:#f2d79e;font-weight:800}.hkw-hero h1{font-size:clamp(1.8rem,4vw,3rem);margin:6px 0 5px;font-weight:900}.hkw-hero p{margin:0;color:#dceafa}.hkw-main{margin-top:-42px;padding:0 4% 48px}.hkw-card{background:#fff;border:1px solid rgba(218,229,241,.85);border-radius:22px;box-shadow:0 18px 50px rgba(24,62,98,.12);padding:clamp(20px,4vw,34px)}.hkw-form-grid{display:grid;grid-template-columns:1fr 220px auto;gap:14px;align-items:end}.form-label{font-size:.84rem;font-weight:800;margin-bottom:7px}.form-control,.form-select{border:1px solid #cfdeec;border-radius:12px;min-height:47px;background:#fbfdff;padding:10px 13px}.form-control:focus,.form-select:focus{border-color:#5796d0;box-shadow:0 0 0 .2rem rgba(35,107,179,.1)}.hkw-btn{border:0;border-radius:12px;min-height:47px;padding:10px 22px;color:#fff;background:linear-gradient(135deg,#2f80c9,#0a3978);font-weight:800;box-shadow:0 8px 20px rgba(0,64,140,.17)}.hkw-btn:hover{color:#fff;filter:brightness(.96)}.hkw-result{margin-top:26px}.hkw-student{display:flex;align-items:center;gap:14px;background:#f1f7fd;border:1px solid #dceaf7;border-radius:16px;padding:15px 18px;margin-bottom:16px}.hkw-student i{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:#fff;color:#1763a7;font-size:1.4rem}.hkw-student strong{display:block}.hkw-student small{color:var(--hkw-muted)}.hkw-table-wrap{overflow:auto;border:1px solid var(--hkw-line);border-radius:16px}.hkw-table{width:100%;border-collapse:separate;border-spacing:0;min-width:720px}.hkw-table th,.hkw-table td{padding:12px 10px;text-align:center;border-right:1px solid var(--hkw-line);border-bottom:1px solid var(--hkw-line)}.hkw-table th:last-child,.hkw-table td:last-child{border-right:0}.hkw-table tr:last-child td{border-bottom:0}.hkw-table thead th{background:#edf5fd;font-size:.82rem;color:#274c71}.hkw-table thead th:nth-child(2){background:#f9e9f6}.hkw-table thead th:nth-child(3){background:#e4f7e9}.hkw-table thead th:nth-child(4){background:#fbefe1}.hkw-table thead th:nth-child(5){background:#e3f3fb}.hkw-status{display:inline-flex;align-items:center;justify-content:center;min-width:76px;padding:7px 9px;border-radius:999px;font-size:.78rem;font-weight:800}.is-present{background:#e2f6e9;color:#197047}.is-absent{background:#fee8e8;color:#ad3434}.is-late{background:#fff2d9;color:#9b680d}.is-leave{background:#e5efff;color:#295da4}.is-activity{background:#f0e8ff;color:#7142aa}.is-empty{background:#f1f4f7;color:#7d8995}.hkw-alert{padding:13px 16px;border-radius:12px;margin-top:18px;background:#fff0f0;color:#9c3030;border:1px solid #f4d1d1}.hkw-login{max-width:480px;margin:auto}.hkw-login-head{text-align:center;margin-bottom:24px}.hkw-login-icon{width:66px;height:66px;border-radius:19px;display:grid;place-items:center;margin:0 auto 12px;background:#e8f2ff;color:#1460a6;font-size:1.8rem}.hkw-field{position:relative}.hkw-field>i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#6681a1}.hkw-field .form-control{padding-left:42px}.hkw-note{font-size:.8rem;color:var(--hkw-muted);text-align:center;margin-top:16px}.hkw-portal-nav{display:flex;gap:8px;flex-wrap:wrap;margin-top:24px}.hkw-portal-nav a{color:#dceafa;border:1px solid rgba(255,255,255,.18);padding:8px 12px;border-radius:10px;font-size:.8rem}.hkw-portal-nav a.active{background:#fff;color:#123b74}.hkw-slot{min-width:128px}.hkw-slot strong{display:block;font-size:.78rem;color:#183f67}.hkw-slot small{display:block;font-size:.68rem;color:#6c7e90;line-height:1.45}.hkw-empty{color:#a2adba}.hkw-footer{text-align:center;color:#7890a7;font-size:.76rem;padding:5px 10px 28px}
/* New immersive campus theme */
body{background:#eaf5ff;overflow-x:hidden}.hkw-header{position:relative;z-index:20}.hkw-header-inner{max-width:1480px}.hkw-hero{position:relative;isolation:isolate;min-height:390px;padding:46px 4% 92px;background-image:linear-gradient(90deg,rgba(1,46,121,.96) 0%,rgba(0,74,167,.84) 43%,rgba(4,71,144,.18) 78%),url('/assets/images/hkw-portal-campus.png');background-size:cover;background-position:center 52%;overflow:hidden}.hkw-hero:before{content:"";position:absolute;z-index:-1;inset:auto -8% -108px -8%;height:190px;background:#eaf5ff;border-radius:50% 50% 0 0/32% 32% 0 0;box-shadow:0 -8px 0 rgba(255,207,74,.55),0 -13px 35px rgba(88,190,255,.65)}.hkw-hero-inner{position:relative;max-width:1220px}.hkw-kicker{letter-spacing:.24em}.hkw-hero h1{font-size:clamp(2.4rem,5vw,4.7rem);line-height:1.05;text-shadow:0 5px 22px rgba(0,24,83,.34)}.hkw-hero h1:after{content:"";display:block;width:65px;height:5px;margin-top:14px;border-radius:99px;background:linear-gradient(90deg,#ffe17b,#ffb718)}.hkw-hero p{font-size:1.05rem}.hkw-motto{position:absolute;left:min(55vw,680px);top:10px;max-width:330px;font-size:1.32rem;line-height:1.55;font-weight:700;font-style:italic;color:#fff6d8;transform:rotate(-4deg);text-shadow:0 2px 8px #00377f}.hkw-motto i{color:#ffd750}.hkw-float{position:absolute;pointer-events:none;filter:drop-shadow(0 12px 13px rgba(0,35,95,.25));animation:hkw-float 4s ease-in-out infinite}.hkw-float-cap{right:3%;bottom:55px;font-size:6.4rem;transform:rotate(12deg)}.hkw-float-star{right:18%;top:45px;color:#ffe376;font-size:2.3rem;animation-delay:-1.7s}.hkw-float-book{right:29%;bottom:65px;font-size:3.2rem;color:#ffda63;animation-delay:-.8s}.hkw-spark{position:absolute;width:7px;height:7px;border-radius:50%;background:#fff;box-shadow:0 0 13px 4px #fff,0 0 26px 10px #55bbff;animation:hkw-twinkle 2.4s ease-in-out infinite}.hkw-spark.s1{left:4%;top:31%}.hkw-spark.s2{left:48%;top:18%;animation-delay:-1s}.hkw-spark.s3{right:12%;top:44%;animation-delay:-1.8s}.hkw-main{position:relative;z-index:5;margin-top:-58px}.hkw-card{border-color:rgba(255,255,255,.85);box-shadow:0 24px 60px rgba(3,57,119,.18),inset 0 1px 0 #fff;backdrop-filter:blur(12px)}.hkw-btn{position:relative;overflow:hidden;background:linear-gradient(110deg,#159bf3,#075bce 48%,#0a3695)}.hkw-btn:after{content:"";position:absolute;top:-80%;left:-45%;width:28%;height:260%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);transform:rotate(20deg);animation:hkw-shine 4.5s infinite}.hkw-table-wrap{box-shadow:0 9px 25px rgba(15,78,144,.07)}.hkw-table tbody tr{transition:transform .16s,background .16s}.hkw-table tbody tr:hover{background:#f4f9ff}.hkw-portal-nav a{backdrop-filter:blur(8px);transition:.2s}.hkw-portal-nav a:hover{transform:translateY(-2px);background:rgba(255,255,255,.18);color:#fff}.hkw-portal-nav a.active{box-shadow:0 0 0 2px rgba(122,222,255,.7),0 0 23px rgba(64,193,255,.75)}
@keyframes hkw-float{0%,100%{translate:0 0;rotate:-2deg}50%{translate:0 -13px;rotate:3deg}}@keyframes hkw-twinkle{0%,100%{opacity:.25;scale:.55}50%{opacity:1;scale:1.15}}@keyframes hkw-shine{0%,60%{left:-45%}85%,100%{left:130%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}
@media(max-width:900px){.hkw-motto{display:none}.hkw-float-cap{font-size:4.8rem;right:2%}.hkw-float-book{display:none}.hkw-hero{background-position:64% center}}
@media(max-width:760px){.hkw-header-inner{padding:10px 4%}.hkw-brand img{width:42px;height:42px}.hkw-brand strong{font-size:.9rem}.hkw-brand small{display:none}.hkw-home span{display:none}.hkw-hero{min-height:340px;padding:34px 4% 82px;background-image:linear-gradient(90deg,rgba(1,45,119,.95),rgba(3,76,161,.73)),url('/assets/images/hkw-portal-campus.png');background-position:61% center}.hkw-main{padding:0 3.5% 35px;margin-top:-52px}.hkw-card{border-radius:18px;padding:18px}.hkw-form-grid{grid-template-columns:1fr!important}.hkw-btn{width:100%}.hkw-portal-nav{gap:5px}.hkw-portal-nav a{font-size:.72rem;padding:7px 9px}.hkw-float-cap{font-size:3.8rem;bottom:64px;opacity:.8}.hkw-hero h1{max-width:80%}}

/* Colourful full-width timetable: every period remains visible without horizontal scrolling. */
.hkw-main-timetable{max-width:1540px;padding-left:1.3%;padding-right:1.3%}.hkw-card-timetable{padding:24px 22px}.hkw-timetable-filter{grid-template-columns:minmax(220px,430px) 220px;max-width:680px}.hkw-timetable-wrap{overflow:visible;border:0;border-radius:20px;box-shadow:0 16px 36px rgba(17,70,130,.13)}.hkw-timetable{table-layout:fixed;min-width:0;width:100%;border:1px solid #cfe0f0;border-radius:20px;overflow:hidden}.hkw-timetable th,.hkw-timetable td{padding:9px 5px;overflow-wrap:anywhere}.hkw-timetable thead th{height:66px;color:#123b74;border-color:#c9dced;background:linear-gradient(145deg,#dbeeff,#edf7ff)}.hkw-timetable thead th:first-child{width:92px;background:linear-gradient(145deg,#173f85,#087aca);color:#fff}.hkw-timetable thead th:nth-child(2){background:linear-gradient(145deg,#ffd8ec,#fff0f7)}.hkw-timetable thead th:nth-child(3){background:linear-gradient(145deg,#d8f7e7,#effcf4)}.hkw-timetable thead th:nth-child(4){background:linear-gradient(145deg,#ffedbd,#fff8df)}.hkw-timetable thead th:nth-child(5){background:linear-gradient(145deg,#d6efff,#eff9ff)}.hkw-timetable thead th:nth-child(6){background:linear-gradient(145deg,#e4ddff,#f4f1ff)}.hkw-timetable thead th:nth-child(7){background:linear-gradient(145deg,#d8f5fa,#effcff)}.hkw-timetable thead th:nth-child(8){background:linear-gradient(145deg,#ffe2d3,#fff3ec)}.hkw-timetable thead th:nth-child(9){background:linear-gradient(145deg,#e1f2d5,#f3faee)}.hkw-timetable thead th:nth-child(10){background:linear-gradient(145deg,#f7ddff,#fbf1ff)}.hkw-timetable thead th>span{display:block;font-size:.76rem;font-weight:900}.hkw-timetable thead th small{display:block;margin-top:3px;font-size:.59rem;line-height:1.2;color:#58718d}.hkw-timetable tbody tr{height:89px}.hkw-timetable tbody th{font-size:.84rem;font-weight:900;color:#fff;border-color:rgba(255,255,255,.35)}.hkw-timetable tbody th i{display:block;font-size:1.05rem;margin-bottom:3px}.hkw-timetable .day-1 th{background:linear-gradient(145deg,#ffcf3f,#eda719)}.hkw-timetable .day-2 th{background:linear-gradient(145deg,#ff91c9,#e84f9f)}.hkw-timetable .day-3 th{background:linear-gradient(145deg,#52d38a,#13a965)}.hkw-timetable .day-4 th{background:linear-gradient(145deg,#ff9f48,#ed6f20)}.hkw-timetable .day-5 th{background:linear-gradient(145deg,#58aaff,#2676dc)}.hkw-timetable tbody td{background:#fff;border-color:#dbe7f2}.hkw-timetable tbody tr:nth-child(even) td{background:#f8fbff}.hkw-timetable tbody td:hover{background:#eaf5ff;box-shadow:inset 0 0 0 2px #83c5ff}.hkw-timetable .hkw-slot{min-width:0}.hkw-timetable .hkw-slot strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.68rem;line-height:1.28;color:#123b74}.hkw-timetable .hkw-slot small{font-size:.57rem;line-height:1.27}.hkw-timetable .subject-code{font-weight:800;color:#2872b7;margin-top:3px}.hkw-timetable .teacher-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#74869a;margin-top:2px}
@media(max-width:900px){.hkw-card-timetable{padding:14px 9px}.hkw-timetable th,.hkw-timetable td{padding:6px 2px}.hkw-timetable thead th:first-child{width:58px}.hkw-timetable thead th{height:56px}.hkw-timetable thead th>span{font-size:.61rem}.hkw-timetable thead th small{font-size:.48rem}.hkw-timetable tbody tr{height:76px}.hkw-timetable tbody th{font-size:.65rem}.hkw-timetable tbody th i{font-size:.82rem}.hkw-timetable .hkw-slot strong{font-size:.56rem}.hkw-timetable .hkw-slot small{font-size:.47rem}}
@media(max-width:560px){.hkw-main-timetable{padding-left:1%;padding-right:1%}.hkw-card-timetable{padding:12px 3px}.hkw-timetable-filter{padding:0 9px}.hkw-timetable{border-radius:12px}.hkw-timetable th,.hkw-timetable td{padding:4px 1px}.hkw-timetable thead th:first-child{width:43px}.hkw-timetable thead th{height:50px}.hkw-timetable thead th>span{font-size:.52rem}.hkw-timetable thead th small{font-size:.4rem}.hkw-timetable tbody tr{height:68px}.hkw-timetable tbody th{font-size:.55rem}.hkw-timetable tbody th i{display:none}.hkw-timetable .hkw-slot strong{font-size:.47rem;line-height:1.18}.hkw-timetable .hkw-slot small{font-size:.4rem;line-height:1.15}.hkw-timetable .teacher-name{-webkit-line-clamp:1}.hkw-timetable-wrap{box-shadow:0 8px 20px rgba(17,70,130,.11)}}
.hkw-timetable .hkw-slot-merged{position:relative;background:linear-gradient(135deg,#e7f5ff,#f1edff)!important;box-shadow:inset 4px 0 #4894ee,inset -4px 0 #8565dc}.hkw-timetable .hkw-slot-merged:before{content:"คาบคู่";position:absolute;right:5px;top:4px;border-radius:999px;padding:2px 6px;background:linear-gradient(120deg,#327edf,#7652c7);color:#fff;font-size:.47rem;font-weight:800}.hkw-timetable .hkw-slot-merged strong{font-size:.77rem;color:#173c87}.hkw-timetable .hkw-slot-merged .subject-code{color:#6847ad}.hkw-timetable .hkw-break-head{background:linear-gradient(145deg,#ffe385,#ffc43e)!important;color:#734800!important}.hkw-timetable .hkw-lunch-cell{width:54px;background:linear-gradient(180deg,#fff5b8,#ffd65a)!important;color:#7b4a00;border-color:#efbf37;vertical-align:middle;font-weight:900}.hkw-timetable .hkw-lunch-cell span{display:block;font-size:1.3rem;margin-bottom:5px}.hkw-timetable .hkw-lunch-cell strong{display:block;font-size:.7rem;line-height:1.35;color:#7b4a00}@media(max-width:560px){.hkw-timetable .hkw-slot-merged:before{display:none}.hkw-timetable .hkw-lunch-cell{width:28px}.hkw-timetable .hkw-lunch-cell span{font-size:.8rem}.hkw-timetable .hkw-lunch-cell strong{font-size:.45rem}}
.hkw-semester-badge{display:flex;align-items:center;justify-content:center;gap:14px;width:max-content;max-width:100%;margin:20px auto -8px;padding:10px 20px;border:1px solid #c8ddf4;border-radius:999px;background:linear-gradient(120deg,#f2f8ff,#fff9e9);color:#1b4f86;font-size:.86rem;box-shadow:0 7px 19px rgba(25,83,145,.1)}.hkw-semester-badge i{color:#d99a0b;margin-right:5px}.hkw-semester-badge strong{color:#0d3d7b;font-size:1rem}.hkw-semester-divider{width:1px;height:22px;background:#c9d9e9}.hkw-timetable-wrap{width:80%;margin-left:auto;margin-right:auto}@media(max-width:900px){.hkw-timetable-wrap{width:80%}.hkw-semester-badge{font-size:.72rem;padding:8px 13px;gap:9px}.hkw-semester-badge strong{font-size:.8rem}}@media(max-width:560px){.hkw-semester-badge{border-radius:15px;flex-wrap:wrap}.hkw-semester-divider{display:none}}

