:root{--bg:#0d1822;--bg2:#12222d;--panel:#172a35;--panel2:#1c333e;--edge:#344752;--text:#eff6f2;--muted:#98afb5;--lime:#b8ef68;--mint:#4fd8b8;--red:#ff7d87;--gold:#f5c968;--shadow:0 15px 45px #06111955;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.hidden{display:none!important}.shell{display:flex;min-height:100vh}.sidebar{width:238px;background:#101e29;border-right:1px solid #283c44;padding:26px 15px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;flex-shrink:0}.side-brand{display:flex;gap:12px;align-items:center;padding:4px 10px 28px}.brand-icon,.brandmark{background:var(--lime);color:#13252d;font-weight:900;border-radius:15px;padding:12px;font-size:21px}.brandmark{display:inline-block;font-size:35px}.brandmark span{font-size:14px}.side-brand strong{font-size:21px;letter-spacing:.12em}.side-brand small{display:block;font-size:9px;letter-spacing:.14em;color:var(--muted);margin-top:5px}nav{display:grid;gap:7px}nav button{border:0;text-align:left;color:#bccbd0;background:transparent;padding:13px 15px;border-radius:11px;font-weight:650}nav button.active,nav button:hover{color:var(--lime);background:#243c3e}nav button span{margin-left:13px}.sidebar-foot{font-size:11px;color:var(--muted);margin-top:auto;padding:15px 12px;line-height:2}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--mint);margin-right:8px}.text-link{color:var(--lime);border:0;background:transparent;padding:0}.main-wrap{width:100%;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;padding:25px 32px;border-bottom:1px solid #253843}.topbar h1{font-size:27px;margin:4px 0 0;letter-spacing:-.03em}.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:10px;font-weight:800;color:var(--mint)}.top-right{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:13px}.round-avatar{background:#365449;border-radius:50%;padding:10px}#mobile-nav{display:none}main{padding:28px 32px 65px;max-width:1650px;margin:auto}.grid{display:grid;gap:20px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.layout-2{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);gap:20px}.card{background:linear-gradient(150deg,#192e39,#152832);border:1px solid var(--edge);border-radius:18px;padding:22px;box-shadow:var(--shadow);min-width:0}.card h2{margin:0 0 17px;font-size:17px}.card h3{margin:0 0 12px}.hero{background:radial-gradient(ellipse at 82% 25%,#34654a,#1d3f37 35%,#182f34 75%);border:1px solid #497a62;border-radius:22px;padding:30px;display:flex;justify-content:space-between;align-items:center;gap:22px;margin-bottom:22px}.hero h2{font-size:36px;line-height:1.15;letter-spacing:-.035em;margin:9px 0}.hero p{color:#c6d8cd}.hero-visual{font-size:85px;opacity:.8}.btn{background:#28404b;border:1px solid #526772;color:#eef7f3;border-radius:11px;padding:10px 15px;font-weight:750;transition:.15s}.btn:hover{filter:brightness(1.18)}.btn.primary{background:var(--lime);color:#112b28;border-color:var(--lime)}.btn.warn{background:#5b3238;border-color:#9f4e5b}.btn.small{font-size:12px;padding:7px 10px}.btn.icon{padding:6px 12px;font-size:20px}.btn-row{display:flex;flex-wrap:wrap;gap:9px;align-items:center}.muted{color:var(--muted)}.tiny{font-size:12px}.pill{display:inline-block;color:var(--lime);background:#304c3e;border:1px solid #4f7454;border-radius:30px;padding:5px 10px;font-size:11px;font-weight:800;letter-spacing:.05em}.pill.live{background:#57333a;color:#ff9ba2;border-color:#8e4c59}.section-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:18px}.section-head h2{margin:0;font-size:20px}.stack{display:grid;gap:12px}.item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px;background:#213943;border:1px solid #354d56;border-radius:12px}.item strong{display:block}.item small{color:var(--muted)}.empty{color:var(--muted);text-align:center;padding:32px 15px;border:1px dashed #425763;border-radius:13px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stat{background:#1a313b;border:1px solid #344b51;border-radius:14px;padding:18px}.stat .number{font-weight:850;font-size:29px;margin-top:8px}.stat span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.1em}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}label{display:grid;gap:6px;color:#c9d9d8;font-size:12px;font-weight:750}label.full{grid-column:1/-1}input,select,textarea{background:#0e212b;color:var(--text);padding:11px;border:1px solid #46606b;border-radius:9px;outline:0;width:100%;min-width:0}input:focus,select:focus,textarea:focus{border-color:var(--lime)}input[type=color]{padding:4px;height:42px}textarea{min-height:75px;resize:vertical}.subhead{font-size:13px;color:var(--mint);font-weight:800;letter-spacing:.09em;text-transform:uppercase;margin:22px 0 12px}.field-wrap{max-width:800px;margin:auto}.pitch{position:relative;aspect-ratio: .84;width:100%;max-height:790px;overflow:hidden;border:5px solid #235a44;border-radius:17px;background:repeating-linear-gradient(0deg,#186046 0,#186046 12.5%,#1c674c 12.5%,#1c674c 25%);box-shadow:inset 0 0 80px #05160b55,0 20px 45px #0005;touch-action:none;user-select:none}.pitch-lines,.pitch-markers,.pitch-canvas{position:absolute;inset:0;width:100%;height:100%}.pitch-lines{pointer-events:none}.pitch-markers{pointer-events:none}.pitch-canvas{touch-action:none;pointer-events:none}.pitch.drawing .pitch-canvas{pointer-events:auto;cursor:crosshair}.player-token{position:absolute;left:0;top:0;transform:translate(-50%,-50%);z-index:2;min-width:79px;max-width:125px;text-align:center;pointer-events:auto;touch-action:none;cursor:pointer}.player-token .disc{height:43px;width:43px;border:2px solid #fff8;border-radius:50%;background:#b8ef68;color:#0e2930;display:grid;place-items:center;margin:auto;font-weight:900;box-shadow:0 4px 12px #041c1b88}.player-token .name{background:#0c292ae8;padding:5px 7px;border:1px solid #709279;border-radius:7px;font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.player-token .position{font-size:9px;color:#e9ffd8;text-transform:uppercase;letter-spacing:.06em;margin-top:3px;text-shadow:0 2px 5px #001}.player-token.dragging .disc{background:var(--gold)}.field-direction{display:flex;justify-content:space-between;align-items:center;margin:0 auto 12px;max-width:800px}.field-direction span{color:var(--lime);font-weight:900;letter-spacing:.1em;font-size:12px}.field-tools{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.field-note{font-size:12px;color:var(--muted);margin:8px 0 0}.slot-editor{display:flex;gap:8px;flex-wrap:wrap}.slot-tag{border:1px solid #537064;border-radius:8px;padding:7px;font-size:12px;background:#24433e}.scoreboard{background:radial-gradient(ellipse at 50% -90%,#496f48,#142b34 75%);border:1px solid #537e67;border-radius:19px;padding:20px;margin-bottom:20px}.score-grid{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;text-align:center;gap:10px}.score-number{font-size:clamp(42px,6vw,76px);font-weight:950;letter-spacing:-.08em;color:var(--lime);line-height:1}.score-team{font-size:14px;font-weight:850;overflow-wrap:anywhere}.score-controls{display:flex;justify-content:center;gap:9px;margin:12px 0 0}.score-divider{font-size:40px;color:#94b9a1}.score-info{text-align:center;margin:0 0 12px;color:var(--mint);font-size:13px;font-weight:800;letter-spacing:.1em}.clock-readout{font-size:36px;font-weight:850;font-variant-numeric:tabular-nums}.event{border-left:2px solid var(--mint);padding:5px 13px;margin:10px 0;font-size:12px}.event .muted{font-size:11px}.board-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.swatch{width:31px;height:31px;border-radius:50%;border:3px solid transparent}.swatch.selected{border-color:white}.auth-outer{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 70% 20%,#245544,#0b1923 55%)}.auth-card{width:min(460px,100%);padding:35px;background:#192d36;border:1px solid #42614f;border-radius:24px;box-shadow:var(--shadow)}.auth-card h1{font-size:42px;margin:10px 0 0}.auth-card h2{margin-top:32px}.auth-card p{color:var(--muted)}.auth-card form{display:grid;gap:15px}.error{color:var(--red);margin-top:10px}.success{color:var(--lime)}#toast{position:fixed;right:20px;bottom:20px;z-index:30;background:#b8ef68;color:#12312e;padding:12px 18px;border-radius:11px;font-weight:800;box-shadow:var(--shadow);display:none;max-width:360px}#toast.error{background:#f49e9e;color:#3b1720}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;color:var(--muted);font-size:11px;text-transform:uppercase}td,th{padding:11px 8px;border-bottom:1px solid #38505a}tr:last-child td{border-bottom:0}.scroll-x{overflow:auto}.dim{opacity:.6}.notice{border:1px solid #477965;border-radius:12px;padding:12px;color:#c2e8d8;background:#203f3c}.icon-btn{border:1px solid #536b73;background:#19333a;color:white;border-radius:9px;padding:9px}.split{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.mt{margin-top:18px}.mb{margin-bottom:15px}.selected-card{outline:2px solid var(--lime)}@media(max-width:1100px){.layout-2{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}.sidebar{width:205px}.topbar,main{padding-left:20px;padding-right:20px}}@media(max-width:700px){.sidebar{position:fixed;left:-255px;z-index:20;transition:left .2s;width:240px;box-shadow:var(--shadow)}.sidebar.open{left:0}#mobile-nav{display:block}.topbar{padding:16px}.topbar h1{font-size:21px}.eyebrow{font-size:9px}main{padding:15px}.grid.two,.grid.three{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr);gap:9px}.stat{padding:12px}.hero{padding:20px}.hero h2{font-size:27px}.hero-visual{display:none}.card{padding:15px}.form-grid{grid-template-columns:1fr}.score-team{font-size:12px}.pitch{border-width:3px}.player-token{min-width:53px;max-width:76px}.player-token .disc{width:34px;height:34px;font-size:13px}.player-token .name{font-size:9px;padding:3px}.player-token .position{font-size:8px}.top-right #account-name{display:none}}

/* Formation Playbook — v0.1.1 */
.playbook-panel{background:linear-gradient(145deg,#22423b,#152f36);border:1px solid #5d8770;border-radius:14px;padding:17px}.playbook-panel .section-head h2{font-size:17px}.playbook-explain{margin-top:13px;padding:14px;background:#0e2730;border-radius:11px;border:1px solid #3c665a;color:#e7f2eb}.playbook-explain strong{color:#b8ef68}.playbook-explain p{font-size:13px;line-height:1.55;margin:10px 0}.playbook-explain small{display:block;margin-top:13px;color:#afc8bc}.playbook-explain b{color:#b8ef68}
.playbook-compact{margin:12px 0}.playbook-compact .playbook-explain{margin:0}

/* v0.1.2 visual playbook and draggable markers */
.playbook-panel{margin-bottom:18px}.playbook-panel label{display:block;margin-top:12px}.playbook-panel select{width:100%;margin-top:6px}.playbook-panel #load-preset:disabled{opacity:.5;cursor:not-allowed}.playbook-explain{margin-top:14px}.pitch-markers{position:absolute;inset:0;pointer-events:none}.pitch-markers>.player-token{position:absolute;pointer-events:auto} 

/* v0.1.4: dedicated, measured tactical marker layer. */
#field{position:relative;isolation:isolate}
#field>.pitch-lines{z-index:0}
#field>.pitch-markers{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:block!important;z-index:3;overflow:visible;pointer-events:none}
#field>.pitch-markers>.player-token{position:absolute!important;display:block!important;pointer-events:auto;transform:translate(-50%,-50%);will-change:left,top;transition:left .45s ease,top .45s ease}
#field>.pitch-markers>.player-token.dragging{transition:none;z-index:5}
#field>.pitch-canvas{z-index:4}
@media(prefers-reduced-motion:reduce){#field>.pitch-markers>.player-token{transition:none}}

/* v0.1.5 editable coaching arrows: separate SVG interaction layer */
.tactics-panel{margin:16px 0;padding:16px;border-radius:14px;background:#19383b;border:1px solid #547b6c}
.tactics-panel h2{font-size:16px}.tactics-panel p{line-height:1.6;margin:9px 0 14px}
.tactics-tools{display:grid;grid-template-columns:2fr 1fr 1fr;gap:9px;margin:12px 0}
.tactics-tools label{min-width:0;font-size:12px}.tactics-tools select{width:100%;min-width:0}
.arrow-toggle{display:flex!important;align-items:center;gap:10px;margin:12px 0;font-size:13px}
.arrow-toggle input{width:auto}.arrow-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px;max-height:145px;overflow-y:auto}
.arrow-selected{outline:2px solid #ff6f75}
#field>.tactics-overlay{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;overflow:visible;touch-action:none}
#field>.tactics-overlay.editing{pointer-events:auto}
.tactics-overlay .arrow-hit{cursor:grab}
.tactics-overlay .arrow-handle{fill:white;stroke:#132a30;stroke-width:.6;cursor:crosshair}
#field>.pitch-markers{z-index:3}
#field>.tactics-overlay.editing~.pitch-markers{pointer-events:none}
#field>.tactics-overlay.editing~.pitch-markers>.player-token{pointer-events:none}
@media(max-width:650px){.tactics-tools{grid-template-columns:1fr 1fr}.tactics-tools label:first-child{grid-column:span 2}}

/* v0.1.6 Roster editing and private player thumbnails */
.roster-list{margin-bottom:16px}.roster-item{gap:12px}.roster-desc{flex:1;min-width:0}.roster-desc strong{overflow-wrap:anywhere}
.roster-photo{width:52px;height:52px;flex:0 0 52px;border-radius:50%;object-fit:cover;object-position:center;background:#29464a;border:2px solid #9bc66e;display:grid;place-items:center;font-weight:900;color:#b8ef68}
.photo-placeholder{font-size:18px}.player-edit{border:1px solid #4b7865;padding:17px;border-radius:15px;background:#14333b;margin-top:22px}
.photo-edit-preview{display:flex;align-items:center;gap:12px;margin-bottom:15px}.player-token .disc.has-photo{overflow:hidden;background:#26473a}
.player-token .disc.has-photo img{width:100%;height:100%;object-fit:cover;display:block}
@media(max-width:700px){.roster-photo{width:42px;height:42px;flex-basis:42px}.roster-item{padding:10px}.roster-desc small{font-size:10px}}

/* v0.1.8: formation name is shown once; format remains supporting metadata. */
.playbook-format{display:block;margin-top:4px;color:var(--muted,#9cb5bb);font-size:.76rem;font-weight:500;letter-spacing:.02em}

/* v0.1.9: accessible match-field assignment and clear match-position labels */
.field-assignment{background:#173a38;border:1px solid #56816a;border-radius:12px;padding:13px}
.field-assignment .assignment-title{font-weight:850;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.field-assignment .assignment-controls{display:flex;align-items:center;gap:9px;margin:12px 0 5px}
.field-assignment .assignment-controls select{flex:1}
#field .match-position:focus-visible{outline:2px solid #b8ef68;outline-offset:5px;border-radius:12px}
#field .match-position:hover .disc{box-shadow:0 0 0 4px #b8ef6866,0 5px 18px #031c1877}
.player-token .disc.has-photo{position:relative;overflow:visible}
.player-token .disc.has-photo img{border-radius:50%}
.token-number{position:absolute;right:-12px;bottom:-5px;padding:1px 4px;background:#102d32;color:#c3f878;border:1px solid #c3f878;border-radius:8px;font-size:9px;line-height:1.4}
@media(max-width:700px){.field-assignment .assignment-controls{flex-direction:column;align-items:stretch}}

/* v0.2.5: team identity and in-progress lineup editing */
.team-logo{width:58px;height:58px;object-fit:contain;border-radius:12px;background:#183e39;padding:5px;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-right:10px}.team-logo-placeholder{font-size:26px}.team-profile-header,.coach-identity{display:flex;align-items:center;gap:10px}.coach-identity{min-width:0}.coach-identity small{display:block}.score-team .team-logo{width:37px;height:37px;margin-right:5px}.player-token .name{max-width:125px}.team-profile-header{margin-bottom:14px}.field-note{line-height:1.5}

/* v0.2.6 tactical ink controls */
.board-toolbar .swatch{appearance:none;-webkit-appearance:none;box-sizing:border-box;flex:0 0 34px;width:34px;height:34px;min-width:34px;padding:0;border:2px solid #667c83!important;border-radius:50%;background:var(--ink-color)!important;background-color:var(--ink-color)!important;cursor:pointer;box-shadow:0 1px 6px #0006}
.board-toolbar .swatch.selected{outline:3px solid #b8ef68;outline-offset:2px;border-color:#0d2830!important}
.board-toolbar .swatch:focus-visible{outline:3px solid #b8ef68;outline-offset:3px}
.board-toolbar .ink-active{background:#b8ef68!important;color:#102b25!important;border-color:#b8ef68!important}
.eraser-size-label{display:inline-flex;flex-direction:row;align-items:center;gap:7px;font-size:11px;font-weight:700;white-space:nowrap}
.eraser-size-label input{width:90px;min-width:60px;padding:0;accent-color:#b8ef68}
.eraser-size-label output{min-width:35px;font-variant-numeric:tabular-nums}
.pitch.drawing:has(+ *) .pitch-canvas{touch-action:none}

/* v0.2.7: SVG swatches are independent of forced button backgrounds. */
.board-toolbar button.swatch{display:inline-flex!important;align-items:center;justify-content:center;background:#142d35!important;background-color:#142d35!important;overflow:visible;line-height:0;padding:0!important}
.board-toolbar button.swatch svg.ink-swatch-icon{display:block;flex-shrink:0;width:30px;height:30px;pointer-events:none}

/* v0.3.0 authenticated, read-only live board */
#live-field .pitch-markers{position:absolute!important;inset:0!important;pointer-events:none!important}
#live-field .player-token{z-index:3;min-width:70px;text-align:center}
#live-connection{font-size:.8rem;margin-top:14px}
#live-view-content .layout-2{align-items:start}
#queued-substitutions .item{gap:10px;flex-wrap:wrap}
@media(max-width:700px){#live-view-content .layout-2{display:block}#live-view-content .layout-2>.stack{margin-top:15px}}

/* v0.4.0 role based navigation and admin views */
#nav button[hidden]{display:none!important}#request-access-toggle{margin-top:18px}.auth-card .hidden{display:none!important}#invite-link{width:100%;margin:8px 0}.cleanup-player,.cleanup-match{accent-color:#b8ef68;width:18px;height:18px;flex:none}.item:has(.cleanup-player),.item:has(.cleanup-match){justify-content:flex-start}.notice{line-height:1.6}#admin-trash .item{margin-bottom:7px}
/* v0.5.0 coach first-run setup */
.wizard-wrap{max-width:750px;margin:25px auto}.wizard-wrap .card{padding:clamp(22px,4vw,45px)}.wizard-wrap h2{font-size:clamp(22px,4vw,32px);margin:18px 0}.wizard-progress{display:flex;gap:7px;margin:20px 0}.wizard-progress span{height:7px;border-radius:20px;background:#3a525b;flex:1}.wizard-progress span.on{background:var(--lime)}.wizard-wrap .form-grid{margin-top:20px}.wizard-wrap label{font-size:13px}


/* v0.5.4 — Fresh Sideline light palette. Keep turf/field markers deliberately dark for clarity. */
:root{
  --bg:#eef5f1;--bg2:#e1efe7;--panel:#ffffff;--panel2:#f4faf6;
  --edge:#c8ded4;--text:#183b35;--muted:#57766c;
  --lime:#b8ef68;--mint:#087f6e;--red:#ad3445;--gold:#a26d15;
  --shadow:0 10px 30px #144b3912;
  color-scheme:light;
}
html,body{background:var(--bg);color:var(--text)}
.sidebar{background:linear-gradient(180deg,#155e54 0%,#14614f 50%,#104e48 100%);border-color:#28796a;color:#f3fff8;box-shadow:4px 0 16px #1357461c}
.sidebar .side-brand small,.sidebar .sidebar-foot{color:#c2e6dc}
.sidebar .side-brand strong{color:#fff}
.sidebar nav button{color:#e7f9ef}
.sidebar nav button.active,.sidebar nav button:hover{background:#ffffff24;color:#e7ffad;box-shadow:inset 3px 0 #bcf274}
.sidebar .text-link{color:#e7ffad}
.sidebar .status-dot{background:#b8ef68}
.main-wrap{background:linear-gradient(160deg,#f5faf7 0%,#eaf4ee 65%,#f6faf8 100%)}
.topbar{background:#ffffffd9;border-color:#d9e8df;box-shadow:0 1px 0 #dae9df}
.top-right{color:#54756a}
.round-avatar{background:#daf1e2;color:#195b48}
.eyebrow,.subhead{color:#087f6e}
.card{background:linear-gradient(160deg,#ffffff,#f9fcfa);border-color:var(--edge);box-shadow:var(--shadow)}
.card h2,.card h3,.section-head h2,.topbar h1{color:#183b35}
.hero{background:linear-gradient(120deg,#d8f4df 0%,#e9fae1 52%,#cbebdc 100%);border-color:#a6d1b9;box-shadow:var(--shadow)}
.hero h2{color:#123c33}.hero p{color:#3e6859}
.btn{background:#ecf5ee;border-color:#b3d0c0;color:#22564a}
.btn:hover{filter:none;background:#dcf0dc;border-color:#7db79c}
.btn.primary{background:#b8ef68;color:#163b2d;border-color:#88cc4c;box-shadow:0 2px 0 #6ba63333}
.btn.primary:hover{background:#a9e657;border-color:#74b93a}
.btn.warn{background:#fff0f0;color:#992f43;border-color:#e7a2ae}
.muted,.field-note,.item small{color:var(--muted)}
.pill{color:#17623e;background:#e1f4d5;border-color:#b6dda5}
.pill.live{background:#ffeded;color:#9e3042;border-color:#edbdc5}
.item{background:#f2faf5;border-color:#d0e5d8}
.item:hover{border-color:#a2d3b7}
.empty{color:#658176;border-color:#bdd9cd;background:#f8fcf9}
.stat{background:#fff;border-color:#cfe4d8;box-shadow:0 4px 14px #184d3610}
.stat .number{color:#1c6e53}
label{color:#34594d}
input,select,textarea{background:#ffffff;color:#1a3c32;border-color:#a9c9b8;box-shadow:0 1px 2px #144a3510}
input::placeholder,textarea::placeholder{color:#728f84}
input:focus,select:focus,textarea:focus{border-color:#349c72;box-shadow:0 0 0 3px #7bd8a13d}
input[type=color]{background:#fff}
option{color:#173d32;background:#fff}
.field-direction span{color:#167d55}
.slot-tag{background:#e4f4e9;border-color:#b2d6c1;color:#1c5948}
.scoreboard{background:linear-gradient(125deg,#e6f8dc,#dbf3e8);border-color:#a7d5bc;box-shadow:var(--shadow)}
.score-number{color:#18644c}.score-divider{color:#5d9b7e}.score-info{color:#137d66}
.field-assignment{background:#e6f5eb;border-color:#a6d2b8}
.tactics-panel{background:#edf8ef;border-color:#b6dbc7}
.playbook-panel{background:linear-gradient(140deg,#e2f4e8,#f3faf3);border-color:#a8d0b8}
.playbook-explain{background:#fff;border-color:#c5decd;color:#31584c}
.playbook-explain strong,.playbook-explain b{color:#176c4e}
.playbook-explain small{color:#54766a}
.player-edit{background:#eff9f3;border-color:#afd9bd}
.roster-photo{background:#e7f4ec;color:#206249;border-color:#78b892}
.team-logo{background:#e5f2e9}
.notice{background:#e5f6ec;border-color:#a9d7bd;color:#2b654d}
.notice .muted{color:#477563}
.icon-btn{background:#eaf5ed;border-color:#bbd9c7;color:#285e4d}
.auth-outer{background:radial-gradient(circle at 80% 0%,#ccefdc,#ecf6ef 65%)}
.auth-card{background:#fff;border-color:#bbdcc8;box-shadow:0 18px 65px #195f3a1b}
.auth-card p{color:#5c7d70}
.text-link{color:#116f54}
.error{color:#aa2842}.success{color:#1b7f55}
td,th{border-bottom-color:#d8e8de}
th{color:#53796b}
#toast{box-shadow:0 8px 28px #164d362d}
.wizard-progress span{background:#d5e6dc}
.wizard-progress span.on{background:#64ba76}
.selected-card{outline-color:#4ea56a}
/* Keep field token labels and in-field overlays on dark backgrounds. */
.pitch .player-token .name,#live-field .player-token .name{background:#0c292ae8;color:#ffffff;border-color:#709279}
.pitch .player-token .position,#live-field .player-token .position{color:#e9ffd8}
/* Maintain clear tactical ink controls over light UI. */
.board-toolbar button.swatch{background:#eaf4ee!important;background-color:#eaf4ee!important}
.board-toolbar .swatch.selected{outline-color:#1c865f}
.board-toolbar .ink-active{background:#b8ef68!important;color:#102b25!important}
@media(max-width:700px){.sidebar{box-shadow:8px 0 24px #1649353a}.topbar{background:#fff}}

/* v0.5.8 team branding: one theme for coaching and Family Live Board */
:root{--team-primary:#155e54;--team-primary-text:#fff;--team-accent:#b8ef68;--team-accent-text:#163b2d}
.sidebar{background:var(--team-primary)!important;color:var(--team-primary-text)!important;border-color:var(--team-primary)!important}
.sidebar .side-brand strong,.sidebar nav button,.sidebar .sidebar-foot,.sidebar .side-brand small{color:var(--team-primary-text)!important}
.sidebar nav button.active,.sidebar nav button:hover{background:#ffffff30!important;box-shadow:inset 4px 0 var(--team-accent)!important}
.btn.primary{background:var(--team-accent)!important;color:var(--team-accent-text)!important;border-color:var(--team-accent)!important}
.btn.primary:hover{filter:brightness(.93)!important}
.status-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.status-row .roster-photo{width:43px;height:43px;flex:0 0 43px}
.status-info{flex:1;min-width:110px}.status-info small{display:block}
.status-badges{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.status-chip{padding:4px 7px;border-radius:8px;font-size:11px;font-weight:750;white-space:nowrap}
.status-chip.caution{background:#fff0ad;color:#59430b}
.status-chip.dismissal{background:#ffe0e1;color:#922632}
.status-chip.injury{background:#d7effa;color:#185a79}
.status-chip.normal{background:#e1f3e6;color:#216342}
.player-token{position:relative}.marker-card{position:absolute;right:-4px;top:-3px;border-radius:3px;font-size:13px;text-shadow:0 0 2px #222}.marker-card.yellow{color:#f7d12b}.marker-card.red{color:#e83d4d}

.sidebar .text-link{color:var(--team-primary-text)!important;text-decoration:underline}

/* v0.6.0 Sideline Chat */
.chat-thread{height:clamp(310px,50vh,620px);overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--edge);border-radius:14px;background:#f4f8f6}
.chat-line{max-width:85%;align-self:flex-start}.chat-line.mine{align-self:flex-end;text-align:right}
.chat-meta{font-size:11px;color:#49645c;margin:0 5px 5px}.chat-bubble{padding:12px 15px;border:1px solid #c9dad2;background:#fff;border-radius:16px;color:#1b3630;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left}
.chat-line.mine .chat-bubble{background:var(--team-primary);color:var(--team-primary-text);border-color:var(--team-primary)}
.chat-line .btn{margin-top:5px}.chat-compose{display:flex;gap:8px}.chat-compose input{flex:1}.chat-toggle{display:flex;align-items:center;gap:8px;font-size:14px;color:#204a3e}.chat-toggle input{width:auto}.chat-toggle small{font-weight:normal}
@media(max-width:700px){.chat-line{max-width:94%}.chat-compose{gap:5px}.chat-compose .btn{padding:10px}}

.sideline-float{position:fixed;bottom:22px;right:22px;z-index:12;border:0;background:var(--team-primary);color:var(--team-primary-text);padding:13px 18px;border-radius:24px;box-shadow:0 8px 25px #173f3066;font-weight:800;cursor:pointer} .sideline-float:hover{filter:brightness(1.1)}

/* v0.6.1: Compact, phone-friendly Sideline Chat. Keep team branding and moderation intact. */
.chat-page{max-width:1180px;margin-inline:auto}
.chat-page .chat-heading{margin-bottom:12px}
.chat-page .chat-heading p{margin:6px 0 0;font-size:13px}
.chat-toolbar{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:12px}
.chat-toolbar>label{flex:1;max-width:440px}
.chat-toolbar>.btn{white-space:nowrap}
.chat-settings{margin:8px 0 12px}
.chat-room{border:1px solid #c9ded4;border-radius:17px;overflow:hidden;background:#f5f9f7;box-shadow:0 5px 20px #1854480a}
.chat-room .chat-thread{height:clamp(270px,42vh,450px);padding:18px 18px 22px;border:0;border-radius:0;background:transparent;gap:12px;scroll-behavior:smooth;overscroll-behavior:contain}
.chat-room .chat-line{max-width:min(79%,620px);display:flex;flex-direction:column;align-items:flex-start}
.chat-room .chat-line.mine{align-items:flex-end;text-align:right}
.chat-room .chat-meta{display:flex;flex-wrap:wrap;gap:5px 9px;align-items:baseline;font-size:11px;line-height:1.35;color:#557168;margin:0 4px 4px}
.chat-room .chat-meta span{font-weight:400;color:#688079}
.chat-room .chat-line.mine .chat-meta{justify-content:flex-end}
.chat-room .chat-bubble{display:inline-block;max-width:100%;width:fit-content;padding:10px 14px;border-radius:5px 17px 17px 17px;line-height:1.45;font-size:14px;box-shadow:0 1px 2px #0e362016}
.chat-room .chat-line.mine .chat-bubble{border-radius:17px 5px 17px 17px}
.chat-room .chat-line.removed .chat-bubble{opacity:.62;font-style:italic}
.chat-room .chat-remove{align-self:flex-start;opacity:.75;padding:3px 8px;font-size:11px;margin-top:4px}
.chat-room .chat-line.mine .chat-remove{align-self:flex-end}
.chat-room .chat-compose{position:relative;margin:0;padding:12px;background:#fff;border-top:1px solid #cbded5;gap:10px;align-items:center}
.chat-room .chat-compose input{min-height:44px;background:#f7fbf9}
.chat-room .chat-compose .btn{min-height:44px;white-space:nowrap}
.chat-notice{margin:10px 2px 0}
.chat-moderation{margin-top:20px}
.chat-moderation details{border:1px solid #cbded5;border-radius:12px;background:#f5faf7;padding:13px 15px}
.chat-moderation summary{cursor:pointer;font-weight:750;color:#28564d}
.chat-moderation details .stack{margin-top:14px}
@media(max-width:700px){
 .chat-page{padding:13px}
 .chat-page .chat-heading{align-items:start}
 .chat-toolbar{align-items:stretch;flex-direction:column;gap:8px}
 .chat-toolbar>label{max-width:none}
 .chat-toolbar>.btn{align-self:flex-start}
 .chat-room .chat-thread{height:clamp(280px,48dvh,460px);padding:12px;gap:10px}
 .chat-room .chat-line{max-width:91%}
 .chat-room .chat-bubble{font-size:14px;padding:10px 12px}
 .chat-room .chat-compose{padding:9px;gap:6px}
 .chat-room .chat-compose input{font-size:16px}
 .chat-room .chat-compose .btn{padding:10px}
}

/* v0.7.1 - Match location / edit form */
.match-location { display:flex;flex-direction:column;gap:6px;align-items:flex-start;min-width:0;overflow-wrap:anywhere; }
.match-location .btn { margin-top:4px;white-space:normal; }
.scoreboard>.match-location { margin:14px 0 6px; padding:12px 16px;border-radius:12px;background:rgba(255,255,255,.12); }
#match-edit { margin-top:16px; }
#match-edit .btn-row { align-self:end; }
@media(max-width:700px){.match-location{width:100%}#match-edit .btn-row{width:100%}}

/* v0.7.2.1 beta — field-first matchday workflow and dashboard hero */
.match-quick-actions{margin-top:16px;min-width:0}
.match-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.match-action-tile{min-width:0;border:1px solid var(--edge);border-radius:12px;padding:14px;background:var(--panel2)}
.match-action-tile.card{margin:0;box-shadow:none}
.match-action-tile h3{font-size:16px;margin:0 0 12px}
.match-action-tile .subhead:first-of-type{margin-top:0}
.match-action-tile .item{padding:10px}
.match-field-column{min-width:0}
.hero{position:relative;overflow:hidden;min-height:230px}
.hero>div:first-child{position:relative;z-index:2;max-width:62%}
.hero-visual.pitch-hero-art{display:block;position:absolute;z-index:1;inset:0 0 0 auto;width:52%;height:100%;opacity:.92;background-image:linear-gradient(90deg,var(--panel) 0%,transparent 42%),url('/static/ward-34-illustration.webp');background-size:cover;background-position:center 40%;pointer-events:none}
@media(max-width:1100px){.match-actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.match-actions-grid{grid-template-columns:1fr}.hero>div:first-child{max-width:75%}.hero-visual.pitch-hero-art{display:block;width:65%;opacity:.38;background-position:60% center}.hero{min-height:215px}}


/* v0.7.2.2 beta — cinematic graphite / forest green theme, Pi preview */
:root{
 --bg:#f0f0ec;--bg2:#e7e9e5;--panel:#ffffff;--panel2:#f5f6f3;
 --edge:#d5dad5;--text:#202c29;--muted:#61706b;
 --lime:#16634f;--mint:#16634f;--gold:#b19158;
 --shadow:0 10px 28px #20252412;
}
html,body{background:#f0f0ec;color:var(--text)}
.main-wrap{background:linear-gradient(155deg,#f5f5f1 0%,#ededeb 80%,#f7f7f4 100%)}
.sidebar{background:linear-gradient(180deg,#202524 0%,#29332f 58%,#1c3029 100%);border-color:#3b4c45;color:#f5f5f1;box-shadow:4px 0 18px #10171320}
.sidebar .side-brand small,.sidebar .sidebar-foot{color:#bdc7c0}
.sidebar nav button{color:#e3e8e3}
.sidebar nav button.active,.sidebar nav button:hover{background:#ffffff19;color:#fff;box-shadow:inset 3px 0 #b19158}
.sidebar .text-link{color:#d5c09b}
.topbar{background:#fafaf8ee;border-color:#d9dcd7;box-shadow:0 1px 0 #d8dcd6}
.topbar h1,.card h2,.card h3,.section-head h2{color:#26342f}
.eyebrow,.subhead{color:#16634f}
.card{background:linear-gradient(160deg,#fff,#fbfbf9);border-color:#d7ddd7}
.hero{background:linear-gradient(110deg,#202524 0%,#28312d 60%,#202524 100%);border-color:#46544d;box-shadow:0 14px 38px #17201b22}
.hero h2{color:#fff}.hero p{color:#d0d8d1}.hero .eyebrow{color:#d1b57c}
.hero-visual.pitch-hero-art{opacity:1;background-image:linear-gradient(90deg,#202524 0%,#202524 1%,rgba(32,37,36,.96) 7%,rgba(32,37,36,.45) 34%,transparent 70%),url('/static/ward-34-illustration.webp');background-position:center,center 40%}
.hero .btn{background:#303b35;color:#f5f5f1;border-color:#66746a}
.hero .btn.primary{background:#16634f;color:#fff;border-color:#287e65}
.hero .btn:hover{background:#425047;border-color:#8a9a8e}
.hero .btn.primary:hover{background:#20765e}
.btn{background:#f6f7f4;border-color:#c5d0c8;color:#2d4940}
.btn:hover{background:#e9f0ea;border-color:#93b09e}
.btn.primary{background:#16634f;color:#fff;border-color:#16634f;box-shadow:none}
.btn.primary:hover{background:#205e4e;border-color:#205e4e}
.pill{background:#e9eee8;color:#2c604b;border-color:#c4d2c5}
.pill.live{background:#e6eee6;color:#16634f;border-color:#8bb8a3}
.stat{background:#fff;border-color:#d6ddd6}.stat .number{color:#16634f}
.item{background:#f7f8f5;border-color:#dce2da}
.scoreboard{background:linear-gradient(145deg,#fff 0%,#f4f5f2 100%);border-color:#cdd7ce;box-shadow:0 12px 28px #2025240c}
.score-number{color:#16634f}.score-divider{color:#788b80}.score-info{color:#4a6155}
.scoreboard>.match-location{background:#f0f3ef}
.notice{background:#edf3ed;border-color:#c7d9ca;color:#2d5b46}
.round-avatar{background:#e1ebe2;color:#16634f}
.auth-outer{background:radial-gradient(circle at 70% 0%,#49544e,#202524 68%)}
.auth-card{background:#fff;border-color:#d1d9d2}
.text-link{color:#16634f}
@media(max-width:700px){
 .hero{min-height:245px;background:#202524}
 .hero>div:first-child{max-width:92%}
 .hero-visual.pitch-hero-art{width:100%;opacity:.28;background-image:linear-gradient(90deg,#202524 0%,rgba(32,37,36,.75) 40%,rgba(32,37,36,.3) 100%),url('/static/ward-34-illustration.webp');background-position:center,65% center}
 .hero h2,.hero p,.hero .eyebrow{position:relative;text-shadow:0 1px 3px #0008}
}

/* 0.7.2.3: keep disciplinary cards attached to the avatar itself */
.player-token .disc,.match-position .disc{position:relative;overflow:visible!important}
.player-token .disc .marker-card,.match-position .disc .marker-card{position:absolute;top:-7px;right:-8px;z-index:8;display:block;width:13px;height:20px;border:1px solid #fff9;border-radius:2px;font-size:0;box-shadow:0 2px 5px #0008;pointer-events:none}
.player-token .disc .marker-card.yellow,.match-position .disc .marker-card.yellow{background:#f5c529}
.player-token .disc .marker-card.red,.match-position .disc .marker-card.red{background:#e8424e}
/* Stable score baselines, regardless of team name wrapping */
.score-grid-fixed{grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:end}
.score-grid-fixed .score-side{min-width:0;display:grid;grid-template-rows:minmax(48px,auto) auto;align-items:end;justify-items:center;gap:8px}
.score-grid-fixed .score-team{display:flex;align-items:end;justify-content:center;min-height:48px;max-width:100%;text-align:center;line-height:1.2;overflow-wrap:anywhere}
.score-grid-fixed .score-number{font-variant-numeric:tabular-nums;line-height:1.05}
.score-grid-fixed .score-divider{align-self:end;line-height:1.05}
.parent-match-clock{display:flex;flex-direction:column;align-items:center;gap:4px;margin:16px auto 8px;text-align:center}
.parent-match-clock strong{font-size:clamp(26px,5vw,38px);font-variant-numeric:tabular-nums;color:var(--text)}
.parent-match-clock span{font-weight:750;font-size:12px;color:var(--gold)}
.parent-match-clock small{font-size:11px;max-width:430px;line-height:1.4;color:var(--muted)}
/* Reveal more of the black-and-white WARD artwork without changing the palette */
.hero-visual.pitch-hero-art{opacity:1;background-image:linear-gradient(90deg,#202524 0%,rgba(32,37,36,.94) 8%,rgba(32,37,36,.36) 35%,rgba(32,37,36,.05) 80%),url('/static/ward-34-illustration.webp');filter:brightness(1.22) contrast(1.04)}
@media(max-width:700px){.hero-visual.pitch-hero-art{opacity:.56;filter:brightness(1.35) contrast(1.02)}}

/* v0.7.2.4-beta — full-width parent match activity below pitch */
.parent-live-sections{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-top:18px}
.parent-live-sections>.card{min-width:0}
.parent-contribution-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin-top:12px}
.parent-event-card summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none}
.parent-event-card summary::-webkit-details-marker{display:none}
.parent-event-card summary::after{content:'⌄';font-size:1.2rem;color:#16634f}
.parent-event-card[open] summary::after{content:'⌃'}
.parent-event-card summary h2{margin:0}
@media(max-width:650px){.parent-contribution-grid{grid-template-columns:1fr}}

/* v0.7.2.6 per-user unread notifications */
.chat-unread-badge{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 5px;margin-left:7px;border-radius:999px;background:#c43c39;color:#fff;font-weight:800;font-size:12px;line-height:1;vertical-align:middle;box-shadow:0 1px 4px #0002}
.chat-unread-badge[hidden]{display:none!important}

/* v0.7.2.7: Advanced Player Statistics — responsive coach roster view */
.stats-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:end;justify-content:space-between;margin:14px 0 16px}
.stats-toolbar label{min-width:170px;max-width:250px}
.stats-toolbar .btn{white-space:nowrap}
.season-stat-table{width:100%;border-collapse:collapse;min-width:630px;font-variant-numeric:tabular-nums}
.season-stat-table th,.season-stat-table td{padding:10px 11px;border-bottom:1px solid var(--edge);text-align:right;white-space:nowrap}
.season-stat-table th:first-child,.season-stat-table td:first-child{text-align:left;min-width:155px}
.season-stat-table th{color:var(--muted);font-size:12px;font-weight:750;text-transform:uppercase;letter-spacing:.025em}
.season-stat-table td small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.season-stat-table tbody tr:hover{background:#e8f0e9}
.season-stat-table .stats-selected-row{background:#e9f3eb}
.season-stat-table .stats-selected-row td:first-child{box-shadow:inset 3px 0 var(--team-primary,#16634f)}
.stats-player-profile{border-top:1px solid var(--edge);margin-top:17px;padding-top:16px}
.stats-player-profile h3{margin:0 0 4px}
.stats-player-profile .stats.mini{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:8px;margin:12px 0}
.stats-player-profile .stats.mini .stat{padding:10px;min-height:68px}
.stats-player-profile .stats.mini .number{font-size:22px}
.stats-player-profile .stats.mini span{font-size:11px}
@media(max-width:650px){.stats-toolbar{align-items:stretch}.stats-toolbar label{max-width:none;flex:1}.stats-player-profile .stats.mini{grid-template-columns:repeat(2,minmax(0,1fr))}.season-stat-table th,.season-stat-table td{padding:9px 8px}}

/* v0.7.2.8: touch-first roster picker for goals and goalkeeper saves. */
.pitch-roster-dialog{position:fixed;inset:0;margin:auto;width:min(520px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:min(85dvh,750px);overflow:auto;box-sizing:border-box;padding:24px;background:var(--card,#fff);color:var(--text,#17242b);border:1px solid var(--edge,#d8e0dc);border-radius:18px;box-shadow:0 16px 70px #0005;z-index:1100}
.pitch-roster-dialog::backdrop{background:rgba(6,22,20,.68)}
.pitch-roster-form{display:flex;flex-direction:column;gap:15px}
.pitch-roster-form h2{margin:0;font-size:1.35rem}
.pitch-roster-form .field-note{margin:0}
.pitch-roster-form label{display:flex;flex-direction:column;gap:7px;font-weight:650}
.pitch-roster-form select{display:block;width:100%;min-height:52px;padding:10px 14px;font-size:16px;background:#fff;color:#17242b;border:1px solid #a9bdb5;border-radius:10px}
.pitch-picker-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.pitch-picker-actions .btn{min-height:45px}
.pitch-picker-error{color:#b42e32;font-weight:650;margin:0;min-height:1px}
@media(max-width:650px){.pitch-roster-dialog{padding:18px}.pitch-picker-actions .btn{flex:1}}


/* v0.7.2.9: stats grid fit + visible player details, no hidden horizontal actions.
   The full stat table remains visible on roomy desktops; constrained views
   become stacked, touch-friendly rows rather than sideways-scrolling tables. */
#season-stats-section,#season-stats-body,#stats-player-details,.stats-summary-wrap,.stats-history-wrap{min-width:0;max-width:100%}
#season-stats-section{overflow:hidden}
.season-stat-table.season-stat-summary{width:100%;min-width:0;table-layout:fixed}
.season-stat-summary th,.season-stat-summary td{padding:9px 5px;font-size:12px;white-space:nowrap;min-width:0}
.season-stat-summary th{font-size:10px}
.season-stat-summary th:first-child,.season-stat-summary td:first-child{width:25%;min-width:0;white-space:normal;overflow-wrap:anywhere}
.season-stat-summary th:last-child,.season-stat-summary td:last-child{width:14%;text-align:right}
.season-stat-summary td:last-child .btn{white-space:nowrap;padding:7px 10px;font-size:12px;max-width:100%}
.season-stat-summary td:not(:first-child):not(:last-child){font-variant-numeric:tabular-nums}
/* Tablet/small laptop: keep player name and Details on the SAME line. */
@media(max-width:1200px){
 .stats-summary-wrap,.stats-history-wrap{overflow-x:hidden}
 .season-stat-table.season-stat-summary,.season-stat-table.season-stat-history{display:block;table-layout:auto;min-width:0;width:100%}
 .season-stat-summary thead,.season-stat-history thead{display:none}
 .season-stat-summary tbody,.season-stat-history tbody{display:grid;gap:10px;width:100%}
 .season-stat-summary tbody tr,.season-stat-history tbody tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 8px;width:100%;max-width:100%;padding:10px 12px;border:1px solid var(--edge);border-radius:12px;box-sizing:border-box;background:#fff}
 .season-stat-summary tbody tr.stats-selected-row{background:#e9f3eb;border-color:#a0c5ab}
 .season-stat-summary tbody td,.season-stat-history tbody td{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;width:auto;min-width:0;max-width:100%;padding:7px 2px;border:0;white-space:normal;text-align:left;font-size:13px;overflow-wrap:anywhere}
 .season-stat-summary tbody td[data-label]::before,.season-stat-history tbody td[data-label]::before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.025em}
 .season-stat-summary tbody td:first-child,.season-stat-history tbody td:first-child{grid-column:1/4;grid-row:1;width:auto;min-width:0;font-size:14px;padding:4px 2px 9px;border-bottom:1px solid var(--edge);box-shadow:none}
 .season-stat-summary tbody td:last-child{grid-column:4;grid-row:1;align-items:flex-end;justify-content:flex-start;width:auto;padding:4px 2px 9px;border-bottom:1px solid var(--edge)}
 .season-stat-summary tbody td:last-child .btn{min-height:38px;padding:8px 12px;font-size:13px}
 .season-stat-history tbody td:first-child{grid-column:1/-1;grid-row:1}
 .season-stat-history tbody td:last-child{width:auto;text-align:left}
}
@media(max-width:650px){
 .season-stat-summary tbody tr,.season-stat-history tbody tr{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 5px;padding:9px 10px}
 .season-stat-summary tbody td:first-child{grid-column:1/3}
 .season-stat-summary tbody td:last-child{grid-column:3;grid-row:1}
 .season-stat-summary tbody td,.season-stat-history tbody td{font-size:12px}
}
@media(max-width:380px){
 .season-stat-summary tbody tr,.season-stat-history tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 .season-stat-summary tbody td:first-child{grid-column:1}
 .season-stat-summary tbody td:last-child{grid-column:2;grid-row:1}
}

/* v0.7.2.9 hotfix — iPad portrait dashboard hero framing.
   Only adjust the background IMAGE focal point (second background layer).
   Keep the dark overlay, hero card, desktop and landscape unchanged. */
@media (min-width:701px) and (max-width:1100px) and (orientation:portrait) {
  .hero-visual.pitch-hero-art {
    background-position: center, 100% 40%;
  }
}

/* v0.7.3.2: always-accessible mobile account controls and saved tactic importer */
#mobile-logout{display:none}
.advisor-studio-import{padding:14px 16px;border:1px solid var(--edge);border-radius:12px;background:var(--panel2)}
.advisor-studio-import .section-head{margin-bottom:5px}
.advisor-studio-import .section-head h2{font-size:16px;margin:0}
.advisor-studio-import .btn-row{margin-top:12px}
.advisor-studio-import select{flex:1 1 230px;min-width:0;max-width:100%}
@media(max-width:700px){
 #mobile-logout{display:inline-flex;min-height:40px;align-items:center;justify-content:center;white-space:nowrap}
 .topbar .top-right{gap:7px}
 .topbar .round-avatar{display:none}
 .sidebar{height:100dvh;max-height:100dvh;overflow:hidden;padding-bottom:max(12px,env(safe-area-inset-bottom))}
 .sidebar nav{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:start;-webkit-overflow-scrolling:touch}
 .sidebar-foot{flex:0 0 auto;padding:9px 12px 3px}
 .advisor-studio-import .btn-row{align-items:stretch}
 .advisor-studio-import select{flex-basis:100%}
 .advisor-studio-import .btn{width:100%}
}

/* v0.8.0-alpha1: persistent multi-team picker in coach/parent header. */
.top-team-picker{display:flex;flex-direction:column;gap:2px;min-width:125px;max-width:220px}
.top-team-picker span{font-size:9px;letter-spacing:.08em;color:var(--muted);font-weight:850}
.top-team-picker select{max-width:100%;min-height:36px;padding:6px 9px;font-size:13px;background:#fff;color:#26342f}
.top-team-picker[hidden]{display:none!important}
@media(max-width:700px){.top-team-picker{min-width:95px;max-width:min(39vw,165px)}.top-team-picker select{font-size:12px;padding:5px}.top-team-picker span{font-size:8px}.top-right{gap:7px}.topbar .round-avatar{display:none}}


/* v0.8.0-alpha2 — charcoal (#343637) + gold (#d9bd08) default palette.
   Avoid touching turf, player kit markers, red/yellow disciplinary signals,
   or custom team branding. UI ink and accent are set by applyTeamTheme(). */
:root {
  --pitch-ui-ink:#343637;--pitch-ui-accent:#d9bd08;
  --team-primary:#343637;--team-primary-text:#ffffff;
  --team-accent:#d9bd08;--team-accent-text:#272721;
  --lime:#343637;--mint:#343637;--gold:#d9bd08;
}
.sidebar{background:var(--team-primary)!important;border-color:var(--team-primary)!important}
.sidebar nav button.active,.sidebar nav button:hover{box-shadow:inset 4px 0 var(--team-accent)!important}
.brand-icon,.brandmark{display:inline-flex;align-items:center;justify-content:center;background:transparent!important;color:inherit!important;padding:0!important;overflow:visible;border-radius:50%;flex:0 0 auto}
.brand-icon{height:57px;width:57px;font-size:0}
.brandmark{height:72px;width:72px;font-size:0}
.brand-icon img,.brandmark img{display:block;height:100%;width:100%;object-fit:contain}
/* Default text formerly styled in forest green now uses charcoal. */
.eyebrow,.subhead,.stat .number,.score-number,.score-info,.score-divider,
.field-direction span,.parent-event-card summary::after,.season-stat-table th,
.stat .number,.stats-player-profile .number,.round-avatar,.text-link,
.playbook-explain strong,.playbook-explain b,.notice,.notice .muted,
.pill,.section-head h2,.field-note,.slot-tag,.clock-readout,
.parent-match-clock strong,.parent-match-clock span,
.season-stat-table .stats-selected-row td:first-child{
  color:var(--pitch-ui-ink);
}
.stat .number,.stats-player-profile .number{color:var(--pitch-ui-ink,#343637)!important}
.btn.primary{background:var(--team-accent)!important;border-color:var(--team-accent)!important;color:var(--team-accent-text)!important}
.btn.primary:hover{filter:brightness(.93)!important}
.pill{background:color-mix(in srgb,var(--team-accent,#d9bd08) 17%,white);border-color:var(--team-accent,#d9bd08);color:var(--pitch-ui-ink,#343637)}
.pill.live{background:#f8e9e9;color:#92383c;border-color:#e0a9ae}
.selected-card,.board-toolbar .swatch.selected{outline-color:var(--pitch-ui-accent)}
.top-team-picker select:focus-visible,button:focus-visible,input:focus-visible,
select:focus-visible,textarea:focus-visible{outline:2px solid var(--pitch-ui-accent);outline-offset:2px}
.item:hover{border-color:#b8b8ad}
.topbar .eyebrow{color:var(--pitch-ui-ink)}
.auth-card .eyebrow{color:#343637}
.auth-outer{background:radial-gradient(circle at 75% 0%,#5b5d5a,#282a29 66%)}
.auth-card{border-color:#c8c8c0}
.hero .eyebrow{color:#e3c949}
.hero .btn.primary{background:var(--team-accent)!important;color:var(--team-accent-text)!important;border-color:var(--team-accent)!important}
.chat-line.mine .chat-bubble{background:var(--team-primary);color:var(--team-primary-text)}
/* Form fields, supporting pages and remaining legacy green links use default UI ink. */
.playbook-panel .playbook-explain strong,.playbook-panel .playbook-explain b,
.stats-toolbar label,.season-stat-table .stats-selected-row td:first-child,
.chat-toolbar .btn,.chat-moderation summary,.field-direction span,
.playbook-panel .section-head h2,.parent-match-clock span,
.score-info,.notice,.notice strong,.notice small,.auth-card a,
#advisor-root .intro h1{color:var(--pitch-ui-ink,#343637)}
.chat-unread-badge{background:#b83b40;color:white}
/* Keep status colors semantic; keep turf green for match readability. */
.status-chip.normal,.status-chip.injury,.status-chip.caution,.status-chip.dismissal,
.marker-card.yellow,.marker-card.red,.pitch,.pitch-lines,.pitch-markers{filter:none}
@media(max-width:700px){.brand-icon{height:48px;width:48px}.side-brand{gap:8px}}

/* v0.8.0-alpha3: age badges and family membership management */
.pitch-age-chip{display:inline-block;margin-left:7px;padding:3px 8px;border-radius:999px;border:1px solid #cfbd3e;background:#f4efd1;color:#343637;font-size:11px;font-weight:800;vertical-align:middle}
.pitch-family-record{align-items:flex-start}.pitch-family-main{flex:1;min-width:0}.pitch-family-members{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.pitch-family-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid #ccd2cd;border-radius:9px;background:#f7f8f4;font-size:12px;color:#343637}.pitch-remove-member{border:1px solid #bfa4a4;background:#fff4f4;color:#863a39;border-radius:7px;padding:5px 8px;font-size:11px;font-weight:700}.pitch-remove-member:focus-visible{outline:3px solid #d9bd08;outline-offset:2px}
@media(max-width:700px){.pitch-family-record{flex-direction:column}.pitch-family-members{flex-direction:column;align-items:flex-start}}

/* v0.8.0-alpha4 onboarding: clear team chooser and activation delivery outcome. */
#parent-team-choice[hidden],#parent-team-help[hidden]{display:none!important}
#invite-result{border:2px solid #9a8228;padding:18px;scroll-margin-top:72px;overflow-wrap:anywhere}
#invite-result input{width:100%;font-size:14px;margin-top:8px}
#invite-result button{margin-top:12px}

/* v0.8.0-alpha6 — visible support contact on login and authenticated screens. */
.auth-support{margin-top:22px;padding-top:16px;border-top:1px solid var(--edge,#d5dad5);font-size:13px;line-height:1.6;color:#44504d}
.auth-support a{display:inline-block;font-weight:750;color:#343637;text-decoration:underline;text-underline-offset:3px}
.auth-support small{display:block;color:#596660;font-size:12px;overflow-wrap:anywhere}
.pitch-support{display:grid;gap:4px;padding-bottom:11px;margin-bottom:10px;border-bottom:1px solid #ffffff33;line-height:1.4}
.sidebar .pitch-support-link{color:var(--team-primary-text,#fff)!important;display:flex;align-items:center;gap:8px;font-weight:750;font-size:13px;text-decoration:underline;text-underline-offset:3px}
.sidebar .pitch-support-address{color:var(--team-primary-text,#fff)!important;font-size:11px;opacity:.9;overflow-wrap:anywhere;line-height:1.5}
.auth-support a:focus-visible,.pitch-support a:focus-visible{outline:2px solid #d9bd08;outline-offset:3px}
@media(max-width:700px){.pitch-support{padding-top:4px}.auth-support{margin-top:18px}}


/* v0.8.0-alpha7: keep mobile navigation AND sign out visible on small phones.
   Team selector moves below page title instead of crowding the logout button.
   Desktop/tablet layouts remain untouched. */
@media (max-width:700px) {
  .topbar {
    display:grid;
    grid-template-columns:42px minmax(0,1fr);
    column-gap:10px;row-gap:12px;align-items:center;
    padding:12px 14px;
  }
  #mobile-nav {
    display:inline-flex;align-items:center;justify-content:center;
    width:42px;min-height:44px;grid-column:1;grid-row:1;
  }
  .topbar > div:nth-child(2) {grid-column:2;grid-row:1;min-width:0;}
  .topbar > div:nth-child(2) .eyebrow {
    font-size:8px;line-height:1.5;overflow-wrap:anywhere;
  }
  .topbar > div:nth-child(2) h1 {font-size:clamp(19px,5vw,24px);line-height:1.2;}
  .topbar .top-right {
    grid-column:1 / -1;grid-row:2;display:flex;
    justify-content:space-between;align-items:center;
    width:100%;min-width:0;gap:10px;
  }
  .topbar .top-team-picker:not([hidden]) {flex:1 1 auto;min-width:0;max-width:none;}
  .topbar .top-team-picker select {width:100%;min-height:44px;font-size:14px;}
  .topbar .top-right #mobile-logout {
    display:inline-flex!important;flex:0 0 auto;
    min-height:44px;min-width:80px;padding:10px 12px;
    align-items:center;justify-content:center;
    visibility:visible;white-space:nowrap;
    position:relative;z-index:1;
    background:var(--team-accent,#d9bd08)!important;
    color:var(--team-accent-text,#272721)!important;
    border:1px solid var(--team-accent,#d9bd08)!important;
  }
  .sidebar {
    height:100dvh;max-height:100dvh;
    display:flex;flex-direction:column;
    padding-bottom:max(14px,env(safe-area-inset-bottom));
  }
  .sidebar nav {flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;}
  .sidebar-foot {flex:0 0 auto;}
}
@media (max-width:360px) {
  .topbar {padding:10px 9px;column-gap:8px;}
  .topbar .top-right #mobile-logout {min-width:72px;padding:10px;}
}

/* Alpha9.5: keep account/help controls reachable at short desktop heights. */
@media (min-width:701px) {
 .sidebar {height:100vh;height:100dvh;max-height:100dvh;overflow:hidden;display:flex;flex-direction:column;}
 .sidebar .side-brand {flex:0 0 auto;}
 .sidebar nav {flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:start;-webkit-overflow-scrolling:touch;}
 .sidebar .sidebar-foot {flex:0 0 auto;margin-top:0;padding:9px 12px 3px;}
}


/* Alpha9.6 — persistent command bar across scrolling pages.
   Works in mobile Safari/PWA and on desktop without altering the document scroller.
   Sidebar drawer remains above this bar (sidebar z-index:20 on mobile). */
.main-wrap {min-width:0;}
.main-wrap > .topbar {
  position:sticky;
  top:0;
  z-index:12;
  background:#fafaf8;
  box-shadow:0 2px 9px #18272220;
  isolation:isolate;
}
/* Keyboard anchors and focus targets should not disappear beneath the bar. */
html {scroll-padding-top:160px;}
@media (max-width:700px) {
  .main-wrap > .topbar {
    top:0;
    padding-top:max(10px, env(safe-area-inset-top));
    box-shadow:0 3px 12px #18272220;
  }
  /* Preserve the alpha7 two-row layout: menu and title, then team and sign-out. */
  .topbar .top-right {min-width:0;}
  .topbar .top-team-picker:not([hidden]) {min-width:0;}
  .topbar .top-team-picker select {max-width:100%;}
  .sidebar.open {z-index:20;}
  html {scroll-padding-top:155px;}
}
@media (max-width:360px) {
  .main-wrap > .topbar {padding-left:9px;padding-right:9px;}
}

/* Alpha9.7 — read-only parent pitch must not capture page-scrolling gestures.
   Do not apply this to #field: coaches need pointer drawing/dragging there. */
#live-field,
#live-field .pitch-lines,
#live-field .pitch-markers,
#live-field .player-token {
  touch-action:pan-y !important;
}
#live-field .player-token { pointer-events:none !important; }
/* Parent board uses intrinsic widths so small phones never require zooming out.
   Keep user pinch-zoom available for accessibility. */
@media(max-width:700px) {
  html, body, #shell, .main-wrap, main, #content, #live-view-content,
  #live-view-content .card, #live-view-content .scoreboard,
  #live-view-content .parent-live-sections { min-width:0; max-width:100%; }
  #live-view-content .score-grid {grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:4px;}
  #live-view-content .score-grid > div {min-width:0;}
  #live-view-content .score-team, #live-view-content .score-info,
  #live-view-content .parent-match-clock small {overflow-wrap:anywhere;}
  #live-view-content #live-field {width:100%;max-width:100%;box-sizing:border-box;}
  #live-view-content .parent-live-sections > * {min-width:0;max-width:100%;}
}

/* Alpha9.8 — visible tablet sign-out, including iPad portrait/landscape.
   Keep regular desktop sidebar sign-out and working phone topbar unchanged.
   No device sniffing: tablet-sized viewports get a touch-sized exit. */
@media (min-width:701px) and (max-width:1366px) {
  .topbar .top-right #mobile-logout {
    display:inline-flex!important;
    flex:0 0 auto;
    min-height:44px;
    min-width:86px;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
    visibility:visible;
  }
  .topbar .top-right {min-width:0;gap:9px;}
  .topbar .top-team-picker {min-width:0;max-width:min(32vw,310px);}
  .topbar .round-avatar {display:none;}
}
@media (min-width:701px) and (max-width:900px) {
  .topbar .eyebrow {font-size:8px;}
  .topbar #account-name {display:none;}
  .topbar {gap:8px;padding:14px 12px;}
  .topbar h1 {font-size:21px;}
  .topbar .top-team-picker {max-width:175px;}
}

/* Alpha9.9.2: parent contacts sit on a dedicated, responsive row. */
.pitch-family-meta{display:block;margin-top:4px}
.pitch-family-contact{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:10px;padding:10px 12px;background:#edf3ee;border:1px solid #d7e2d9;border-radius:10px}
.pitch-family-contact-details{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;min-width:0}
.pitch-contact-label{font-size:11px;text-transform:uppercase;letter-spacing:.07em;font-weight:800;color:#55685c}
.pitch-contact-address{font-size:13px;overflow-wrap:anywhere;color:#20352a}
.pitch-contact-address em{font-style:normal;color:#68766d}
.pitch-contact-status{font-size:11px;font-weight:700;padding:3px 7px;border-radius:99px}
.pitch-contact-verified{background:#d7efdb;color:#1b6a38}
.pitch-contact-unverified{background:#f5e8c6;color:#77551a}
.pitch-family-contact>.btn{flex-shrink:0}
@media(max-width:520px){.pitch-family-contact{align-items:stretch}.pitch-family-contact-details{width:100%}.pitch-family-contact>.btn{align-self:flex-start}}

/* BEGIN PITCH SIDEBAR GOLD PATCH alpha10.1 */
/* P.I.T.C.H. sidebar navigation polish — v0.8.0-alpha10.1; CSS-only */
.sidebar nav {gap:8px;padding:3px 2px 8px;}
.sidebar nav button {
  display:flex;align-items:center;width:100%;min-height:44px;
  padding:11px 12px;border:1px solid rgba(222,198,145,.34)!important;
  border-radius:10px;background:rgba(9,22,19,.23)!important;
  color:var(--team-primary-text,#f5f5f1)!important;
  box-shadow:0 2px 5px rgba(0,0,0,.10);
  font-size:13px;font-weight:720;line-height:1.35;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.sidebar nav button span {margin-left:12px;min-width:0;}
.sidebar nav button:hover {
  background:rgba(245,201,104,.15)!important;
  border-color:#e0bd78!important;
  box-shadow:inset 3px 0 #e5bd70,0 3px 10px rgba(0,0,0,.14)!important;
  transform:translateX(2px);
}
.sidebar nav button.active,
.sidebar nav button.active:hover {
  background:linear-gradient(90deg,rgba(245,201,104,.27),rgba(245,201,104,.09))!important;
  border-color:#f0c779!important;
  color:#fff5d9!important;
  box-shadow:inset 4px 0 #f5c968,0 0 0 1px rgba(245,201,104,.18),0 3px 12px rgba(0,0,0,.15)!important;
  transform:none;
}
.sidebar nav button:focus-visible {outline:2px solid #f5c968;outline-offset:2px;}
.sidebar nav button[hidden] {display:none!important;}
@media (prefers-reduced-motion:reduce){.sidebar nav button{transition:none}.sidebar nav button:hover{transform:none}}
/* END PITCH SIDEBAR GOLD PATCH alpha10.1 */


/* PITCH WAR ROOM SUBTLE CARD ACCENTS START */

/* Preserve the application's native light card backgrounds
   and text colors. Add only restrained visual accents. */

#main:has(#draw-canvas) .layout-2 > .card,
#main:has(#draw-canvas) .layout-2 > .stack > .card {
    border-radius: 14px;
    border-top-width: 3px;
    border-top-style: solid;
    box-shadow: 0 3px 12px rgba(20, 45, 35, .07);
}

/* Digital Battleground — green */
#main:has(#draw-canvas) .layout-2 > .card {
    border-top-color: #79B89A;
}

/* Lineup & Subs — blue */
#main:has(#draw-canvas) .layout-2 > .stack > .card:nth-child(1) {
    border-top-color: #82B3D5;
}

/* Playing Time — amber */
#main:has(#draw-canvas) .layout-2 > .stack > .card:nth-child(2) {
    border-top-color: #D9BB7C;
}

/* Player Status — rose */
#main:has(#draw-canvas) .layout-2 > .stack > .card:nth-child(3) {
    border-top-color: #D8A1AF;
}

/* Match Actions — slate */
#main:has(#draw-canvas) .layout-2 > .stack > .card:nth-child(4) {
    border-top-color: #ABBCC2;
}

/* Goalkeeper Saves — teal */
#main:has(#draw-canvas) .layout-2 > .stack > .card:nth-child(5) {
    border-top-color: #85C6BF;
}

/* Match Contributions — violet */
#main:has(#draw-canvas) .layout-2 > .stack > .card:nth-child(6) {
    border-top-color: #B6A6D9;
}

/* Match Event Timeline — rose */
#main:has(#draw-canvas) .layout-2 > .stack > .card:nth-child(7) {
    border-top-color: #D8A1AF;
}

/* Clearer spacing between stacked sections */
@media (max-width: 760px) {
    #main:has(#draw-canvas) .layout-2 > .stack {
        gap: 16px;
    }
}

/* PITCH WAR ROOM SUBTLE CARD ACCENTS END */

/* alpha11: coach War Room collapsible cards; retain existing light-card theme. */
#main .pitch-collapsible-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
#main .pitch-card-toggle{margin-left:auto;flex:0 0 auto;border:1px solid rgba(80,105,110,.28);border-radius:9px;background:transparent;color:inherit;font:inherit;font-size:18px;line-height:1;min-width:36px;min-height:36px;cursor:pointer}
#main .pitch-card-toggle:focus-visible{outline:3px solid #4196c3;outline-offset:2px}
#main .pitch-card-collapsed > :not(.pitch-collapsible-heading){display:none!important}
@media(max-width:700px){#main .pitch-card-toggle{min-width:44px;min-height:44px}}

/* PITCH_PARENT_GOAL_CELEBRATION_V1 */
.parent-goal-pref{display:flex;align-items:center;gap:10px;font-size:13px;margin:0 0 10px;padding:9px 12px;border-radius:10px;background:rgba(110,140,125,.1)}
.parent-goal-pref input{width:18px;height:18px;accent-color:#287e56}
.parent-goal-overlay{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:20px;background:rgba(5,20,15,.76);backdrop-filter:blur(5px);animation:parent-goal-fade .2s ease-out}
.parent-goal-panel{position:relative;width:min(100%,440px);padding:35px 20px 28px;text-align:center;border:2px solid #d6b34c;border-radius:24px;color:#f7fff9;background:radial-gradient(circle at 50% 0%,#24664b,#0e2b21 75%);box-shadow:0 20px 80px #0008;animation:parent-goal-pop .35s ease-out}
.parent-goal-ball{font-size:64px;line-height:1.2;animation:parent-goal-bounce .7s ease-out}
.parent-goal-title{font-size:clamp(48px,13vw,76px);font-weight:900;letter-spacing:.08em;line-height:1.1;color:#f2d061;text-shadow:0 4px 20px #0007}
.parent-goal-team{font-size:clamp(18px,5vw,25px);font-weight:800;margin-top:12px}
.parent-goal-score{font-size:clamp(38px,10vw,54px);font-weight:900;color:#f2d061;margin:10px 0}
.parent-goal-scorer{font-size:19px;font-weight:800}.parent-goal-assist{margin-top:6px;font-size:15px;color:#c7e1d0}
.parent-goal-close{margin-top:22px;padding:9px 20px;border:1px solid #a8c9b3;border-radius:10px;background:transparent;color:#fff;cursor:pointer}
@keyframes parent-goal-fade{from{opacity:0}to{opacity:1}}
@keyframes parent-goal-pop{from{transform:scale(.88);opacity:.3}to{transform:scale(1);opacity:1}}
@keyframes parent-goal-bounce{0%{transform:translateY(-24px) rotate(-12deg)}60%{transform:translateY(5px)}100%{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.parent-goal-overlay,.parent-goal-panel,.parent-goal-ball{animation:none!important;backdrop-filter:none}}

/* PITCH_PARENT_FINAL_WHISTLE_V1 */
.parent-final-overlay{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:20px;background:rgba(5,20,15,.82);backdrop-filter:blur(5px);animation:parent-goal-fade .2s ease-out}
.parent-final-panel{width:min(100%,460px);padding:30px 22px;text-align:center;border:2px solid #8eb6a0;border-radius:24px;color:#f7fff9;background:radial-gradient(circle at 50% 0%,#22533f,#102820 78%);box-shadow:0 20px 80px #0009;animation:parent-goal-pop .35s ease-out}
.parent-final-panel.parent-final-won{border-color:#f0c84f;background:radial-gradient(circle at 50% 0%,#2b6446,#0d2b21 78%)}
.parent-final-eyebrow{font-size:12px;font-weight:800;letter-spacing:.13em;color:#c1d9ca}
.parent-final-symbol{font-size:70px;line-height:1.5}
.parent-final-title{font-size:clamp(36px,11vw,62px);font-weight:900;line-height:1.1;letter-spacing:.05em;color:#f0c84f}
.parent-final-team{font-size:20px;font-weight:800;margin-top:12px}
.parent-final-score{font-size:clamp(40px,12vw,60px);font-weight:900;color:#f0c84f;margin:12px 0}
.parent-final-opponent{font-size:14px;color:#c1d9ca}
.parent-final-close{margin-top:24px;padding:10px 24px;border:1px solid #b6d1bf;border-radius:10px;background:transparent;color:#fff;cursor:pointer}
@media(prefers-reduced-motion:reduce){.parent-final-overlay,.parent-final-panel{animation:none!important;backdrop-filter:none}}

/* PITCH_TEAM_SOCIAL_V1 */
.team-social-links .btn-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
#team-social-settings .form-grid input[type=checkbox]{width:auto;margin-right:8px;accent-color:#3b9068}
#team-social-settings .form-grid label.full{min-width:0}

/* P.I.T.C.H. end-game action: prominent, below scoreboard */
.end-game-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:16px 20px;border:1px solid #a64b57;border-radius:15px;background:rgba(135,35,48,.10)}
.end-game-copy{flex:1 1 250px;min-width:0}
.end-game-copy strong{font-size:15px}
.end-game-copy p{font-size:12px;line-height:1.5;margin:5px 0 0;color:var(--muted)}
.btn.end-game-btn{background:#b42332;border-color:#d45260;color:#fff;font-weight:850;padding:13px 18px;white-space:normal;min-height:46px}
.btn.end-game-btn:hover:not(:disabled){background:#d02c3d}
@media(max-width:700px){.end-game-panel{padding:14px}.btn.end-game-btn{width:100%}}

/* PITCH ACCESS ALERTS v1 */
.pitch-access-badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;height:1.5rem;padding:0 .35rem;margin-left:auto;border-radius:999px;background:#bc2438;color:#fff;font-size:.78rem;font-weight:800;line-height:1}
.pitch-access-badge[hidden]{display:none}

/* P.I.T.C.H. v0.8.0-alpha12 — player approvals, game RSVPs, matchday availability */
.pitch-alpha12-request{align-items:flex-start;flex-wrap:wrap}
.pitch-alpha12-request>div:first-child{flex:1;min-width:175px}
.pitch-alpha12-approval{display:grid;gap:10px;min-width:min(100%,270px);flex:1}
.pitch-alpha12-approval label.field-note{display:flex;gap:9px;align-items:flex-start;line-height:1.4}
.pitch-alpha12-approval input[type=checkbox],#player-age-choice input[type=checkbox]{width:auto;min-width:18px;min-height:18px;flex-shrink:0;accent-color:var(--lime)}
#player-age-choice{display:flex;align-items:flex-start;gap:10px;line-height:1.4}
.pitch-alpha12-summary{display:flex;flex-wrap:wrap;gap:8px 16px;margin:8px 0 14px}
.pitch-alpha12-summary span{display:inline-block;background:#263f49;padding:8px 11px;border:1px solid #4b6670;border-radius:8px;font-size:12px}
.pitch-alpha12-availability{align-items:center;flex-wrap:wrap}
.pitch-alpha12-availability>div{flex:1;min-width:180px}
.pitch-alpha12-availability select{width:min(240px,100%)}
/* alpha12.1: light-theme readable schedule cards and full-width responsive game RSVP.
   The Schedule event uses flex layout; the RSVP must wrap to a NEW row. */
.schedule-event--rsvp-open{flex-wrap:wrap;align-items:center}
.pitch-alpha12-rsvp{flex:1 0 100%;width:100%;min-width:0;padding:13px 15px;background:#fff;border:1px solid #b7d4c2;border-left:4px solid #23755b;border-radius:12px;color:#233931;box-shadow:0 2px 8px #1236260b}
.pitch-alpha12-rsvp-row + .pitch-alpha12-rsvp-row{border-top:1px solid #e1ebe2;margin-top:12px;padding-top:12px}
.pitch-alpha12-rsvp-row label{display:grid;grid-template-columns:minmax(0,1fr) minmax(145px,185px);align-items:center;gap:12px;color:#233931;font-size:14px}
.pitch-alpha12-rsvp-info{display:grid;gap:3px;min-width:0;line-height:1.35}
.pitch-alpha12-rsvp-info strong{display:block;color:#213d32;font-size:15px;overflow-wrap:anywhere}
.pitch-alpha12-rsvp-info small{display:block;color:#536960;font-size:12px}
.pitch-alpha12-rsvp-row select{background:#fff;color:#213d32;border:1px solid #91baa0;border-radius:9px;min-height:44px;padding:9px 11px;width:100%;max-width:100%;font-size:14px}
.pitch-alpha12-rsvp-row select:focus-visible{outline:3px solid #a9d5ba;outline-offset:2px}
.pitch-alpha12-announcement{padding:15px 16px;background:#f8faf7;border:1px solid #d0ddd2;border-left:4px solid #277359;border-radius:12px;color:#24382f;box-shadow:0 2px 8px #1236260b}
.pitch-alpha12-announcement strong{display:block;color:#1d382b;font-size:16px;line-height:1.4;overflow-wrap:anywhere}
.pitch-alpha12-announcement small{display:block;color:#53675c;font-size:12px;margin-top:5px}
.pitch-alpha12-announcement p{color:#34483d;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6;margin:12px 0 0}
@media(max-width:700px){.pitch-alpha12-availability select{width:100%}.pitch-alpha12-rsvp-row label{grid-template-columns:1fr;gap:8px}.pitch-alpha12-rsvp{padding:12px}.schedule-event--rsvp-open>.schedule-detail{min-width:0}}

/* alpha13: player-only, readable published Formation Studio playbook */
.player-playbook-editor{padding:16px;border-radius:14px;border:1px solid #adcbb9;background:#f2f8f2;color:#253a30;margin-bottom:18px}
.player-playbook-editor h2,.player-playbook-page h2{margin:0;color:#172d26}
.player-playbook-editor .field-note{color:#485f54}
.player-playbook-editor label{color:#263e34}
.player-playbook-editor textarea{background:#fff;color:#17342b;border:1px solid #9fbca9;max-width:100%}
.player-playbook-publish{display:flex!important;align-items:center;gap:12px;font-size:15px;line-height:1.45;font-weight:750;cursor:pointer}
.player-playbook-publish input{width:22px;height:22px;flex:none;accent-color:#24834d}
.player-playbook-page{background:#fff;border:1px solid #d6e4d9;color:#1c342a}
.player-playbook-page .pill{background:#e5f4e9;color:#21573a;border:1px solid #a8ceb4}
.player-playbook-page .field-note{color:#526a60}
.player-playbook-list{display:grid;gap:13px}
.player-playbook-entry{border:1px solid #bed7c7;border-radius:14px;background:#f6faf6;overflow:hidden}
.player-playbook-entry summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:17px;color:#183a2b;list-style-position:inside}
.player-playbook-entry summary strong{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
.player-playbook-entry summary span{font-size:12px;color:#526a60;text-align:right;flex:none}
.player-playbook-entry[open] summary{border-bottom:1px solid #d1e1d5}
.player-playbook-content{padding:16px;display:grid;grid-template-columns:minmax(220px,400px) minmax(200px,1fr);gap:20px;align-items:start}
.player-playbook-pitch{position:relative;aspect-ratio:.84;width:100%;overflow:hidden;border:4px solid #226243;border-radius:13px;background:repeating-linear-gradient(0deg,#1a664c 0,#1a664c 12.5%,#1e7053 12.5%,#1e7053 25%);user-select:none;pointer-events:none}
.player-playbook-pitch .pitch-lines,.player-playbook-pitch .player-playbook-movement,.player-playbook-pitch .player-playbook-markers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.player-playbook-pitch .pitch-lines{z-index:1}.player-playbook-pitch .player-playbook-movement{z-index:2}.player-playbook-pitch .player-playbook-markers{z-index:3}
.player-playbook-marker{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:3px;min-width:48px;max-width:100px;text-align:center}
.player-playbook-number{width:32px;height:32px;border-radius:50%;border:2px solid #102d22;background:#f6d547;color:#173126;display:grid;place-items:center;font-weight:900;font-size:13px;box-shadow:0 2px 6px #0008}
.player-playbook-position{background:#09291fdf;color:#fff;padding:2px 5px;border-radius:5px;font-size:10px;font-weight:700;max-width:100px;overflow-wrap:anywhere}
.player-playbook-instructions{color:#1f382c}.player-playbook-instructions h3{font-size:16px;margin:0 0 10px}.player-playbook-instructions p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:15px}.player-playbook-instructions small{color:#5e766a}
@media(max-width:750px){.player-playbook-content{grid-template-columns:1fr;padding:12px}.player-playbook-pitch{max-width:500px;margin:auto}.player-playbook-entry summary{flex-direction:column;align-items:flex-start;gap:5px}.player-playbook-entry summary span{text-align:left}.player-playbook-publish{align-items:flex-start!important}}

/* alpha13.1 — iPhone/PWA: avoid Safari's input-focus magnification while
   preserving normal user pinch-zoom (do NOT disable viewport scaling). */
@media (max-width: 900px){
  #auth input:not([type="checkbox"]):not([type="radio"]),
  #auth select,
  #auth textarea,
  #shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
  #shell select,
  #shell textarea {font-size:16px!important;}
}
/* Player-only welcome and shortcuts on the family live board. */
.pitch-player-home{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:20px;border:1px solid #a4cdb0;border-radius:16px;background:linear-gradient(120deg,#f3fbf0,#e5f4eb);color:#193e31}
.pitch-player-home h2{margin:5px 0 7px;font-size:21px;color:#173c2b}
.pitch-player-home p{margin:0;line-height:1.5;color:#3b5b4a;font-size:14px}
.pitch-player-home-eyebrow{font-size:11px;letter-spacing:.11em;color:#286b46;font-weight:850}
.pitch-player-home-actions{display:flex;flex-wrap:wrap;gap:9px}
.pitch-player-home-actions .btn{min-height:44px;white-space:normal}
.pitch-player-access-notice{margin:0 0 17px;padding:14px 16px;background:#fff8e7;border:1px solid #e4c78a;border-radius:12px;color:#514020;font-size:14px;line-height:1.55}
.pitch-player-access-notice strong{display:block;color:#4c3517;font-size:15px}
.pitch-player-access-notice p{margin:6px 0 0;color:#57482b}
@media(max-width:700px){.pitch-player-home{padding:15px}.pitch-player-home-actions{width:100%}.pitch-player-home-actions .btn{flex:1 1 140px}}

/* v0.8.0-alpha13.2: saved tactical ink in Formation Studio and Player Playbook */
#field #studio-ink-layer{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none;touch-action:none;overflow:visible}
#field #studio-ink-layer.active{pointer-events:auto;cursor:crosshair}
#field #studio-ink-layer.active~.pitch-canvas{pointer-events:none}
#field:has(#studio-ink-layer.active)>.pitch-markers>.player-token{pointer-events:none}
#field:has(#studio-ink-layer.active)>.tactics-overlay{pointer-events:none}
.studio-ink-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin:12px 0}
.studio-ink-toolbar label{min-width:140px;flex:1}
.player-playbook-pitch .player-playbook-ink{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
.player-playbook-pitch .player-playbook-markers{z-index:3}
@media(max-width:700px){.studio-ink-toolbar .btn{flex:1}}

/* Alpha13.2.2: shared War Room-style Formation Studio controls */
.studio-board-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0 16px}
.studio-board-toolbar .btn{white-space:nowrap}
.studio-board-toolbar .swatch{flex:0 0 34px}
.studio-board-toolbar .eraser-size-label{display:inline-flex;align-items:center;gap:6px;width:auto;flex-wrap:nowrap;font-size:11px}
.studio-board-toolbar .eraser-size-label input{width:100px;min-width:65px;padding:0}
.studio-legacy-control{display:none!important}
.studio-arrow-advanced{border:1px solid #b6dbc7;border-radius:10px;padding:10px 12px;margin:9px 0 14px}
.studio-arrow-advanced summary{cursor:pointer;font-weight:800}
.studio-arrow-advanced .tactics-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px){.studio-board-toolbar .btn{font-size:12px}.studio-board-toolbar .eraser-size-label{width:100%}.studio-arrow-advanced .tactics-tools{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* PITCH_SMART_CONTRAST_V1: accessible chrome, without altering original team kits. */
:root{--pitch-ui-accent-ink:#695700}
/* Pills use a light neutral surface; their labels must not inherit a pale kit. */
#shell .pill:not(.live){color:var(--pitch-ui-ink,#343637);border-color:var(--pitch-ui-accent,#856e00)}
/* On light UI surfaces, use contrast-safe tokens rather than the raw team color. */
#shell .section-head h2,#shell .subhead,#shell .stat .number,
#shell .score-number,#shell .score-info,#shell .score-divider,
#shell .field-direction span,#shell .playbook-explain strong,
#shell .season-stat-table th,#shell .field-note,
#shell .topbar .eyebrow,#shell .clock-readout{
 color:var(--pitch-ui-ink,#343637);
}
/* Maintain visible focus and selection with white/yellow/light team colors. */
#shell button:focus-visible,#shell a:focus-visible,#shell select:focus-visible,
#shell input:focus-visible,#shell textarea:focus-visible{
 outline:2px solid var(--pitch-ui-accent,#856e00);outline-offset:2px;
}
#shell .selected-card,#shell .board-toolbar .swatch.selected{
 outline-color:var(--pitch-ui-accent,#856e00);
}

/* PITCH_SMART_CONTRAST_V1: accessible chrome, without altering original team kits. */
:root{--pitch-ui-accent-ink:#695700}
/* Pills use a light neutral surface; their labels must not inherit a pale kit. */
#shell .pill:not(.live){color:var(--pitch-ui-ink,#343637);border-color:var(--pitch-ui-accent,#856e00)}
/* On light UI surfaces, use contrast-safe tokens rather than the raw team color. */
#shell .section-head h2,#shell .subhead,#shell .stat .number,
#shell .score-number,#shell .score-info,#shell .score-divider,
#shell .field-direction span,#shell .playbook-explain strong,
#shell .season-stat-table th,#shell .field-note,
#shell .topbar .eyebrow,#shell .clock-readout{
 color:var(--pitch-ui-ink,#343637);
}
/* Maintain visible focus and selection with white/yellow/light team colors. */
#shell button:focus-visible,#shell a:focus-visible,#shell select:focus-visible,
#shell input:focus-visible,#shell textarea:focus-visible{
 outline:2px solid var(--pitch-ui-accent,#856e00);outline-offset:2px;
}
#shell .selected-card,#shell .board-toolbar .swatch.selected{
 outline-color:var(--pitch-ui-accent,#856e00);
}

/* PITCH_RSVP_CONTRAST_HOTFIX_V1
   Matchday Availability summary is dark regardless of the selected team's kit.
   Explicitly use light text for readable contrast on every team theme. */
#shell #alpha12-game-availability .pitch-alpha12-summary span {
  background: #263f49;
  color: #ffffff !important;
  border-color: #4b6670;
}
#shell #alpha12-game-availability .pitch-alpha12-summary span strong {
  color: inherit !important;
}

/* PITCH_SIDEBAR_SELECTED_CONTRAST_V1
   The selected navigation tile uses a deliberately pale-gold surface even
   when the team primary is white. Text must use dark neutral ink there.
   Team kit colors and sidebar theme tokens are not changed. */
#shell .sidebar nav button.active,
#shell .sidebar nav button.active:hover {
  color: #222b2a !important;
}
#shell .sidebar nav button.active span,
#shell .sidebar nav button.active:hover span {
  color: inherit !important;
}

/* P.I.T.C.H. War Room: tap-on-turf player picker, beta */
.pitch-position-backdrop{position:fixed;inset:0;z-index:11000;background:#07120dcc;display:flex;justify-content:center;align-items:center;padding:20px;overscroll-behavior:contain}
.pitch-position-sheet{width:min(520px,100%);max-height:min(720px,88dvh);display:flex;flex-direction:column;gap:12px;overflow:hidden;background:#f4faf6;color:#13392d;border:1px solid #6da68c;border-radius:18px;padding:20px;box-shadow:0 28px 100px #0009}
.pitch-position-header{display:flex;justify-content:space-between;gap:12px;align-items:start}.pitch-position-header h3{margin:5px 0 0;color:#143e32;font-size:23px}.pitch-position-kicker{font-size:11px;letter-spacing:.12em;font-weight:850;color:#2c7b55}.pitch-position-close{border:1px solid #a9c8b7;border-radius:10px;background:#fff;color:#14392e;min-width:42px;min-height:42px;font-size:28px;line-height:1;cursor:pointer}
.pitch-position-search-label{font-size:12px;font-weight:750;color:#2a6048}.pitch-position-sheet #pitch-position-search{width:100%;min-height:46px;background:#fff;color:#123629;border:1px solid #9bbcab;border-radius:10px;font-size:16px;padding:10px 13px}
.pitch-position-results{overflow:auto;min-height:0;display:grid;align-content:start;gap:7px;padding:2px;overscroll-behavior:contain}.pitch-position-option{width:100%;display:flex;align-items:center;gap:12px;text-align:left;background:#fff;color:#143b2d;border:1px solid #d0e4d7;border-radius:12px;padding:10px;min-height:62px;cursor:pointer}.pitch-position-option:hover,.pitch-position-option:focus-visible{border-color:#398863;background:#e2f3e8;outline:2px solid #9bddad;outline-offset:0}.pitch-position-option.is-selected{border-color:#71a581;background:#e1f2e5}.pitch-position-option:disabled{cursor:default;opacity:.65}.pitch-position-avatar{flex:none;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:#d5e9de;color:#1b5541;font-weight:850;overflow:hidden}.pitch-position-avatar img{width:100%;height:100%;object-fit:cover}.pitch-position-option-text{display:grid;gap:3px;flex:1;min-width:0}.pitch-position-option-text strong{font-size:14px;overflow-wrap:anywhere}.pitch-position-option-text small{font-size:11px;color:#557669}.pitch-position-selected{font-weight:800;font-size:11px;color:#286d4e;white-space:nowrap}.pitch-position-footnote,.pitch-position-readonly,.pitch-position-no-results{font-size:12px;color:#486a59;margin:0}
@media(max-width:700px){.pitch-position-backdrop{align-items:flex-end;padding:0}.pitch-position-sheet{width:100%;max-height:82dvh;border-radius:22px 22px 0 0;padding:18px 16px max(20px,env(safe-area-inset-bottom));border-bottom:0}.pitch-position-header h3{font-size:20px}}

/* PITCH WAR ROOM DIRECT ASSIGNMENT */
/* Keep the original controls in the DOM for compatibility. */
#field-assignment {
    display: none !important;
}

/* PITCH UNIFIED COMPACT TACTICAL TOOLBARS V2 */
/* Scoped to the War Room and Formation Studio only. */
.board-toolbar:has(> #flip-field),
.board-toolbar.studio-board-toolbar {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center;
  justify-content:flex-start;
  column-gap:8px;
  row-gap:9px;
  margin:10px 0 14px!important;
  min-width:0;
}
/* First line: drawing/movement and action buttons. */
.board-toolbar:has(> #flip-field) > :is(#flip-field,#draw-toggle,#arrow-ink-toggle,#eraser-toggle,#undo-stroke,#clear-board,#save-board),
.studio-board-toolbar > :is([data-studio-tool],#studio-ink-undo,#studio-ink-clear) {
  order:1;
  margin:0;
  flex:0 0 auto;
  padding:8px 10px;
  font-size:clamp(12px,1vw,14px);
  white-space:nowrap;
  grid-area:auto!important;
}
/* A deliberate row break stops colors from floating beside unrelated buttons. */
.board-toolbar:has(> #flip-field)::before,
.studio-board-toolbar::before {
  content:"";
  order:2;
  flex:0 0 100%;
  height:0;
}
.board-toolbar:has(> #flip-field) > .eraser-size-label,
.studio-board-toolbar > .eraser-size-label {
  order:3;
  display:inline-flex;
  align-items:center;
  width:auto;
  flex:0 1 auto;
  gap:7px;
  margin:0 12px 0 0;
  font-size:12px;
  white-space:nowrap;
  grid-area:auto!important;
}
.board-toolbar:has(> #flip-field) > .eraser-size-label input,
.studio-board-toolbar > .eraser-size-label input {
  width:clamp(75px,8vw,118px);
  min-width:75px;
}
.board-toolbar:has(> #flip-field) > .swatch,
.studio-board-toolbar > .swatch {
  order:4;
  grid-area:auto!important;
  flex:0 0 36px;
  width:36px;
  height:36px;
  min-width:36px;
  min-height:36px;
  margin:0;
  padding:0!important;
  border-radius:50%;
}
.studio-board-toolbar > #studio-ink-count {
  order:5;
  flex:0 0 auto;
  margin-left:6px;
  white-space:nowrap;
}
@media (max-width:700px) {
  .board-toolbar:has(> #flip-field),.studio-board-toolbar {column-gap:6px;row-gap:8px;}
  .board-toolbar:has(> #flip-field) > :is(#flip-field,#draw-toggle,#arrow-ink-toggle,#eraser-toggle,#undo-stroke,#clear-board,#save-board),
  .studio-board-toolbar > :is([data-studio-tool],#studio-ink-undo,#studio-ink-clear) {padding:8px 9px;font-size:12px;}
  .board-toolbar:has(> #flip-field) > .eraser-size-label,
  .studio-board-toolbar > .eraser-size-label {font-size:11px;max-width:100%;}
  .board-toolbar:has(> #flip-field) > .swatch,
  .studio-board-toolbar > .swatch {flex-basis:34px;width:34px;height:34px;min-width:34px;min-height:34px;}
}

/* PITCH SIDEBAR COMPACT LOCKUP v1 */
/* Scoped exclusively to sidebar branding; preserve logo artwork and team colors. */
.sidebar .side-brand {
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px 2px 15px;
  min-width:0;
}
.sidebar .side-brand .brand-icon {
  width:42px;
  height:42px;
  flex:0 0 42px;
  padding:0!important;
}
.sidebar .side-brand .brand-icon img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.sidebar .side-brand > div {
  min-width:0;
  flex:1 1 auto;
}
.sidebar .side-brand strong {
  display:block;
  font-size:17px;
  line-height:1.1;
  letter-spacing:.035em;
  white-space:nowrap;
}
.sidebar .side-brand small {
  display:block;
  margin-top:4px;
  font-size:8px;
  line-height:1.2;
  letter-spacing:.05em;
  white-space:nowrap;
}
@media (min-width:701px) and (max-width:1100px) {
  .sidebar .side-brand {gap:7px;padding-inline:0;}
  .sidebar .side-brand .brand-icon {width:38px;height:38px;flex-basis:38px;}
  .sidebar .side-brand strong {font-size:15px;letter-spacing:.015em;}
  .sidebar .side-brand small {font-size:7px;letter-spacing:0;}
}
@media (max-width:700px) {
  .sidebar .side-brand .brand-icon {width:42px;height:42px;flex-basis:42px;}
  .sidebar .side-brand strong {font-size:17px;}
}

/* Family Live Board compact scoreboard — scoped to parent view only */
#live-view-content .parent-scoreboard{padding:16px 18px 13px;margin-bottom:10px}
#live-view-content .parent-scoreboard .parent-venue{text-align:center;font-weight:800;font-size:14px;line-height:1.35;margin:0 0 9px;overflow-wrap:anywhere}
#live-view-content .parent-scoreboard .parent-venue a{color:inherit;text-decoration:none}
#live-view-content .parent-scoreboard .parent-venue a:hover{text-decoration:underline}
#live-view-content .parent-scoreboard .parent-venue-arrow{font-size:12px;color:var(--muted)}
#live-view-content .parent-scoreboard .score-info{margin-bottom:10px}
#live-view-content .parent-scoreboard .parent-match-clock{border-top:1px solid #d7dfd9;padding-top:9px;margin:10px auto 5px;gap:2px}
#live-view-content .parent-scoreboard .parent-match-clock strong{line-height:1.1}
#live-view-content .parent-scoreboard .parent-match-clock small{line-height:1.3}
#live-view-content .parent-scoreboard #live-connection{margin-top:9px;font-size:11px}
#live-view-content .parent-live-sections{margin-top:10px;gap:12px}
@media(max-width:700px){
 #live-view-content .parent-scoreboard{padding:12px 13px 10px;margin-bottom:7px}
 #live-view-content .parent-scoreboard .parent-venue{font-size:13px;margin-bottom:6px}
 #live-view-content .parent-scoreboard .score-info{margin-bottom:7px;font-size:12px}
 #live-view-content .parent-scoreboard .score-grid{gap:4px}
 #live-view-content .parent-scoreboard .score-number{font-size:clamp(39px,11vw,60px);line-height:1}
 #live-view-content .parent-scoreboard .score-team{font-size:clamp(11px,3.1vw,14px);line-height:1.2}
 #live-view-content .parent-scoreboard .parent-match-clock{margin:8px auto 3px;padding-top:8px}
 #live-view-content .parent-scoreboard .parent-match-clock strong{font-size:clamp(27px,8vw,35px)}
 #live-view-content .parent-scoreboard .parent-match-clock span{font-size:11px}
 #live-view-content .parent-scoreboard .parent-match-clock small{font-size:10px;max-width:340px}
 #live-view-content .parent-scoreboard #live-connection{margin-top:7px;font-size:10px}
 #live-view-content .parent-live-sections{margin-top:7px;gap:10px}
 #live-view-content .parent-live-sections>.card{padding:13px}
 #live-view-content .parent-live-sections>.card h2{margin-bottom:10px}
 #live-view-content .parent-live-sections .field-direction{margin-bottom:8px}
}

/* Match-specific starter selection */
.pitch-starter-roster{max-height:380px;overflow-y:auto;overscroll-behavior:contain}
.pitch-starter-row{display:flex;align-items:center;gap:12px;cursor:pointer}
.pitch-starter-name{flex:1;min-width:0}
.pitch-starter-name small{display:block}
.pitch-starter-check{display:flex;align-items:center;gap:7px;white-space:nowrap;font-weight:650}
.pitch-starter-check input{width:19px;height:19px;accent-color:#27865c}
.pitch-starters-card .section-head{gap:8px}

/* Match availability: match-specific starting eleven in existing availability rows. */
.pitch-availability-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.pitch-availability-actions select{width:min(240px,100%)}
.pitch-availability-starter{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-weight:650;cursor:pointer}
.pitch-availability-starter input{width:19px;height:19px;accent-color:#27865c}
@media(max-width:700px){.pitch-availability-actions{width:100%;justify-content:space-between}.pitch-availability-actions select{flex:1;min-width:145px}}

/* v0.8.0-alpha13.3.3 — Player Roster position manager and RSVP status */
.pitch-player-positions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
.pitch-player-positions label{min-width:0}.pitch-player-positions .muted{grid-column:1/-1}
.pitch-position-manager{margin-top:16px}.pitch-position-manager .item{gap:12px;flex-wrap:wrap}
.pitch-rsvp-status{display:block;font-weight:650;line-height:1.45;margin-top:4px}
.pitch-rsvp-green{color:#147c46}.pitch-rsvp-yellow{color:#926500}.pitch-rsvp-red{color:#b23037}
@media(max-width:600px){.pitch-player-positions{grid-template-columns:1fr}}

/* alpha13.3.5 unified matchday roster */
.pitch-unified-roster{margin:1rem 0}.pitch-roster-summary,.pitch-roster-tabs{display:flex;flex-wrap:wrap;gap:.5rem;margin:.8rem 0}.pitch-roster-tabs button[aria-pressed="true"]{background:#1d513d;color:white}.pitch-roster-grid{width:100%;border-collapse:collapse;min-width:740px}.pitch-roster-grid th,.pitch-roster-grid td{padding:.8rem .6rem;text-align:left;border-bottom:1px solid #dce6e0;vertical-align:middle}.pitch-roster-grid th{background:#eff4ef;font-size:.84rem}.pitch-roster-person{display:flex;align-items:center;gap:.6rem}.pitch-roster-person img{width:36px;height:36px;object-fit:cover;border-radius:50%}.pitch-roster-badge{display:inline-block;padding:.3rem .55rem;border-radius:999px;font-size:.78rem;font-weight:700;margin:.1rem}.pitch-roster-green{background:#e0f4e8;color:#145c33}.pitch-roster-yellow{background:#fff1c5;color:#795200}.pitch-roster-red{background:#ffe0e2;color:#a92131}.pitch-roster-blue{background:#d9effc;color:#135274}.pitch-roster-advanced{margin-top:1.2rem;border-top:1px solid #dce6e0;padding-top:1rem}.pitch-roster-advanced>summary{cursor:pointer;font-weight:700;padding:.6rem}.pitch-roster-source{margin:1rem 0}.my-stats-page .stats{margin:1rem 0}@media(max-width:800px){.pitch-roster-grid{min-width:0}.pitch-roster-grid thead{display:none}.pitch-roster-grid tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:1rem .3rem;border-bottom:1px solid #dce6e0;gap:.5rem}.pitch-roster-grid td{border:0;padding:.1rem;min-width:0}.pitch-roster-grid td:first-child{grid-column:1/-1}.pitch-roster-grid td:before{content:attr(data-label);display:block;color:#64766e;font-size:.72rem}.pitch-roster-grid td:first-child:before{display:none}}

/* alpha13.3.6 — portrait-safe Matchday Roster; no horizontal page overflow */
.pitch-unified-roster {min-width:0;max-width:100%;box-sizing:border-box}
.pitch-unified-roster #unified-roster-table {max-width:100%;min-width:0;overflow-x:auto}
.pitch-roster-person {min-width:0;gap:.55rem}
.pitch-roster-person strong {overflow-wrap:anywhere}
.pitch-roster-avatar {width:38px;height:38px;min-width:38px;object-fit:cover;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#e5efe7;color:#143e2b;font-weight:750;border:2px solid #80b89c}
.pitch-roster-grid {max-width:100%}
/* iPad portrait and narrow desktop: make every attribute visible in tidy, wrapped player tiles. */
@media(max-width:1250px) {
 .pitch-unified-roster #unified-roster-table {overflow-x:visible}
 .pitch-roster-grid {min-width:0;width:100%;table-layout:fixed}
 .pitch-roster-grid thead {display:none}
 .pitch-roster-grid tbody {display:block}
 .pitch-roster-grid tr {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px;padding:14px 6px;border-bottom:1px solid #dce6e0;align-items:center}
 .pitch-roster-grid td {min-width:0;border:0;padding:0;overflow-wrap:anywhere}
 .pitch-roster-grid td:first-child {grid-column:1/-1}
 .pitch-roster-grid td:before {content:attr(data-label);display:block;color:#63746c;font-size:.7rem;font-weight:650;margin-bottom:4px}
 .pitch-roster-grid td:first-child:before {display:none}
 .pitch-roster-grid td:nth-child(7) .btn {max-width:100%;white-space:normal;line-height:1.2}
 .pitch-roster-badge {max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
@media(max-width:700px) {
 .pitch-roster-grid tr {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 8px}
 .pitch-roster-grid td:nth-child(7) {grid-column:1/-1}
 .pitch-roster-grid td:nth-child(7) .btn {width:100%}
 .pitch-roster-summary,.pitch-roster-tabs {gap:6px}
 .pitch-roster-summary .pill {font-size:.78rem;padding:6px 8px}
 .pitch-roster-tabs button {font-size:.8rem}
}

/* alpha13.3.7: emphasize real event correction tools when accessed from roster */
.pitch-card-correction-highlight{outline:3px solid #c49a00;outline-offset:3px;border-radius:8px;background:rgba(226,190,37,.13)}

/* alpha13.3.8: keep match roster legible and in flow on iPad portrait */
.pitch-roster-person .pitch-roster-avatar.photo-placeholder{width:36px;height:36px;min-width:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#e5f0e6;color:#1a4c37;font-size:13px;font-weight:800}
#show-all-match-events{margin:12px 0}
@media(max-width:1100px){.pitch-unified-roster{width:100%;min-width:0}.pitch-roster-grid td[data-label="Status"]{overflow-wrap:anywhere}}

/* alpha13.3.10: lineup tools live directly below the Digital Battleground. */
.pitch-lineup-controls{margin:14px 0 22px;padding:15px;border:1px solid var(--edge);border-radius:14px;background:var(--panel2);min-width:0}
.pitch-lineup-controls .pitch-lineup-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.pitch-lineup-controls h3{margin:0;font-size:16px}
.pitch-lineup-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}
.pitch-lineup-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.pitch-lineup-buttons .btn{min-width:0;white-space:normal;overflow-wrap:anywhere}
#save-lineup{grid-column:1/-1;order:-2}
#discard-lineup{grid-column:1/-1;order:3}
.pitch-lineup-controls #draft-hint{margin-top:12px}
@media(max-width:580px){.pitch-lineup-controls{padding:11px}.pitch-lineup-settings{grid-template-columns:1fr}.pitch-lineup-buttons .btn{padding:10px 6px;font-size:12px}}

/* Shared Battleground v1 — only the active tool layer may accept pointer input. */
#field #studio-ink-layer:not(.active),#field #studio-ink-layer:not(.active) *{pointer-events:none!important}
#field #studio-ink-layer.active .studio-ink-hit{pointer-events:all}
#field>.tactics-overlay:not(.editing),#field>.tactics-overlay:not(.editing) *{pointer-events:none!important}
#field>.tactics-overlay.editing{z-index:6;pointer-events:auto!important}
#field>.tactics-overlay.editing .tactics-hit-surface{pointer-events:all}
#field>.pitch-markers>.player-token{pointer-events:auto}
#field:has(>.tactics-overlay.editing)>.pitch-markers>.player-token{pointer-events:none!important}
#field:has(>#studio-ink-layer.active)>.pitch-markers>.player-token{pointer-events:none!important}
#field.match-moving>.pitch-markers>.player-token{cursor:grab}
#field.match-moving>.pitch-markers>.player-token.dragging{cursor:grabbing}
.live-position-tools .ink-active{border-color:var(--lime);color:var(--lime);background:#234538}
.live-position-tools{padding:9px 0}

/* PITCH formation layer order: drawing is beneath circles/numbers, even while editing. */
#field>.pitch-markers{z-index:7!important;pointer-events:none}
#field>.pitch-markers>.player-token{z-index:1;pointer-events:auto}
#field>.tactics-overlay{z-index:2}
#field>.tactics-overlay.editing{z-index:6!important}
#field #studio-ink-layer{z-index:4}
#field:has(>.tactics-overlay.editing)>.pitch-markers>.player-token,
#field:has(>#studio-ink-layer.active)>.pitch-markers>.player-token{pointer-events:none!important}

/* P.I.T.C.H. alpha14 — cohesive personal appearance; intentionally preserves field/team kit colors */
:root{--pitch-user-primary:#333333;--pitch-user-accent:#D9BD08;--bg:#222426;--bg2:#2b2e30;--panel:#393c3e;--panel2:#46494b;--edge:#56595b;--text:#f5f5f4;--muted:#c0c4c5;--lime:#D9BD08;--mint:#e0c83c;--gold:#D9BD08;--shadow:0 10px 25px #0003}
html,body{background:var(--bg);color:var(--text)}
.sidebar{background:#333333;border-color:#515151}.topbar{background:#292b2d;border-color:#505254}
.card{background:linear-gradient(145deg,var(--panel),#343638);border-color:var(--edge);box-shadow:var(--shadow)}
.item,.stat{background:var(--panel2);border-color:var(--edge)}
.btn{background:#4b4e50;border-color:#6c7072;color:#fff}.btn.primary{background:var(--pitch-user-accent);border-color:var(--pitch-user-accent);color:var(--team-accent-text,#151515)}
nav button.active,nav button:hover{color:var(--pitch-user-accent);background:#454545}
.pill{color:#f4e37c;background:#4c4931;border-color:#777042}
input,select,textarea{background:#262829;color:#fff;border-color:#747778}
label{color:#e4e5e5}.subhead,.eyebrow{color:#e5ce4c}
.hero{background:linear-gradient(120deg,#363b39,#2c3730);border-color:#77734a}
/* LED-style match display, with no stadium backdrop or change to match data */
.scoreboard{background:linear-gradient(160deg,#20262b,#11171b);border:2px solid #596167;box-shadow:inset 0 0 0 3px #0e1215,0 10px 25px #0004}
.score-number{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#d8f8ff;letter-spacing:.02em;text-shadow:0 0 13px #5bbddd55;font-variant-numeric:tabular-nums}
.score-divider{color:#D9BD08}.score-info{color:#D9BD08}.clock-readout{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#ff786b;font-variant-numeric:tabular-nums;text-shadow:0 0 10px #ff493744}
#pitch-sun-toggle{position:fixed;z-index:35;right:12px;bottom:76px;width:46px;height:46px;border:2px solid #D9BD08;border-radius:50%;background:#333;color:#D9BD08;font-size:24px;box-shadow:0 3px 14px #0007}
#pitch-sun-toggle[aria-pressed="true"]{background:#ffdd35;color:#171717}
body:has(#shell.hidden) #pitch-sun-toggle{display:none}
.pitch-settings .pitch-check-label{display:flex;align-items:center;gap:10px}.pitch-settings .pitch-check-label input{width:auto}
:root[data-pitch-size="large"] #main{font-size:1.08rem}:root[data-pitch-size="xl"] #main{font-size:1.18rem}
:root[data-pitch-size="large"] .btn,:root[data-pitch-size="large"] input,:root[data-pitch-size="large"] select{min-height:46px}
:root[data-pitch-size="xl"] .btn,:root[data-pitch-size="xl"] input,:root[data-pitch-size="xl"] select{min-height:52px}
:root[data-pitch-reduce-motion="yes"] *, :root[data-pitch-reduce-motion="yes"] *::before,:root[data-pitch-reduce-motion="yes"] *::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
:root[data-pitch-theme="light"]{--bg:#f3f4f4;--bg2:#e8ebeb;--panel:#fff;--panel2:#eceff0;--edge:#b6bec1;--text:#1b2225;--muted:#49565b;--shadow:0 6px 18px #1112}
:root[data-pitch-theme="light"] .card{background:#fff}:root[data-pitch-theme="light"] .item,:root[data-pitch-theme="light"] .stat{background:#edf0f1}
:root[data-pitch-theme="light"] .topbar{background:#fff}:root[data-pitch-theme="light"] input,:root[data-pitch-theme="light"] select,:root[data-pitch-theme="light"] textarea{background:#fff;color:#171717;border-color:#7b8589}
:root[data-pitch-theme="light"] label{color:#293236}:root[data-pitch-theme="light"] .btn:not(.primary){background:#dce1e3;color:#20282c;border-color:#909a9f}
:root[data-pitch-theme="sun"]{--bg:#fff;--bg2:#fff;--panel:#fff;--panel2:#fff;--edge:#111;--text:#090909;--muted:#222;--lime:#111;--mint:#111;--shadow:none}
:root[data-pitch-theme="sun"] .card,:root[data-pitch-theme="sun"] .item,:root[data-pitch-theme="sun"] .stat{background:#fff!important;border:2px solid #171717!important;box-shadow:none!important;color:#090909!important}
:root[data-pitch-theme="sun"] .topbar{background:#fff;color:#111;border-bottom:3px solid #111}
:root[data-pitch-theme="sun"] .btn{background:#111!important;color:#fff!important;border:2px solid #111!important;text-shadow:none!important}
:root[data-pitch-theme="sun"] .btn.primary{background:#ffdf2f!important;color:#111!important}
:root[data-pitch-theme="sun"] label,:root[data-pitch-theme="sun"] .muted,:root[data-pitch-theme="sun"] .field-note{color:#111!important}
:root[data-pitch-theme="sun"] input,:root[data-pitch-theme="sun"] select,:root[data-pitch-theme="sun"] textarea{background:#fff;color:#111;border:2px solid #111}
:root[data-pitch-theme="sun"] .pitch{background:repeating-linear-gradient(0deg,#5cae45 0,#5cae45 12.5%,#70bd56 12.5%,#70bd56 25%);box-shadow:none;border:5px solid #111}
:root[data-pitch-theme="sun"] .player-token .disc{border:3px solid #111;background:#fff;color:#111;box-shadow:none}
:root[data-pitch-theme="sun"] .player-token .name{background:#fff;color:#111;border:2px solid #111;font-weight:900}
:root[data-pitch-theme="sun"] .scoreboard{background:#fff;border:3px solid #111;box-shadow:none;color:#111}
:root[data-pitch-theme="sun"] .score-number,:root[data-pitch-theme="sun"] .clock-readout,:root[data-pitch-theme="sun"] .score-info{color:#111;text-shadow:none}
@media(max-width:700px){#pitch-sun-toggle{right:10px;bottom:82px;width:42px;height:42px}.scoreboard{padding:12px}.score-number{font-size:clamp(38px,11vw,60px)}}


/* alpha14.1 — STANDARD THEME RESET. Contrast follows each surface, not team kit colors. */
:root{--pitch-ui-ink:#f8fafc;--pitch-user-primary:#333333;--pitch-user-accent:#D9BD08;--bg:#242424;--bg2:#2b2b2b;--panel:#383838;--panel2:#424242;--edge:#666666;--text:#ffffff;--muted:#d1d5db;--lime:#D9BD08;--mint:#D9BD08;--gold:#D9BD08}
html,body,#shell,.main-wrap,main{color:var(--text)}
#shell .sidebar{background:#333333!important;color:#fff!important;border-color:#555!important}
#shell .sidebar nav button{color:#fff!important;background:#292929!important;border:1px solid #686052}
#shell .sidebar nav button.active,#shell .sidebar nav button:hover{background:#D9BD08!important;color:#171717!important;border-color:#f2d65d!important;box-shadow:inset 5px 0 #f6e4a0!important}
#shell .sidebar nav button.active *,#shell .sidebar nav button:hover *{color:#171717!important}
#shell .sidebar .sidebar-foot,#shell .sidebar .side-brand small{color:#e5e7eb!important}
#shell .topbar{background:#292929;color:#fff;border-color:#555}
#shell .topbar h1,#shell .topbar .eyebrow{color:#fff!important}
#shell .card,#shell .playbook-panel,#shell .tactics-panel,#shell .player-playbook-editor,#shell .advisor-studio-import,#shell .pitch-lineup-controls{background:#383838!important;color:#fff!important;border-color:#696969!important}
#shell .card h1,#shell .card h2,#shell .card h3,#shell .card h4,#shell .card .section-head h2,#shell .playbook-panel h2,#shell .tactics-panel h2,#shell .pitch-lineup-controls h3{color:#fff!important}
#shell .card p:not(.error):not(.success),#shell .card .muted,#shell .card .field-note,#shell .card small,#shell .card .tiny,#shell .card .subhead,#shell .card .eyebrow,#shell .card label,#shell .card .playbook-explain,#shell .card .playbook-explain strong,#shell .card .playbook-explain b,#shell .card .notice,#shell .card .notice .muted,#shell .card .stat .number,#shell .card .stats-player-profile .number{color:#fff!important}
#shell .card .muted,#shell .card .field-note,#shell .card small,#shell .card .tiny{color:#d1d5db!important}
#shell .card .item,#shell .card .stat,#shell .card .playbook-explain,#shell .card .notice,#shell .card .slot-tag{background:#424242!important;color:#fff!important;border-color:#707070!important}
#shell .card input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),#shell .card select,#shell .card textarea,#shell .topbar select{background:#262626!important;color:#fff!important;border:1px solid #898989!important}
#shell .card input::placeholder,#shell .card textarea::placeholder{color:#cbd5e1!important;opacity:1}
#shell .card .btn:not(.primary):not(.warn){background:#505050;color:#fff;border-color:#858585}
#shell .btn.primary,#shell .card .btn.primary{background:#D9BD08!important;color:#171717!important;border-color:#D9BD08!important}
#shell .pill:not(.live),#shell .card .pill:not(.live){background:#50491f!important;color:#fff!important;border-color:#D9BD08!important}
#shell .card .pill.live{color:#fff!important}
#shell .card .notice{background:#424242!important}
#shell .card .notice:not(.error) *{color:#fff!important}
/* Light event rows intentionally stay light: give all non-status content dark ink. */
#shell .schedule-event,#shell .schedule-item,#shell .schedule-card,#shell .event-card{color:#171717}
#shell .schedule-event :is(h1,h2,h3,h4,p,small,strong,span),#shell .schedule-item :is(h1,h2,h3,h4,p,small,strong,span),#shell .schedule-card :is(h1,h2,h3,h4,p,small,strong,span),#shell .event-card :is(h1,h2,h3,h4,p,small,strong,span){color:inherit}
/* The scoreboard is a deliberately dark, high-contrast surface. */
#shell .scoreboard,#shell .parent-scoreboard{color:#fff!important}
#shell .scoreboard .score-team,#shell .parent-scoreboard .score-team{color:#fff!important}
#shell .scoreboard .score-info,#shell .parent-scoreboard .score-info{color:#e9d34c!important}
/* Authentication is outside #shell and must never inherit the previous white-card palette. */
.auth-outer{background:radial-gradient(circle at 70% 5%,#424242,#202020 65%)!important;color:#fff!important}
.auth-card{background:#333333!important;border:1px solid #747474!important;color:#fff!important;box-shadow:0 18px 50px #0005!important}
.auth-card h1,.auth-card h2,.auth-card h3,.auth-card label,.auth-card .eyebrow,.auth-card p,.auth-card .muted,.auth-card a{color:#fff!important}
.auth-card p,.auth-card .muted{color:#d1d5db!important}
.auth-card input:not([type=checkbox]):not([type=radio]),.auth-card select,.auth-card textarea{background:#242424!important;color:#fff!important;border:1px solid #999!important}
.auth-card input::placeholder{color:#cbd5e1!important}
.auth-card .btn.primary,.auth-card button.primary{background:#D9BD08!important;color:#171717!important;border-color:#D9BD08!important}
.auth-card .error{color:#ffb4b4!important}
/* Accessible explicit light and sunlight surface pairings. */
:root[data-pitch-theme="light"]{--pitch-ui-ink:#171717;--bg:#f3f4f4;--panel:#fff;--panel2:#f1f2f3;--text:#171717;--muted:#4b5563}
:root[data-pitch-theme="light"] #shell .card,:root[data-pitch-theme="light"] #shell .playbook-panel,:root[data-pitch-theme="light"] #shell .tactics-panel,:root[data-pitch-theme="light"] #shell .player-playbook-editor,:root[data-pitch-theme="light"] #shell .advisor-studio-import,:root[data-pitch-theme="light"] #shell .pitch-lineup-controls{background:#fff!important;color:#171717!important;border-color:#a6a6a6!important}
:root[data-pitch-theme="light"] #shell .card :is(h1,h2,h3,h4,p,small,label,.muted,.tiny,.field-note,.subhead,.eyebrow),:root[data-pitch-theme="light"] #shell .playbook-panel :is(h2,p,label),:root[data-pitch-theme="light"] #shell .tactics-panel :is(h2,p,label){color:#171717!important}
:root[data-pitch-theme="light"] #shell .card .item,:root[data-pitch-theme="light"] #shell .card .stat,:root[data-pitch-theme="light"] #shell .card .notice,:root[data-pitch-theme="light"] #shell .card .playbook-explain{background:#f1f2f3!important;color:#171717!important;border-color:#b1b1b1!important}
:root[data-pitch-theme="light"] #shell .card .item *,:root[data-pitch-theme="light"] #shell .card .stat *,:root[data-pitch-theme="light"] #shell .card .notice *,:root[data-pitch-theme="light"] #shell .card .playbook-explain *{color:#171717!important}
:root[data-pitch-theme="light"] #shell .card input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),:root[data-pitch-theme="light"] #shell .card select,:root[data-pitch-theme="light"] #shell .card textarea{background:#fff!important;color:#171717!important;border-color:#777!important}
:root[data-pitch-theme="light"] #shell .card .btn:not(.primary):not(.warn){background:#e5e7eb;color:#171717;border-color:#888}
:root[data-pitch-theme="light"] #shell .card .pill:not(.live){background:#f5edbb!important;color:#171717!important}
:root[data-pitch-theme="sun"]{--pitch-ui-ink:#090909;--bg:#fff;--panel:#fff;--panel2:#fff;--text:#090909;--muted:#222}
:root[data-pitch-theme="sun"] #shell .card,:root[data-pitch-theme="sun"] #shell .playbook-panel,:root[data-pitch-theme="sun"] #shell .tactics-panel{background:#fff!important;color:#090909!important;border:2px solid #111!important}
:root[data-pitch-theme="sun"] #shell .card :is(h1,h2,h3,h4,p,small,label,.muted,.tiny,.field-note,.subhead,.eyebrow),:root[data-pitch-theme="sun"] #shell .playbook-panel :is(h2,p,label),:root[data-pitch-theme="sun"] #shell .tactics-panel :is(h2,p,label){color:#090909!important}
:root[data-pitch-theme="sun"] #shell .card .item,:root[data-pitch-theme="sun"] #shell .card .stat,:root[data-pitch-theme="sun"] #shell .card .notice{background:#fff!important;color:#090909!important;border:2px solid #111!important}
:root[data-pitch-theme="sun"] #shell .card .item *,:root[data-pitch-theme="sun"] #shell .card .stat *,:root[data-pitch-theme="sun"] #shell .card .notice *{color:#090909!important}
:root[data-pitch-theme="sun"] #shell .card input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),:root[data-pitch-theme="sun"] #shell .card select,:root[data-pitch-theme="sun"] #shell .card textarea{background:#fff!important;color:#090909!important;border:2px solid #111!important}
/* Never repaint semantic badges, tactical ink, jerseys, or pitch markers. */

/* alpha14.2: explicit readable end-of-match warning on every theme */
:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) .end-game-panel{background:#42272c!important;border:2px solid #e37a87!important;color:#fff!important}
:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) .end-game-panel .end-game-copy,:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) .end-game-panel .end-game-copy strong{color:#fff!important}
:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) .end-game-panel .end-game-copy p{color:#f2dce0!important}
:root[data-pitch-theme="light"] .end-game-panel,:root[data-pitch-theme="sun"] .end-game-panel{background:#fff0f1!important;border:2px solid #a32030!important;color:#231316!important}
:root[data-pitch-theme="light"] .end-game-panel .end-game-copy,:root[data-pitch-theme="sun"] .end-game-panel .end-game-copy,:root[data-pitch-theme="light"] .end-game-panel .end-game-copy strong,:root[data-pitch-theme="sun"] .end-game-panel .end-game-copy strong{color:#231316!important}
:root[data-pitch-theme="light"] .end-game-panel .end-game-copy p,:root[data-pitch-theme="sun"] .end-game-panel .end-game-copy p{color:#4a292e!important}
.pitch-settings #pitch-appearance-status{font-weight:650}


/* alpha14.3: schedule light cards always use dark ink, regardless of parent card theme */
#shell #sched-events .schedule-event { color:#171717!important; }
#shell #sched-events .schedule-event .schedule-day strong,
#shell #sched-events .schedule-event .schedule-day small,
#shell #sched-events .schedule-event .schedule-detail strong,
#shell #sched-events .schedule-event .schedule-detail small,
#shell #sched-events .schedule-event .schedule-detail span,
#shell #sched-events .schedule-event .schedule-detail p,
#shell #sched-events .schedule-event .schedule-detail .muted {
  color:#252525!important; opacity:1!important;
}
#shell #sched-events .schedule-event .schedule-detail a {
  color:#064b91!important; text-decoration:underline!important;
}
#shell #sched-events .schedule-event--match .schedule-detail>strong {color:#463700!important}
#shell #sched-events .schedule-event .pitch-kind {color:#171717!important}
#shell #sched-events .schedule-event--canceled .pitch-kind {color:#fff!important}
#shell #sched-events .schedule-event .pitch-canceled {color:#991b1b!important}
/* Keep status pills legible and the finalization warning consistent. */
#shell .end-game-panel {background:#42272c!important;border:2px solid #e37a87!important;color:#fff!important}
#shell .end-game-panel .end-game-copy strong {color:#fff!important}
#shell .end-game-panel .end-game-copy p {color:#f9e7ea!important;opacity:1!important}
:root[data-pitch-theme="light"] #shell .end-game-panel,
:root[data-pitch-theme="sun"] #shell .end-game-panel {background:#fff0f1!important;color:#231316!important}
:root[data-pitch-theme="light"] #shell .end-game-panel .end-game-copy strong,
:root[data-pitch-theme="sun"] #shell .end-game-panel .end-game-copy strong {color:#231316!important}
:root[data-pitch-theme="light"] #shell .end-game-panel .end-game-copy p,
:root[data-pitch-theme="sun"] #shell .end-game-panel .end-game-copy p {color:#4a292e!important}

/* alpha14.5: compact, portrait-first Matchday Roster cards.
   Scope rules to the unified roster so other tables remain unchanged. */
.pitch-unified-roster,
.pitch-unified-roster * {box-sizing:border-box}
.pitch-unified-roster {min-width:0;max-width:100%}
.pitch-unified-roster #unified-roster-table.pitch-roster-container {
  width:100%;max-width:100%;min-width:0;overflow-x:hidden;
}
.pitch-unified-roster .pitch-roster-cards {display:grid;grid-template-columns:minmax(0,1fr);gap:9px}
.pitch-unified-roster .pitch-roster-card {
  display:grid;gap:8px;min-width:0;padding:11px 13px;
  border:1px solid var(--edge, #575757);border-radius:12px;
  background:var(--panel2, #353535);color:var(--text, #fff);
}
.pitch-unified-roster .pitch-roster-card-head,
.pitch-unified-roster .pitch-roster-card-foot {
  display:flex;align-items:center;gap:9px;min-width:0;
}
.pitch-unified-roster .pitch-roster-card-head {justify-content:space-between}
.pitch-unified-roster .pitch-roster-person {display:flex;align-items:center;gap:9px;flex:1 1 auto;min-width:0}
.pitch-unified-roster .pitch-roster-identity {display:flex;flex-direction:column;gap:2px;min-width:0}
.pitch-unified-roster .pitch-roster-identity strong {color:var(--text,#fff);font-size:.94rem;line-height:1.2;overflow-wrap:anywhere}
.pitch-unified-roster .pitch-roster-meta {color:var(--muted,#c0c0c0);font-size:.78rem}
.pitch-unified-roster .pitch-roster-avatar {width:36px;height:36px;min-width:36px;flex-shrink:0}
.pitch-unified-roster .pitch-roster-badge {
  margin:0;display:inline-flex;align-items:center;min-width:0;
  font-size:.72rem;line-height:1.2;padding:5px 8px;overflow-wrap:anywhere;
}
.pitch-unified-roster .pitch-roster-card-head>.pitch-roster-badge {flex:0 1 auto;max-width:38%;text-align:center}
.pitch-unified-roster .pitch-roster-card-foot {flex-wrap:wrap}
.pitch-unified-roster .pitch-roster-indicators {display:flex;align-items:center;flex:1 1 170px;flex-wrap:wrap;gap:5px;min-width:0}
.pitch-unified-roster .pitch-roster-starter {
  display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
  font-size:.79rem;color:var(--text,#fff);cursor:pointer;flex:0 0 auto;
}
.pitch-unified-roster .pitch-roster-starter input {width:18px;height:18px;margin:0;accent-color:var(--accent,#d9bd08)}
.pitch-unified-roster .pitch-roster-action {
  flex:0 0 auto;max-width:100%;white-space:normal;
  padding:8px 11px;line-height:1.15;min-height:36px;
}
.pitch-unified-roster .pitch-roster-tabs button[aria-pressed="true"] {
  background:var(--accent,#d9bd08);color:var(--accent-text,#171717);
}
.pitch-unified-roster .pitch-roster-summary,
.pitch-unified-roster .pitch-roster-tabs {max-width:100%;min-width:0}
@media(max-width:700px){
 .pitch-unified-roster .pitch-roster-card {padding:10px;gap:8px}
 .pitch-unified-roster .pitch-roster-card-foot {gap:7px}
 .pitch-unified-roster .pitch-roster-indicators {flex-basis:100%}
 .pitch-unified-roster .pitch-roster-action {margin-left:auto}
}
@media(max-width:390px){
 .pitch-unified-roster .pitch-roster-card-head {align-items:flex-start}
 .pitch-unified-roster .pitch-roster-card-head>.pitch-roster-badge {max-width:40%}
 .pitch-unified-roster .pitch-roster-action {font-size:.75rem}
}


/* alpha14.6: tablet-portrait-first consolidated player command */
.pitch-unified-roster .pitch-roster-card{gap:8px}
.pitch-unified-roster .pitch-roster-card-foot{display:grid;grid-template-columns:minmax(0,1fr) 108px minmax(120px,155px);gap:9px;align-items:center}
.pitch-unified-roster .pitch-roster-indicators{min-width:0;flex-basis:auto}
.pitch-unified-roster .pitch-roster-starter{justify-self:start;min-width:0}
.pitch-unified-roster .pitch-roster-action{width:100%;min-width:0;justify-self:stretch}
.pitch-unified-roster .pitch-roster-card-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;border-top:1px solid var(--edge,#555);padding-top:8px}
.pitch-unified-roster .pitch-roster-availability-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.78rem;color:var(--muted,#ccc);min-width:0}
.pitch-unified-roster .pitch-roster-availability-label select{max-width:100%;min-width:0;width:auto;padding:6px 8px;font-size:.8rem;color:var(--text,#fff);background:var(--panel,#303030)}
.pitch-unified-roster .pitch-roster-minutes{min-height:32px}
.pitch-command-source-hidden{display:none!important}
@media(max-width:800px){
 .pitch-unified-roster .pitch-roster-card-foot{grid-template-columns:minmax(0,1fr) 100px minmax(108px,140px)}
}
@media(max-width:590px){
 .pitch-unified-roster .pitch-roster-card-foot{grid-template-columns:minmax(0,1fr) minmax(96px,125px)}
 .pitch-unified-roster .pitch-roster-indicators{grid-column:1/-1}
 .pitch-unified-roster .pitch-roster-starter{grid-column:1}
 .pitch-unified-roster .pitch-roster-action{grid-column:2}
 .pitch-unified-roster .pitch-roster-card-controls{align-items:stretch}
 .pitch-unified-roster .pitch-roster-availability-label{flex:1 1 100%}
}
/* P.I.T.C.H. alpha14.6.1 — viewport containment for iPhone Safari/PWA.
   Keep browser pinch zoom enabled. Do not change coach field gesture handling. */
@media (max-width: 700px) {
  html { width:100%; max-width:100%; overflow-x:clip; }
  body { width:100%; max-width:100%; overflow-x:clip; overscroll-behavior-x:none; }
  #shell.shell { width:100%; max-width:100%; min-width:0; overflow-x:clip; }
  #shell .main-wrap { flex:1 1 auto; width:100%; max-width:100%; min-width:0; overflow-x:clip; }
  #shell main, #shell #content, #shell #live-view-content { width:100%; max-width:100%; min-width:0; }
  #live-view-content .layout-2, #live-view-content .layout-2 > *,
  #live-view-content .field-wrap, #live-view-content .card,
  #live-view-content .scoreboard, #live-view-content .parent-live-sections {
    min-width:0; max-width:100%;
  }
  #live-view-content #live-field { display:block; width:100%; max-width:100%; }
  #live-view-content .score-grid { min-width:0; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); }
  #live-view-content .score-grid > * { min-width:0; }
  #live-view-content .score-team { overflow-wrap:anywhere; }
  /* Read-only field accepts vertical page swipes, not horizontal panning. */
  #live-field, #live-field .pitch-markers, #live-field .player-token { touch-action:pan-y pinch-zoom !important; }
  /* Rapid tapping buttons should not trigger double-tap zoom. */
  #live-view-content button, #live-view-content a, #mobile-nav { touch-action:manipulation; }
}

/* alpha14.6.2: equal-height score columns and consistent match header */
.scoreboard .pitch-match-designation{
  text-align:center;font-size:.78rem;font-weight:650;letter-spacing:.12em;
  color:var(--muted,#bfc7cd);margin:3px 0 12px;
}
.scoreboard .score-grid,
.scoreboard .score-grid-fixed{align-items:stretch}
.scoreboard .score-side{display:flex;flex-direction:column;align-items:center;min-width:0}
.scoreboard .score-team{min-height:2.6em;display:flex;align-items:center;justify-content:center;text-align:center;overflow-wrap:anywhere}
.scoreboard .score-number{margin-top:auto}
.parent-scoreboard .score-grid>div:not(.score-divider){display:flex;flex-direction:column;align-items:center;min-width:0}
.parent-scoreboard .score-grid .score-team{min-height:2.6em}
.parent-scoreboard .score-grid .score-number{margin-top:auto}
@media(max-width:540px){
 .scoreboard .score-info{font-size:.73rem;text-align:center;overflow-wrap:anywhere}
 .scoreboard .pitch-match-designation{font-size:.69rem}
 .scoreboard .score-team{font-size:.85rem}
}


/* P.I.T.C.H. alpha14.6.3: LED scoreboard; scoped to live match boards.
   No background image or font downloads; accessible real text and controls. */
#shell .scoreboard,
#live-view-content .scoreboard.parent-scoreboard {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#192229 0%,#0b1014 65%,#121c20 100%) !important;
  border:2px solid #54676d!important;border-radius:22px!important;
  color:#f5f8f9!important;
  box-shadow:inset 0 0 0 3px #070c10,inset 0 0 24px #000b,0 12px 26px #0005!important;
  padding:clamp(12px,2.4vw,25px)!important;
  min-width:0;max-width:100%;
}
#shell .scoreboard::before,
#live-view-content .scoreboard.parent-scoreboard::before{
  content:"";pointer-events:none;position:absolute;inset:5px;
  border:1px solid #4f6e60;border-radius:16px;opacity:.6;
  box-shadow:0 0 8px #32df7550;
}
#shell .scoreboard .score-info,
#live-view-content .scoreboard.parent-scoreboard .score-info{
  color:#f5c930!important;text-align:center!important;
  font-size:clamp(11px,1.8vw,17px)!important;
  font-weight:800!important;letter-spacing:.085em;line-height:1.4;
  text-shadow:0 0 8px #d3a81c55;
  margin:0!important;
}
#shell .scoreboard .pitch-match-designation,
#live-view-content .scoreboard.parent-scoreboard .pitch-match-designation{
  color:#b9c7ce!important;text-align:center;
  font-size:clamp(10px,1.5vw,13px);font-weight:700;
  margin:3px 0 14px;letter-spacing:.09em;
}
#shell .scoreboard .score-grid,
#live-view-content .scoreboard.parent-scoreboard .score-grid{
  display:grid!important;grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr)!important;
  align-items:stretch!important;gap:clamp(4px,1.5vw,14px)!important;
  min-width:0;width:100%;
}
#shell .scoreboard .score-side,
#live-view-content .scoreboard.parent-scoreboard .score-grid>div:not(.score-divider){
  min-width:0!important;display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:flex-start!important;
  padding:clamp(8px,1.5vw,17px)!important;
  border:1px solid #28744e;border-radius:14px;
  background:linear-gradient(160deg,#142025,#080e12)!important;
  box-shadow:inset 0 0 0 2px #071011,0 0 10px #1b9a4c25;
}
#shell .scoreboard .score-team,
#live-view-content .scoreboard.parent-scoreboard .score-team{
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex-wrap:wrap;gap:6px;min-height:3.4em!important;
  font-size:clamp(11px,1.8vw,19px)!important;
  font-weight:800!important;line-height:1.2!important;
  color:#fff!important;text-align:center!important;
  overflow-wrap:anywhere;max-width:100%;margin:0!important;
}
#shell .scoreboard .score-team .team-logo,
#live-view-content .scoreboard.parent-scoreboard .score-team .team-logo{
  width:clamp(22px,3.6vw,38px);height:clamp(22px,3.6vw,38px);object-fit:contain;
}
#shell .scoreboard .score-number,
#live-view-content .scoreboard.parent-scoreboard .score-number{
  display:flex;align-items:center;justify-content:center;
  width:100%;min-width:0;min-height:1.55em;
  margin:7px 0 0!important;padding:3px 2px!important;
  background:#05090c;border:1px solid #263b42;border-radius:10px;
  color:#ff554e!important;
  font-family:"Courier New",ui-monospace,monospace!important;
  font-weight:900!important;font-size:clamp(39px,8vw,94px)!important;
  line-height:1.2!important;letter-spacing:.015em!important;
  font-variant-numeric:tabular-nums;
  text-shadow:0 0 5px #ff3939,0 0 19px #e1222266!important;
}
#shell .scoreboard .score-divider,
#live-view-content .scoreboard.parent-scoreboard .score-divider{
  align-self:center!important;color:#b6c8ce!important;
  font-size:clamp(18px,4vw,30px)!important;line-height:1!important;
}
#shell .scoreboard .score-controls{
  display:flex!important;flex-wrap:wrap;justify-content:center;
  gap:6px;margin-top:10px;min-width:0;
}
#shell .scoreboard .score-controls .btn{
  min-width:0!important;margin:0!important;padding:7px 9px!important;
  color:#f8fafb!important;background:#28363c!important;
  border:1px solid #5b6b72!important;border-radius:10px!important;
  font-size:clamp(11px,1.5vw,14px)!important;
}
#shell .scoreboard .clock-readout,
#live-view-content .scoreboard.parent-scoreboard .parent-match-clock strong{
  color:#ffcc25!important;
  font-family:"Courier New",ui-monospace,monospace!important;
  font-variant-numeric:tabular-nums;font-weight:900!important;
  text-shadow:0 0 6px #ffc421,0 0 18px #e9a70088!important;
  letter-spacing:.02em;
}
#shell .scoreboard .clock-readout{
  font-size:clamp(36px,6vw,70px)!important;line-height:1.1!important;
}
#live-view-content .scoreboard.parent-scoreboard .parent-match-clock{
  background:#080e11!important;border:1px solid #31474c!important;
  border-radius:12px!important;padding:12px 8px!important;
  margin:14px 0 4px!important;
}
#live-view-content .scoreboard.parent-scoreboard .parent-match-clock strong{
  font-size:clamp(30px,8vw,54px)!important;
}
#live-view-content .scoreboard.parent-scoreboard .parent-match-clock span,
#live-view-content .scoreboard.parent-scoreboard .parent-match-clock small,
#shell .scoreboard .muted{
  color:#c0cbd0!important;
}
@media(max-width:540px){
 #shell .scoreboard,#live-view-content .scoreboard.parent-scoreboard{
  padding:12px 9px!important;border-radius:15px!important;
 }
 #shell .scoreboard .score-grid,
 #live-view-content .scoreboard.parent-scoreboard .score-grid{
  grid-template-columns:minmax(0,1fr) 8px minmax(0,1fr)!important;gap:4px!important;
 }
 #shell .scoreboard .score-side,
 #live-view-content .scoreboard.parent-scoreboard .score-grid>div:not(.score-divider){
  padding:7px 4px!important;border-radius:10px!important;
 }
 #shell .scoreboard .score-team,
 #live-view-content .scoreboard.parent-scoreboard .score-team{
  min-height:4em!important;font-size:11px!important;
 }
 #shell .scoreboard .score-number,
 #live-view-content .scoreboard.parent-scoreboard .score-number{
  font-size:clamp(38px,11vw,58px)!important;
 }
 #shell .scoreboard .score-controls .btn{padding:6px!important;font-size:11px!important}
}
@media(prefers-reduced-motion:reduce){
 #shell .scoreboard *,#live-view-content .scoreboard.parent-scoreboard *{animation:none!important}
}


/* alpha14.6.4 seven-segment green scores / amber clock */
.scoreboard .pitch-led-digits{
  display:inline-flex!important;align-items:center;justify-content:center;
  gap:clamp(1px,.4vw,5px);max-width:100%;min-width:0;
  height:1em;vertical-align:middle;
}
.scoreboard .score-number .pitch-led-digits{height:clamp(52px,9vw,108px)}
.scoreboard .clock-readout .pitch-led-digits{height:clamp(37px,6vw,68px)}
.scoreboard .parent-match-clock strong .pitch-led-digits{height:clamp(32px,8vw,57px)}
.scoreboard .pitch-led-digit{height:100%;width:auto;max-width:100%;overflow:visible;flex-shrink:1}
.scoreboard .pitch-led-colon{height:100%;width:auto;flex-shrink:1;overflow:visible;fill:currentColor}
.scoreboard .score-number{color:#43f58b!important;text-shadow:none!important}
.scoreboard .clock-readout,.scoreboard .parent-match-clock strong{color:#ffcc25!important;text-shadow:none!important}
.scoreboard .pitch-led-digit .lit{fill:currentColor;filter:drop-shadow(0 0 3px currentColor)}
.scoreboard .pitch-led-digit .unlit{fill:#102019;opacity:.22;filter:none}
.scoreboard .clock-readout .pitch-led-digit .unlit,
.scoreboard .parent-match-clock .pitch-led-digit .unlit{fill:#332709;opacity:.22}
@media(max-width:540px){
 .scoreboard .score-number .pitch-led-digits{height:clamp(39px,12vw,62px)}
 .scoreboard .clock-readout .pitch-led-digits{height:clamp(32px,9vw,48px)}
}

/* alpha14.6.5: emerald scores and centered clock on coach scoreboard */
#shell .scoreboard .score-number .pitch-led-digit polygon.lit,
#shell .parent-scoreboard .score-number .pitch-led-digit polygon.lit{
  fill:#43f58b!important;
  filter:drop-shadow(0 0 3px rgba(67,245,139,.58))!important;
}
#shell .scoreboard .score-number .pitch-led-digit polygon.unlit,
#shell .parent-scoreboard .score-number .pitch-led-digit polygon.unlit{
  fill:#102019!important;opacity:.22!important;filter:none!important;
}
#shell .scoreboard .clock-readout .pitch-led-digit polygon.lit,
#shell .parent-scoreboard .parent-match-clock .pitch-led-digit polygon.lit{
  fill:#ffcc25!important;filter:drop-shadow(0 0 3px rgba(255,204,37,.5))!important;
}
/* Only the coach scoreboard has a direct child split containing clock controls. */
#shell .scoreboard > .split.mt{
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;
  text-align:center!important;gap:12px!important;
}
#shell .scoreboard > .split.mt > div:first-child{
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;
  width:100%;min-width:0;text-align:center!important;
}
#shell .scoreboard #clock-display{
  display:flex!important;justify-content:center!important;align-items:center!important;
  width:fit-content;max-width:100%;margin:0 auto!important;
  padding:10px 20px!important;background:#03090b!important;
  border:1px solid #284c41!important;border-radius:12px!important;
  box-shadow:inset 0 0 14px #0009!important;
}
#shell .scoreboard #clock-rule-label{text-align:center!important;margin-top:7px!important}
#shell .scoreboard > .split.mt > .btn-row{
  display:flex!important;justify-content:center!important;align-items:center!important;
  flex-wrap:wrap!important;max-width:100%;gap:8px!important;
}
@media(max-width:540px){#shell .scoreboard #clock-display{padding:8px 12px!important}}

/* PITCH: scoped advanced-player-statistics contrast fix.
   Mobile rows were hard-coded white/mint while global theme forced white text. */
#shell #season-stats-section .season-stat-summary tbody tr{
 background:#343434!important;color:#fff!important;
 border:1px solid #656565!important;
}
#shell #season-stats-section .season-stat-summary tbody tr.stats-selected-row{
 background:#403b25!important;color:#fff!important;
 border:2px solid #d9bd08!important;
 box-shadow:inset 4px 0 #d9bd08,0 0 0 1px rgba(217,189,8,.12)!important;
}
#shell #season-stats-section .season-stat-summary tbody tr td,
#shell #season-stats-section .season-stat-summary tbody tr td strong,
#shell #season-stats-section .season-stat-summary tbody tr td small{
 color:#fff!important;
}
#shell #season-stats-section .season-stat-summary tbody tr td[data-label]::before{
 color:#cbd5e1!important;opacity:1!important;
}
#shell #season-stats-section .season-stat-summary tbody tr td:first-child{
 border-bottom-color:#737373!important;box-shadow:none!important;
}
#shell #season-stats-section .season-stat-summary tbody tr.stats-selected-row td:first-child{
 box-shadow:inset 3px 0 #d9bd08!important;
}
#shell #season-stats-section .season-stat-summary tbody tr td .btn{
 background:#505050!important;color:#fff!important;border:1px solid #888!important;
}
#shell #season-stats-section .season-stat-summary tbody tr.stats-selected-row td .btn{
 background:#d9bd08!important;color:#171717!important;border-color:#d9bd08!important;
}
#shell #season-stats-section .season-stat-summary tbody tr td .btn:focus-visible{
 outline:3px solid #f6e27b!important;outline-offset:2px;
}
#shell #season-stats-section .season-stat-summary tbody tr:hover{
 background:#444!important;
}
#shell #season-stats-section .season-stat-summary tbody tr.stats-selected-row:hover{
 background:#484027!important;
}
/* PITCH match-by-match record: mobile card contrast, scoped to player stats */
@media (max-width:1200px){
 #shell #season-stats-section .season-stat-history tbody tr{
   background:#343434!important;color:#fff!important;border:1px solid #656565!important;
 }
 #shell #season-stats-section .season-stat-history tbody tr td,
 #shell #season-stats-section .season-stat-history tbody tr td strong,
 #shell #season-stats-section .season-stat-history tbody tr td small{
   color:#fff!important;
 }
 #shell #season-stats-section .season-stat-history tbody tr td[data-label]::before{
   color:#cbd5e1!important;opacity:1!important;
 }
 #shell #season-stats-section .season-stat-history tbody tr td:first-child{
   border-bottom-color:#737373!important;box-shadow:none!important;
 }
 #shell #season-stats-section .season-stat-history tbody tr:hover{
   background:#414141!important;
 }
}

/* P.I.T.C.H. Family Live Board contrast fix, 2026-11-13.
   The live-page controls sit on the light main canvas even in Classic Dark.
   Scope this pairing to these two controls; do not modify the dark scoreboard. */
#shell label:has(> #live-view-match) {
  color:#202725 !important;
  font-weight:800;
}
#shell .parent-goal-pref {
  background:#e4e8e5;
  border:1px solid #bdc9c2;
  color:#202725 !important;
  font-weight:750;
  opacity:1;
}
#shell .parent-goal-pref input[type="checkbox"] {
  flex:0 0 18px;
  accent-color:#247b50;
}
/* Explicit light-mode pairing as well; applies if cards elsewhere use high-specificity rules. */
:root:is([data-pitch-theme="light"],[data-pitch-theme="sun"]) #shell label:has(> #live-view-match),
:root:is([data-pitch-theme="light"],[data-pitch-theme="sun"]) #shell .parent-goal-pref {
  color:#171717 !important;
}


/* Custom color pickers alongside the four fast tactical ink swatches. */
.board-toolbar .custom-ink-picker {display:inline-flex;align-items:center;gap:6px;color:inherit;font-size:12px;font-weight:700;white-space:nowrap;min-width:0}
.board-toolbar .custom-ink-picker input[type="color"] {width:39px;height:35px;min-width:39px;padding:2px;border:1px solid #879799;border-radius:9px;background:#343637;cursor:pointer;vertical-align:middle}
.board-toolbar .custom-ink-picker input[type="color"]::-webkit-color-swatch-wrapper {padding:1px}
.board-toolbar .custom-ink-picker input[type="color"]::-webkit-color-swatch {border:0;border-radius:5px}
.board-toolbar .custom-ink-picker input[type="color"]:focus-visible {outline:2px solid #d9bd08;outline-offset:2px}

/* PITCH_HEADER_TEAM_CREST_20261113 */
/* Crest lives in the existing title column: no extra header rows or palette override. */
#shell .topbar .pitch-header-identity{display:flex;align-items:center;gap:11px;min-width:0;flex:1 1 auto}
#shell .topbar .pitch-header-copy{min-width:0;overflow:hidden}
#shell .topbar .pitch-header-crest{
 display:block;flex:0 0 46px;width:46px;height:46px;object-fit:contain;
 background:#e6f0e9;border:1px solid #61766c;border-radius:11px;
 padding:3px;box-sizing:border-box;
}
#shell .topbar .pitch-header-copy h1{overflow-wrap:anywhere}
@media(max-width:700px){
 #shell .topbar .pitch-header-identity{gap:9px}
 #shell .topbar .pitch-header-crest{flex-basis:42px;width:42px;height:42px;border-radius:9px}
 #shell .topbar .pitch-header-copy .eyebrow{font-size:8px;line-height:1.2}
}
@media(max-width:360px){
 #shell .topbar .pitch-header-identity{gap:7px}
 #shell .topbar .pitch-header-crest{flex-basis:36px;width:36px;height:36px}
 #shell .topbar .pitch-header-copy h1{font-size:18px}
}

/* P.I.T.C.H. notification center */
.pitch-notification-entry{border:1px solid var(--border,#7775);border-radius:10px;padding:12px;margin:6px 0;}
.pitch-notification-entry.unread{border-left:3px solid #D9BD08;}
.pitch-notification-entry p{margin:5px 0;}
.pitch-notif-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 5px;border-radius:16px;background:#D9BD08;color:#222;font-size:11px;font-weight:800;margin-left:6px;}
/* Matchday shot/attribution UI v0.8.0-alpha14.8.0 */
.score-controls{display:flex;gap:6px;flex-wrap:wrap;align-items:center;justify-content:center}
.score-controls .btn{min-height:36px;padding:7px 10px}
.pitch-avatar-attribution{max-width:min(92vw,570px);max-height:85dvh;overflow:auto}
.pitch-event-field{margin:12px 0}
.pitch-event-field>strong{display:block;margin-bottom:7px}
.pitch-event-selected,.pitch-event-person{width:100%;display:flex;align-items:center;text-align:left;gap:12px;border:1px solid #bdd9c7;border-radius:13px;padding:10px;background:#fafffb;color:#183e30;cursor:pointer;min-height:67px}
.pitch-event-selected{border-color:#8ea99c}
.pitch-choice-copy{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}
.pitch-choice-copy strong{font-size:1rem;white-space:normal}
.pitch-choice-copy small{font-size:.85rem;color:#597b6e}
.pitch-avatar-round{display:flex;align-items:center;justify-content:center;width:50px;height:50px;min-width:50px;border-radius:50%;overflow:hidden;background:#dcebe3;color:#19553f;font-weight:700}
.pitch-avatar-round img,.pitch-avatar-round .roster-photo{width:100%;height:100%;border-radius:50%;object-fit:cover}
.pitch-event-list{padding:8px 0}
.pitch-event-list input{width:100%;min-height:44px;margin:0 0 8px;border-radius:10px;padding:8px 12px}
.pitch-event-list [data-avatar-options]{max-height:300px;overflow:auto;display:flex;flex-direction:column;gap:7px}
.pitch-event-person:hover,.pitch-event-person:focus-visible{border-color:#b9a000;background:#fffced}
.pitch-event-chevron{font-size:1.3rem}
.pitch-shot-choices{display:grid;gap:10px;margin-bottom:12px}
.pitch-shot-choices .btn{min-height:50px;white-space:normal}
/* P.I.T.C.H. v0.8.0-alpha14.8.2 — compact roster and accessible light panels */
#shell .pitch-roster-stats-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin:12px 0 16px;padding:10px;border:1px solid #5d6264;border-radius:12px;background:#292b2c}
#shell .pitch-roster-stats-controls label{color:#f7f7f7;font-weight:700;flex:1;min-width:140px}
#shell .pitch-roster-stats-controls select{max-width:240px;margin-top:5px}
#shell #roster-stats-status{flex-basis:100%;color:#d6ddd9!important;margin:0}
#shell .pitch-roster-entry{border:1px solid #666;border-radius:13px;background:#3d3d3d;overflow:hidden}
#shell .pitch-roster-entry>.roster-item{border:0;background:transparent;margin:0;border-radius:0;display:flex;align-items:center;gap:9px}
#shell .pitch-roster-entry .roster-desc{flex:1;min-width:0}
#shell .pitch-roster-expand{min-width:42px;min-height:42px;font-size:23px;line-height:1;flex-shrink:0}
#shell .pitch-roster-expanded{border-top:1px solid #656565;background:#303232;padding:14px}
#shell .pitch-roster-expanded[hidden]{display:none!important}
#shell .pitch-roster-stat-content h3{margin:0 0 10px;color:#f7f7f7}
#shell .pitch-roster-stat-group{margin:10px 0 16px}
#shell .pitch-roster-stat-group h4{color:#f5f5f5;margin:0 0 8px;font-size:.95rem}
#shell .pitch-roster-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(95px,1fr));gap:7px}
#shell .pitch-roster-stat{background:#222a2a;border:1px solid #58635d;border-radius:9px;padding:9px;display:flex;flex-direction:column;gap:5px;min-width:0}
#shell .pitch-roster-stat small{color:#d1dcd7;font-size:.73rem}
#shell .pitch-roster-stat strong{color:#fff;font-size:1.1rem;font-variant-numeric:tabular-nums}
#shell .pitch-roster-history{border:1px solid #6b716d;border-radius:12px;margin:15px 0;background:#262a29}
#shell .pitch-roster-history summary{padding:13px 14px;cursor:pointer;color:#f7f7f7;font-weight:700}
#shell .pitch-roster-history summary:focus-visible{outline:3px solid #d9bd08;outline-offset:2px}
#shell .pitch-roster-match-list{padding:0 10px 10px;display:grid;gap:10px}
#shell .pitch-roster-match{border:1px solid #5b645e;border-radius:10px;padding:10px;background:#383b3a}
#shell .pitch-roster-match-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;margin-bottom:10px}
#shell .pitch-roster-match-head strong{color:white}
#shell .pitch-roster-match-head small{color:#d2dfd7}
/* Edit Player: inputs stay charcoal; labels on pale panel become dark */
#shell #player-edit-panel .player-edit{background:#eff9f3!important;border:1px solid #9dc7ad!important;color:#143c2e!important}
#shell #player-edit-panel .player-edit h2,#shell #player-edit-panel .player-edit h3,#shell #player-edit-panel .player-edit label,#shell #player-edit-panel .player-edit label span,#shell #player-edit-panel .player-edit .muted,#shell #player-edit-panel .player-edit small,#shell #player-edit-panel .player-edit .field-note{color:#163d2f!important;opacity:1!important;text-shadow:none!important}
#shell #player-edit-panel .player-edit input:not([type=checkbox]),#shell #player-edit-panel .player-edit select{background:#252525!important;color:#fff!important;border:1px solid #7c9589!important}
#shell #player-edit-panel .player-edit button.btn:not(.primary):not(.warn){color:#fff!important;background:#505050!important;border-color:#777!important}
#shell #player-edit-panel .player-edit .btn.primary{background:#d9bd08!important;color:#181818!important}
/* Shot outcome dialog: readable heading, instructions, and cancel */
dialog.pitch-shot-outcome{background:#f4faf6!important;color:#153c2d!important;color-scheme:light}
dialog.pitch-shot-outcome h2{color:#153c2d!important;text-shadow:none!important}
dialog.pitch-shot-outcome .field-note{color:#405c50!important;opacity:1!important;text-shadow:none!important}
dialog.pitch-shot-outcome .pitch-shot-choices .btn{background:#464b4d!important;color:#fff!important;border:1px solid #697477!important;opacity:1!important}
dialog.pitch-shot-outcome [data-shot-cancel]{background:#e2ebe5!important;color:#193c2f!important;border:1px solid #8aab97!important;opacity:1!important}
@media(max-width:580px){#shell .pitch-roster-entry>.roster-item{gap:7px;padding:9px}#shell .pitch-roster-expand{min-width:40px}#shell .pitch-roster-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* PITCH announcement schedule badge 2026-11-13 */
/* Force readable text on announcement cards in both dark and sunlight modes. */
#main .pitch-alpha12-announcement { background:#f6faf7 !important; border-color:#bfdbca !important; border-left-color:#237a58 !important; color:#20372a !important; }
#main .pitch-alpha12-announcement strong { color:#193c2a !important; opacity:1 !important; }
#main .pitch-alpha12-announcement small { color:#526358 !important; opacity:1 !important; }
#main .pitch-alpha12-announcement p { color:#273e30 !important; opacity:1 !important; -webkit-text-fill-color:#273e30 !important; }
#nav button[data-page="schedule"] .pitch-schedule-unread { margin-left:8px; }

/* PITCH VOLTRON MULTITEAM 2026-11-13 */
/* Red indicator stays visible on closed native dropdown (including unread on other teams). */
.top-team-picker{position:relative}
.top-team-picker .pitch-team-unread-dot{position:absolute;right:35px;bottom:16px;width:10px;height:10px;min-width:10px;border:2px solid #282828;border-radius:50%;background:#e23b46;box-shadow:0 0 0 1px #f5b2b7;z-index:2;pointer-events:none}
.top-team-picker .pitch-team-unread-dot[hidden]{display:none!important}
@media(max-width:700px){.top-team-picker .pitch-team-unread-dot{right:36px;bottom:18px}}
/* RSVP input labels inherited near-white from dark-mode forms: force text contrast only. */
#main .pitch-alpha12-rsvp,#main .pitch-alpha12-rsvp-row,#main .pitch-alpha12-rsvp-row label{background:#fff!important;color:#213d32!important;-webkit-text-fill-color:#213d32!important}
#main .pitch-alpha12-rsvp-info strong{color:#163e2e!important;opacity:1!important;-webkit-text-fill-color:#163e2e!important}
#main .pitch-alpha12-rsvp-info small{color:#405b50!important;opacity:1!important;-webkit-text-fill-color:#405b50!important}
#main .pitch-alpha12-rsvp-row select{background:#252525!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:2px solid #77847f!important;opacity:1!important}
/* P.I.T.C.H. Android bottom-navigation chat composer clearance — 2026-11-13.
   Scoped to mobile Sideline Chat; does not affect the tactical field or other pages. */
@media (max-width: 700px) {
  #main .chat-page {
    /* Room to scroll the entire composer above Android's system/browser navigation. */
    padding-bottom: max(96px, calc(34px + env(safe-area-inset-bottom, 0px)));
  }
  #main .chat-room .chat-thread {
    /* Make the message list scroll internally instead of pushing Send below the screen. */
    height: clamp(180px, 32dvh, 320px);
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #main .chat-room .chat-compose {
    flex-wrap: nowrap;
    padding: 12px 10px max(18px, calc(12px + env(safe-area-inset-bottom, 0px)));
    scroll-margin-bottom: 100px;
  }
  #main .chat-room .chat-compose input { min-width: 0; flex: 1 1 auto; }
  #main .chat-room .chat-compose button { flex: 0 0 auto; }
  #main #chat-message { scroll-margin-bottom: 130px; }
}
@supports not (height: 100dvh) {
  @media (max-width: 700px) {
    #main .chat-room .chat-thread { height: clamp(180px, 32vh, 320px); }
  }
}


/* PITCH alpha14.8.5: Player Portal match history contrast.
   Scope to My Stats: coach season-statistics styling remains unchanged. */
#shell .my-stats-page .season-stat-history tbody tr {
  background:#383838 !important;
  color:#f7f7f7 !important;
  border-color:#696969 !important;
}
#shell .my-stats-page .season-stat-history tbody td,
#shell .my-stats-page .season-stat-history tbody td strong,
#shell .my-stats-page .season-stat-history tbody td small {
  color:#f7f7f7 !important;
}
#shell .my-stats-page .season-stat-history tbody td[data-label]::before {
  color:#d6d6d6 !important;
  opacity:1 !important;
}
#shell .my-stats-page .season-stat-history tbody td:first-child {
  border-bottom-color:#777 !important;
}
#shell .my-stats-page .season-stat-history tbody tr:hover {
  background:#454545 !important;
}
@media(max-width:700px) {
  #shell .my-stats-page .season-stat-history tbody tr {
    box-shadow:none !important;
  }
}

/* PITCH Package 1 UI preview: charcoal/gray surfaces, desktop coach icon rail. */
:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) #shell .main-wrap,
:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) #shell main {background:#34383a!important;}
#pitch-sidebar-collapse {display:block;align-self:flex-end;margin:0 0 8px;background:#d9bd08;color:#252525;border:0;border-radius:8px;padding:7px 12px;font-weight:900;min-height:36px;}
#pitch-mobile-sun {display:none;background:transparent;color:inherit;border:1px solid currentColor;border-radius:9px;padding:10px;margin-bottom:9px;text-align:left;}
@media(min-width:701px){
 #shell.pitch-sidebar-collapsed .sidebar{width:76px!important;padding-left:8px!important;padding-right:8px!important;}
 #shell.pitch-sidebar-collapsed .side-brand{padding:6px 0 12px;justify-content:center;}
 #shell.pitch-sidebar-collapsed .side-brand>div{display:none!important;}
 #shell.pitch-sidebar-collapsed .sidebar nav button{font-size:20px!important;text-align:center!important;padding:10px 3px!important;white-space:nowrap;}
 #shell.pitch-sidebar-collapsed .sidebar nav button span{display:none!important;}
 #shell.pitch-sidebar-collapsed .sidebar-foot{font-size:0!important;padding:4px!important;}
 #shell.pitch-sidebar-collapsed .sidebar-foot .pitch-support{display:none!important;}
 #shell.pitch-sidebar-collapsed .sidebar-foot #logout{font-size:12px!important;}
}
@media(max-width:700px){#pitch-sidebar-collapse{display:none!important;}#pitch-mobile-sun{display:block;}}
/* Sunlight Mode: scoreboard must change along with the rest of the page. */
:root[data-pitch-theme="sun"] #shell .scoreboard,
:root[data-pitch-theme="sun"] #shell .scoreboard .score-team,
:root[data-pitch-theme="sun"] #shell .scoreboard .score-number{background:#fff!important;color:#111!important;border-color:#111!important;text-shadow:none!important;}
:root[data-pitch-theme="sun"] #shell .scoreboard :is(h1,h2,h3,span,strong,small,p,label){color:#111!important;text-shadow:none!important;}

/* Package 1 candidate: permit vertical swipes on the field except while drawing or dragging. */
@media (pointer:coarse){
  .pitch:not(.drawing), .pitch:not(.drawing) .pitch-markers, .pitch:not(.drawing) .pitch-canvas {touch-action:pan-y pinch-zoom !important;}
  .pitch.drawing, .pitch.drawing .pitch-canvas, .player-token.dragging {touch-action:none !important;}
}

/* P.I.T.C.H. Package 1 alpha14.8.8: scope and contrast polish. */
:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) #shell .main-wrap,
:root:not([data-pitch-theme="light"]):not([data-pitch-theme="sun"]) #shell main {background:#35383a!important;}
@media(min-width:701px){
 #shell.pitch-sidebar-collapsed #nav button{position:relative;overflow:visible;justify-content:center;min-height:46px;}
 #shell.pitch-sidebar-collapsed #nav button > span:not(.chat-unread-badge):not(.pitch-access-badge){display:none!important;}
 #shell.pitch-sidebar-collapsed #nav button .chat-unread-badge,
 #shell.pitch-sidebar-collapsed #nav button .pitch-access-badge{display:inline-flex!important;position:absolute;right:-6px;top:-6px;z-index:3;font-size:10px;min-width:20px;height:20px;align-items:center;justify-content:center;margin:0;padding:1px 5px;background:#d9bd08!important;color:#111!important;border:2px solid #333;border-radius:20px;}
 #shell.pitch-sidebar-collapsed .sidebar .side-brand .brand-icon{margin:0!important;}
 #shell.pitch-sidebar-collapsed .sidebar .sidebar-foot{margin-top:auto;}
}
#mobile-nav{position:relative;overflow:visible;}
#mobile-nav .pitch-chat-mobile-unread{display:none;}
@media(max-width:700px){
 #mobile-nav .pitch-chat-mobile-unread:not([hidden]){display:inline-flex!important;position:absolute;right:-8px;top:-7px;min-width:20px;height:20px;align-items:center;justify-content:center;padding:1px 4px;background:#D9BD08!important;color:#111!important;border:2px solid #333;border-radius:22px;font-weight:900;font-size:10px;}
 #pitch-mobile-sun{display:flex!important;align-items:center;gap:9px;width:100%;min-height:44px;margin-bottom:10px;}
}
@media(min-width:701px){#pitch-mobile-sun{display:none!important;}}
/* Full-time & GOAL! overlays appear above settings and navigation without changing the current page. */
.parent-goal-overlay,.parent-final-overlay{z-index:9999!important;}
.pitch-finalize-overlay{position:fixed;inset:0;z-index:10050;background:#000b;display:flex;align-items:center;justify-content:center;padding:20px;}
.pitch-finalize-dialog{width:min(100%,480px);background:#333;color:#fff;border:2px solid #D9BD08;border-radius:16px;box-shadow:0 18px 60px #0009;padding:24px;}
.pitch-finalize-dialog h2{margin:0 0 14px;color:#f5d85b;font-size:1.3rem;}
.pitch-finalize-dialog p{line-height:1.5;color:#f3f3f3;}
.pitch-finalize-dialog .btn-row{justify-content:flex-start;gap:12px;margin-top:20px;}
.pitch-finalize-dialog .btn{min-height:44px;}
:root[data-pitch-theme="sun"] .pitch-finalize-dialog{background:#fff;color:#111;border:3px solid #111;}
:root[data-pitch-theme="sun"] .pitch-finalize-dialog :is(h2,p){color:#111;}
/* Sunlight Mode scoreboard: override nested display classes and LED glow. */
:root[data-pitch-theme="sun"] #shell :is(.scoreboard,.parent-scoreboard,.parent-match-scoreboard){background:#fff!important;color:#111!important;border:3px solid #111!important;box-shadow:none!important;}
:root[data-pitch-theme="sun"] #shell :is(.scoreboard,.parent-scoreboard,.parent-match-scoreboard) :is(.score-number,.score-divider,.score-team,.score-info,.score-side,.clock-readout,.parent-clock,.parent-clock-readout,h1,h2,h3,p,small,strong,span){color:#111!important;text-shadow:none!important;}
:root[data-pitch-theme="sun"] #shell :is(.scoreboard,.parent-scoreboard,.parent-match-scoreboard) .btn{background:#111!important;color:#fff!important;border-color:#111!important;}
/* Allow page scrolling when swiping on blank tactical turf, but preserve Move/draw control. */
@media(pointer:coarse){
 #field.pitch:not(.drawing):not(.match-moving),
 #studio-field.pitch:not(.drawing),
 #live-field.pitch {touch-action:pan-y pinch-zoom!important;}
 #field.pitch.match-moving, #field.pitch.drawing,
 #field.pitch.match-moving .match-position,
 #studio-field .player-token.dragging{touch-action:none!important;}
}

/* Honor role-specific hidden controls even when button display is themed. */
#pitch-sidebar-collapse[hidden]{display:none!important;}

/* Package 2 player self-service and guest management */
.p2-cropper{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;align-items:center;margin:12px 0}
.p2-cropper.hidden{display:none}
#p2-crop-canvas{width:min(240px,100%);aspect-ratio:1;object-fit:contain;border-radius:14px;border:2px solid var(--team-accent,#D9BD08);background:#252525;grid-row:span 3}
.p2-cropper label{display:grid;gap:5px}.p2-cropper input[type=range]{width:100%}
.p2-headshot{width:90px;height:90px;object-fit:cover;border-radius:16px;border:2px solid #D9BD08}
.p2-silhouette{display:inline-grid;place-items:center;background:#414141;color:#fff;font-size:45px}
.p2-player-preview{margin:12px 0}.p2-link-code{display:inline-block;user-select:all;padding:8px;border-radius:6px;background:#292929;color:#fff}
.p2-link-player{border-top:1px solid #555;padding-top:14px}
#p2-match-guests .item{align-items:center;flex-wrap:wrap;gap:8px}
#p2-match-guests .roster-photo{width:36px;height:36px;vertical-align:middle}
#p2-match-guests .pill{white-space:nowrap}
/* Play Editor pen safety: never display pen marks outside the field. */
#field #studio-ink-layer{overflow:hidden!important;clip-path:inset(0)}
#field #studio-ink-layer .studio-ink-hit{pointer-events:all}
#studio-custom-ink-controls{display:flex;flex-wrap:wrap;gap:5px 7px;align-items:center;white-space:normal;max-width:100%}
#studio-custom-ink-controls label{font-size:12px;font-weight:650;min-width:auto;flex:0 0 auto}
#studio-custom-ink-controls #studio-ink-hex{width:88px;max-width:88px;min-width:0;padding:7px 5px;border-radius:7px;font-size:12px}
#studio-custom-ink-controls .studio-ink-preview{width:28px;height:28px;flex:0 0 28px;display:inline-block;border:1px solid #aab5ac;border-radius:7px}
#studio-custom-ink-controls input[type=range]{width:76px;min-width:60px;max-width:100px;touch-action:pan-x}
/* P.I.T.C.H. five-color pen palette (Formation Studio + War Room). */
#field #studio-ink-layer{overflow:hidden!important;clip-path:inset(0)}
#field #studio-ink-layer .studio-ink-hit{pointer-events:all}
.pitch-ink-palette{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 2px;max-width:100%;vertical-align:middle}
.pitch-color-swatch{--swatch:#fff;display:inline-flex;align-items:center;justify-content:center;border:2px solid #7d858c;background:rgba(0,0,0,.18);width:40px;height:40px;min-width:40px;padding:4px;border-radius:10px;cursor:pointer;touch-action:manipulation}
.pitch-color-swatch .pitch-swatch-dot{width:25px;height:25px;border-radius:50%;background:var(--swatch);border:1px solid rgba(0,0,0,.35);display:block}
.pitch-color-swatch.selected,.pitch-color-swatch[aria-pressed="true"]{border-color:#fff;box-shadow:0 0 0 2px #d9bd08}
.pitch-color-swatch:focus-visible{outline:3px solid #d9bd08;outline-offset:3px}

/* PITCH compact matchday roster: preserves existing status colors and controls */
.pitch-unified-roster .pitch-roster-group{margin:10px 0;border:1px solid var(--edge,#555);border-radius:12px;overflow:hidden}
.pitch-unified-roster .pitch-roster-group-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;background:var(--panel,#303030);color:var(--text,#fff);border:0;padding:10px 13px;text-align:left;font-weight:750;cursor:pointer}
.pitch-unified-roster .pitch-roster-group-toggle strong{background:#d9bd08;color:#202020;border-radius:20px;padding:2px 8px;margin-left:5px}
.pitch-unified-roster .pitch-roster-group .pitch-roster-cards{padding:8px;gap:6px}
.pitch-unified-roster .pitch-roster-card{padding:9px 11px;gap:6px}
.pitch-unified-roster .pitch-roster-detail{border-top:1px solid var(--edge,#555);padding-top:5px}
.pitch-unified-roster .pitch-roster-detail>summary{cursor:pointer;font-size:.77rem;color:var(--muted,#ccc);padding:4px 0;list-style:none;display:flex;justify-content:space-between}
.pitch-unified-roster .pitch-roster-detail>summary::-webkit-details-marker{display:none}
.pitch-unified-roster .pitch-roster-detail[open]>summary span{transform:rotate(180deg)}
.pitch-unified-roster .pitch-roster-card-controls{border-top:0;padding:7px 0 2px}
.pitch-unified-roster .pitch-roster-card-foot{gap:6px}
.pitch-unified-roster .pitch-roster-summary .pill{border-color:#d9bd08}
@media(min-width:801px){#mobile-logout{display:none!important}}
#nav button[data-page="settings"]{margin-top:12px;border-top:2px solid var(--edge,#555)}

/* P.I.T.C.H. coach UX Phase 1: sidebar grouping only; no match or API changes. */
#nav .pitch-coach-nav-group{min-width:0;width:100%;border:1px solid #595959;border-radius:11px;background:#2a2a2a;overflow:visible}
#nav .pitch-coach-nav-heading{display:flex;align-items:center;gap:9px;min-height:42px;padding:9px 12px;color:#fff;font-size:13px;font-weight:800;cursor:pointer;list-style:none;user-select:none;border-radius:10px}
#nav .pitch-coach-nav-heading::-webkit-details-marker{display:none}
#nav .pitch-coach-nav-heading:hover,#nav .pitch-coach-nav-heading:focus-visible{background:#474747;outline-offset:2px}
#nav .pitch-coach-group-icon{font-size:18px;width:22px;flex:0 0 22px;text-align:center}
#nav .pitch-coach-group-label{flex:1;min-width:0}
#nav .pitch-coach-group-chevron{font-size:17px;transition:transform .15s ease}
#nav .pitch-coach-nav-group[open] .pitch-coach-group-chevron{transform:rotate(180deg)}
#nav .pitch-coach-nav-group:has(button.active)>.pitch-coach-nav-heading{color:#ffdf54}
#nav .pitch-coach-nav-links{display:grid;gap:4px;padding:0 6px 7px}
#nav .pitch-coach-nav-links button{width:100%;padding:9px 9px 9px 12px!important;font-size:12px!important;min-height:39px;line-height:1.25}
#nav button.pitch-coach-nav-secondary{margin-top:-3px;opacity:.9;font-size:12px!important;padding-top:8px!important;padding-bottom:8px!important}
#nav button.pitch-coach-nav-secondary span{margin-left:11px}
#nav[data-pitch-coach-organized="1"] button[data-page="settings"]{margin-top:16px!important;border-top:2px solid #707070!important}
#nav .pitch-coach-nav-heading:focus-visible{outline:2px solid #D9BD08}
#nav .pitch-coach-nav-group:has(.pitch-schedule-unread:not([hidden]))>.pitch-coach-nav-heading::after,
#nav .pitch-coach-nav-group:has(.pitch-access-badge:not([hidden]))>.pitch-coach-nav-heading::after{content:"";width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#D9BD08}
@media(min-width:701px){
 #shell.pitch-sidebar-collapsed #nav .pitch-coach-nav-group{border:0;background:transparent}
 #shell.pitch-sidebar-collapsed #nav .pitch-coach-nav-heading{display:none!important}
 #shell.pitch-sidebar-collapsed #nav .pitch-coach-nav-links{padding:0;gap:5px}
 #shell.pitch-sidebar-collapsed #nav .pitch-coach-nav-links button{padding:10px 3px!important;font-size:20px!important;min-height:46px}
 #shell.pitch-sidebar-collapsed #nav button.pitch-coach-nav-secondary{font-size:20px!important;opacity:1}
}
@media(max-width:700px){
 #nav .pitch-coach-nav-heading{min-height:46px}
 #nav .pitch-coach-nav-links button{min-height:44px}
}
@media(prefers-reduced-motion:reduce){#nav .pitch-coach-group-chevron{transition:none}}


/* P.I.T.C.H. Coach UX Phase 2A — layout-only, preserves original form IDs/handlers. */
#main .pitch-calendar-match-manager{border-top:3px solid #d9bd08;padding:clamp(14px,2vw,22px)}
#main .pitch-calendar-match-manager .section-head{align-items:start;gap:12px}
#main .pitch-calendar-match-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:12px 0}
#main .pitch-calendar-match-row .btn{min-height:43px}
#main .pitch-calendar-select-label{display:grid;gap:5px;min-width:min(280px,100%);flex:1 1 260px;font-weight:700;font-size:.83rem}
#main .pitch-calendar-select-label select{width:100%;min-width:0}
#main .pitch-calendar-editor{margin-top:16px;border-top:1px solid #646464;padding-top:14px}
#main .pitch-calendar-editor-head{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
#main .pitch-calendar-editor-head strong{font-size:1.02rem}
#main .pitch-calendar-editor #match-edit{margin-top:14px}
#main .pitch-calendar-match-manager #new-match-form{margin-top:16px}
#main .pitch-matchday-header{display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:#343434;border:1px solid #707070;border-left:4px solid #d9bd08;border-radius:12px;padding:12px 16px}
#main .pitch-matchday-header .btn-row{flex:1;min-width:min(280px,100%)}
#main .pitch-match-picker-label{display:flex;align-items:center;gap:10px;font-size:.92rem;font-weight:800;flex:1}
#main .pitch-match-picker-label select{flex:1;min-width:0;max-width:580px}
#main .pitch-warroom-jumps{display:flex;align-items:center;gap:6px;overflow-x:auto;padding:7px 0 13px;margin:0 0 5px;scrollbar-width:thin}
#main .pitch-warroom-jumps>span{font-size:.8rem;color:#c8c8c8;font-weight:700;flex-shrink:0;margin-right:4px}
#main .pitch-warroom-jumps button{border:1px solid #626262;border-radius:999px;background:#343434;color:#f7f7f7;font-weight:750;font-size:.83rem;padding:8px 13px;cursor:pointer;white-space:nowrap;min-height:38px}
#main .pitch-warroom-jumps button:hover,#main .pitch-warroom-jumps button:focus-visible{border-color:#d9bd08;color:#f9df6a;outline-offset:2px}
#main .match-field-column>.card:first-child{border-top:3px solid #d9bd08}
#main #matchday-unified-roster{border-top:3px solid #8c8c8c}
#main .match-quick-actions{border-top:3px solid #8c8c8c}
#main #match-events{scroll-margin-top:18px}
#main #field,#main #matchday-unified-roster,#main .match-quick-actions{scroll-margin-top:18px}
@media(max-width:700px){
 #main .pitch-matchday-header{padding:11px 12px}
 #main .pitch-match-picker-label{display:grid;gap:5px;width:100%}
 #main .pitch-match-picker-label select{width:100%;max-width:none}
 #main .pitch-calendar-match-row>.btn{flex:1 1 auto}
 #main .pitch-calendar-select-label{flex-basis:100%}
 #main .pitch-warroom-jumps{margin-bottom:2px}
}
:root[data-pitch-theme="sun"] #main .pitch-matchday-header,
:root[data-pitch-theme="sun"] #main .pitch-warroom-jumps button{background:#fff;color:#111;border-color:#222}
:root[data-pitch-theme="sun"] #main .pitch-warroom-jumps>span{color:#111}

/* PITCH_COACH_UX_PHASE2A_MATCH_SAVE_FEEDBACK: match editor shows save outcomes and validation errors. */
#main #calendar-match-save-feedback:empty{display:none}
#main #calendar-match-save-feedback{grid-column:1 / -1;margin:0;padding:8px 10px;border-left:3px solid #d9bd08;background:rgba(217,189,8,.09);border-radius:4px}
#main #calendar-match-save-feedback.error{color:#ffe4e4!important;border-left-color:#f87171;background:rgba(248,113,113,.11)}
:root[data-pitch-theme="light"] #main #calendar-match-save-feedback.error,:root[data-pitch-theme="sun"] #main #calendar-match-save-feedback.error{color:#7f1d1d!important}

/* P.I.T.C.H. UX Phase 2B.1 — coach Matchday Player Command only.
   Original element IDs and DOM actions are preserved. */
#matchday-unified-roster .pitch-command-heading {gap:12px;align-items:flex-start}
#matchday-unified-roster .pitch-command-heading h2{margin-bottom:3px}
#matchday-unified-roster .pitch-command-summary{display:flex;gap:7px;margin:10px 0}
#matchday-unified-roster .pitch-command-summary>.pill{font-size:.81rem;padding:7px 10px;background:var(--panel,#303030)}
#matchday-unified-roster .pitch-command-summary-alert{border-color:#e5ac49!important}
#matchday-unified-roster .pitch-command-attendance{border:1px solid var(--edge,#585858);border-radius:10px;padding:0 11px;margin:0 0 12px;background:var(--panel,#303030)}
#matchday-unified-roster .pitch-command-attendance>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:700;padding:10px 0;color:var(--text,#fff)}
#matchday-unified-roster .pitch-command-attendance-hint{font-size:.76rem;font-weight:500;color:var(--muted,#bbb)}
#matchday-unified-roster .pitch-command-attendance .pitch-roster-summary{margin:0 0 7px}
#matchday-unified-roster .pitch-command-attendance .field-note{font-size:.77rem;margin:3px 0 11px}
#matchday-unified-roster .pitch-command-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:10px 0}
#matchday-unified-roster .pitch-command-filters button{min-width:0;white-space:normal;min-height:38px;line-height:1.2;padding:8px 6px}
#matchday-unified-roster .pitch-command-player{padding:9px 12px;gap:7px}
#matchday-unified-roster .pitch-command-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(95px,140px);align-items:center;gap:10px;min-width:0}
#matchday-unified-roster .pitch-command-row>.pitch-roster-badge{text-align:center;max-width:160px}
#matchday-unified-roster .pitch-command-row>.pitch-roster-action{min-height:38px;width:100%;margin:0;font-size:.81rem}
#matchday-unified-roster .pitch-roster-card-head,.pitch-unified-roster .pitch-roster-card-foot{min-width:0}
#matchday-unified-roster .pitch-command-prep{display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:24px}
#matchday-unified-roster .pitch-command-prep-indicators,.pitch-command-detail-flags{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0}
#matchday-unified-roster .pitch-command-prep>.pitch-roster-starter{padding:3px 6px;min-height:32px}
#matchday-unified-roster .pitch-command-detail-label{color:var(--muted,#bbb);font-size:.79rem}
#matchday-unified-roster .pitch-command-detail-flags{padding:6px 0}
#matchday-unified-roster .pitch-command-warning{padding:2px 0}
#matchday-unified-roster .pitch-roster-neutral{background:rgba(130,140,150,.20);color:var(--text,#fff);border:1px solid var(--edge,#777)}
#matchday-unified-roster .pitch-roster-detail>summary{color:var(--muted,#ccc);padding:7px 0;min-height:30px}
#matchday-unified-roster .pitch-roster-detail[open]>summary{color:var(--text,#fff)}
#matchday-unified-roster .pitch-roster-card-controls{gap:10px}
#matchday-unified-roster button:focus-visible,#matchday-unified-roster summary:focus-visible{outline:3px solid var(--accent,#d9bd08);outline-offset:2px}
@media(max-width:690px){
 #matchday-unified-roster .pitch-command-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}
 #matchday-unified-roster .pitch-command-row>.pitch-roster-badge{grid-column:2;grid-row:1;max-width:110px}
 #matchday-unified-roster .pitch-command-row>.pitch-roster-action{grid-column:1/-1;grid-row:2;min-height:42px}
 #matchday-unified-roster .pitch-command-filters{gap:5px}
 #matchday-unified-roster .pitch-command-filters button{font-size:.76rem;padding:7px 3px}
 #matchday-unified-roster .pitch-command-summary>.pill{font-size:.76rem;padding:6px 7px}
}
@media(max-width:380px){
 #matchday-unified-roster .pitch-roster-person{gap:6px}
 #matchday-unified-roster .pitch-command-row>.pitch-roster-badge{max-width:95px}
 #matchday-unified-roster .pitch-command-heading{flex-wrap:wrap}
}
/* A class display:grid must never override native [hidden] on collapsed groups. */
#matchday-unified-roster .pitch-roster-cards[hidden]{display:none!important}


/* PITCH_COACH_LANDSCAPE_2B1_V1
   The coach sidebar consumes width: on tablet landscape, a nominally wide
   viewport can leave the old two-column War Room uncomfortably skinny.
   Preserve the original DOM, IDs, toolbar and match event handlers. */
@media (min-width: 1101px) and (max-width: 1480px) {
  /* Unstack the field + controls columns for intermediate landscape widths. */
  #main:has(.pitch-matchday-header) > .layout-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  /* Small panels may sit beside one another; interactive player command and
     event history need the full available width. */
  #main:has(.pitch-matchday-header) > .layout-2 > .stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }
  #main:has(.pitch-matchday-header) > .layout-2 > .stack > #matchday-unified-roster,
  #main:has(.pitch-matchday-header) > .layout-2 > .stack > .card:has(#match-events),
  #main:has(.pitch-matchday-header) > .layout-2 > .stack > .card:has(#queued-substitutions) {
    grid-column: 1 / -1;
  }
}
/* Player cards only split when THEIR container, not the window, is wide.
   In narrow sidebars or portrait displays they remain readable one per row. */
#matchday-unified-roster {container: pitch-player-command / inline-size;}
@container pitch-player-command (min-width: 760px) {
  #matchday-unified-roster .pitch-roster-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
  }
  #matchday-unified-roster .pitch-command-row {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 135px);
    align-items: center;
    gap: 7px 10px;
  }
  #matchday-unified-roster .pitch-command-row > .pitch-roster-badge {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    max-width: 100%;
  }
  #matchday-unified-roster .pitch-command-row > .pitch-roster-action {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    min-height: 42px;
  }
}
/* Short phone-landscape viewports stay one column for thumb-sized targets. */
@media (orientation: landscape) and (max-height: 550px) {
  #matchday-unified-roster .pitch-roster-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  #matchday-unified-roster .pitch-command-row > .pitch-roster-badge,
  #matchday-unified-roster .pitch-command-row > .pitch-roster-action {
    grid-row: auto;
  }
}


/* PITCH_GUEST_LIBRARY_V1 — compact guest management within the existing card. */
#p2-match-guests .pitch-guest-current{gap:9px}
#p2-match-guests .pitch-guest-item{border:1px solid var(--edge);border-radius:12px;padding:12px;min-width:0;background:var(--panel2,#343434)}
#p2-match-guests .pitch-guest-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-width:0}
#p2-match-guests .pitch-guest-name{display:flex;align-items:center;gap:9px;min-width:0;flex:1}
#p2-match-guests .pitch-guest-name strong,#p2-match-guests .pitch-guest-summary strong{display:block;overflow-wrap:anywhere}
#p2-match-guests .pitch-guest-name small,#p2-match-guests .pitch-guest-summary small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
#p2-match-guests .pitch-guest-edit-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--edge)}
#p2-match-guests .pitch-guest-full{grid-column:1/-1;min-width:0}
#p2-match-guests .pitch-guest-full.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
#p2-match-guests .pitch-guest-hidden-header{display:flex;justify-content:flex-start}
#p2-match-guests .pitch-guest-summary .btn{flex-shrink:0}
@media(max-width:680px){
 #p2-match-guests .pitch-guest-full.form-grid{grid-template-columns:minmax(0,1fr)}
 #p2-match-guests .pitch-guest-summary>.btn-row{width:100%}
 #p2-match-guests .pitch-guest-item{padding:10px}
}

/* PITCH_PLAYER_PLAYBOOK_INSTRUCTIONS_CONTRAST_20261120
   Scoped contrast fix for coach-published instructions; does not affect tactical turf. */
.player-playbook-page .player-playbook-instructions {
  background: #333333 !important;
  color: #ffffff !important;
  border: 1px solid #6b6130;
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
  box-sizing: border-box;
}
.player-playbook-page .player-playbook-instructions h3 {
  color: #d9bd08 !important;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}
.player-playbook-page .player-playbook-instructions p {
  color: #ffffff !important;
  background: transparent !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #ffffff !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  margin: 0 0 16px;
}
.player-playbook-page .player-playbook-instructions small {
  display: block;
  color: #d2d2d2 !important;
  -webkit-text-fill-color: #d2d2d2 !important;
  opacity: 1 !important;
  border-top: 1px solid #666666;
  padding-top: 10px;
  line-height: 1.5;
}
@media (max-width: 750px) {
  .player-playbook-page .player-playbook-instructions { width: 100%; }
}
/* END PITCH_PLAYER_PLAYBOOK_INSTRUCTIONS_CONTRAST_20261120 */
/* War Room position command: additive, preserves existing position picker. */
.pitch-command-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0}
.pitch-command-actions .btn{white-space:normal;min-height:44px;text-align:center}
.pitch-command-actions [data-position-action="assign"]{grid-column:1/-1}
#pitch-position-assign-panel[hidden]{display:none!important}
@media(max-width:480px){.pitch-command-actions{grid-template-columns:1fr}}

/* PITCH Player Command: one-tap foul and penalty choices */
#pitch-position-event-panel[hidden]{display:none!important}
.pitch-position-event-panel{display:grid;gap:12px;padding:12px 0}
.pitch-position-event-question{margin:0;font-weight:750;font-size:15px}
.pitch-position-event-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pitch-position-event-choice{min-height:64px;padding:12px 10px;border:1px solid #698f7d;border-radius:12px;background:#fff;color:#143b2d;font-size:15px;font-weight:750;cursor:pointer}
.pitch-position-event-choice:focus-visible{outline:3px solid #d9bd08}
.pitch-position-event-choice:disabled{opacity:.55;cursor:wait}
.pitch-position-event-cancel{justify-self:center;background:transparent;border:0;color:inherit;text-decoration:underline;padding:8px 20px;cursor:pointer}
@media(max-width:380px){.pitch-position-event-choices{grid-template-columns:1fr}}

/* PITCH_LIVE_STREAM_2A — click-to-watch video; no page overlays or forced playback. */
.pitch-stream-page{max-width:960px;margin-inline:auto}
.pitch-stream-page h3{margin:20px 0 10px}
.pitch-stream-match-label{display:block;max-width:650px}
.pitch-stream-coach{border-top:1px solid var(--edge,#555);margin-top:18px;padding-top:10px}
.pitch-stream-coach[hidden],.pitch-stream-actions [hidden]{display:none!important}
.pitch-stream-view{margin:15px 0}
.pitch-stream-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.pitch-stream-actions a.btn{text-decoration:none;display:inline-flex;align-items:center}
.pitch-stream-player-wrap{width:100%;max-width:100%;background:#161616;border-radius:12px;overflow:hidden}
.pitch-stream-player-wrap:has(iframe){aspect-ratio:16/9}
.pitch-stream-player-wrap iframe{display:block;width:100%;height:100%;aspect-ratio:16/9;border:0}
.pitch-stream-disclaimer{margin-top:16px;line-height:1.5}
@media(max-width:700px){.pitch-stream-actions{align-items:stretch}.pitch-stream-actions .btn{flex:1 1 auto;justify-content:center}}

.pitch-stream-picker{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.pitch-stream-picker label{flex:1 1 260px}

/* PITCH STREAM 2B — persistent opt-in player / responsive dock. */
.pitch-stream-beta-tag{display:inline-flex;vertical-align:middle;align-items:center;font-size:10px;letter-spacing:.07em;font-weight:800;line-height:1.2;color:#1d1d1d;background:#D9BD08;border-radius:4px;padding:3px 5px;margin-left:6px;white-space:nowrap}
#nav button[data-page="stream"] .pitch-stream-beta-tag{margin-left:auto;flex-shrink:0}
.pitch-sidebar-collapsed #nav button[data-page="stream"] .pitch-stream-beta-tag{position:absolute;right:1px;top:0;font-size:7px;padding:2px 3px;margin:0}
.pitch-stream-dock{position:relative;width:100%;aspect-ratio:16/9;background:#141818;border-radius:12px;overflow:hidden;border:1px solid #555;margin:16px 0}
.pitch-stream-dock-placeholder{position:absolute;left:12px;right:12px;bottom:12px;text-align:center;color:#aaa;font-size:13px;pointer-events:none}
.pitch-stream-below-video{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.pitch-stream-floating{position:fixed;bottom:16px;right:16px;width:min(350px,calc(100vw - 24px));height:auto;z-index:9000;background:#181c1c;color:#fff;box-shadow:0 8px 32px #000b;border:1px solid #8b7a25;border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.pitch-stream-floating[hidden]{display:none!important}
.pitch-stream-floating-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 9px;min-height:35px;background:#252626;font-size:12px}
.pitch-stream-float-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.pitch-stream-float-controls{display:flex;gap:4px}
.pitch-stream-float-controls button{border:1px solid #777;border-radius:6px;background:#333;color:#fff;min-height:28px;min-width:30px;cursor:pointer}
.pitch-stream-floating-frame{width:100%;aspect-ratio:16/9;min-height:0;flex:1}
.pitch-stream-floating-frame iframe{display:block;width:100%;height:100%;border:0}
.pitch-stream-floating.pitch-stream-pinned{border-radius:12px;box-shadow:none;z-index:20}
.pitch-stream-floating.pitch-stream-pinned .pitch-stream-floating-frame{flex:1;aspect-ratio:auto}
.pitch-stream-floating.pitch-stream-mini{max-width:350px}
.pitch-stream-connection-note{padding:8px;font-size:12px}
@media(max-width:700px){.pitch-stream-floating.pitch-stream-mini{bottom:calc(env(safe-area-inset-bottom,0px) + 14px);right:8px;max-width:min(260px,calc(100vw - 16px));width:260px}.pitch-stream-floating-head{min-height:33px}.pitch-stream-dock-placeholder{font-size:12px}}

.pitch-stream-dock:not(.pitch-stream-dock-active){display:none}

#nav button[data-page="stream"]{position:relative}

/* Stage 2B1: touch dragging is limited to the floating player title bar. */
.pitch-stream-floating.pitch-stream-mini .pitch-stream-floating-head{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.pitch-stream-floating.pitch-stream-mini .pitch-stream-floating-head:active{cursor:grabbing}
.pitch-stream-floating .pitch-stream-float-controls{touch-action:manipulation}

/* Stage 2B2: mobile-only sticky, in-flow player above page content. */
.pitch-stream-mobile-slot{display:none}
@media(max-width:700px){
 .pitch-stream-mobile-slot.pitch-stream-mobile-slot-active{
  display:block;position:sticky;top:0;z-index:35;
  width:100%;padding:4px 10px 7px;
  background:var(--bg,#252525);border-bottom:1px solid #555;
 }
 .pitch-stream-floating.pitch-stream-mobile-docked{
  position:relative!important;inset:auto!important;
  display:flex;max-width:none;width:100%!important;height:auto!important;
  margin:0;border-radius:9px;box-shadow:none;
 }
 .pitch-stream-floating.pitch-stream-mobile-docked .pitch-stream-floating-frame{
  aspect-ratio:16/9;flex:0 0 auto;
 }
 .pitch-stream-floating.pitch-stream-mobile-docked.pitch-stream-mobile-collapsed .pitch-stream-floating-frame{
  height:0!important;aspect-ratio:auto;overflow:hidden;
 }
 .pitch-stream-floating.pitch-stream-mobile-docked.pitch-stream-mobile-collapsed .pitch-stream-connection-note{display:none}
 .pitch-stream-floating.pitch-stream-mobile-docked .pitch-stream-floating-head{
  cursor:default;touch-action:manipulation;user-select:auto;
 }
 .pitch-stream-floating.pitch-stream-mobile-docked .pitch-stream-float-controls button{
  min-width:33px;min-height:33px;
 }
 #shell .sidebar.open{z-index:110}
}

/* Stage 2B3: Family Live Board is the ONLY video surface for every user role. */
.pitch-live-stream-section{margin:0 0 14px;padding:12px}
.pitch-live-stream-section .section-head{margin-bottom:6px}
.pitch-live-stream-slot{width:100%;max-width:900px;margin:10px auto 0}
.pitch-live-stream-slot:empty{display:none}
.pitch-stream-floating.pitch-stream-family-docked{
 position:relative!important;inset:auto!important;display:flex;
 width:100%!important;height:auto!important;max-width:none!important;
 margin:0;z-index:1;border-radius:10px;box-shadow:none;
}
.pitch-stream-floating.pitch-stream-family-docked[hidden]{display:none!important}
.pitch-stream-floating.pitch-stream-family-docked .pitch-stream-floating-frame{aspect-ratio:16/9;flex:0 0 auto}
.pitch-stream-floating.pitch-stream-family-docked.pitch-stream-mobile-collapsed .pitch-stream-floating-frame{height:0!important;aspect-ratio:auto;overflow:hidden}
.pitch-stream-floating.pitch-stream-family-docked .pitch-stream-floating-head{touch-action:manipulation;cursor:default;user-select:auto}
.pitch-stream-floating.pitch-stream-family-docked .pitch-stream-float-controls button{min-width:33px;min-height:33px}
@media(max-width:700px){.pitch-live-stream-section{padding:9px}.pitch-live-stream-slot{margin-top:8px}}

/* PITCH_STREAM_2C: tidy broadcaster grants; Family board placement unchanged. */
.pitch-broadcast-member { display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid rgba(180,180,180,.24);border-radius:8px;margin:5px 0;cursor:pointer; }
.pitch-broadcast-member input {width:18px;height:18px;flex-shrink:0;}
.pitch-stream-floating-frame video {width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:#050505;display:block;}

/* PITCH_STREAM_2E: branded, accessible, no-video placeholder on the Family Live Board. */
.pitch-live-video-placeholder{
 box-sizing:border-box;isolation:isolate;position:relative;overflow:hidden;
 width:100%;min-height:190px;aspect-ratio:16/9;
 border:1px solid rgba(217,189,8,.42);border-radius:10px;
 background:radial-gradient(ellipse 95% 85% at 50% 15%,rgba(217,189,8,.085),transparent 67%),
            linear-gradient(135deg,#292b2b 0%,#191d1d 60%,#111414 100%);
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 text-align:center;gap:8px;padding:22px 20px;color:#f5f5f5;
}
.pitch-live-video-placeholder::before{
 content:'';position:absolute;inset:9px;border:1px solid rgba(255,255,255,.055);
 border-radius:6px;pointer-events:none;z-index:-1;
}
.pitch-live-video-placeholder-logo{width:54px;height:54px;object-fit:contain;opacity:.78;filter:grayscale(.45);}
.pitch-live-video-placeholder-brand{
 color:#D9BD08;letter-spacing:.16em;font-size:11px;font-weight:800;line-height:1.3;
}
.pitch-live-video-placeholder-title{
 display:block;font-size:clamp(16px,2.5vw,22px);font-weight:750;line-height:1.24;
}
.pitch-live-video-placeholder-detail{display:block;color:#d0d0d0;line-height:1.45;max-width:460px;font-size:13px;}
@media(max-width:700px){
 .pitch-live-video-placeholder{min-height:150px;padding:16px 16px;gap:6px;}
 .pitch-live-video-placeholder-logo{width:39px;height:39px;}
 .pitch-live-video-placeholder-detail{font-size:12px;}
 .pitch-live-video-placeholder-brand{font-size:10px;}
}
@media(prefers-reduced-motion:reduce){.pitch-live-video-placeholder{animation:none;}}

/* Stream 2F: source-specific controls must stay hidden even when styled as cards. */
.pitch-stream-page [hidden]{display:none!important}
