:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:#112040;background:#eff3fa;--navy:#102044;--blue:#194b97;--orange:#ff8a31;--slate:#60708b;--border:#dce4f0;--bg:#eff3fa;--card:#fff;--green:#0a936e;--radius:16px}*{box-sizing:border-box}body{margin:0;overscroll-behavior:none}button,input,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.42;cursor:not-allowed}input,select{min-height:43px;border:1px solid #cbd6e5;border-radius:10px;background:#fff;color:#172846;padding:9px 11px;min-width:0;max-width:100%;width:100%}input:focus,select:focus,button:focus-visible{outline:3px solid #9bbcfb;outline-offset:1px}.app{padding:12px max(12px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));max-width:1650px;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--navy);color:#fff;border-radius:17px;padding:10px 14px;min-height:66px;box-shadow:0 4px 15px #1c376526}.brand{display:flex;align-items:center;gap:11px;min-width:170px}.brand-icon{background:var(--orange);color:var(--navy);font-weight:1000;letter-spacing:-1px;border-radius:13px;width:47px;height:47px;display:grid;place-items:center;font-size:18px}.brand strong{display:block;letter-spacing:.8px;font-size:16px}.brand small{display:block;color:#b9cce9;font-size:11px;font-weight:600;margin-top:2px}.top-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.btn{min-height:42px;border:0;border-radius:10px;font-weight:750;padding:9px 12px;background:#e8eef9;color:#263d65;white-space:nowrap}.btn:hover{filter:brightness(.97)}.btn.outline{border:1px solid #cad7e9;background:transparent;color:#273f64}.topbar .btn{background:#26395c;color:#e6efff}.topbar .btn.orange,.btn.orange{background:var(--orange);color:#221f20}.btn.primary{background:#224f9b;color:white}.btn.danger{background:#fae6e7;color:#b42331}.btn.ghost{background:#f1f5fb;color:#51617b}.btn.success{background:#d8f6e9;color:#007956}.btn:active,.roster-chip:active,.court-pos:active,.grade:active,.fund:active{transform:scale(.98)}.tabs{display:flex;gap:5px;align-items:center;margin:12px 0}.tab{border:0;background:transparent;color:#60728f;font-weight:800;padding:9px 17px;border-radius:10px;min-height:40px}.tab.active{background:#fff;color:#17438d;box-shadow:0 2px 7px #1a3d6f0e}.session{font-size:12px;margin-left:auto;color:#5d6c81;font-weight:700}.columns{display:grid;grid-template-columns:minmax(300px,1.1fr) minmax(265px,.94fr) minmax(300px,.95fr);gap:12px;align-items:start}.panel{background:var(--card);border:1px solid #e3e9f3;border-radius:var(--radius);box-shadow:0 4px 18px #12395d0c;overflow:hidden}.panel-head{padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:9px;border-bottom:1px solid #edf1f7;min-height:53px}.panel-head h2{font-size:14px;letter-spacing:.2px;margin:0}.panel-head small{color:#7b899d;font-size:11px}.panel-inner{padding:12px}.inline{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.muted{color:#76849a}.tiny{font-size:11px}.bold{font-weight:800}.court{background:linear-gradient(180deg,#e4f3fb,#e5f0fa);border:1px solid #bed4eb;border-radius:13px;padding:9px 10px 12px;position:relative}.net{height:8px;border-radius:6px;background:repeating-linear-gradient(90deg,#425c7d 0,#425c7d 8px,#8da5bf 8px,#8da5bf 12px);position:relative;margin-bottom:11px}.net:after{content:'RETE';position:absolute;top:-3px;left:50%;transform:translateX(-50%);font-size:9px;letter-spacing:1px;background:#e4f3fb;padding:0 7px;color:#3a577c;font-weight:850}.court-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;grid-template-areas:'p4 p3 p2' 'p5 p6 p1'}.court-pos{border:2px solid #cbd9e8;border-radius:12px;background:#fff;min-width:0;min-height:90px;padding:7px 4px;text-align:center;color:#19305b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.court-pos.selected{border:3px solid var(--orange);background:#fff4eb;box-shadow:0 0 0 2px #ff8b3629}.court-pos.empty{border-style:dashed;background:#f8fcff}.position-label{font-size:10px;color:#68839f;font-weight:900}.player-number{font-size:18px;line-height:1;font-weight:950;color:#144788}.player-name{font-size:11px;line-height:1.12;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.pos-role{font-size:9px;color:#72849c;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%}.court-note{font-size:11px;margin-top:8px;color:#627893;text-align:center}.rotation-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.rotation-actions .btn{white-space:normal}.bench-label{font-size:11px;color:#60728f;font-weight:900;text-transform:uppercase;letter-spacing:.6px;margin:13px 0 7px}.bench{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:165px;overflow:auto}.roster-chip{border:1px solid #d6e1ef;border-radius:9px;background:#f7faff;padding:9px;min-height:43px;font-size:11px;font-weight:800;text-align:left;color:#263d66;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roster-chip.libero{border-left:4px solid #fa9a4b}.roster-chip.selected{background:#fff2e8;border-color:#fb9a50}.scout-heading{min-height:92px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:13px}.scout-heading .small{font-weight:800;font-size:11px;color:#8291a7;letter-spacing:.6px;text-transform:uppercase}.scout-heading .athlete{font-size:23px;font-weight:900;line-height:1.15;margin-top:3px}.scout-heading .athlete span{color:#ed7c29}.scout-hint{font-size:12px;color:#7b8ba2;margin-top:6px;text-align:center}.fund-grid{padding:4px 12px 12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.fund{height:72px;border:2px solid #d7e2f1;background:#f6f9fe;border-radius:13px;font-weight:950;font-size:27px;color:#1f4d98;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:0}.fund small{font-size:10px;color:#6d7b90;font-weight:750}.fund.active{background:#fdf0e5;border-color:#ff8a31;color:#c65b08}.grades{padding:10px 12px 16px}.grades-title{font-size:12px;font-weight:850;color:#405778;margin:0 0 12px;text-align:center}.grade-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.grade{min-height:76px;border-radius:12px;border:1px solid #cbd7e9;background:#edf3fa;display:flex;flex-direction:column;justify-content:center;align-items:center;font-weight:900;font-size:22px;color:#243e66}.grade small{font-weight:750;font-size:10px;margin-top:5px}.grade.point{background:#d9f6e9;color:#047c55;border-color:#a9e2c9}.grade.positive{background:#e4f1ff;border-color:#bad7fa}.grade.negative{background:#fff0dc;border-color:#f8d6aa}.grade.error{background:#ffe5e6;color:#b92b35;border-color:#efbdc0}.scorecard{display:grid;grid-template-columns:1fr auto 1fr;gap:7px;align-items:center}.team-score{text-align:center;min-width:0}.team-score .teamname{font-size:11px;font-weight:900;color:#61718b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-value{font-size:48px;font-weight:950;line-height:1.1;color:#143875;letter-spacing:-2px}.score-btns{display:flex;justify-content:center;gap:5px}.score-btns button{width:39px;height:34px;min-height:0;padding:0}.set-badge{background:#e8effb;border-radius:13px;padding:8px 10px;font-size:11px;font-weight:950;color:#31517a;text-align:center;line-height:1.35}.set-badge b{font-size:20px;display:block}.event-list{max-height:350px;min-height:120px;overflow:auto;padding:0 12px 8px}.event{display:flex;align-items:center;gap:7px;padding:9px 3px;border-bottom:1px solid #eef1f7;font-size:12px}.event .when{color:#8090a5;min-width:43px;font-size:10px}.event .name{flex:1;font-weight:800}.event .event-type{color:#51617c;font-size:10px}.event .event-grade{background:#e5ebf6;border-radius:6px;padding:4px 6px;font-size:10px;font-weight:900;min-width:37px;text-align:center}.event .event-grade.point{background:#dcf7e9;color:#07805d}.event .event-grade.error{background:#ffe4e4;color:#be343b}.empty-state{text-align:center;padding:26px 15px;color:#7e8ba0;font-size:12px;line-height:1.5}.foot-note{font-size:11px;color:#7b899d;line-height:1.4}.pills{display:flex;gap:6px;flex-wrap:wrap}.pill{background:#f0f4fa;border-radius:10px;padding:5px 9px;color:#57708d;font-size:11px;font-weight:800}.statbar{padding:12px 14px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.stat{background:#f0f5fc;border:1px solid #e1eaf7;border-radius:12px;padding:12px 9px;text-align:center}.stat strong{font-size:22px;display:block;color:#153e81}.stat span{font-size:11px;color:#657791;font-weight:800}.stats-wrap{overflow:auto;margin:0 12px 12px;border:1px solid #e3e9f0;border-radius:12px}table{border-collapse:collapse;width:100%;min-width:690px;font-size:12px}th,td{text-align:center;padding:11px 8px;border-bottom:1px solid #ebeff5;white-space:nowrap}th{background:#edf2f8;color:#516481;font-size:11px}td:first-child,th:first-child{text-align:left;position:sticky;left:0;background:#fff;font-weight:800}th:first-child{background:#edf2f8}tr:last-child td{border-bottom:0}.stats-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px}.stats-toolbar select{width:auto;min-width:150px}.modal-back{position:fixed;z-index:50;inset:0;background:#07193196;display:grid;place-items:center;padding:15px}.modal{background:white;border-radius:18px;max-width:580px;width:100%;max-height:95dvh;display:flex;flex-direction:column;box-shadow:0 12px 55px #03173570}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:17px 18px;border-bottom:1px solid #e9edf5}.modal h2{font-size:19px;margin:0}.modal-body{padding:15px 18px;overflow:auto}.modal-foot{padding:12px 18px;border-top:1px solid #edf1f7;display:flex;justify-content:flex-end;gap:8px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field label{font-size:11px;font-weight:850;display:block;margin-bottom:5px;color:#5f6d84}.roster-list{display:flex;flex-direction:column;gap:5px;margin:12px 0}.roster-line{border:1px solid #e3e9f3;border-radius:9px;padding:7px;display:grid;grid-template-columns:36px 1fr auto auto;align-items:center;gap:9px;font-size:12px}.roster-line .num{font-weight:950;color:#1b4b91;font-size:17px}.roster-line strong{display:block}.roster-line small{font-size:10px;color:#77849a}.roster-line button{font-size:11px;min-height:32px;padding:5px 8px}.roster-add{background:#f1f6fd;border:1px solid #e1e9f7;border-radius:12px;padding:12px;margin-top:12px}.toast{position:fixed;z-index:100;bottom:24px;left:50%;transform:translate(-50%,16px);opacity:0;pointer-events:none;transition:.2s ease;background:#102c57;color:white;border-radius:11px;padding:11px 17px;font-size:12px;font-weight:700;box-shadow:0 8px 25px #07182a44;text-align:center;max-width:90vw}.toast.show{opacity:1;transform:translate(-50%,0)}.help-list{font-size:13px;line-height:1.7;color:#4d607d}.divider{height:1px;background:#e8edf5;margin:12px 0}.btnrow{display:flex;gap:7px;flex-wrap:wrap}.w100{width:100%} .chip-warning{font-size:11px;padding:9px;border-radius:9px;color:#9b601e;background:#fff4e8;margin:9px 0}
@media(max-width:950px){.columns{grid-template-columns:minmax(250px,1fr) minmax(260px,1fr)}.right-column{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}.right-column .panel{min-width:0}.event-list{max-height:175px}.score-value{font-size:39px}.court-pos{min-height:79px}.fund{height:69px}}@media(max-width:680px){.app{padding:7px}.topbar{padding:8px 9px;gap:5px}.brand{min-width:0}.brand-icon{width:40px;height:40px}.brand strong{font-size:12px}.brand small{font-size:9px}.top-actions .btn{font-size:11px;padding:7px 8px;min-height:35px}.top-actions .hide-small{display:none}.tabs{margin:7px 0}.columns{grid-template-columns:1fr}.right-column{grid-column:auto;display:block}.right-column .panel{margin-bottom:10px}.court-pos{min-height:77px}.scout-heading{min-height:70px}.grade{min-height:67px}.session{display:none}.statbar{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.score-value{font-size:44px}}@media(min-width:681px) and (max-height:750px){.panel-head{min-height:45px;padding:9px 12px}.panel-inner{padding:10px}.court-pos{min-height:73px}.fund{height:65px}.scout-heading{min-height:72px}.grade{min-height:63px}.bench{max-height:108px}.event-list{max-height:205px}}
