/* Compact class video layout. Other pages keep their existing layout. */
body:has(#hgClassVideos.active)>header,body:has(#hgClassVideos.active)>.deployProof{display:none}
body:has(#hgClassVideos.active)>main{max-width:960px;padding:0 12px}
body:has(#hgClassVideos.active){padding-bottom:calc(76px + env(safe-area-inset-bottom))}
body:has(#hgClassVideos.active)>nav.hgNav{height:calc(62px + env(safe-area-inset-bottom));min-height:0;padding:3px 6px calc(3px + env(safe-area-inset-bottom))}
body:has(#hgClassVideos.active)>nav.hgNav button{min-height:50px;height:50px;padding:2px;font-size:14px;gap:0}
body:has(#hgClassVideos.active)>nav.hgNav button i{font-size:23px;line-height:25px}
body:has(#hgClassVideos.active)>nav.hgNav button span{font-size:14px;line-height:20px}
#hgClassVideos{padding:6px 0 18px}
#hgClassVideos .hgVideoTop{display:flex;align-items:center;gap:8px;margin:0 0 4px}
#hgClassVideos #hgVideoTitle{flex:1;min-width:0;margin:0;padding:0;border:0;font:700 18px/1.35 var(--hgSans);letter-spacing:0;overflow-wrap:anywhere}
#hgClassVideos .hgVideoTop>button{flex:none;min-height:44px;padding:5px 8px;white-space:nowrap}
#hgClassVideos #hgYoutubeChannel{font-size:14px;line-height:1.4;margin:3px 0 6px;overflow-wrap:anywhere;color:#536273}
#hgClassVideos .hgVideoToolbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0}
#hgClassVideos .hgVideoToolbar>button{min-height:44px;padding:6px 10px;font-size:15px;margin:0}
#hgClassVideos .hgVideoSettings{position:relative;margin:0;padding:0;border:0}
#hgClassVideos .hgVideoSettings>summary{font-size:14px;min-height:44px;display:flex;align-items:center;padding:4px 8px;cursor:pointer;border:0;margin:0}
#hgClassVideos .hgVideoSettings>div{position:absolute;z-index:15;right:0;top:44px;width:min(270px,calc(100vw - 32px));padding:12px;background:#fffdf7;border:1px solid #d5d8dd;border-radius:8px;box-shadow:0 5px 20px #10294f22}
#hgClassVideos .hgVideoSettings p{font-size:14px;line-height:1.5;margin:8px 0 0}
#hgClassVideos #hgVideoStatus{font-size:13px;line-height:1.4;margin:6px 0;color:#536273;min-height:0}
#hgClassVideos #hgVideoStatus:empty{display:none}
#hgClassVideos .hgVideoRow{display:grid;grid-template-columns:112px minmax(0,1fr) 40px;gap:9px;align-items:center;padding:9px 0;margin:0;position:relative;border:0;border-bottom:1px solid #ded9c9;border-radius:0;background:transparent}
#hgClassVideos button.hgVideoCover{position:relative;width:112px;height:68px;min-height:0;padding:0;border:0;border-radius:6px;overflow:hidden;background:#dce3e8;color:#fff;flex:none}
#hgClassVideos .hgVideoCover img{display:block;width:100%;height:100%;object-fit:cover;margin:0}
#hgClassVideos .hgVideoCover>span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:30px;height:30px;font-size:15px;line-height:1;background:#10294fcc;border-radius:50%}
#hgClassVideos .hgVideoText h2{font:inherit;font-size:17px;line-height:1.35;margin:0;padding:0;border:0}
#hgClassVideos button.hgVideoPlay{display:block;width:100%;min-height:54px;padding:0;text-align:left;border:0;border-radius:0;background:transparent;font-size:17px;line-height:1.35;white-space:normal}
#hgClassVideos .hgVideoName{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-weight:700}
#hgClassVideos .hgVideoPlay small{display:block;font-size:13px;line-height:1.4;margin-top:4px;font-weight:400;color:#536273}
#hgClassVideos .hgVideoOptions{position:static;margin:0;padding:0;border:0;align-self:center}
#hgClassVideos .hgVideoOptions>summary{display:grid;place-items:center;list-style:none;min-height:44px;width:40px;padding:0;margin:0;border:0;font-size:25px;line-height:1;cursor:pointer}
#hgClassVideos .hgVideoOptions>summary::-webkit-details-marker{display:none}
#hgClassVideos .hgVideoPopover{position:absolute;right:0;top:calc(100% - 8px);z-index:12;width:min(300px,calc(100vw - 32px));padding:12px;background:#fffdf7;border:1px solid #d5d8dd;border-radius:8px;box-shadow:0 5px 20px #10294f22;font-size:15px;line-height:1.5;overflow-wrap:anywhere;max-height:50dvh;overflow-y:auto}
#hgClassVideos .hgVideoPopover p{font-size:14px;white-space:pre-wrap;margin:6px 0}
#hgClassVideos .hgVideoPopover button{display:block;width:100%;min-height:44px;padding:6px 10px;margin-top:5px}
#hgClassVideos .hgVideoHelp{margin:8px 0;padding:0;border:0;font-size:14px;line-height:1.5}
#hgClassVideos .hgVideoHelp summary{display:flex;align-items:center;min-height:44px;margin:0;padding:0;border:0;font-size:14px;cursor:pointer;color:#536273}
#hgClassVideos .hgVideoHelp p,#hgClassVideos .hgVideoHelp ol{font-size:14px;margin:6px 0}
@media(min-width:640px){#hgClassVideos .hgVideoRow{grid-template-columns:144px minmax(0,1fr) 44px}#hgClassVideos button.hgVideoCover{width:144px;height:81px}}
@media(max-width:350px){#hgClassVideos .hgVideoRow{grid-template-columns:92px minmax(0,1fr) 40px;gap:6px}#hgClassVideos button.hgVideoCover{width:92px;height:60px}#hgClassVideos #hgVideoTitle{font-size:16px}#hgClassVideos .hgVideoToolbar{gap:4px}#hgClassVideos .hgVideoToolbar>button{padding:6px 8px;font-size:14px}}

.hgVideoCover[data-cover-missing="1"]::after{content:'封面未就緒';position:absolute;bottom:4px;left:0;right:0;font-size:12px;line-height:18px;color:#142b4e;background:#ffffffd9;text-align:center;z-index:3}
