:is(.shell:has(.portal-page) .topbar,.shell:has(.portal-page)>.footer){display:none}.portal-page{--portal-red:#900;--portal-deep:#760000;--portal-gold:#c93;background:#fafafa;flex-direction:column;width:min(100%,620px);min-height:100dvh;margin:0 auto;display:flex;box-shadow:0 0 35px #10182812}.portal-hero{background:linear-gradient(160deg,var(--portal-red),var(--portal-deep));color:#fff;flex-direction:column;align-items:center;min-height:295px;padding:20px 24px 26px;display:flex;position:relative}.portal-hero>img{object-fit:contain;filter:drop-shadow(0 7px 10px #31000855);width:150px;height:150px}.portal-hero h2{letter-spacing:.01em;margin:7px 0 0;font-size:1.9rem}.login-panel{flex-direction:column;flex:1;padding:34px 28px 12px;display:flex}.login-title{text-align:center}.login-title h1{color:#181818;font-size:2rem;font-weight:650;line-height:1.22}.login-title p{color:#737b86;margin:12px auto 0;font-size:.92rem}.login-form{flex-direction:column;flex:1;align-items:stretch;padding:64px 65px 0;display:flex}.qr-input{border:1.5px solid var(--portal-red);text-align:center;background:#fff;border-radius:5px;height:58px;padding:10px 16px;font-size:1.05rem;box-shadow:0 2px 4px #10182808}.qr-input:focus{outline:3px solid #cc993342}.login-help{text-align:center;color:#717985;margin:12px 0;font-size:.86rem;line-height:1.25}.portal-error{color:#9d1b1b;background:#fff1f1;border:1px solid #f1c2c2;border-radius:6px;margin:9px 0;padding:10px 12px;font-size:.85rem}.login-buttons{gap:10px;margin-top:auto;display:grid}.portal-button,.camera-button{border-radius:6px;height:57px;font-size:1.05rem;font-weight:700}.portal-button{background:var(--portal-red);color:#fff;border:1px solid var(--portal-gold);box-shadow:0 4px 10px #76000020}.portal-button:hover:not(:disabled){background:#870000}.camera-button{color:#fff;background:#3f69bd;border:1px solid #244d9e}.camera-button:disabled{opacity:.48;cursor:not-allowed}.portal-button:disabled{opacity:.45;cursor:not-allowed}.portal-footer{text-align:center;color:#818895;padding:18px 12px 24px;font-size:.8rem;line-height:1.25}.portal-footer span{color:#6e7682}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.teacher-strip{justify-content:space-between;align-items:end;gap:14px;display:flex;position:absolute;bottom:10px;left:20px;right:14px}.teacher-strip>div{gap:6px;font-size:.83rem;display:grid}.teacher-strip span{color:#e2b95c}.teacher-strip strong{font-weight:500}.teacher-strip button{border:1px solid var(--portal-gold);color:#fff;background:0 0;border-radius:7px;padding:12px 17px;font-weight:650}.teacher-strip button:hover{background:#ffffff14}.class-form{background:#fff;border:1px solid #e5e7eb;flex:1;gap:22px;margin:14px 12px 0;padding:20px 15px 132px;display:grid;position:relative}.class-form label{color:#54212c;gap:8px;font-size:.8rem}.select-wrap{grid-template-columns:1fr 46px;height:50px;display:grid}.select-wrap select{appearance:none;background:#fff;border:1px solid #ccd2d8;border-radius:0;grid-area:1/1/auto/3;width:100%;height:50px;padding:8px 58px 8px 10px;font-size:1rem}.select-wrap span{z-index:1;pointer-events:none;background:var(--portal-red);color:var(--portal-gold);border-left:1px solid #ddd;grid-area:1/2;place-items:center;font-size:1.8rem;display:grid}.select-wrap select:focus{border-color:var(--portal-red);outline:2px solid #c935}.class-continue{width:min(100% - 52px,554px);position:fixed;bottom:84px;left:50%;transform:translate(-50%)}.portal-loading{text-align:center;color:#747d88;font-size:.9rem}@media (max-width:600px){.portal-page{box-shadow:none}.portal-hero{min-height:296px}.portal-hero>img{width:140px;height:140px}.portal-hero h2{font-size:1.7rem}.login-panel{padding:32px 20px 8px}.login-form{padding:55px min(9vw,48px) 0}.class-hero{min-height:345px}.class-form{padding-bottom:125px}.class-continue{bottom:82px}.portal-footer{padding-bottom:max(20px,env(safe-area-inset-bottom))}}@media (max-height:760px){.portal-hero{min-height:230px;padding-top:12px}.portal-hero>img{width:115px;height:115px}.login-panel{padding-top:22px}.login-form{padding-top:28px}.login-buttons{margin-top:30px}.class-hero{min-height:280px}.class-form{padding-bottom:105px}.class-continue{bottom:72px}}@media (prefers-reduced-motion:no-preference){.portal-hero>img{animation:.45s ease-out both logoIn}.login-panel,.class-form{animation:.35s ease-out both panelIn}@keyframes logoIn{0%{opacity:0;transform:translateY(-8px)scale(.96)}to{opacity:1;transform:none}}@keyframes panelIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}}.portal-page{color:#131722;background:#f3f5f8;width:min(100%,680px);box-shadow:0 0 48px #15223814}.portal-hero{background:linear-gradient(145deg,#790014 0%,#900 58%,#a91919 100%);border-radius:0 0 28px 28px;justify-content:flex-start;min-height:188px;padding:24px 28px 30px;box-shadow:0 10px 30px #76000026}.portal-hero:after{content:"";background:linear-gradient(90deg,#0000,#e6bb5d99,#0000);height:1px;position:absolute;inset:auto 28px 0}.portal-hero>img{filter:drop-shadow(0 6px 10px #31000845);width:84px;height:84px}.portal-hero h2{letter-spacing:-.01em;margin:8px 0 0;font-size:1.35rem;font-weight:650}.login-panel{z-index:1;background:#fff;border:1px solid #e6e9ee;border-radius:22px;margin:-22px 18px 0;padding:28px 24px 22px;box-shadow:0 12px 35px #17203312}.login-title h1{letter-spacing:-.025em;font-size:1.75rem;line-height:1.18}.login-title p{max-width:330px;font-size:.9rem;line-height:1.45}.login-form{padding:34px 0 0}.qr-input{background:#f9fafb;border:1px solid #cbd1da;border-radius:14px;height:56px;font-size:1rem;transition:border-color .18s,box-shadow .18s,background .18s}.qr-input:focus{background:#fff;border-color:#900;outline:0;box-shadow:0 0 0 4px #99000014}.login-help{color:#7b8492;font-size:.8rem;line-height:1.4}.login-buttons{gap:11px;margin-top:40px}.portal-button,.camera-button{letter-spacing:.005em;border-radius:14px;height:54px;font-size:1rem}.portal-button{background:linear-gradient(135deg,#870016,#a40000);border:0;box-shadow:0 8px 18px #88001224}.portal-button:hover:not(:disabled){background:linear-gradient(135deg,#760013,#920000);box-shadow:0 10px 22px #88001232}.camera-button{color:#7a8492;box-shadow:none;background:#eef1f5;border:1px solid #d9dde4}.portal-footer{color:#9299a5;padding:20px 12px 26px}.class-hero{align-items:flex-start;min-height:218px;padding-bottom:76px}.class-hero>img{width:64px;height:64px}.class-hero h2{margin-top:5px;font-size:1.18rem}.teacher-strip{align-items:center;bottom:24px;left:28px;right:24px}.teacher-strip>div{gap:4px}.teacher-strip span{color:#e7bd65;font-size:.72rem}.teacher-strip strong{white-space:nowrap;text-overflow:ellipsis;max-width:420px;font-size:.88rem;overflow:hidden}.teacher-strip button{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#ffffff12;border:1px solid #fff5;border-radius:12px;padding:10px 15px;font-size:.85rem}.class-form{z-index:1;background:#fff;border:1px solid #e4e8ed;border-radius:22px;flex-direction:column;gap:20px;margin:-22px 18px 0;padding:25px 22px 24px;display:flex;box-shadow:0 12px 35px #17203310}.class-form label{letter-spacing:.045em;color:#606978;gap:8px;font-size:.72rem;font-weight:750}.select-wrap{height:56px}.select-wrap select{color:#20242d;background:#f8f9fb;border:1px solid #d5dae1;border-radius:14px;height:56px;padding:10px 52px 10px 14px;font-size:1rem;font-weight:550;transition:border-color .18s,box-shadow .18s,background .18s}.select-wrap select:focus{background:#fff;border-color:#900;outline:0;box-shadow:0 0 0 4px #99000012}.select-wrap span{color:#8c0018;background:#f1e4e7;border:0;border-radius:10px;justify-self:end;width:38px;height:44px;margin:6px;font-size:1.45rem}.class-continue{width:100%;margin-top:10px;position:static;transform:none}.portal-loading{background:#f7f8fa;border-radius:12px;padding:12px}.classes-page .portal-footer{margin-top:auto}@media (max-width:600px){.portal-page{width:100%}.portal-hero{border-radius:0 0 24px 24px;min-height:174px;padding:20px 22px 27px}.portal-hero>img{width:76px;height:76px}.login-panel{margin:-20px 14px 0;padding:25px 20px 20px}.login-form{padding-top:30px}.class-hero{min-height:205px;padding-bottom:74px}.class-hero>img{width:60px;height:60px}.teacher-strip{bottom:21px;left:22px;right:18px}.teacher-strip strong{max-width:260px}.class-form{margin:-20px 14px 0;padding:23px 18px 22px}.portal-footer{font-size:.76rem}}@media (max-height:760px){.portal-hero{min-height:154px}.portal-hero>img{width:65px;height:65px}.login-panel,.login-form{padding-top:22px}.login-buttons{margin-top:25px}.class-hero{min-height:190px}.class-form{padding-bottom:20px}}.portal-hero>img{object-fit:contain;filter:none;background:linear-gradient(145deg,#fffdf8,#fff7e8);border:1px solid #e4bd63;border-radius:24px;width:96px;height:96px;padding:10px;box-shadow:0 10px 24px #38000738,inset 0 1px #fff}.class-hero>img{border-radius:20px;width:76px;height:76px;padding:8px}.portal-hero h2{margin-top:10px}@media (max-width:600px){.portal-hero>img{border-radius:22px;width:88px;height:88px}.class-hero>img{border-radius:18px;width:70px;height:70px}}@media (max-height:760px){.portal-hero>img{width:76px;height:76px;padding:8px}.class-hero>img{width:64px;height:64px}}.reconnect-button{color:#fff;background:#900;border-radius:11px;justify-content:center;align-items:center;min-height:44px;margin-top:10px;font-weight:700;text-decoration:none;display:flex}.reconnect-button:hover{background:#830000}.class-hero{border-radius:0 0 24px 24px;flex-direction:row;justify-content:space-between;align-items:flex-start;min-height:166px;padding:22px 24px 56px;display:flex}.class-hero:after{left:24px;right:24px}.class-brand{align-items:center;gap:13px;display:flex}.class-brand>img{object-fit:contain;background:linear-gradient(145deg,#fffdf8,#fff7e8);border:1px solid #e4bd63;border-radius:18px;width:62px;height:62px;padding:7px;box-shadow:0 7px 18px #38000730}.class-brand h2{margin:0;font-size:1.22rem}.class-brand span{color:#f0ca79;margin-top:4px;font-size:.72rem;display:block}.class-logout{color:#fff;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#ffffff12;border:1px solid #fff5;border-radius:12px;padding:10px 15px;font-weight:650}.class-logout:hover{background:#ffffff20}.teacher-identity{align-items:center;gap:9px;min-width:0;display:flex;position:absolute;bottom:16px;left:25px;right:25px}.teacher-identity span{color:#f1ce83;background:#ffffff18;border-radius:999px;flex:none;padding:3px 8px;font-size:.68rem}.teacher-identity strong{white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:.83rem;font-weight:550;overflow:hidden}@media (max-width:600px){.class-hero{min-height:158px;padding:19px 18px 54px}.class-brand{gap:10px}.class-brand>img{border-radius:16px;width:56px;height:56px}.class-brand h2{font-size:1.08rem}.class-logout{padding:9px 12px;font-size:.82rem}.teacher-identity{bottom:15px;left:19px;right:19px}.classes-page .class-form{margin-top:-17px}}.class-brand{text-align:center;flex-direction:column;gap:6px;position:absolute;top:15px;left:50%;transform:translate(-50%)}.class-brand span{margin-top:2px}.class-logout{position:absolute;top:20px;right:20px}.teacher-identity{text-align:center;justify-content:center}@media (max-width:600px){.class-hero{min-height:184px}.class-brand{top:13px}.class-brand>img{width:62px;height:62px}.class-logout{padding:8px 10px;top:17px;right:14px}.teacher-identity{left:15px;right:15px}}.class-hero{min-height:148px;padding-bottom:24px}.class-brand{top:14px}.class-brand>img{width:64px;height:64px}.class-brand h2{font-size:1.1rem}.class-logout{box-shadow:none;color:#fff;background:0 0;border:0;padding:6px 2px;font-size:.88rem;font-weight:600;top:18px;right:21px}.class-logout:hover{color:#f1cf87;text-underline-offset:4px;background:0 0;text-decoration:underline}.classes-page .class-form{margin-top:-15px}.class-panel-head{text-align:center;border-bottom:1px solid #eceff2;padding:3px 4px 8px}.class-panel-head h1{letter-spacing:-.025em;margin:0 0 13px;font-size:1.65rem}.class-panel-head>div{gap:4px;font-family:Khmer OS Content,Noto Sans Khmer,sans-serif;display:grid}.class-panel-head span{color:#7b8491;font-size:.78rem}.class-panel-head strong{color:#333946;font-size:1.02rem;font-weight:500}@media (max-width:600px){.class-hero{min-height:142px}.class-brand{top:12px}.class-brand>img{width:60px;height:60px}.class-logout{top:15px;right:16px}.classes-page .class-form{margin-top:-14px}.class-panel-head h1{font-size:1.5rem}.class-panel-head strong{font-size:1rem}}.camera-overlay{z-index:1000;background:#090b10d9;place-items:center;padding:18px;display:grid;position:fixed;inset:0}.camera-dialog{background:#fff;border-radius:22px;width:min(100%,520px);padding:20px;box-shadow:0 24px 70px #0008}.camera-heading{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px;display:flex}.camera-heading h2{margin:0;font-size:1.35rem}.camera-heading p{color:#667085;margin:5px 0 0;font-size:.9rem}.camera-heading>button{color:#344054;background:#f1f3f6;border:0;border-radius:999px;width:40px;height:40px;font-size:1.7rem;line-height:1}.camera-preview{aspect-ratio:3/4;background:#111;border-radius:16px;max-height:65dvh;position:relative;overflow:hidden}.camera-preview video{object-fit:cover;width:100%;height:100%}.camera-frame{border:3px solid #fff;border-radius:18px;position:absolute;inset:20%;box-shadow:0 0 0 999px #0005}.camera-frame:before,.camera-frame:after{content:"";border-color:#d4af37;width:38px;height:38px;position:absolute}.camera-frame:before{border-top:5px solid #d4af37;border-left:5px solid #d4af37;border-radius:15px 0 0;top:-3px;left:-3px}.camera-frame:after{border-bottom:5px solid #d4af37;border-right:5px solid #d4af37;border-radius:0 0 15px;bottom:-3px;right:-3px}.camera-error{color:#9d1b1b;background:#fff1f1;border:1px solid #f1c2c2;border-radius:12px;padding:18px;line-height:1.45}.camera-cancel{color:#344054;background:#fff;border:1px solid #cfd4dc;border-radius:12px;width:100%;height:50px;margin-top:14px;font-weight:700}@media (max-width:560px){.camera-overlay{padding:0}.camera-dialog{border-radius:0;flex-direction:column;height:100dvh;display:flex}.camera-preview{flex:1;max-height:none}.camera-cancel{flex:none}}
