/* These rules are loaded only in the coach space. Parent and public layouts stay independent. */
.family-code-panel { margin:20px 0; padding:22px; }
.family-code-panel h3 { margin:0 0 10px; }.family-code-panel p { font-size:16px; line-height:1.5; }
.family-code-form { display:grid; gap:16px; margin-top:20px; }
.family-code-confirm { display:flex; align-items:flex-start; gap:12px; font-size:14px; line-height:1.5; }
.family-code-confirm input { flex:0 0 22px; width:22px; height:22px; margin:2px 0; }
.family-code-result { padding:18px; margin-top:16px; border:1px solid #6caa8e; border-radius:14px; background:#edf9f1; }
.family-code-result label { display:grid; gap:10px; font-size:16px; font-weight:700; }
.family-code-result input { width:100%; min-width:0; padding:12px 8px; font:700 clamp(14px,4vw,21px)/1.5 monospace; color:#132b40; background:white; border:1px solid #a4c9b7; border-radius:8px; }
.family-code-result button { margin-top:12px; }.family-code-result [role="status"] { margin-bottom:0; }
.coach-share-button { gap:7px; background:#137b4d; color:#fff; border:1px solid #137b4d; box-shadow:none; text-decoration:none; font-size:14px; min-height:44px; }
.coach-share-button:hover { background:#0c603b; color:#fff; }.coach-share-button[aria-busy="true"] { opacity:.7; cursor:wait; }
.coach-copy-control { margin:14px 0; }.coach-copy-control>.coach-share-button { display:flex; justify-content:center; }
.coach-copy-status { color:#12613e; font-size:14px; line-height:1.5; margin:8px 0 0; }.coach-copy-status:empty { display:none; }.coach-copy-status.is-error { color:#a32830; }
.coach-copy-fallback { margin-top:12px; }.coach-copy-fallback>.button,.coach-share-page [data-copy-ready] { margin-top:12px; }
.coach-copy-control [hidden] { display:none!important; }
.coach-share-preview { display:grid; gap:8px; font-size:14px; font-weight:700; }.coach-share-preview textarea { width:100%; min-height:180px; height:auto; padding:14px; border:1px solid #b9cbd5; border-radius:12px; background:#fff; color:#17374d; font:400 16px/1.5 system-ui,sans-serif; resize:vertical; }
.coach-share-page>.button { margin:16px 0; }
.coach-mobile-home,.coach-compositions-back { display:none; }
.coach-photo-alert { display:flex; align-items:center; gap:12px; padding:14px 16px; margin:0 0 18px; border:1px solid #efb453; border-radius:16px; background:#fff4d9; color:#603c0b; text-decoration:none; }
.coach-photo-alert>span { font-size:28px; }.coach-photo-alert>div { flex:1; display:grid; gap:3px; }.coach-photo-alert strong { font-size:16px; }.coach-photo-alert small { font-size:14px; }.coach-photo-alert>b { font-size:26px; }
.coach-team { display:inline-flex; align-items:center; padding:5px 10px; border-radius:9px; font-size:14px; font-weight:850; }
.coach-team.team-c,.coach-day-team.team-c { color:#fff; background:#b94515; }
.coach-team.team-d,.coach-day-team.team-d { color:#fff; background:#7052aa; }
@media(min-width:901px) {
  .player-profile-layout>.player-identity { grid-column:1; grid-row:1; }
  .player-profile-layout>.profile-progress { grid-column:2; grid-row:1; }
}
.coach-stat-feedback { min-height:2.8em; margin:6px 0 10px; font-size:14px; line-height:1.4; color:#526473; }
.coach-stat-feedback.is-error { color:#a32929; }
.profile-progress .coach-radar-title { margin-top:24px; }
.stat-controls button:disabled { opacity:.4; cursor:default; }
.attendance-metadata { margin-top:22px; padding-top:18px; border-top:1px solid #dce2e5; }
.attendance-sheet-context { color:#526473; font-size:14px; margin:0 0 12px; }
.presence-toggle input:focus-visible+span { outline:3px solid #123f62; outline-offset:3px; }
[data-pwa-app="coach"] :is(a,button):focus-visible { outline:3px solid #137ca6; outline-offset:3px; }

@media(max-width:720px),(pointer:coarse) and (max-width:1100px) {
  body[data-pwa-app="coach"] { background:#f7f4ec; padding-bottom:calc(96px + env(safe-area-inset-bottom)); }
  [data-pwa-app="coach"] .site-header,.coach-suite>.admin-side { display:none; }
  .coach-suite { display:block; }
  .coach-suite .admin-main { min-width:0; padding:16px 12px 28px!important; }
  .coach-app-header { display:grid; position:sticky; top:0; z-index:90; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; min-height:80px; padding:calc(10px + env(safe-area-inset-top)) 14px 10px; background:#102f4a; color:white; }
  .coach-app-header>img { width:50px; height:50px; border-radius:50%; }.coach-app-header>div { display:grid; gap:4px; min-width:0; }.coach-app-header strong { font-size:22px; }.coach-app-header small { font-size:14px; color:#d7e4ec; }
  .coach-app-header>button { width:44px; height:44px; border:1px solid #7390a5; border-radius:12px; background:none; color:white; font-size:26px; }
  .coach-app-nav { display:grid; position:fixed; z-index:100; inset:auto 0 0; grid-template-columns:repeat(5,minmax(0,1fr)); padding:6px 4px calc(6px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #d9dcda; }
  .coach-app-nav :is(a,button) { display:flex; min-width:0; align-items:center; justify-content:center; flex-direction:column; gap:3px; min-height:74px; border:0; border-radius:12px; padding:5px 2px; background:none; color:#526473; font:inherit; text-decoration:none; }
  .coach-app-nav img { width:40px; height:40px; object-fit:contain; }.coach-app-nav span { font-size:12px; font-weight:800; }.coach-app-nav .active { background:#fff0e4; color:#b94318; }
  .coach-mobile-home { display:block; }.coach-compositions:not(.is-open) { display:none; }.coach-compositions-back { display:flex; margin-bottom:16px; }
  .coach-compositions { scroll-margin-top:100px; }.coach-mobile-home { scroll-margin-top:100px; }
  .coach-month-toolbar { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; gap:6px; padding:10px; border-radius:20px; background:linear-gradient(110deg,#102f4a,#1b536b); color:#fff; }
  .coach-month-toolbar h2 { margin:0; text-align:center; font-size:clamp(17px,5vw,24px); line-height:1.25; }
  .coach-month-toolbar a { display:grid; place-items:center; min-height:46px; border-radius:13px; background:#ff642b; color:white; text-decoration:none; font-size:30px; }
  .coach-calendar-key { display:flex; align-items:center; gap:8px; margin:14px 0 10px; }.coach-calendar-key a { margin-left:auto; font-size:14px; font-weight:700; color:#174566; }.coach-calendar-hint { font-size:14px; color:#526473; margin:0 0 12px; }
  .coach-month-grid { width:100%; table-layout:fixed; border-spacing:4px; padding:6px; background:#fff; border:1px solid #dfe4e6; border-radius:18px; }
  .coach-month-grid th { padding:4px 0 8px; text-align:center; font-size:14px; color:#526473; }
  .coach-month-grid td { padding:0; vertical-align:top; border:0; }
  .coach-calendar-day { display:flex; width:100%; aspect-ratio:1; min-height:44px; align-items:center; flex-direction:column; justify-content:center; gap:3px; padding:2px; border:1px solid #e1e7ea; border-radius:10px; background:#f5f7f8; color:#18394f; font:inherit; }
  button.coach-calendar-day { cursor:pointer; }.coach-calendar-day time { display:grid; place-items:center; font-weight:850; font-size:clamp(16px,4.5vw,21px); line-height:1.15; min-width:24px; min-height:24px; }
  .coach-month-grid .has-events .coach-calendar-day { background:#dcedff; border:1.5px solid #69a5d3; box-shadow:0 2px 4px #164a7310; }
  .coach-month-grid .is-today time { background:#ff642b; color:#fff; border-radius:50%; }.coach-month-grid .is-today .coach-calendar-day { outline:2px solid #ff642b; outline-offset:-2px; }
  .coach-day-teams { display:flex; gap:2px; justify-content:center; min-height:0; }.coach-day-teams:empty { display:none; }
  .coach-day-team { display:inline-flex; justify-content:center; align-items:center; min-width:16px; padding:0 3px; border-radius:4px; font-size:12px; line-height:17px; font-weight:850; }
  .coach-compositions-link { display:flex; justify-content:center; margin-top:16px; font-size:14px; }.coach-calendar-empty { font-size:16px; padding:12px; }
  .coach-day-dialog { width:calc(100% - 24px); max-width:540px; max-height:calc(100dvh - 40px); padding:0; border:0; border-radius:22px; background:#f7f4ec; }
  .coach-day-dialog::backdrop { background:#071e32ad; }
  .coach-day-dialog>header { display:flex; align-items:flex-start; gap:10px; padding:20px 16px 14px; }.coach-day-dialog>header>div { flex:1; }.coach-day-dialog>header p { margin:0 0 5px; font-size:14px; color:#526473; }.coach-day-dialog h2 { margin:0; font-size:22px; line-height:1.25; }
  .coach-day-dialog>header button { width:44px; height:44px; border:1px solid #cdd7dc; border-radius:12px; font-size:26px; background:white; color:#17374d; }
  .coach-day-events { display:grid; gap:14px; padding:0 16px; }.coach-event-card { min-width:0; padding:16px; border:1px solid #cbdde8; border-left:5px solid #b94515; border-radius:15px; background:#fff; }.coach-event-card.team-d { border-left-color:#7052aa; }.coach-event-card.calendar-type-friendly { background:#e5f2ff; }.coach-event-card.calendar-type-tbd { background:#e6f5e8; }
  .coach-event-type { display:block; margin:8px 0; font-size:14px; color:#526473; }.coach-event-card h3 { margin:10px 0 8px; font-size:21px; }.coach-event-card p { font-size:16px; margin:9px 0; }.coach-event-card>strong { font-size:19px; }
  .coach-event-attendance { display:flex; align-items:center; gap:8px; min-height:48px; margin-top:14px; border-top:1px solid #cbdde8; padding-top:10px; font-size:16px; color:#173e5b; font-weight:750; text-decoration:none; }.coach-event-attendance img { width:30px; height:30px; object-fit:contain; }.coach-event-attendance span { margin-left:auto; }
  .coach-day-footer { padding:16px; }.coach-day-footer button { width:100%; }
  .coach-suite .admin-title { margin:0 0 14px; gap:12px; }.coach-suite .admin-title h2 { font-size:24px; margin:5px 0 0; }.coach-suite .admin-title p { display:none; }.coach-suite .back-inline { display:inline-flex; align-items:center; min-height:40px; font-size:14px; }
  .coach-suite .player-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .coach-suite .player-profile-card { min-width:0; padding:0 0 6px; background:#edf0f1; border-radius:16px; box-shadow:none; }
  .coach-suite .player-card-photo { width:100%; height:96px; aspect-ratio:auto; object-fit:cover; }.coach-suite .profile-placeholder { font-size:34px; background:#e1e6e8; }
  .coach-suite .player-card-identity { padding:10px; }.coach-suite .player-card-identity h3 { font-size:16px; line-height:1.25; overflow-wrap:anywhere; }.coach-suite .player-card-identity h3 strong { display:block; }
  .coach-suite .player-card-facts { gap:5px; }.coach-suite .player-card-facts>span { display:none; }.coach-suite .player-card-facts>.jersey-number-badge,.coach-suite .player-card-facts>.player-card-team { display:inline-flex; font-size:12px; }.coach-suite .player-profile-card .player-radar { display:none; }
  .coach-suite .player-profile-layout { display:flex; flex-direction:column; gap:16px; }.coach-suite .player-profile-layout>section { width:100%; min-width:0; }
  .coach-suite .profile-progress { padding:0; background:transparent; border:0; box-shadow:none; }.coach-suite .profile-progress>h3:first-child { font-size:18px; }.coach-stat-feedback { font-size:14px; margin:4px 0 8px; min-height:2.8em; }
  .coach-profile-page .admin-title>div { display:flex; gap:12px; align-items:center; width:100%; }.coach-profile-page .admin-title h2 { flex:1; font-size:21px; margin:0; }.coach-profile-page .back-inline { flex-shrink:0; }
  .coach-profile-page .profile-progress>h3:first-child { display:none; }.coach-profile-page .coach-stat-feedback { min-height:20px; margin-top:0; }
  .coach-suite .stat-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
  .coach-suite .stat-controls article { display:flex; flex-direction:column; gap:7px; min-width:0; padding:10px; border:1px solid #dce2e5; border-radius:14px; background:#fff; }
  .coach-suite .stat-controls article>span { display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; min-height:40px; }.coach-suite .stat-controls b { display:flex; align-items:center; justify-content:center; font-size:14px; line-height:1.15; min-height:32px; }.coach-suite .stat-controls strong { font-size:16px; line-height:1.1; color:#b74518; }
  .coach-suite .stat-controls article>div { display:grid; grid-template-columns:1fr 1fr; gap:10px; width:100%; }.coach-suite .stat-controls form { margin:0; }.coach-suite .stat-controls button { width:100%; height:46px; min-width:44px; border-radius:10px; font-size:28px; line-height:1; }
  .coach-suite .profile-progress .player-radar { width:100%; height:270px; margin:8px 0 0; background:#fff; border-radius:16px; }
  .coach-suite .presence-list article { grid-template-columns:1fr 1fr; gap:8px; padding:12px; }.coach-suite .presence-list article>div { grid-column:1/-1; }.coach-suite .presence-list p strong { font-size:16px; }.coach-suite .presence-list small { font-size:14px; }.coach-suite .presence-toggle span { display:flex; align-items:center; justify-content:center; min-height:48px; font-size:16px; border-radius:10px; }
  .coach-suite .attendance-form { padding:12px; }.coach-suite .attendance-settings { grid-template-columns:1fr; gap:12px; }.coach-suite .attendance-form .form-actions { gap:10px; flex-wrap:wrap; }.coach-suite .attendance-form .form-actions button { min-height:48px; font-size:16px; }.coach-suite .attendance-form label { font-size:14px; }
}
@media(min-width:721px) and (pointer:coarse) and (max-width:1100px) {
  .coach-app-more { display:none; position:fixed; z-index:101; bottom:98px; left:14px; right:14px; padding:20px; border-radius:20px; background:#fff; box-shadow:0 5px 40px #102f4a60; }.coach-app-more.is-open { display:block; }.coach-app-more-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.coach-app-more-grid a { display:grid; padding:14px; color:#18394f; border:1px solid #dce2e5; border-radius:12px; }.coach-app-more-actions { display:flex; justify-content:space-between; gap:12px; margin-top:16px; }
}
@media(max-width:360px) {
  .coach-month-grid { border-spacing:2px; padding:4px; }.coach-calendar-day { gap:1px; border-radius:8px; }.coach-suite .stat-controls article { padding:8px; }
}
