/* Phone-only finishing layer, loaded after page styles. Keep wide data tables
   intact; scroll their containers instead of shrinking text to unreadable sizes. */
.mobile-scroll-hint{display:none}
@media(max-width:700px){
 html{scroll-padding-top:16px}
 body .shell:not(.admin-shell){padding:12px max(12px,env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;max-width:100%!important;min-width:0}
 body main,body .panel,body .card,body .member-panel,body .award-board-card{min-width:0;max-width:100%}
 body input:not([type=checkbox]):not([type=radio]):not([type=range]),body select,body textarea{font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
 body button,body .btn,body summary,body input:not([type=checkbox]):not([type=radio]):not([type=range]),body select{min-height:44px;touch-action:manipulation}
 body input[type=checkbox],body input[type=radio]{width:20px;height:20px;accent-color:var(--gold)}
 body input[type=range]{min-height:36px;width:100%;touch-action:pan-y}
 body .nav .nav-auth button{width:44px;height:44px}
 body .page-heading,body .section-heading,body .results-heading,body .panel-head{flex-wrap:wrap;align-items:flex-start;gap:12px}
 body .page-heading>*,body .section-heading>*{min-width:0;max-width:100%}
 body .page-heading h1,body h1.title{font-size:27px!important;overflow-wrap:anywhere}
 body .actions,body .preseason-actions,body .board-tools,body .docs-actions{flex-wrap:wrap;gap:8px}
 body .workspace-context{gap:10px;padding:12px 0}
 body .workspace-context label{width:100%;justify-content:space-between}
 body .workspace-context select{min-width:0;max-width:75%;flex:1}
 body .workspace-tabs{overflow-x:auto;max-width:100%;gap:16px;white-space:nowrap;scrollbar-width:thin}
 body .workspace-tabs a{flex-shrink:0;min-height:44px}
 body .member-toolbar,body .master-toolbar,body .results-filters,body .train-week-controls,body .vs-matrix-controls{display:flex;flex-wrap:wrap;gap:10px}
 body .member-toolbar>input,body .member-toolbar>select,body .results-filters>input,body .results-filters>select,body .train-week-controls>label,body .vs-matrix-controls>label{flex:1 1 100%;width:100%;min-width:0}
 body .table-scroll,body .tablewrap,body .master-scroll,body .vs-matrix-scroll,body .permission-matrix-scroll,body .mobile-table-scroll{max-width:100%;min-width:0;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch;isolation:isolate}
 body .table-scroll,body .tablewrap,body .master-scroll,body .vs-matrix-scroll{max-height:65dvh}
 body .vs-matrix-table th:first-child,body .vs-matrix-table td:first-child{min-width:130px;max-width:150px;white-space:normal;overflow-wrap:anywhere}
 body .master-table th:first-child,body .master-table td:first-child{min-width:130px!important;max-width:150px;overflow-wrap:anywhere}
 body .mobile-scroll-hint{display:block;margin:8px 0;color:#9eafc0;font-size:12px}
 body .mobile-scroll-hint[hidden]{display:none!important}
 body dialog{max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important;overflow:auto;box-sizing:border-box}
 body .member-drawer{max-height:92dvh;padding-bottom:env(safe-area-inset-bottom)}
 body .calendar-event-fields,body .metaform,body .feedback-fields{grid-template-columns:1fr}
 body .feedback-fields{display:block}
 body .preseason-calendar-grid{width:100%;min-width:0;grid-template-columns:repeat(7,minmax(96px,1fr));overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:8px}
 body .agenda-row{grid-template-columns:1fr;gap:5px}
 body .calendar-item{min-height:44px}
 body .overview-banner{min-height:170px;padding:20px 16px}
 body #dashboardWidgets.dashboard-widgets{grid-template-columns:minmax(0,1fr)!important}
 body #dashboardWidgets.dashboard-widgets>[data-dashboard-widget],body #dashboardWidgets.preseason-dashboard-grid.dashboard-widgets>[data-dashboard-widget].dashboard-size-compact{grid-column:1/-1!important;aspect-ratio:auto!important;min-width:0}
 body #dashboardWidgets.preseason-dashboard-grid.dashboard-widgets>[data-dashboard-widget].dashboard-size-compact{min-height:214px!important}
 body .global-job-chip{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 body .auth-card{padding:24px 20px;width:min(430px,calc(100% - 24px));margin:12px auto}
 body .auth-splash{min-height:100dvh;padding-block:env(safe-area-inset-top) env(safe-area-inset-bottom)}
}
