:root{--red: #ef0107;--red-dark: #c50006;--gold: #9c824a;--navy: #023474;--bg: #faf7f2;--surface: #ffffff;--ink: #1d1a17;--ink-secondary: #5c564e;--ink-muted: #8a8378;--border: #e6e0d6;--divider: #f1ece3;--green: #1a7f37;--amber: #9a6700;--tap-bg: #f4efe7;--control-bg: #efe9df;--cream-tint: #fffaf3;--gold-bg: #f3ecdd;--gold-border: #e2d5b8;--gold-tint: #fdf6e3;--warn-bg: #fff8e5;--warn-border: #f0d79a;--danger-bg: #fdeceb;--danger-border: #f5c2c0;--success-bg: #e9f7ed;--success-border: #b7e1c2;--radius: 14px;--nav-height: 60px;color-scheme:light}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #17140f;--surface: #211d17;--ink: #f2ede4;--ink-secondary: #c9c0b2;--ink-muted: #8f8677;--border: #38322a;--divider: #2c2720;--tap-bg: #2c2720;--control-bg: #2c2720;--cream-tint: #2a2419;--gold-bg: #362d1c;--gold-border: #4d3f25;--gold-tint: #332a19;--warn-bg: #382c14;--warn-border: #5c4a1f;--danger-bg: #3a1f1c;--danger-border: #5c2e29;--success-bg: #1c3223;--success-border: #2c4d34;color-scheme:dark}}:root[data-theme=dark]{--bg: #17140f;--surface: #211d17;--ink: #f2ede4;--ink-secondary: #c9c0b2;--ink-muted: #8f8677;--border: #38322a;--divider: #2c2720;--tap-bg: #2c2720;--control-bg: #2c2720;--cream-tint: #2a2419;--gold-bg: #362d1c;--gold-border: #4d3f25;--gold-tint: #332a19;--warn-bg: #382c14;--warn-border: #5c4a1f;--danger-bg: #3a1f1c;--danger-border: #5c2e29;--success-bg: #1c3223;--success-border: #2c4d34;color-scheme:dark}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.45}h1{font-size:1.35rem;margin:0 0 .75rem;text-wrap:balance}h2{font-size:1.05rem;margin:0 0 .5rem;text-wrap:balance}h3{margin:.75rem 0 .25rem}.muted{color:var(--ink-muted)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.small{font-size:.8rem}.center{text-align:center;margin-top:2rem}.app-header{position:sticky;top:0;z-index:10;background:var(--red);color:#fff;padding-top:env(safe-area-inset-top)}.app-header-row{max-width:560px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.6rem 1rem}.app-title{font-weight:700;font-size:1.05rem;white-space:nowrap}.header-controls{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;justify-content:flex-end}.squad-toggle{display:flex;background:#ffffff2e;border-radius:999px;padding:3px}.squad-toggle button{border:0;background:transparent;color:#fff;font:inherit;font-size:.85rem;font-weight:600;padding:.3rem .9rem;border-radius:999px;cursor:pointer}.season-toggle button{font-size:.75rem;padding-inline:.6rem}.squad-toggle button.active{background:#fff;color:var(--red)}.logout-btn{flex:none;border:0;background:#ffffff2e;color:#fff;width:2rem;height:2rem;border-radius:50%;font-size:1rem;line-height:1;cursor:pointer}.login-page{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:1.5rem}.login-card{width:100%;max-width:320px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:2rem 1.5rem;text-align:center;display:flex;flex-direction:column;gap:.75rem}.login-crest{font-size:2.5rem;line-height:1}.login-card h1{margin:0}.login-card input{text-align:center;font-size:1.1rem}.login-card .btn-primary{margin-top:.25rem}.app-main{max-width:560px;margin:0 auto;padding:1rem 1rem calc(var(--nav-height) + env(safe-area-inset-bottom) + 1.5rem)}.bottom-nav{position:fixed;bottom:0;left:0;right:0;height:calc(var(--nav-height) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--surface);border-top:1px solid var(--border);display:flex;z-index:10}.bottom-nav a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-decoration:none;color:var(--ink-muted);font-size:.7rem;font-weight:600}.bottom-nav a.active{color:var(--red)}.nav-icon{font-size:1.15rem;line-height:1}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.9rem 1rem;margin-bottom:.9rem}.plain-list{list-style:none;margin:0;padding:0}.plain-list li{padding:.25rem 0}.match-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}.match-filters{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-bottom:.8rem}.match-filters input:first-child{grid-column:1 / -1}.match-filters input,.match-filters select{font-size:1rem}.match-card{display:block;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.75rem .9rem;text-decoration:none;color:inherit}.match-card:active{background:var(--tap-bg)}.match-card-top{display:flex;justify-content:space-between;margin-bottom:.35rem}.match-card-main{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.match-score{font-size:1.25rem;font-weight:700}.match-opponent{font-weight:600}.scorers-line{margin-top:.35rem}.result-badge{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:6px;color:#fff;font-size:.8rem;font-weight:700;flex:none}.result-W{background:var(--green)}.result-D{background:var(--ink-muted)}.result-L{background:var(--red-dark)}.attended-badge{margin-left:auto;background:var(--gold-bg);color:var(--gold);border:1px solid var(--gold-border);font-size:.72rem;font-weight:700;padding:.15rem .5rem;border-radius:999px;white-space:nowrap}.empty-state{text-align:center;margin-top:3rem}.fab{position:fixed;right:max(1rem,calc(50vw - 280px + 1rem));bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 1rem);width:3.4rem;height:3.4rem;border-radius:50%;background:var(--red);color:#fff;font-size:2rem;line-height:1;display:flex;align-items:center;justify-content:center;text-decoration:none;box-shadow:0 4px 14px #c5000659;z-index:9}.form section{margin:1.25rem 0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.25rem}.section-head h2{margin:0}.field{display:flex;flex-direction:column;gap:.25rem;font-size:.85rem;font-weight:600;color:var(--ink-secondary);margin-bottom:.75rem}.field-row{display:flex;gap:.75rem}.field-row .field{flex:1;min-width:0}.field-row .grow{flex:2}.template-strip{display:flex;flex-wrap:wrap;gap:.45rem;margin:0 0 .8rem}.template-strip button{border:1px solid var(--border);background:var(--surface);color:var(--ink);border-radius:8px;padding:.45rem .6rem;font:inherit;font-size:.82rem;font-weight:700;cursor:pointer}.template-strip button:active{background:var(--tap-bg)}.lineup-warnings{list-style:none;margin:0 0 .6rem;padding:0;display:flex;flex-direction:column;gap:.35rem}.lineup-warnings li{border:1px solid var(--warn-border);background:var(--warn-bg);color:var(--amber);border-radius:8px;padding:.45rem .55rem;font-size:.82rem;font-weight:700}.opponent-history{border:1px solid var(--border);background:var(--cream-tint);border-radius:10px;padding:.65rem .75rem;margin:-.25rem 0 .85rem}.opponent-history strong,.opponent-history span{display:block}.opponent-history ul{margin-top:.35rem;color:var(--ink-secondary);font-size:.82rem}.compact-history-list li{padding:.35rem 0}.shirt-field{flex:0 0 5rem}input,select,textarea{font:inherit;font-size:1rem;color:var(--ink);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:.55rem .65rem;width:100%;min-width:0}input:focus,select:focus,textarea:focus{outline:2px solid var(--red);outline-offset:1px;border-color:var(--red)}.check-field,.mini-check{display:flex;align-items:center;gap:.5rem;font-weight:600}.check-field input,.mini-check input{width:1.15rem;height:1.15rem;accent-color:var(--red)}.mini-check{font-size:.78rem;gap:.25rem;flex:none}.score-row{align-items:flex-end}.score-row .field{flex:1}.score-row input{font-size:1.3rem;font-weight:700;text-align:center}.score-dash{padding-bottom:.9rem;font-weight:700}.segmented{display:flex;background:var(--control-bg);border-radius:10px;padding:3px}.segmented button{flex:1;border:0;background:transparent;font:inherit;font-weight:600;padding:.45rem 0;border-radius:8px;cursor:pointer;color:var(--ink-secondary)}.segmented button.active{background:var(--surface);color:var(--red);box-shadow:0 1px 3px #0000001f}.lineup-group{margin-bottom:.5rem}.chip-grid{display:flex;flex-wrap:wrap;gap:.45rem}.lineup-chip-wrap{display:flex;align-items:center;gap:.3rem}.chip{border:1px solid var(--border);background:var(--surface);color:var(--ink);font:inherit;font-size:.85rem;font-weight:600;padding:.4rem .7rem;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;gap:.35rem}.chip-num{color:var(--ink-muted);font-weight:700;font-size:.75rem}.chip-role{font-size:.65rem;font-weight:800;letter-spacing:.03em}.chip-starter{background:var(--red);border-color:var(--red);color:#fff}.chip-starter .chip-num{color:#ffffffbf}.chip-sub{background:var(--navy);border-color:var(--navy);color:#fff}.chip-sub .chip-num{color:#ffffffbf}.chip-standout{background:var(--gold-tint);border-color:var(--gold);color:var(--ink)}.sub-minute{width:4rem;padding:.3rem .4rem;font-size:1rem}.event-row{display:flex;align-items:center;gap:.4rem;margin-bottom:.5rem}.event-row select{flex:1;min-width:0}.event-row input[type=number]{flex:0 0 3.8rem}.opponent-goal-row input:first-child{flex:1}.substitution-row input[type=number]{flex-basis:3.4rem}.substitution-row select{flex:1.2}.ratings-list{display:flex;flex-direction:column;gap:.45rem}.rating-row{display:grid;grid-template-columns:minmax(7rem,1fr) 4.3rem minmax(7rem,1.2fr);gap:.45rem;align-items:center}.rating-player{font-size:.9rem;font-weight:600;min-width:0}.rating-input{text-align:center;font-variant-numeric:tabular-nums}.rating-note{font-size:.9rem}.remove-btn{flex:none;border:0;background:transparent;color:var(--ink-muted);font-size:1.3rem;line-height:1;cursor:pointer;padding:.2rem .4rem}.add-row-btn{border:1px dashed var(--border);background:transparent;color:var(--ink-secondary);font:inherit;font-weight:600;padding:.45rem .9rem;border-radius:10px;cursor:pointer}.form-actions{display:flex;gap:.75rem;margin-top:1.25rem}.btn-primary,.btn-secondary,.btn-danger{font:inherit;font-weight:700;padding:.65rem 1.2rem;border-radius:12px;cursor:pointer;text-decoration:none;text-align:center;border:1px solid transparent}.btn-primary{background:var(--red);color:#fff;flex:1}.btn-primary:disabled{opacity:.6}.btn-secondary{background:var(--surface);border-color:var(--border);color:var(--ink)}.btn-danger{background:var(--surface);border-color:var(--red-dark);color:var(--red-dark)}.link-btn{border:0;background:transparent;color:var(--navy);font:inherit;font-size:.82rem;font-weight:600;cursor:pointer;padding:.25rem .3rem}.link-btn.danger{color:var(--red-dark)}.error-note{background:var(--danger-bg);border:1px solid var(--danger-border);color:var(--red-dark);border-radius:10px;padding:.6rem .8rem;font-weight:600}.success-note{background:var(--success-bg);border:1px solid var(--success-border);color:var(--green);border-radius:10px;padding:.6rem .8rem;font-weight:700;margin:0 0 .75rem}.detail-header{margin-bottom:1rem}.detail-score{display:flex;align-items:center;gap:.6rem;margin:.35rem 0}.detail-score h1{margin:0}.detail-meta{margin:.35rem 0 0}.timeline-list{list-style:none;margin:0;padding:0}.timeline-list li{display:grid;grid-template-columns:2.2rem 1.7rem 1fr;gap:.45rem;align-items:start;padding:.45rem 0;border-bottom:1px solid var(--divider)}.timeline-list li:last-child{border-bottom:0}.timeline-minute{color:var(--ink-muted);font-size:.82rem;font-weight:700;font-variant-numeric:tabular-nums}.timeline-icon{line-height:1.2;text-align:center}.timeline-main{min-width:0}.lineup-num{display:inline-block;width:1.8rem;color:var(--ink-muted);font-weight:700;font-variant-numeric:tabular-nums}.notes-text{margin:0;white-space:pre-wrap}.rating-summary-list li{display:grid;grid-template-columns:1fr 3rem;gap:.45rem;align-items:baseline}.rating-summary-list .small{grid-column:1 / -1}.rating-value{justify-self:end;font-weight:800;font-variant-numeric:tabular-nums}.page-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.75rem}.page-head h1{margin:0}.page-head .btn-primary{flex:none;padding:.45rem .8rem;font-size:.85rem}.player-list li{padding:0}.player-row{display:flex;align-items:center;gap:.3rem;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:.5rem .7rem;margin-bottom:.4rem}.player-name{flex:1;font-weight:600;min-width:0}.player-link{color:inherit;text-decoration:none;font-weight:700}.player-link:active,.player-link:hover{color:var(--red)}.archived-toggle{font-size:.9rem;padding:.5rem 0}.archived-list .player-row{opacity:.75}.status-badge{display:inline-flex;align-items:center;border:1px solid var(--warn-border);background:var(--warn-bg);color:var(--amber);border-radius:999px;padding:.08rem .38rem;margin-left:.25rem;font-size:.68rem;font-weight:800;vertical-align:middle}.player-form{margin-bottom:.75rem}.tile-row{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;margin-bottom:1rem}.tile{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.7rem .9rem;display:flex;flex-direction:column;gap:.15rem}.tile-label{font-size:.75rem;font-weight:600;color:var(--ink-secondary)}.tile-value{font-size:1.6rem;font-weight:700;font-variant-numeric:tabular-nums}.tile-link,.tile-split-links a{color:inherit;text-decoration:none}.tile-link:active,.tile-link:hover,.tile-split-links a:active,.tile-split-links a:hover{border-color:var(--red)}.tile-split-links{padding:0;display:grid;grid-template-columns:1fr 1fr;gap:0;overflow:hidden}.tile-split-links a{display:flex;flex-direction:column;gap:.15rem;padding:.7rem .65rem}.tile-split-links a+a{border-left:1px solid var(--border)}.form-strip{display:flex;gap:.4rem;flex-wrap:wrap}.form-pill{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:8px;color:#fff;font-size:.85rem;font-weight:800;font-variant-numeric:tabular-nums;text-decoration:none}.dashboard-actions{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;margin-bottom:.8rem}.dashboard-actions .btn-primary:first-child{grid-column:1 / -1}.dashboard-actions .btn-primary,.dashboard-actions .btn-secondary,.dashboard-footer-action .btn-secondary{text-align:center}.dashboard-latest{margin-bottom:.9rem}.dashboard-tiles{grid-template-columns:1fr 1fr}.dashboard-leaders{display:grid;gap:.75rem;grid-template-columns:1fr 1fr}.dashboard-leader{display:flex;flex-direction:column;gap:.25rem}.dashboard-leader .player-link{display:flex;flex-direction:column;gap:.05rem}.dashboard-footer-action{margin:.1rem 0 0}.dashboard-footer-action .btn-secondary{display:block}.season-review-grid{display:grid;gap:.75rem;margin-bottom:.9rem}.review-match-main{margin:.25rem 0 .15rem}.review-stats{display:grid;gap:.4rem}.review-stats span{font-weight:800;font-variant-numeric:tabular-nums}.quality-list li{padding:.42rem 0;border-bottom:1px solid var(--divider)}.quality-list li:last-child{border-bottom:0}.milestone-list li{border-bottom:1px solid var(--divider)}.milestone-list li:last-child{border-bottom:0}.milestone-row{display:flex;align-items:center;gap:.6rem;padding:.5rem 0;color:inherit;text-decoration:none}.milestone-icon{font-size:1.3rem;flex:none;line-height:1}.milestone-text{display:flex;flex-direction:column;gap:.05rem;min-width:0}.milestone-title{font-weight:600}.stats-table{width:100%;border-collapse:collapse}.stats-table th{text-align:left;font-size:.75rem;color:var(--ink-muted);font-weight:600;padding:.25rem 0;border-bottom:1px solid var(--border)}.stats-table td{padding:.35rem 0;border-bottom:1px solid var(--divider)}.stats-table tr:last-child td{border-bottom:0}.stats-table .num{text-align:right;font-variant-numeric:tabular-nums}.about-card{text-align:center}.about-card h1{margin-bottom:.2rem}.about-actions{display:flex;flex-direction:column;gap:.55rem;margin:.6rem 0 .25rem}.about-actions .btn-primary,.about-actions .btn-secondary{width:100%}.about-status{margin:.4rem 0 0;font-weight:700}.about-note{margin:.35rem 0 0;text-wrap:pretty}.profile-grid{display:grid;gap:.75rem}.profile-event-card{min-width:0}.rating-trend{display:flex;gap:.45rem;overflow-x:auto;padding-bottom:.1rem}.rating-point{min-width:3.25rem;border:1px solid var(--border);border-radius:8px;padding:.45rem .35rem;text-align:center;color:inherit;text-decoration:none;background:var(--cream-tint)}.rating-point span,.rating-point small{display:block}.rating-point span{font-weight:800;font-variant-numeric:tabular-nums}.rating-point small{margin-top:.1rem;color:var(--ink-muted);font-size:.68rem;white-space:nowrap}.profile-match-list li{padding:0}.profile-match-link{display:grid;grid-template-columns:1.5rem 1fr;gap:.6rem;align-items:start;color:inherit;text-decoration:none;padding:.45rem 0}.profile-match-link .small{display:block;margin-top:.1rem}@media(max-width:560px){.form .field-row:not(.score-row){flex-direction:column;gap:0}}.ground-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.4rem 0;border-bottom:1px solid var(--divider)}.ground-row:last-child{border-bottom:0}.ground-name{font-weight:600;display:flex;align-items:center;gap:.4rem}.home-ground-badge{background:var(--gold-bg);color:var(--gold);border:1px solid var(--gold-border);font-size:.68rem;font-weight:700;padding:.08rem .4rem;border-radius:999px}.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}.photo-thumb-wrap{position:relative;aspect-ratio:1}.photo-thumb{width:100%;height:100%;object-fit:cover;border-radius:10px;border:1px solid var(--border);display:block}.photo-remove-btn{position:absolute;top:.25rem;right:.25rem;width:1.5rem;height:1.5rem;border-radius:50%;border:0;background:#0009;color:#fff;font-size:1rem;line-height:1;cursor:pointer}.pending-sync-banner{max-width:560px;margin:.75rem auto 0;padding:0 1rem}.pending-sync-summary{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;background:var(--warn-bg);border:1px solid var(--warn-border);color:var(--amber);font:inherit;font-weight:600;padding:.55rem .8rem;border-radius:10px;cursor:pointer}.pending-sync-list{list-style:none;margin:.4rem 0 0;padding:0;background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden}.pending-sync-list li{display:flex;flex-direction:column;gap:.15rem;padding:.5rem .8rem;border-bottom:1px solid var(--divider)}.pending-sync-list li:last-child{border-bottom:0}.pending-sync-error{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.35rem .5rem}
