/* Restores semantic elements inside the app after aggressive theme-wrapper resets. */
body:has(#koh-student-app) #koh-student-app .koh-subject header{display:flex!important}
body:has(#koh-student-app) #koh-student-app .koh-topbar{display:flex!important}
body:has(#koh-student-app) #koh-student-app .koh-menu{width:40px;height:40px;padding:9px!important}
body:has(#koh-student-app) #koh-student-app .koh-menu svg{display:block;width:22px;height:22px}
body:has(#koh-student-app) #koh-student-app .koh-dialog-head{display:block!important}
body:has(#koh-student-app) #koh-student-app .koh-stat{padding:18px!important}
body:has(#koh-student-app) #koh-student-app .koh-subject{padding:17px!important}
body:has(#koh-student-app) #koh-student-app .koh-method{padding:15px!important}
body:has(#koh-student-app) #koh-student-app .koh-history-item{padding:12px!important}
body:has(#koh-student-app) #koh-student-app .koh-question{padding:16px!important}

/* Rich lesson preview. */
body:has(#koh-student-app) #koh-student-app .koh-next-item{grid-template-columns:96px minmax(0,1fr) auto;gap:14px;padding:10px}
body:has(#koh-student-app) #koh-student-app .koh-next-thumb{position:relative;overflow:hidden;display:block;width:96px;height:56px;margin:0;border-radius:9px;background:#e9eef4}
body:has(#koh-student-app) #koh-student-app .koh-next-thumb img{display:block;width:100%;height:100%;margin:0;object-fit:cover}
body:has(#koh-student-app) #koh-student-app .koh-next-thumb b{position:absolute;left:6px;bottom:5px;display:grid;width:20px;height:20px;place-items:center;border-radius:6px;background:rgba(7,28,54,.88);color:#fff;font-size:9px}

/* The video never changes progress by itself. */
body:has(#koh-student-app) #koh-student-app .koh-progress-note{margin:9px 0 0;padding:8px 10px;border-left:3px solid var(--gold);background:#fff9e9;color:#6d5728;font-size:9px;line-height:1.5}

/* Stable, perfectly centered close icon. */
body:has(#koh-student-app) #koh-student-app .koh-dialog-close{display:block!important;width:36px!important;height:36px!important;padding:0!important}
body:has(#koh-student-app) #koh-student-app .koh-dialog-close span{display:none!important}
body:has(#koh-student-app) #koh-student-app .koh-dialog-close:before,
body:has(#koh-student-app) #koh-student-app .koh-dialog-close:after{content:"";position:absolute;left:10px;top:17px;width:16px;height:2px;border-radius:2px;background:#fff;transform-origin:center}
body:has(#koh-student-app) #koh-student-app .koh-dialog-close:before{transform:rotate(45deg)}
body:has(#koh-student-app) #koh-student-app .koh-dialog-close:after{transform:rotate(-45deg)}

/* Exam layout: radio controls stay beside their labels regardless of theme CSS. */
body:has(#koh-student-app) #koh-student-app .koh-exam-dialog{overflow:hidden}
body:has(#koh-student-app) #koh-student-app .koh-exam-dialog .koh-dialog-body{padding:20px 22px 25px}
body:has(#koh-student-app) #koh-student-app .koh-question-list{gap:14px}
body:has(#koh-student-app) #koh-student-app .koh-question{border-color:#d7e0e9!important;border-radius:12px!important;background:#fff!important}
body:has(#koh-student-app) #koh-student-app .koh-question>strong{margin-bottom:12px;font-size:12px;line-height:1.55}
body:has(#koh-student-app) #koh-student-app .koh-question>strong small{color:#7b8999;font-size:9px;font-weight:700;white-space:nowrap}
body:has(#koh-student-app) #koh-student-app .koh-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body:has(#koh-student-app) #koh-student-app .koh-options label{display:grid!important;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:9px;min-height:46px;margin:0!important;padding:10px 12px!important;border:1px solid #d9e2eb!important;border-radius:9px!important;background:#fbfcfd!important;cursor:pointer}
body:has(#koh-student-app) #koh-student-app .koh-options label:hover{border-color:#91a6bd!important;background:#f4f7fa!important}
body:has(#koh-student-app) #koh-student-app .koh-options label:has(input:checked){border-color:#246fc1!important;background:#eef6ff!important;box-shadow:0 0 0 2px rgba(36,111,193,.08)}
body:has(#koh-student-app) #koh-student-app .koh-options input[type="radio"]{appearance:auto!important;display:block!important;flex:0 0 18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;margin:0!important;padding:0!important;accent-color:#126fda}
body:has(#koh-student-app) #koh-student-app .koh-options label>span{display:block!important;margin:0!important;color:#18314f!important;font-size:10px!important;font-weight:700!important;line-height:1.35!important;text-align:left!important}
body:has(#koh-student-app) #koh-student-app .koh-submit-exam{width:100%;min-height:46px;margin-top:18px}
body:has(#koh-student-app) #koh-student-app .koh-exam-timer span{font-size:11px}
body:has(#koh-student-app) #koh-student-app .koh-exam-timer span b{color:#e2bd65;font-size:14px}
body:has(#koh-student-app) #koh-student-app .koh-exam-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}
body:has(#koh-student-app) #koh-student-app .koh-exam-meta span{padding:9px;border:1px solid #dde5ed;border-radius:9px;background:#fff;color:#667588;font-size:8px;text-align:center}
body:has(#koh-student-app) #koh-student-app .koh-exam-meta b{display:block;margin-bottom:2px;color:var(--navy);font-size:15px}
body:has(#koh-student-app) #koh-student-app .koh-attempt-note{margin:8px 0 0;color:#7a6750;font-size:9px}

@media(max-width:620px){
body:has(#koh-student-app) #koh-student-app .koh-next-item{grid-template-columns:78px minmax(0,1fr)}
body:has(#koh-student-app) #koh-student-app .koh-next-thumb{width:78px;height:48px}
body:has(#koh-student-app) #koh-student-app .koh-next-item>button{grid-column:2}
body:has(#koh-student-app) #koh-student-app .koh-options{grid-template-columns:1fr}
body:has(#koh-student-app) #koh-student-app .koh-exam-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
}
