:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:#223d34;background:#f4f6f3;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{border:0;border-radius:8px;padding:12px 18px;background:#1b493c;color:white;font-weight:600;cursor:pointer}button:hover{filter:brightness(.94)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #97b948;outline-offset:3px}.secondary{background:white;color:#28493c;border:1px solid #d6ded7}.danger{color:#a63032;background:#fff1ef}.small{font-size:.875rem;padding:8px 12px}.shell{display:flex;min-height:100vh}aside{width:240px;position:fixed;inset:0 auto 0 0;background:#143e32;color:#eef5ed;padding:36px 24px;display:flex;flex-direction:column}.brand{font-size:2.4rem;letter-spacing:-2px;font-weight:750;color:white;text-decoration:none}.ball{font-size:2rem;color:#d8ed83;margin-right:8px}.brand-dot{color:#d8ed83}.aside-label{font-size:.75rem;letter-spacing:1.5px;color:#aac2b6;margin:42px 0 16px}nav{display:grid;gap:8px}nav a{color:#c6d8ce;text-decoration:none;padding:14px;border-radius:8px;font-size:1rem;display:flex;gap:14px;align-items:center}nav a.active{background:#d8ed83;color:#163e31;font-weight:700}nav a span{width:20px;text-align:center}.storage{margin-top:auto;padding-top:40px;color:#bed0c6;font-size:.875rem;line-height:1.6}.storage>span{display:block;font-size:1.5rem;margin-bottom:8px}.storage strong{color:#e3ece4}.storage p{margin:8px 0 0}main{margin-left:240px;flex:1;min-width:0;padding:0 44px}header{height:100px;border-bottom:1px solid #dbe2db;display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:.75rem;letter-spacing:1px;color:#65796e}.divider{margin:0 12px;color:#9caaa1}header button{font-size:.875rem;letter-spacing:0}#app{max-width:1180px;margin:36px auto}h1{font-size:2rem;letter-spacing:-1px;margin:8px 0 10px;line-height:1.2}h2{font-size:1.2rem;margin:0}h3{font-size:1rem;margin:0}.muted{color:#738177}.eyebrow{font-size:.75rem;font-weight:700;letter-spacing:1.7px;color:#66805e}.title-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.meta{color:#6c7e72;line-height:1.7;margin:0}.tag{display:inline-block;padding:6px 10px;border-radius:5px;background:#edf3e5;color:#49652d;font-size:.75rem;font-weight:650}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:28px}.stat,.panel{background:white;border:1px solid #dce4dc;border-radius:12px}.stat{padding:22px}.stat .value{font-size:2rem;font-weight:700;margin:12px 0 4px}.stat .label{font-size:.875rem;color:#6a7d70}.stat small{color:#7d8d80}.two-col{display:grid;grid-template-columns:1.1fr 1fr;gap:24px}.panel{padding:24px;margin-bottom:24px}.panel-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.panel p{line-height:1.6}.group-head{display:flex;justify-content:space-between;margin-bottom:20px}.avatar{width:36px;height:36px;background:#edf2e7;color:#4d663c;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-size:.75rem;font-weight:700;flex-shrink:0}.person{display:flex;align-items:center;gap:12px}.player-line{padding:12px 0;border-top:1px solid #edf0eb;display:flex;justify-content:space-between;align-items:center;gap:16px}.actions{display:flex;gap:8px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:.875rem}th{text-align:left;font-size:.75rem;color:#718276;font-weight:600;padding:14px 12px;border-bottom:1px solid #e1e7df}td{padding:16px 12px;border-bottom:1px solid #edf0e9}tr:last-child td{border-bottom:0}.win{font-weight:700;color:#1b493c}.unresolved{background:#fff3d9;color:#8b6318;font-size:.75rem;padding:4px 7px;border-radius:4px}.note{font-size:.875rem;color:#697c6d;line-height:1.6}.match{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center;border-top:1px solid #edf0eb;padding:18px 0}.match:last-child{padding-bottom:0}.match-players{display:flex;gap:12px;flex-wrap:wrap;align-items:center;font-weight:600}.versus{font-size:.75rem;color:#94a293;font-weight:400}.score{font-size:.875rem;color:#667d6b;margin-top:10px}.empty{padding:26px;text-align:center;color:#708374}.progress{height:7px;background:#edf0e7;border-radius:10px;margin:22px 0 12px;overflow:hidden}.progress div{height:100%;background:#9ec957}footer{font-size:.75rem;color:#8b9c8d;padding:22px 0 28px;border-top:1px solid #dbe2db}dialog{border:0;border-radius:16px;box-shadow:0 25px 90px #08251d40;padding:28px;width:min(530px,calc(100% - 28px));color:#223d34}dialog::backdrop{background:#0c291c70}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.icon-button{background:transparent;color:#617769;font-size:1.5rem;padding:0 8px}label{display:block;margin:16px 0 7px;font-size:.875rem;font-weight:600}input,select{width:100%;padding:12px;border:1px solid #ccd6cb;border-radius:7px;background:white;color:#263f32}input[type=number]{min-width:0}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#error{color:#a42c2c;font-size:.875rem}.set-row{display:grid;grid-template-columns:70px 1fr 1fr;align-items:center;gap:12px;margin:12px 0}.set-row label{margin:0}#toast{position:fixed;bottom:25px;right:25px;background:#1b493c;color:white;padding:14px 20px;border-radius:9px;display:none;z-index:10}.group-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:24px}.inline-select{width:150px;padding:8px;font-size:.875rem}.lead-panel{background:#e9f0df;border-color:#d8e3c9}.link{color:#315c42;font-weight:600;text-decoration:none;font-size:.875rem}.subtitle{margin:0 0 24px;color:#738177;line-height:1.6}@media(max-width:1000px){main{padding:0 24px;margin-left:210px}aside{width:210px;padding:28px 18px}.two-col{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.shell{display:block}aside{position:static;width:auto;padding:18px 16px}.brand{font-size:1.7rem}.ball{font-size:1.5rem}.aside-label,.storage{display:none}nav{display:flex;margin-top:18px;gap:4px;overflow:auto}nav a{padding:10px 9px;font-size:.875rem;white-space:nowrap}nav a span{display:none}main{margin:0;padding:0 16px}header{height:75px;font-size:.65rem}header .divider{margin:0 5px}header button{padding:10px;font-size:.75rem}#app{margin-top:26px}h1{font-size:1.65rem}.title-row{align-items:flex-start;gap:12px}.title-row button{font-size:.75rem;padding:10px}.stats{gap:10px}.stat{padding:16px}.panel{padding:18px}.group-grid{grid-template-columns:1fr;gap:0}.player-line{flex-wrap:wrap}.match{grid-template-columns:1fr}.match>button{justify-self:start}.actions{flex-wrap:wrap}.meta{font-size:.875rem}.set-row{grid-template-columns:60px 1fr 1fr}#toast{bottom:16px;right:16px;left:16px}.two-col{gap:0}}
.category-filter{display:flex;align-items:center;gap:12px;margin:0 0 24px}.category-filter label{margin:0}.category-filter select{max-width:230px}.complete{background:#d9eccf;color:#244d2a}.manual-note{display:block;color:#6b7e70;margin-top:4px}fieldset{border:1px solid #dce4dc;border-radius:8px;margin:16px 0;padding:16px}legend{font-weight:600;font-size:.875rem}.check-label{display:inline-flex;align-items:center;gap:6px;margin:8px 16px 8px 0}.check-label input{width:20px;height:20px;accent-color:#1b493c}.tb-input{background:#f0f4ec;padding:8px;border-radius:8px}.tb-input span{font-size:.875rem}.tb-note{margin:0 0 18px;font-size:.75rem}.bracket{display:flex;overflow:auto;gap:24px;padding:20px 0}.bracket-round{min-width:280px;flex:1}.bracket-round h3{padding:10px;background:#e9f0df;border-radius:6px;margin-bottom:12px}.bracket-round .match{background:#f7f9f5;padding:16px;border:1px solid #dce4dc;border-radius:9px;margin-bottom:14px;grid-template-columns:1fr}.champion{font-weight:700;background:#d8ed83;padding:16px;border-radius:9px}button:disabled{opacity:.45;cursor:not-allowed}dialog{max-height:90dvh;overflow:auto}
#manual-group-fields{border-top:1px solid #dce4dc;margin-top:20px;padding-top:8px}.tag{overflow-wrap:anywhere}.player-line .actions{align-items:center}.player-line .tag{max-width:360px;white-space:normal;line-height:1.5}.panel-top h2{min-width:0;overflow-wrap:anywhere}.panel-top .actions{flex-shrink:0}#app .stats .value{line-height:1.3}@media(max-width:700px){.panel-top{flex-wrap:wrap}.panel-top .actions{flex-shrink:1}.title-row .actions{justify-content:flex-end}.player-line .actions{max-width:100%}.player-line .tag{max-width:100%}.check-label{font-size:.875rem}.bracket-round{min-width:260px}}
dialog.wide{width:min(1050px,calc(100% - 28px))}details{margin-top:14px}summary{cursor:pointer;font-weight:600;font-size:.875rem}li{line-height:1.65;margin:8px 0}#fields h3{margin-top:18px}.panel>p .tag{margin-bottom:6px}#affected-field{padding:12px;background:#f0f4ec;border-radius:8px}
.agenda-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px}.agenda-tabs button{font-size:.875rem}.agenda-tabs .active{background:#1b493c;color:white}.agenda-filter{display:flex;align-items:center;gap:14px;margin:20px 0}.agenda-filter label{margin:0}.agenda-filter input,.agenda-filter select{max-width:360px}.court-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.court-grid .panel{min-width:0}.schedule-row{padding:18px 0;border-top:1px solid #e1e7df;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.schedule-row h3{line-height:1.6;overflow-wrap:anywhere}.schedule-time{font-weight:650;color:#31563e;margin:0 0 7px}.schedule-row .note{margin:7px 0}.schedule-alert{border-color:#ddba79;background:#fffbef}.schedule-good{background:#edf5e8;border-color:#cddfc2}.schedule-conflict{border-top:1px solid #e9dac0;padding:16px 0;line-height:1.5}.schedule-conflict:last-child{padding-bottom:0}.booking-conflicts{color:#8b4b16;font-size:.875rem;padding-left:22px}.match-agenda{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 0 16px;border-bottom:1px solid #edf0eb;flex-wrap:wrap}.bracket-round .match-agenda{padding:0 8px 16px}.court-grid .schedule-row .actions{width:100%}@media(max-width:850px){.court-grid{grid-template-columns:1fr}}@media(max-width:700px){.agenda-filter{flex-wrap:wrap}.agenda-filter input,.agenda-filter select{max-width:100%}.agenda-tabs button{padding:10px;font-size:.8rem}.schedule-row .actions{width:100%}.schedule-time{font-size:.875rem}}
#api-panel{padding:16px 24px;background:#edf2e7;border-bottom:1px solid #cfdbce}#api-panel .note{margin:8px 0 0}.api-status{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.api-status .actions{flex-wrap:wrap;align-items:center}.api-status select{max-width:250px}.api-error{color:#9b2d2d}@media(max-width:700px){#api-panel{padding:14px 16px}.api-status button{font-size:.8rem;padding:10px}.api-status select{max-width:100%}}
#api-panel{margin-left:240px}@media(max-width:1000px){#api-panel{margin-left:210px}}@media(max-width:700px){#api-panel{margin-left:0}}

#api-advanced{margin-top:12px;color:var(--ink,#26382b)}#api-advanced summary{cursor:pointer;font-size:.85rem;font-weight:600;padding:8px 0;width:fit-content}#api-advanced summary:focus-visible{outline:2px solid #335c3b;outline-offset:3px}#api-advanced .actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}#api-advanced button{font-size:.8rem}#api-advanced[open]{border-top:1px solid #cfdbce;padding-top:4px}
