/* v9.3.16: responsive screen layout. Printed reports and PDF artwork keep their dimensions. */
.mobile-bar9316,.mobile-backdrop9316,.mobile-panel-close9316{display:none}
.mobile-sr9316{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media screen and (max-width:960px){
 html{scroll-padding-top:70px;scroll-padding-bottom:95px}
 html:root body{font-size:max(16px,var(--site-font-size,15px));line-height:1.7}
 .layout,.context-bar~.layout{display:block;margin:12px auto 0;padding:0 12px;max-width:100%;min-width:0}
 .layout>*,.panel,.school-body,.pad,.section-head>*,.toolbar>*,.filters>*,.form-grid>*,.person-fields>*,.access-editor,.designer-layout>*{min-width:0}
 #main{scroll-margin-top:68px;outline-offset:-3px}
 .topline{padding:7px 14px;gap:8px;align-items:flex-start;flex-wrap:wrap}
 .topline #siteTopText{font-size:12px;line-height:1.6;overflow-wrap:anywhere;flex:1 1 230px}
 .topline #version{font-size:11px;white-space:nowrap}
 .masthead{padding:18px 14px;gap:13px;align-items:flex-start}
 .masthead>div{min-width:0}.masthead h1{font-size:clamp(21px,5vw,28px);line-height:1.5;overflow-wrap:anywhere}
 .masthead img{width:50px;max-height:64px;flex:none}.eyebrow{font-size:10px;letter-spacing:.8px;overflow-wrap:anywhere}
 #subtitle,.event-meta{font-size:13px;overflow-wrap:anywhere}
 .banner-shell{margin-inline:auto;max-width:100%}.banner-shell>img{width:100%;height:auto;object-fit:contain}
 .banner-fallback{padding:20px 16px;min-height:0}.banner-copy{min-width:0}.banner-copy h2{font-size:clamp(21px,5vw,29px);line-height:1.5;overflow-wrap:anywhere}
 .banner-art{display:none}.banner-kicker,.banner-copy p{font-size:13px}.banner-copy strong{font-size:14px;white-space:normal}
 .topnav{position:sticky;top:0;z-index:100;display:flex;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;gap:0;max-width:100%;scrollbar-width:thin;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 html:root .topnav button:not([hidden]){display:inline-flex!important;flex:0 0 auto;min-height:48px;align-items:center;justify-content:center;padding:10px 15px;font-size:15px;white-space:nowrap;margin:0}
 .topnav #adminTopLink{margin-left:0}.topnav button[aria-current=page]{box-shadow:inset 0 -3px 0 var(--theme-accent);font-weight:700}
 .context-bar{margin:12px;max-width:calc(100% - 24px);padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:14px;border-radius:14px}
 .context-bar>div:first-child{grid-column:1/-1;width:100%}.context-bar strong{font-size:20px;overflow-wrap:anywhere}
 html .context-bar label{display:grid;gap:6px;min-width:0;white-space:normal;font-size:14px;margin:0}
 html .context-bar select{width:100%;min-width:0;max-width:100%;margin:0}
 .context-bar>.context-home-link{grid-column:1/-1;max-width:none;justify-self:start;text-align:left}
 .panel{border-radius:14px;margin-bottom:14px}.pad,.school-body{padding:16px}
 .section-head{gap:12px;padding:16px;align-items:flex-start}.section-head h2{font-size:20px;line-height:1.5;overflow-wrap:anywhere}
 .section-head .actions{margin-left:auto}.section-head .muted{font-size:13px}
 html:root :is(button,.menu a,.doc-links a,.pdf-link){min-height:44px;touch-action:manipulation}
 html:root button{padding:10px 14px;line-height:1.5}
 html:root :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){min-height:46px;font-size:max(16px,1em)!important;max-width:100%;scroll-margin-block:90px;box-sizing:border-box}
 html :is(input[type=checkbox],input[type=radio]){width:22px;min-width:22px;height:22px;flex:none}
 html input[type=file]{width:100%;font-size:14px!important;overflow:hidden}textarea{min-height:110px}
 html .small,html .muted,html label,html .person-fields label{font-size:max(13px,.88em)}
 .form-grid,.person-fields,.people-columns,.school-split,.style-grid,.access-layout,.score-filter925,.score-activities925,.designer-layout,.hubfields930{grid-template-columns:minmax(0,1fr)!important}
 .form-grid .wide,.person-fields label:nth-child(3){grid-column:auto}.designer-controls .form-grid{grid-template-columns:1fr 1fr!important}
 .person-row,.person-row.coach{grid-template-columns:minmax(0,1fr)!important;gap:10px}.person-row input:nth-child(4),.person-row button{grid-column:auto}
 .actions,.toolbar,.filters,.publication-toolbar,.bulk-tools{gap:10px;flex-wrap:wrap}
 .actions>button{flex:0 1 auto;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .toolbar :is(input,select),.filters :is(input,select){flex:1 1 100%;min-width:0;max-width:100%;width:100%}
 .admin-tabs,.school-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:10px;gap:8px;overscroll-behavior-x:contain}
 html .admin-tabs button,html .school-tabs button{flex:0 0 auto;white-space:nowrap;font-size:15px;min-height:44px}
 .school-hero{display:grid;grid-template-columns:48px minmax(0,1fr);gap:10px 14px;align-items:start;padding:20px 16px}
 .school-hero>div:not(.school-seal){min-width:0}.school-hero h2{font-size:22px;line-height:1.55;overflow-wrap:anywhere}
 .school-hero p{font-size:14px;line-height:1.7;overflow-wrap:anywhere}.school-eyebrow{font-size:10px;letter-spacing:1px}
 .school-seal{width:48px;height:48px;grid-row:1/3;font-size:20px}
 html .school-role{display:inline-flex;grid-column:2;justify-self:start;margin:0;font-size:12px;white-space:normal;max-width:100%}
 .school-stats,.district-totals,.directory-stats929,.district-kpis922{grid-template-columns:repeat(2,minmax(0,1fr));gap:1px}
 .school-stats>div{padding:14px}.school-stats strong{font-size:26px}.school-stats small{font-size:13px}
 .school-steps,.school-category-grid,.templates-grid,.publication-grid,.doc-center-grid,.control-grid,.zone-grid,.district-zone-grid922,.district-news-list922,.district-visual-list922,.cleanup-grid{grid-template-columns:minmax(0,1fr)}
 .shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:10px}.shortcut{min-width:0;overflow-wrap:anywhere}
 .task-group{padding:4px 16px 16px}.task-group>h3{font-size:18px}.task-grid,.admin-hub-grid{grid-template-columns:minmax(0,1fr);gap:12px}.task-card{padding:18px;min-height:115px}
 .task-card strong,.admin-hub-tile strong{font-size:17px}.task-card span,.task-card small{font-size:14px}
 .school-step,.school-category-card{padding:18px}.school-category-card strong{font-size:18px;min-height:0}.school-step small,.school-category-card small{font-size:14px}
 .selection-footer,.school-section-heading,.school-gate{display:flex;flex-direction:column;align-items:stretch;gap:10px}
 .selection-footer button{width:100%}.school-gate small{font-size:13px}
 .school-profile{max-width:100%}.school-note-card p,.school-note-card ul{font-size:15px}
 .person-card{padding:14px}.person-fields{gap:12px}.person-card-head span{font-size:15px}.person-photo-row{gap:12px;flex-wrap:wrap;align-items:flex-start}
 .person-avatar{width:80px;height:100px}.person-photo-row .photo-label{font-size:13px}.person-photo-row button{font-size:14px}
 html .table-wrap,.admin-data-table,.judge-applications-table,.import-guide927{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .table-wrap table{font-size:14px}.table-wrap :is(td,th){font-size:14px;padding:12px;line-height:1.7}.table-wrap td button{font-size:14px}
 .table-wrap .admin-row-actions{flex-direction:row;flex-wrap:wrap;gap:8px}.table-wrap .admin-row-actions button{font-size:14px}
 .table-wrap[data-mobile-overflow9316=true]::before{content:'↔ เลื่อนซ้าย–ขวาเพื่อดูข้อมูลครบ';display:block;position:sticky;left:0;width:100%;box-sizing:border-box;padding:9px 12px;background:var(--theme-soft);color:var(--theme-heading);font-size:13px;font-weight:600;border-bottom:1px solid var(--theme-border)}
 .table-wrap:focus-visible{outline:3px solid var(--theme-focus);outline-offset:-3px}
 .pagination{flex-wrap:wrap;justify-content:center;gap:10px;font-size:14px;padding:16px}
 .access-layout{padding:14px}.access-subject{position:static}.access-subject-list{max-height:260px}.access-savebar{position:static;flex-wrap:wrap}.access-savebar button{width:100%}
 .judge-admin-toolbar923,.directory-filters929{padding:14px;gap:12px}.judge-admin-toolbar923>label,.directory-filters929 label{min-width:0;flex:1 1 100%}
 .judge-activity-picker,.judge-activities,.judge-doc-choices{grid-template-columns:minmax(0,1fr)}.check-option,.judge-activity-option{min-height:48px;align-items:flex-start}
 .handbook-card{padding:16px;gap:12px}.manual-detail{min-width:0;flex:1}.manual-detail h4{font-size:17px}.manual-detail p{font-size:14px}.manual-actions{width:100%;gap:10px}.manual-actions button{font-size:14px}
 .district-hero922,.admin-hub-hero,.handbook-hero,.control-hero,.exchange-intro,.template-intro,.doc-center-hero,.access-hero,.judge-apply-hero,.cleanup-hero{padding:22px 18px;border-radius:14px;overflow-wrap:anywhere}
 .district-hero922 h2{font-size:24px}.district-section-title{gap:10px;flex-wrap:wrap}.district-hero-actions button{max-width:100%;white-space:normal}
 .ops-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-kpi{padding:16px;min-width:0;overflow-wrap:anywhere}.ops-kpi strong{font-size:28px}
 .right-rail{display:grid;grid-template-columns:minmax(0,1fr);gap:0}.right-rail>.panel{width:100%}
 html dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);margin:auto;padding:0;border-radius:16px}
 .dialog-head{padding:12px 16px;gap:12px}.dialog-head h2{font-size:20px;line-height:1.5;min-width:0;overflow-wrap:anywhere}.dialog-head button{flex:none}
 #modalBody{padding:16px}.designer-dialog{width:calc(100% - 16px)!important}.designer-canvas-wrap{max-width:100%;overflow:auto;padding:10px}.designer-controls{padding:0;max-height:none}
 .swal2-popup{max-width:calc(100vw - 24px)!important;box-sizing:border-box}.swal2-actions{gap:10px}.swal2-actions button{min-height:46px;font-size:16px!important}
 .idle-warning{left:12px;right:12px;bottom:calc(86px + env(safe-area-inset-bottom));max-width:calc(100% - 24px)}
 #toast{bottom:calc(88px + env(safe-area-inset-bottom));font-size:15px;overflow-wrap:anywhere}
 footer{padding:20px 16px;overflow-wrap:anywhere}
 /* Navigation panels enhance existing menus/forms; no duplicate login state. */
 html.mobile-ready9316 body{padding-bottom:calc(86px + env(safe-area-inset-bottom))}
 html.mobile-ready9316 #menuToggle{display:none!important}
 html.mobile-ready9316 .mobile-bar9316{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;position:fixed;inset:auto 0 0;z-index:800;padding:8px max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:var(--theme-surface,#fff);border-top:1px solid var(--theme-border,#d6dfeb);box-shadow:0 -4px 20px #17203312}
 html:root .mobile-bar9316 button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:58px;border-radius:10px;background:var(--theme-surface)!important;color:var(--theme-heading)!important;padding:5px 8px;font-size:13px;font-weight:600;border:1px solid transparent}
 .mobile-bar9316 svg{display:block;width:23px;height:23px}
 .mobile-bar9316 .mobile-icon9316{font-size:21px;line-height:1.1}html:root .mobile-bar9316 button[aria-expanded=true]{border-color:var(--theme-primary);background:var(--theme-soft)!important}
 html.mobile-ready9316 .left-rail{display:none;position:fixed;inset:0 auto 0 0;z-index:1100;width:min(88vw,370px);max-width:100%;height:100vh;height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding:16px 12px calc(24px + env(safe-area-inset-bottom));background:var(--theme-bg);box-shadow:10px 0 35px #14203735}
 html.mobile-ready9316 .left-rail.open{display:block}.left-rail>.panel{margin-bottom:12px}
 .mobile-drawer-head9316{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px 14px;color:var(--theme-heading);font-size:19px}
 html.mobile-ready9316 .mobile-panel-close9316{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:8px;font-size:22px;line-height:1}
 html:root .mobile-panel-close9316{background:var(--theme-soft)!important;color:var(--theme-heading)!important;border:1px solid var(--theme-border)}
 html.mobile-ready9316 #authPanel9316{display:none}
 html.mobile-ready9316 body.mobile-account-open9316 #authPanel9316{display:block;position:fixed;inset:auto 0 0;z-index:1100;margin:0 auto;width:min(100%,480px);max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);overflow:auto;overscroll-behavior:contain;border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -10px 35px #14203735}
 #authPanel9316>h2{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:19px}
 html:root #authPanel9316>h2 .mobile-panel-close9316{background:var(--theme-hero-chip)!important;color:var(--theme-on-hero)!important;border-color:var(--theme-on-hero)}
 #authBox .actions{display:grid;grid-template-columns:minmax(0,1fr)}#authBox .user-name{overflow-wrap:anywhere;font-size:20px}
 html.mobile-ready9316 body:is(.mobile-menu-open9316,.mobile-account-open9316){overflow:hidden}
 html.mobile-ready9316 body:is(.mobile-menu-open9316,.mobile-account-open9316) .mobile-backdrop9316{display:block;position:fixed;inset:0;z-index:1000;background:#0f172a80;backdrop-filter:blur(2px);touch-action:none}
 html.mobile-ready9316 body.keyboard-open9316 .mobile-bar9316{display:none}
 html.mobile-ready9316 body.keyboard-open9316{padding-bottom:16px}
 @media(max-width:380px){.context-bar{grid-template-columns:minmax(0,1fr)}.context-bar>*{grid-column:1!important}.shortcuts{grid-template-columns:minmax(0,1fr)}.section-head .actions{margin-left:0;width:100%}.section-head .actions button{flex:1}.school-hero{grid-template-columns:42px minmax(0,1fr);gap:10px}.school-seal{width:42px;height:42px}.school-hero h2{font-size:20px}}
}
@media screen and (min-width:961px){.mobile-drawer-head9316{display:none}}
@media print{
 .mobile-bar9316,.mobile-backdrop9316,.mobile-panel-close9316,.mobile-drawer-head9316,.mobile-sr9316{display:none!important}
 .table-wrap[data-mobile-overflow9316]::before{display:none!important}
}

@media(max-width:800px){.context-bar>div:first-child>strong{font-size:26px;line-height:1.2}}
