:root{--bg:#f1f5f9;--surface:#fff;--surface-2:#e2e8f0;--text:#0f172a;--muted:#475569;--border:#cbd5e1;--primary:#1d4ed8;--primary-text:#fff;--good:#15803d;--good-bg:#dcfce7;--bad:#b91c1c;--bad-bg:#fee2e2;--neutral-bg:#e0e7ff;--divider:#94a3b8;--us-bg:#dbeafe;--them:#c2410c;--them-bg:#ffedd5;--focus:#f59e0b;--warn:#b45309;--radius:10px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}:root:not([data-theme=light]){--bg:#0f172a;--surface:#1e293b;--surface-2:#334155;--text:#f1f5f9;--muted:#94a3b8;--border:#475569;--primary:#3b82f6;--good:#4ade80;--good-bg:#14532d;--bad:#f87171;--bad-bg:#7f1d1d;--neutral-bg:#312e81;--divider:#64748b;--warn:#fbbf24;--us-bg:#1e3a8a;--them:#fb923c;--them-bg:#431407;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--bg:#0f172a;--surface:#1e293b;--surface-2:#334155;--text:#f1f5f9;--muted:#94a3b8;--border:#475569;--primary:#3b82f6;--good:#4ade80;--good-bg:#14532d;--bad:#f87171;--bad-bg:#7f1d1d;--neutral-bg:#312e81;--divider:#64748b;--warn:#fbbf24;--us-bg:#1e3a8a;--them:#fb923c;--them-bg:#431407;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;margin:0;line-height:1.4}h1,h2{margin:0;line-height:1.2}h1{font-size:1.5rem}h2{margin-bottom:.75rem;font-size:1.1rem}.page{max-width:960px;padding:max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 96px max(16px, env(safe-area-inset-left));flex-direction:column;gap:16px;margin:0 auto;display:flex}.page-wide{max-width:1400px}.page-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px}.muted{color:var(--muted)}.empty{text-align:center;color:var(--muted);padding:48px 16px}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.btn{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);min-height:44px;color:var(--text);font:inherit;cursor:pointer;touch-action:manipulation;padding:8px 16px;font-weight:600}.btn:hover:not(:disabled){filter:brightness(.96)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--primary);border-color:var(--primary);color:var(--primary-text)}.btn-good{background:var(--good-bg);border-color:var(--good)}.btn-bad{background:var(--bad-bg);border-color:var(--bad)}.btn-ghost{background:0 0;border-color:#0000}.btn-lg{min-height:56px;padding:12px 24px;font-size:1.1rem}.btn-sm{min-height:40px;padding:6px 12px}:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.actions,.chips{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.banner{border-radius:var(--radius);border:1px solid;flex-wrap:wrap;align-items:center;gap:12px;margin:0;padding:12px 16px;display:flex}.banner-ok{background:var(--good-bg);border-color:var(--good)}.banner-bad{background:var(--bad-bg);border-color:var(--bad)}.form{flex-direction:column;align-items:flex-start;gap:12px;display:flex}.form>*{max-width:100%}.field{flex-direction:column;gap:4px;width:100%;display:flex}.field>span{color:var(--muted);font-size:.9rem}input,select,textarea{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:8px;width:100%;min-height:44px;padding:8px 10px}input[type=checkbox]{width:24px;height:24px;min-height:0;accent-color:var(--primary)}.grid-2{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;width:100%;display:grid}details{width:100%}summary{cursor:pointer;padding:8px 0;font-weight:600}.tiles{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px;width:100%;display:grid}.tile{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);opacity:.55;align-items:stretch;display:flex}.tile.on{opacity:1;border-color:var(--primary);box-shadow:inset 3px 0 0 var(--primary)}.tile.no-num .tile-num{color:var(--warn)}.tile-main{min-width:0;min-height:56px;color:var(--text);font:inherit;text-align:left;cursor:pointer;touch-action:manipulation;background:0 0;border:0;flex:1;align-items:center;gap:10px;padding:6px 4px 6px 12px;display:flex}.tile-num{text-align:center;font-variant-numeric:tabular-nums;min-width:2ch;font-size:1.35rem;font-weight:800}.tile-text{flex-direction:column;min-width:0;display:flex}.tile-name{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.tile-pos{color:var(--muted);font-size:.78rem}.tile-edit{border:0;border-left:1px solid var(--border);min-width:44px;color:var(--muted);cursor:pointer;background:0 0;font-size:1.05rem}.tile-edit-open{opacity:1;border-color:var(--focus);flex-direction:column;grid-column:span 2;gap:8px;padding:8px}.tile-form{grid-template-columns:auto 1fr;gap:6px;display:grid}.tile-form .pos-select{grid-column:1/-1}.hint-warn{color:var(--warn);margin:0;font-weight:600}.num-input{text-align:center;width:4.5ch;min-width:56px}.sticky-bottom{padding:12px 0 max(12px, env(safe-area-inset-bottom));background:var(--bg);position:sticky;bottom:0}.match-list{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.match-item{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.match-title{font-size:1.1rem;font-weight:700}.rec-header{z-index:5;padding:max(6px, env(safe-area-inset-top)) 16px 6px;background:var(--bg);border-bottom:1px solid var(--border);grid-template-columns:auto 1fr auto;align-items:center;gap:12px;margin:-16px -16px 0;display:grid;position:sticky;top:0}.scoreboard{text-align:center;grid-template-columns:1fr auto auto auto 1fr;align-items:center;gap:4px 16px;display:grid}.sb-team{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.sb-team:first-child{text-align:right}.sb-team:nth-child(5){text-align:left}.sb-mid{flex-direction:column;align-items:center;display:flex}.sb-num{animation:.5s ease-out score-pop;display:inline-block}@keyframes score-pop{0%{color:var(--primary);transform:scale(1.35)}}.serve{margin:0 4px;font-size:.95rem}.menu{position:relative}.menu>summary{align-items:center;font-size:1.2rem;list-style:none;display:inline-flex}.menu>summary::-webkit-details-marker{display:none}.menu-pop{z-index:20;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);flex-direction:column;gap:8px;min-width:220px;padding:10px;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 10px 30px #0000002e}.history-box summary{cursor:pointer;font-weight:700}.history-box .history{margin-top:8px}.sub-icon{color:var(--muted);font-size:.85rem}.sb-score{font-variant-numeric:tabular-nums;font-size:1.7rem;font-weight:800;line-height:1.05}.sb-sets{color:var(--muted);white-space:nowrap;font-size:.72rem}.sb-plus{min-width:64px;height:44px;font:inherit;color:var(--text);cursor:pointer;touch-action:manipulation;border:1px solid;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;padding:0 8px;font-weight:800;line-height:1.1;display:flex}.sb-plus small{color:var(--muted);font-size:.6rem;font-weight:600}.sb-plus.tone-good{background:var(--good-bg);border-color:var(--good)}.sb-plus.tone-bad{background:var(--bad-bg);border-color:var(--bad)}.page-rec{gap:10px}.rec-header .actions{flex-wrap:nowrap}.rec-header .btn{white-space:nowrap}.grid-wrap{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);-webkit-overflow-scrolling:touch;overflow-x:auto}.rec-grid,.stats-table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.rec-grid th,.rec-grid td{border-bottom:1px solid var(--surface-2);padding:1px 3px}.rec-grid thead th{color:var(--muted);background:var(--surface);font-size:.72rem;position:sticky;top:0}.group-head,.group-start{border-left:2px solid var(--divider)}.rec-grid td.group-start{padding-left:5px}.group-head{text-transform:uppercase;letter-spacing:.04em}.sticky-col{z-index:1;background:var(--surface);text-align:left;position:sticky;left:0}thead .sticky-col{z-index:2}.player-cell{width:100%;min-width:150px;max-width:240px;height:36px;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation;background:0 0;border:2px solid #0000;border-radius:8px;align-items:center;gap:8px;padding:0 8px 0 4px;display:flex}.player-cell[aria-pressed=true]{border-color:var(--focus);background:var(--surface-2)}.swap{color:var(--muted);margin-left:auto;font-size:1.1rem}.banner-sub{background:var(--surface);border-color:var(--focus)}.team-row th,.team-row td{background:var(--us-bg);color:var(--primary);text-transform:uppercase;letter-spacing:.04em;padding:2px 8px;font-size:.78rem}.team-them .team-row th,.team-them .team-row td{background:var(--them-bg);color:var(--them)}.team-them .pnum,.hist-them span{color:var(--them)}.pos{color:var(--muted);font-size:.7rem;font-weight:700}.sub-tag{white-space:nowrap;background:var(--surface-2);color:var(--text);border-radius:6px;padding:1px 6px;font-size:.68rem;font-weight:600}.chip-blocked,.player-cell.blocked{opacity:.4}.bench-head{flex-wrap:wrap;align-items:center;gap:4px 10px;margin-bottom:8px;display:flex}.bench .bench-head h2{margin:0}.pos-select{min-width:8.5rem}@media (width<=480px){.tile-edit-open{grid-column:auto}}.benches{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px;display:grid}.add-players{align-items:center;gap:6px;display:inline-flex}.add-players input{width:15rem;max-width:60vw;min-height:40px}.opp-setup p{margin:0 0 8px}.bench h2{color:var(--muted);margin-bottom:8px;font-size:.95rem}.bench-chip{align-items:center;gap:6px;display:inline-flex}.pnum{text-align:right;min-width:2ch;font-size:1.1rem;font-weight:800}.pname{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.badge{background:var(--primary);color:var(--primary-text);border-radius:6px;padding:2px 6px;font-size:.75rem;font-weight:700}.cell{border:1px solid var(--border);background:var(--surface);width:100%;min-width:56px;height:36px;box-shadow:inset 0 3px 0 var(--tone,var(--border));font:inherit;color:var(--text);cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;line-height:1.1;transition:transform 60ms;display:flex}.cell:active{transform:scale(.94)}.cnt{font-size:1.15rem;font-weight:800}.tone-good.cell{--tone:var(--good)}.tone-bad.cell{--tone:var(--bad)}.tone-neutral.cell{--tone:var(--primary)}.tone-good.cell:not(.zero) .cnt{color:var(--good)}.tone-bad.cell:not(.zero) .cnt{color:var(--bad)}.cell.zero .cnt{opacity:.22;font-weight:600}.cell:active{background:var(--surface-2)}.cell-off{background:repeating-linear-gradient(45deg, transparent 0 6px, var(--surface-2) 6px 8px)}.history{margin:0;padding:0;list-style:none}.history li{border-bottom:1px solid var(--surface-2);justify-content:space-between;align-items:center;padding:2px 0;display:flex}.toast{right:max(16px, env(safe-area-inset-right));bottom:max(16px, env(safe-area-inset-bottom));background:var(--text);max-width:min(520px,100% - 32px);color:var(--bg);z-index:10;border-radius:12px;align-items:center;gap:12px;padding:8px 8px 8px 16px;font-weight:600;display:flex;position:fixed;box-shadow:0 8px 24px #00000040}.toast .btn{background:var(--bg);color:var(--text);border-color:#0000;flex:none}.stats-title p{margin:4px 0 0}.stats-filters{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;display:flex}.check{cursor:pointer;align-items:center;gap:8px;min-height:44px;display:inline-flex}.th-sort{font:inherit;color:inherit;cursor:pointer;white-space:nowrap;background:0 0;border:0;padding:4px 2px}.th-sort:hover{color:var(--primary)}.stats-table tbody tr:nth-child(n) td.best{color:var(--good);background:var(--good-bg);font-weight:800}.stats-team{flex-direction:column;gap:8px;display:flex}.stats-team-name{color:var(--primary);margin:0}.team-them .stats-team-name{color:var(--them)}.stats-table th,.stats-table td{text-align:center;border-bottom:1px solid var(--surface-2);white-space:nowrap;padding:8px 6px}.stats-table thead th{color:var(--muted);font-size:.8rem}.stats-table tbody tr:nth-child(odd) td,.stats-table tbody tr:nth-child(odd) th{background:var(--bg)}.stats-table tbody th{font-weight:600}.stats-table tfoot td,.stats-table tfoot th{border-top:2px solid var(--border);font-weight:800}.num{font-weight:700}@media (width<=900px){.player-cell{min-width:112px;max-width:170px}.cell{min-width:48px}.rec-grid th,.rec-grid td{padding:1px 2px}}@media (width<=700px){.rec-header{grid-template-columns:1fr auto}.scoreboard{grid-area:2/1/auto/-1}}@media print{.no-print,.banner{display:none!important}:root{--bg:#fff;--surface:#fff;--text:#000}.grid-wrap{border:0;overflow:visible}.page{max-width:none;padding:0}}@media (prefers-reduced-motion:reduce){.cell{transition:none}.sb-num{animation:none}}label.btn{align-items:center;display:inline-flex}label.btn:focus-within{outline:3px solid var(--focus);outline-offset:2px}.account-bar{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.75rem;padding:.35rem 1rem;font-size:.85rem;display:flex}.auth-page{max-width:28rem}
