:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #222624; background: #f6f7f6; font-size: 14px; line-height: 1.5; --green: #156443; --border: #dce1dd; --muted: #626b65; }
html { overflow-y: scroll; scrollbar-gutter: stable; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 0; }
a { color: #185e86; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2576b7; outline-offset: 3px; }
.site-header { background: #000; color: white; border-bottom: 4px solid #32815b; }
.header-inner, .nav-inner, .main-content, .site-footer { max-width: 1160px; margin: auto; padding-left: 28px; padding-right: 28px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 118px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: white; text-decoration: none; min-width: 0; }
.brand strong { display: block; font-size: 20px; overflow-wrap: anywhere; }
.brand small { display: block; color: #b9c4bc; font-size: 11px; margin-top: 3px; }
.site-logo { width: 82px; height: 82px; flex: 0 0 82px; object-fit: contain; display: block; }
.account { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.account > span { max-width: 180px; overflow-wrap: anywhere; }
.main-nav { background: white; border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; gap: 26px; flex-wrap: wrap; }
.nav-inner > a, .nav-inner > span { padding: 17px 0 14px; border-bottom: 3px solid transparent; text-decoration: none; font-weight: 600; font-size: 14px; }
.nav-inner > a { color: #424b45; }
.nav-inner > a[aria-current] { color: var(--green); border-bottom-color: var(--green); }
.nav-inner > span { color: #717a73; }
.nav-inner small { font-size: 10px; font-weight: normal; }
.main-content { min-height: calc(100vh - 245px); min-height: calc(100dvh - 245px); padding-top: 36px; padding-bottom: 60px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading > div { min-width: 0; }
.eyebrow { text-transform: uppercase; color: var(--muted); font-size: 12px; font-weight: bold; margin: 0 0 6px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 16px; }
p { max-width: 75ch; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border: 1px solid #c7d0ca; border-radius: 5px; background: white; color: #28392f; text-decoration: none; cursor: pointer; font-weight: 600; font-size: 14px; text-align: center; }
.button:hover { background: #edf2ee; }
.button.primary { background: var(--green); border-color: var(--green); color: white; }
.button.primary:hover { background: #104d33; }
.button.header-button { background: transparent; border-color: #647269; color: white; }
.button.danger { background: #a62727; border-color: #a62727; color: white; }
.button.small { padding: 8px 12px; }
.team-summary { display: grid; grid-template-columns: 190px 1fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 28px 0; gap: 40px; }
.selection-count { border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.selection-count strong { font-size: 52px; line-height: 1.15; color: var(--green); }
.selection-count > span:last-child { font-size: 14px; color: var(--muted); }
.position-summary dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; }
dt { color: var(--muted); font-size: 14px; } dd { margin: 4px 0 0; font-size: 26px; font-weight: bold; }
.section-block { padding: 28px 0; border-bottom: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.section-heading a { font-size: 14px; }
.match-inline-form { align-items: end; margin: 18px 0; }
.form-submit-field { justify-content: end; }
.compact-table th, .compact-table td { vertical-align: top; }
.compact-table form { margin: 0; }
.score-entry { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 18px; margin-bottom: 24px; background: #eef6f0; border: 1px solid #c7dfcf; border-radius: 6px; }
.score-entry h2 { margin: 0; }
.stats-score-grid { grid-template-columns: repeat(2, 120px); }
.score-summary { display: flex; align-items: center; gap: 14px; padding: 14px 0 4px; }
.score-summary strong { font-size: 22px; }
.exercise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.exercise-tile { position: relative; }
.exercise-card-link { display: grid; gap: 10px; min-height: 176px; padding: 18px; padding-right: 102px; border: 1px solid var(--border); border-radius: 6px; background: white; color: inherit; text-decoration: none; }
.exercise-card-link:hover { background: #edf2ee; }
.exercise-actions { position: absolute; top: 8px; right: 8px; z-index: 1; display: flex; gap: 6px; }
.exercise-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #b9c8bf; border-radius: 50%; background: white; color: var(--green); text-decoration: none; }
.exercise-icon svg, .button-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.exercise-download:hover { background: #e6f1e9; }
.exercise-delete { border-color: #e0b7b7; color: #a11d1d; }
.exercise-delete:hover { background: #fcecec; }
.exercise-tile strong { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.exercise-tile p { margin: 0; color: #3f4842; font-size: 14px; overflow-wrap: anywhere; }
.exercise-tile small { color: var(--muted); }
.exercise-filetype { display: inline-flex; justify-self: start; align-items: center; min-height: 30px; padding: 4px 9px; border-radius: 4px; background: #e6f1e9; color: var(--green); font-size: 12px; font-weight: 800; }
.button-icon { flex: 0 0 20px; margin-right: 7px; }
.exercise-view-description { white-space: normal; overflow-wrap: anywhere; }
.exercise-preview { width: 100%; margin-top: 24px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: #e5e8e6; }
.exercise-preview iframe { display: block; width: 100%; height: min(75vh, 900px); height: min(75dvh, 900px); min-height: 520px; border: 0; background: white; }
.exercise-preview img { display: block; max-width: 100%; height: auto; margin: auto; }
.training-list { display: grid; gap: 14px; }
.training-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.training-date { margin: 0 0 4px; color: var(--green); font-size: 22px; line-height: 1.2; font-weight: 800; }
.training-row h2 { margin: 0 0 6px; }
.training-schedule { display: grid; gap: 16px; }
.training-schedule-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; padding: 14px; border: 1px solid var(--border); border-radius: 6px; background: white; }
.training-schedule-row textarea { min-height: 46px; height: 46px; }
.evaluation-list { display: grid; gap: 16px; }
.evaluation-item { border-top: 1px solid var(--border); padding-top: 16px; }
.evaluation-item h3 { margin: 0 0 4px; font-size: 17px; }
.evaluation-item p { margin-top: 6px; }
.evaluation-readonly { display: grid; gap: 18px; }
.readonly-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.readonly-header h3 { font-size: 22px; }
.readonly-score { display: grid; place-items: center; min-width: 58px; height: 58px; padding: 8px; border-radius: 50%; background: var(--green); color: white; font-size: 24px; line-height: 1; }
.readonly-section { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.readonly-section h4 { margin: 0; font-size: 16px; }
.readonly-section p { margin: 0; }
.readonly-rating-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.readonly-rating-grid div { border: 1px solid var(--border); background: white; padding: 10px 12px; border-radius: 5px; }
.readonly-rating-grid span { display: block; color: var(--muted); font-size: 12px; }
.readonly-rating-grid strong { display: block; font-size: 22px; line-height: 1.2; }
.readonly-player-table { min-width: 680px; }
.readonly-player-table th:nth-child(2), .readonly-player-table td:nth-child(2) { width: 86px; text-align: center; }
.readonly-player-table th:nth-child(3), .readonly-player-table td:nth-child(3) { width: 60%; white-space: normal; }
.player-evaluation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.player-evaluation-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 14px; border: 1px solid var(--border); background: white; border-radius: 6px; }
.player-evaluation-card textarea { min-height: 92px; }
.rating-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.player-rating-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-table th, .stats-table td { text-align: center; }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table input[type=number] { min-width: 72px; }
.rating-matrix th, .rating-matrix td { text-align: center; }
.rating-matrix th:first-child, .rating-matrix td:first-child { text-align: left; }
.rating-matrix td:not(:first-child) { font-weight: 800; }
.rating-low { color: #a11d1d; background: #fcecec; }
.rating-mid { color: #865309; background: #fff5dc; }
.rating-high { color: #166039; background: #e6f1e9; }
.rating-empty { color: var(--muted); background: #f1f3f1; }
.match-overview-table th, .match-overview-table td { text-align: center; }
.match-overview-table th:first-child, .match-overview-table td:first-child { text-align: left; }
.training-attendance-table { min-width: 640px; table-layout: auto; }
.training-attendance-table th:first-child, .training-attendance-table td:first-child { width: 130px; }
.training-attendance-table th:last-child, .training-attendance-table td:last-child { width: 130px; text-align: right; }
.training-attendance-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.stat-icon { display: inline-block; min-width: 1.25em; text-align: center; line-height: 1; }
.stat-check, .stat-cross { font-weight: 900; font-size: 18px; }
.stat-check { color: #166039; }
.stat-cross { color: #7b8580; }
.substitution-icon { display: inline-block; color: var(--green); font-size: 19px; font-weight: 900; line-height: 1; vertical-align: -1px; }
.roster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
.roster-player { display: flex; align-items: center; gap: 12px; min-height: 82px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.roster-player:hover { background: #edf2ee; }
.roster-player strong, .player-identity strong { display: block; overflow-wrap: anywhere; }
.roster-player small, .player-identity small { display: block; color: var(--muted); font-size: 12px; }
.shirt-number { background: #e4e9e5; border: 1px solid #d0d9d2; color: #374b3d; width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; font-weight: bold; }
.shirt-number.keeper { color: #715105; background: #fff0bf; border-color: #e3ca81; }
.heading-count { font-size: 18px; color: var(--muted); margin-left: 8px; }
.filter-tabs { display: flex; gap: 24px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.filter-tabs a { padding: 10px 0; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; min-height: 44px; }
.filter-tabs a[aria-current] { color: var(--green); border-color: var(--green); font-weight: bold; }
.player-table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
.player-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 600; padding: 12px 16px; }
.player-table td { border-top: 1px solid var(--border); background: white; padding: 14px 16px; }
.player-table th:first-child { width: 43%; }
.player-table th:last-child { width: 116px; }
.player-table .player-grade-column { width: 130px; white-space: nowrap; }
.player-identity { display: flex; align-items: center; gap: 14px; }
.player-stat-link { color: inherit; text-decoration: none; }
.player-stat-link:hover strong { color: var(--green); text-decoration: underline; }
.position-primary { color: var(--green); font-weight: bold; }
.position-secondary { color: var(--muted); }
.status-label { color: var(--muted); font-size: 13px; }
.status-label.is-active { color: var(--green); }
.back-link { display: inline-block; margin-bottom: 20px; min-height: 30px; }
.player-form { max-width: 820px; }
fieldset { border: 0; padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid var(--border); min-width: 0; }
legend { font-size: 18px; font-weight: bold; margin-bottom: 18px; padding: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.score-status-grid { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, 112px); gap: 16px; align-items: end; }
.score-field input { max-width: 112px; }
.score-field label { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { width: 100%; border: 1px solid #a9b5ad; border-radius: 4px; background: white; color: #222624; padding: 10px 12px; min-height: 46px; }
input[type=file] { max-width: 100%; }
textarea { resize: vertical; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: #b02727; }
.field-error { color: #a11d1d; font-size: 13px; }
.secondary-positions { border: 0; padding: 0; margin: 0; }
.secondary-positions legend { font-size: 14px; margin-bottom: 7px; }
.checkbox-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkbox-group label, .checkbox-row { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 14px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; }
.checkbox-row { margin-bottom: 20px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.inline-actions { flex-wrap: nowrap; white-space: nowrap; }
.table-scroll, .player-table-wrapper, .player-chart-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.table-scroll, .player-table-wrapper, .player-chart-scroll, .nav-inner, .filter-tabs { -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.player-table-wrapper .player-table { min-width: 680px; }
.match-overview-table { min-width: 680px; }
.rating-matrix { min-width: 520px; table-layout: auto; }
.stats-match-table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: left; table-layout: auto; }
.stats-match-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 600; padding: 12px 16px; }
.stats-match-table td { border-top: 1px solid var(--border); background: white; padding: 14px 16px; }
.stats-match-table th, .stats-match-table td { white-space: nowrap; vertical-align: middle; }
.stats-match-table th:nth-child(5), .stats-match-table td:nth-child(5) { text-align: center; }
.stats-match-table th:nth-child(6), .stats-match-table td:nth-child(6) { width: 100%; }
.stats-match-table .inline-actions { justify-content: flex-end; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 9px; border-radius: 4px; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.status-pill.planned { color: #166039; background: #e6f1e9; }
.status-pill.played { color: #865309; background: #fff5dc; }
.status-pill.cancelled { color: #6a6f6a; background: #ecefec; }
.stats-fixture-row { justify-content: flex-start; align-items: center; }
.stats-fixture-row .eyebrow { flex: 0 0 230px; margin: 0; }
.stats-fixture-row h2 { flex: 1 1 auto; margin: 0; min-width: 160px; }
.stats-fixture-row .inline-actions { margin-left: auto; }
.danger-link { margin-left: auto; color: #a11d1d; padding: 12px 0; font-size: 14px; }
.notice { padding: 14px 18px; border-left: 4px solid; margin-bottom: 24px; overflow-wrap: anywhere; }
.notice.success { background: #e6f1e9; border-color: var(--green); }
.notice.error { background: #fcecec; border-color: #ae2828; color: #812020; }
.empty-state { padding: 36px 0; color: var(--muted); }
.muted { color: var(--muted); }
.guest-content { display: grid; align-content: center; min-height: calc(100vh - 185px); min-height: calc(100dvh - 185px); }
.login-panel { width: 100%; max-width: 400px; margin: 15px auto 40px; }
.login-panel h1 { margin-bottom: 28px; }
.form-stack { display: grid; gap: 22px; }
.site-footer { color: var(--muted); display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--border); font-size: 12px; overflow-wrap: anywhere; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; top: 8px; left: 8px; background: white; padding: 12px; }
@media (max-width: 760px) {
    .header-inner, .nav-inner, .main-content, .site-footer { padding-left: 18px; padding-right: 18px; }
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .brand strong { font-size: 18px; }
    .account { width: 100%; justify-content: space-between; }
    .nav-inner { gap: 0 20px; }
    .nav-inner > a, .nav-inner > span { padding-top: 12px; padding-bottom: 10px; }
    .main-content { padding-top: 26px; }
    h1 { font-size: 26px; }
    .page-heading { flex-wrap: wrap; gap: 16px; }
    .score-entry { align-items: stretch; flex-direction: column; }
    .exercise-grid { grid-template-columns: 1fr; }
    .training-row, .training-schedule-row { grid-template-columns: 1fr; }
    .training-row { align-items: flex-start; flex-direction: column; }
    .team-summary { grid-template-columns: 100px 1fr; gap: 20px; }
    .selection-count strong { font-size: 42px; }
    .position-summary dl { grid-template-columns: 1fr 1fr; gap: 12px; }
    dt { font-size: 12px; } dd { font-size: 23px; }
    .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
    .player-table th, .player-table td { padding: 12px 8px; }
    .player-table th:first-child { width: 42%; }
    .player-table th:last-child { width: 100px; }
    .player-identity { gap: 8px; font-size: 14px; }
    .player-identity .shirt-number { display: none; }
    .form-grid, .score-status-grid { grid-template-columns: 1fr; }
    .score-field input { max-width: none; }
    .readonly-header { align-items: flex-start; }
    .readonly-rating-grid, .player-evaluation-grid, .player-evaluation-card { grid-template-columns: 1fr; }
    .rating-grid, .player-rating-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-table { min-width: 760px; }
    .danger-link { width: 100%; margin-left: 0; }
    .stats-fixture-row { gap: 12px; overflow-x: auto; }
    .stats-fixture-row .eyebrow { flex-basis: 190px; }
    .stats-fixture-row h2 { min-width: 140px; }
}
@media (max-width: 380px) { .roster-grid { grid-template-columns: 1fr; } .team-summary { grid-template-columns: 1fr; } .selection-count { border-right: 0; } }

@media (max-width: 520px) {
    :root { font-size: 15px; }
    .header-inner, .nav-inner, .main-content, .site-footer { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
    .header-inner { min-height: 76px; padding-top: 8px; padding-bottom: 8px; flex-wrap: nowrap; gap: 10px; }
    .site-logo { width: 48px; height: 48px; flex-basis: 48px; }
    .brand { gap: 8px; }
    .brand strong { font-size: 14px; line-height: 1.15; }
    .brand small { font-size: 9px; margin-top: 1px; }
    .account { width: auto; gap: 8px; font-size: 12px; flex-shrink: 0; }
    .account > span { display: none; }
    .button.header-button { min-height: 38px; padding: 7px 9px; font-size: 12px; }
    .nav-inner { flex-wrap: nowrap; overflow-x: auto; gap: 18px; white-space: nowrap; scrollbar-width: thin; }
    .nav-inner > a, .nav-inner > span { padding-top: 10px; padding-bottom: 8px; font-size: 13px; }
    .main-content { min-height: calc(100vh - 174px); min-height: calc(100dvh - 174px); padding-top: 18px; padding-bottom: max(34px, env(safe-area-inset-bottom)); }
    .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 18px; }
    .page-heading > .form-actions, .page-heading > .button { width: 100%; }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; margin-bottom: 12px; }
    .eyebrow { font-size: 11px; margin-bottom: 4px; }
    .button { min-height: 44px; padding: 8px 11px; font-size: 13px; }
    .button.small { min-height: 40px; padding: 7px 10px; }
    .form-actions { gap: 8px; }
    .section-block { padding: 18px 0; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .section-heading .button, .section-heading a.button { width: 100%; }
    .filter-tabs { gap: 18px; margin-bottom: 16px; overflow-x: auto; white-space: nowrap; }
    .filter-tabs a { min-height: 38px; padding: 8px 0; font-size: 13px; }
    input:not([type=checkbox]):not([type=hidden]), select, textarea { min-height: 44px; padding: 8px 10px; font-size: 16px; }
    fieldset { padding-bottom: 20px; margin-bottom: 20px; }
    legend { font-size: 16px; margin-bottom: 14px; }
    .form-grid, .score-status-grid, .training-schedule-row { grid-template-columns: 1fr; gap: 12px; }
    .training-schedule-row { padding: 12px; }
    .score-entry { padding: 14px; gap: 14px; }
    .score-entry .stats-score-grid { width: 100%; }
    .score-summary { flex-wrap: wrap; }
    .team-summary { grid-template-columns: 1fr; gap: 14px; padding: 18px 0; }
    .selection-count { border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
    .selection-count strong { font-size: 34px; }
    .position-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    dd { font-size: 20px; }
    .exercise-grid { gap: 12px; }
    .exercise-card-link { min-height: 130px; padding: 14px 102px 14px 14px; }
    .exercise-icon { width: 44px; height: 44px; }
    .exercise-preview { margin-top: 16px; border-radius: 4px; }
    .exercise-preview iframe { height: 68vh; height: 68dvh; min-height: 420px; }
    .training-row { gap: 10px; padding: 16px 0; }
    .training-date { font-size: 18px; }
    .readonly-header { flex-direction: column; gap: 10px; }
    .readonly-score { min-width: 48px; height: 48px; font-size: 20px; }
    .readonly-rating-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .player-evaluation-card { padding: 12px; gap: 10px; }
    .rating-grid, .player-rating-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .roster-grid { grid-template-columns: 1fr; column-gap: 0; }
    .roster-player { min-height: 62px; gap: 9px; }
    .shirt-number { width: 34px; height: 34px; flex-basis: 34px; font-size: 13px; }
    .player-table th, .player-table td { padding: 10px 7px; font-size: 13px; }
    .page-heading > .icon-button { width: 44px; }
    .stats-match-table { min-width: 620px; }
    .training-attendance-table { min-width: 500px; }
    .readonly-player-table { min-width: 560px; }
    .stats-table { min-width: 680px; }
    .notice { padding: 12px 14px; margin-bottom: 18px; }
    .login-panel { margin-top: 4px; }
    .site-footer { flex-direction: column; gap: 4px; padding-top: 16px; padding-bottom: 18px; }
}

.player-stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
.player-stat-cards > div { background: white; border: 1px solid var(--border); border-top: 3px solid var(--green); border-radius: 6px; padding: 16px; }
.player-stat-cards dt { color: var(--muted); font-size: 13px; }
.player-stat-cards dd { margin: 6px 0 0; color: var(--green); font-size: 30px; font-weight: bold; text-align: center; }
.absence-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.absence-entry { padding: 12px 14px 14px; border: 1px solid var(--border); border-radius: 6px; background: white; }
.absence-entry .checkbox-row { margin-bottom: 8px; font-weight: 700; }
@media (max-width: 760px) { .absence-entry-grid { grid-template-columns: 1fr; } }
.player-chart-scroll { overflow-x: auto; background: white; border: 1px solid var(--border); border-radius: 6px; margin: 18px 0; }
.player-grade-chart { display: block; font-family: inherit; font-size: 12px; fill: #374b3d; }
.chart-grid { stroke: #dce1dd; stroke-width: 1; }
.chart-line { fill: none; stroke: #156443; stroke-width: 3; stroke-linejoin: round; }
.chart-point { fill: #156443; stroke: white; stroke-width: 2; }
.player-grade-chart a:hover .chart-point, .player-grade-chart a:focus .chart-point { fill: #2576b7; stroke: #2576b7; }
.player-history-table { table-layout: auto; }
.player-history-table th, .player-history-table td { min-width: 95px; }
.player-history-table .history-note { min-width: 240px; white-space: normal; overflow-wrap: anywhere; }
.player-history-table tr:target td { background: #e6f1e9; }
@media (max-width: 520px) { .player-stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .player-stat-cards { grid-template-columns: 1fr; } }

.performance-chart .performance-provisional { fill: white; stroke: #156443; stroke-width: 3; }
.performance-chart .performance-win { fill: #d4a017; }
.performance-chart .performance-loss { fill: #c9252d; }
.performance-chart .performance-win.performance-provisional { fill: white; stroke: #d4a017; }
.performance-chart .performance-loss.performance-provisional { fill: white; stroke: #c9252d; }
.performance-table { min-width: 900px; }
.performance-table th:first-child { width: auto; }
.performance-table th:last-child { width: auto; }
.performance-table td { vertical-align: middle; }
.performance-table small { display: block; color: var(--muted); }
.performance-explanation { margin-top: 18px; }
.team-performance p { max-width: none; }
.performance-explanation summary { cursor: pointer; color: var(--green); font-weight: 700; }

.performance-chart .performance-baseline { stroke: #626b65; stroke-width: 2; }
