/* V231 professional responsive polish. Additive styles only; no feature logic/data changes. */
:root{--ds-ui-navy:#102a43;--ds-ui-gold:#d4af37;--ds-ui-border:#dce5ef;--ds-ui-muted:#64748b;--ds-ui-radius:16px}
*,*::before,*::after{box-sizing:border-box}
html{scroll-padding-top:84px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,a,[role="button"],input,select,textarea{touch-action:manipulation}
button:focus-visible,a:focus-visible,[role="button"]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(212,175,55,.8)!important;outline-offset:2px!important}
img,video,iframe{max-width:100%}
.portal,.portal-main,.portal .content,.mtm-shell,.mtx-shell{min-width:0;max-width:100%}
.portal .content,.portal .portal-main,.portal .page-head,.portal .panel,.portal .card,.portal .live-card{overflow-wrap:anywhere}
.portal .page-head{gap:14px}
.portal .page-head .actions,.portal .live-card .actions,.mt-admin-host .page-head .actions{display:flex;flex-wrap:wrap;gap:8px}
.portal .page-head .actions .btn,.portal .live-card .actions .btn,.mt-admin-host .page-head .actions .btn{min-height:42px}
.portal input,.portal select,.portal textarea,.mt-admin-host input,.mt-admin-host select,.mt-admin-host textarea{max-width:100%;min-width:0}
/* Tables remain readable without forcing the whole page wider. */
.portal table,.mt-admin-host table{max-width:100%;border-collapse:separate;border-spacing:0}
.portal .table-wrap,.portal .table-responsive,.mt-admin-host .table-wrap,.mt-admin-host .table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.portal th,.portal td,.mt-admin-host th,.mt-admin-host td{overflow-wrap:anywhere}
/* Consistent live-class cards and controls. */
.portal .live-grid{align-items:stretch;gap:14px}
.portal .live-card{min-width:0;border-radius:var(--ds-ui-radius)!important}
.portal .live-head{align-items:flex-start;gap:10px}
.portal .live-head b,.portal .live-info span{min-width:0;overflow-wrap:anywhere;line-height:1.4}
.portal .live-info{display:flex;flex-wrap:wrap;gap:8px 12px}
/* Mock-test question options and question palette: touch friendly. */
.mtm-shell,.mtx-shell{overflow-x:clip}
.mtm-header,.mtx-header{gap:12px;flex-wrap:wrap}
.mtm-header-test,.mtx-header-test{min-width:0;overflow-wrap:anywhere}
.mtm-options{display:grid;gap:10px}
.mtm-option{min-height:50px;text-align:left;overflow-wrap:anywhere;touch-action:manipulation}
.mtm-nav-dot{min-width:38px;min-height:38px;touch-action:manipulation}
/* Classroom: keep the modal inside the viewport; mobile rules below stack video and chat. */
#liveClassroomModal{padding:0!important;overflow:hidden!important}
#liveClassroomModal>div{max-width:100vw!important;max-height:100dvh!important}
#liveChatBox{overscroll-behavior:contain;overflow-wrap:anywhere}
@media(max-width:760px){
 .portal-main{margin-left:0!important;width:100%!important;min-width:0!important}
 .portal .content{padding:15px 12px calc(122px + env(safe-area-inset-bottom))!important}
 .portal .portal-top{height:auto!important;min-height:62px!important;padding:10px 12px!important;gap:8px}
 .portal .mobile-brand-mini{min-width:0;gap:8px}
 .portal .mobile-brand-mini h2{max-width:56vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .portal .mobile-header-actions{min-width:0;gap:6px}
 .portal .page-head{display:flex;flex-direction:column;align-items:stretch!important}
 .portal .page-head h2,.portal .page-head h3{font-size:clamp(19px,5vw,25px)!important;line-height:1.25}
 .portal .page-head .actions{width:100%}
 .portal .page-head .actions .btn{flex:1 1 auto}
 .portal .portal-main .toolbar{gap:9px}
 .portal .portal-main .toolbar input,.portal .portal-main .toolbar select{width:100%;min-width:0}
 .portal .portal-main .form-grid{grid-template-columns:minmax(0,1fr)!important}
 .portal .portal-main .live-grid{grid-template-columns:minmax(0,1fr)!important}
 .portal .live-card{padding:14px!important}
 .portal .live-card .actions .btn{flex:1 1 125px}
 .mt-admin-host .page-head{display:flex;flex-direction:column;align-items:stretch}
 .mt-admin-host .page-head .actions{width:100%}
 .mt-admin-host .page-head .actions .btn{flex:1 1 130px}
 .mtm-shell{padding-bottom:calc(90px + env(safe-area-inset-bottom))!important}
 #liveClassroomModal>div{width:100vw!important;height:100dvh!important;min-height:0!important;border-radius:0!important}
 #liveClassroomModal>div>div:first-child{gap:10px;flex-wrap:wrap;min-height:58px;padding:10px!important}
 #liveClassroomModal>div>div:first-child>div{min-width:0;overflow-wrap:anywhere}
 #liveClassroomModal>div>div:nth-child(2){display:flex!important;flex-direction:column!important;overflow-y:auto!important;min-height:0!important}
 #liveClassroomModal>div>div:nth-child(2)>div:first-child{flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:32vh!important;aspect-ratio:16/9;position:relative!important}
 #liveClassroomModal>div>div:nth-child(2)>div:first-child iframe{position:absolute;inset:0;width:100%!important;height:100%!important}
 #liveClassroomModal>div>div:nth-child(2)>div:nth-child(2){flex:1 1 auto!important;width:100%!important;min-height:200px!important;border-left:0!important;border-top:1px solid var(--ds-ui-border)!important}
 #liveClassroomModal>div>div:first-child b{font-size:14px!important}
 #liveClassroomModal>div>div:first-child small{display:block;margin:3px 0 0!important}
}
@media(max-width:380px){.portal .content{padding-left:9px!important;padding-right:9px!important}.portal .portal-top{padding-left:9px!important;padding-right:9px!important}.portal .mobile-brand-mini h2{max-width:47vw}.portal .live-card .actions .btn{flex-basis:100%}.mtm-option{padding:11px!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
