/* Use space for observations while retaining tablet-size controls. */
#app-shell #main{padding:20px 24px}
#app-shell .page-heading{margin-bottom:16px;gap:12px}
#app-shell .page-heading h1{font-size:27px;margin-top:4px}
#app-shell .page-heading p{margin-top:5px}
#app-shell .panel-head{padding:14px 18px}
#app-shell .panel-body{padding:16px 18px}
#app-shell .stats{margin-bottom:16px;gap:12px}
#app-shell .stat{padding:14px 16px}
#app-shell .stat-value{margin:5px 0;font-size:27px}
#app-shell .analysis-views{margin-bottom:12px}
#app-shell .performance-stats{padding:16px 18px;gap:14px}
#app-shell .performance-stats>div{gap:5px}
#app-shell .issue-match-summary{padding:16px 18px;margin-bottom:12px}
#app-shell .issue-match-card{padding:16px 18px}
#app-shell .issue-match-list{gap:12px}
#app-shell .timing-match-card .table-wrap{margin:12px 0}
#app-shell .cycle-sample-list{margin-top:12px}
#app-shell .reliability-grid{gap:16px 24px}
#app-shell .compare-card{padding:16px}
#app-shell .metric-row{padding-block:11px}
body[data-page="scout"] .scout-layout{display:grid;grid-template-columns:minmax(0,1fr);max-width:1180px;margin-inline:auto;gap:12px}
body[data-page="scout"] .scout-layout>.scout-identity{margin:0;padding:8px 14px;min-height:48px}
body[data-page="scout"] .scout-identity small{display:inline;margin-left:10px}
body[data-page="scout"] .scout-identity a{min-height:44px;display:inline-flex;align-items:center}
body[data-page="scout"] .scout-quick-nav{margin:0;padding:5px;gap:5px}
body[data-page="scout"] #match-form .form-section{padding:16px 18px}
body[data-page="scout"] #match-form .section-title{margin-bottom:12px;gap:9px}
body[data-page="scout"] #match-form .form-grid{gap:12px}
body[data-page="scout"] #match-form .field{gap:5px}
body[data-page="scout"] #match-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body[data-page="scout"] #match-form select{min-height:48px;padding:9px 10px}
body[data-page="scout"] #match-form .check-field{min-height:48px;padding:8px}
body[data-page="scout"] #match-form .substitution-section{padding-block:6px}
body[data-page="scout"] #match-form [data-action="add-team"]{margin-top:4px!important;min-height:44px}
body[data-page="scout"] .counter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body[data-page="scout"] .counter{display:grid;grid-template-columns:minmax(0,1fr) 182px;gap:3px 8px;align-items:center;padding:10px 12px}
body[data-page="scout"] .counter label{font-size:13px;line-height:1.4;align-self:end}
body[data-page="scout"] .counter .phase{font-size:9px;margin:0;letter-spacing:.5px;align-self:start}
body[data-page="scout"] .counter .stepper{grid-column:2;grid-row:1/3;gap:4px}
body[data-page="scout"] .stepper button{width:56px;height:56px;flex-basis:56px}
body[data-page="scout"] #match-form .counter .stepper input[type="number"]{width:54px;padding:0;font-size:30px}
body[data-page="scout"] #match-form .rating-grid{gap:12px}
body[data-page="scout"] #match-form .rating-options{gap:5px}
body[data-page="scout"] #match-form .rating-options span{min-height:48px}
body[data-page="scout"] #match-form .performance-details{margin-top:12px;padding-top:6px}
body[data-page="scout"] #match-form .measurement-help{margin:8px 0 12px;line-height:1.5}
body[data-page="scout"] #match-form .shot-sample{padding:12px;margin:12px 0}
body[data-page="scout"] #match-form .shooting-stopwatch{padding:10px 12px;margin-bottom:12px}
body[data-page="scout"] #match-form .cycle-stopwatch{padding:12px;margin-top:16px}
body[data-page="scout"] #match-form .cycle-clock,body[data-page="scout"] #match-form .shooting-clock{margin:8px 0}
body[data-page="scout"] .scout-guide{display:block;grid-column:1/-1}
body[data-page="scout"] .scout-guide>summary{display:flex;align-items:center;gap:9px;min-height:48px;padding:12px 18px;cursor:pointer;font-size:13px;font-weight:650;color:#75667e}
body[data-page="scout"] .scout-guide>summary::after{content:'+';margin-left:auto}
body[data-page="scout"] .scout-guide[open]>summary::after{content:'−'}
body[data-page="scout"] .scout-layout>.demo-note{margin:0}
@media(min-width:900px){body[data-page="scout"] #scout-setup>.form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:980px) and (min-width:761px){body[data-page="scout"] .counter-grid{grid-template-columns:1fr}}
@media(max-width:760px){#app-shell #main{padding:16px 14px}#app-shell .page-heading h1{font-size:24px}body[data-page="scout"] .counter-grid{grid-template-columns:1fr}body[data-page="scout"] #match-form .form-section{padding:14px}body[data-page="scout"] .scout-identity small{display:block;margin:2px 0 0}}
@media(max-width:360px){body[data-page="scout"] .counter{grid-template-columns:minmax(0,1fr) 168px;padding-inline:8px}body[data-page="scout"] .stepper button{width:52px;flex-basis:52px}}
/* Overview keeps event data prominent; practice tools remain available on demand. */
body[data-page="overview"] .columns>*,body[data-page="overview"] .overview-side>*{min-width:0}
.overview-practice{margin:0 0 12px}
.overview-practice>summary{min-height:44px;display:list-item;padding:12px;color:var(--pink)}
.overview-practice .launch-card{margin:0}
body[data-page="overview"] .panel-foot{flex-wrap:wrap;gap:8px}
@media(max-width:600px){
 body[data-page="overview"] .columns{grid-template-columns:minmax(0,1fr);gap:14px}
 body[data-page="overview"] .table-wrap{overflow:visible}
 body[data-page="overview"] table,body[data-page="overview"] tbody{display:block;white-space:normal}
 body[data-page="overview"] thead{display:none}
 body[data-page="overview"] tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:12px;gap:10px;border-bottom:1px solid var(--line);position:relative}
 body[data-page="overview"] td{display:block;padding:0;border:0;min-width:0}
 body[data-page="overview"] td:first-child{grid-column:1/-1;padding-right:44px}
 body[data-page="overview"] td:last-child{position:absolute;right:10px;top:10px}
 body[data-page="overview"] td[data-label]::before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:6px}
 body[data-page="overview"] .meter{min-width:0;flex-wrap:wrap}
 body[data-page="overview"] .stat-foot{line-height:1.4}
 body[data-page="overview"] .launch-card .actions{min-width:0}
}
body[data-page="overview"] table{table-layout:fixed;white-space:normal}
body[data-page="overview"] th,body[data-page="overview"] td{padding:10px 12px;overflow-wrap:anywhere}
body[data-page="overview"] th:first-child{width:34%}
body[data-page="overview"] th:last-child{width:48px}
body[data-page="overview"] .team-cell>div{min-width:0}
body[data-page="overview"] .team-cell small{max-width:100%}
body[data-page="overview"] .meter{min-width:0;flex-wrap:wrap}
@media(max-width:600px){body[data-page="overview"] td{padding:0}}
/* Denser team profiles, keeping touch controls and detail available. */
body[data-page="team"] .team-banner{gap:10px;align-items:center}
body[data-page="team"] .team-banner .team-icon{width:44px;height:44px;flex-shrink:0;font-size:15px}
body[data-page="team"] .team-banner>span:last-child{min-width:0;overflow-wrap:anywhere}
body[data-page="team"] .panel{margin-bottom:12px}
body[data-page="team"] .panel+.panel{margin-top:12px}
body[data-page="team"] .columns{gap:12px;align-items:start}
body[data-page="team"] .columns>*{min-width:0}
body[data-page="team"] .compact-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:8px!important;gap:10px}
body[data-page="team"] .compact-stats strong{font-size:23px}
body[data-page="team"] .compact-stats p{font-size:11px;line-height:1.4}
body[data-page="team"] .settings-text{margin:8px 0 12px;line-height:1.5}
body[data-page="team"] .metric-row{padding:9px 0}
.profile-published-matches{margin:8px 0 0}
.profile-published-matches>summary{min-height:44px;align-content:center;padding:8px 0;color:var(--pink)}
@media(max-width:760px){
 body[data-page="team"] #main .panel-head,body[data-page="team"] #main .panel-body{padding:12px}
 body[data-page="team"] #main .stat{padding:10px 12px}
 body[data-page="team"] #main .stat-value{font-size:23px;margin:4px 0}
 body[data-page="team"] #main .stats{gap:8px;margin-bottom:12px}
 body[data-page="team"] .team-banner>span:last-child>span{display:block;font-size:15px!important;margin-top:3px}
 body[data-page="team"] .performance-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important;padding:12px!important}
 body[data-page="team"] .reliability-grid{gap:10px 14px!important}
 body[data-page="team"] .profile-published-matches table{table-layout:fixed;white-space:normal;min-width:0}
 body[data-page="team"] .profile-published-matches th,body[data-page="team"] .profile-published-matches td{padding:8px 4px;overflow-wrap:anywhere}
 body[data-page="team"] .profile-published-matches .btn{white-space:normal;padding:6px;min-height:44px;margin:3px 0}
}
.profile-history-mobile{display:none}
@media(max-width:760px){
 .profile-history-desktop{display:none}
 .profile-history-mobile{display:block;width:100%;white-space:normal}
 .profile-history-mobile thead{display:none}
 .profile-history-mobile tbody{display:grid;gap:12px;padding:12px}
 .profile-history-mobile tr{display:block;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff}
 .profile-history-mobile td{display:block;border:0;padding:0;min-width:0;overflow-wrap:anywhere;font-size:12px}
 .profile-history-mobile td:first-child{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:12px}
 .profile-history-mobile td:first-child>.btn{margin-left:auto}
 .profile-history-mobile .record-match-link{font-size:16px;font-weight:700}
 .profile-history-mobile .record-match-link,.profile-history-mobile .btn{min-height:44px;min-width:44px;padding:6px 8px}
 .profile-history-mobile td:nth-child(2){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .profile-history-mobile .history-value{padding:10px;background:#faf7fb;border-radius:8px;display:flex;flex-direction:column;gap:5px;line-height:1.4;min-width:0}
 .profile-history-mobile .history-value>span{color:var(--muted);font-size:11px}
 .profile-history-mobile .history-value>strong{font-size:18px}
 .profile-history-mobile td:last-child{border-top:1px solid var(--line);margin-top:12px;padding-top:12px;line-height:1.5}
 .profile-history-mobile p{margin:6px 0;line-height:1.5}
 .profile-history-mobile small{font-size:11px;line-height:1.4}
 .profile-history-mobile details{margin:6px 0 0}
 .profile-history-mobile summary{min-height:44px;align-content:center;font-size:12px}
}
