:root{--bg:#f6f8f7;--paper:#fff;--ink:#213b31;--muted:#6b7973;--green:#185b46;--line:#e3e9e5;--soft:#edf4ef;font-family:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-synthesis:none;color:var(--ink);background:var(--bg);font-size:16px}
*{box-sizing:border-box}body{margin:0}h1,h2,h3,p{margin:0}p{line-height:1.65}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{border:0;background:none;color:inherit;cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{transition:background .16s,color .16s,transform .16s}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #72a38c;outline-offset:3px}small{font-size:.8125rem}.icon{display:block;width:1.1rem;height:1.1rem;flex-shrink:0}[hidden]{display:none!important}.skip-link{position:fixed;top:-80px;left:20px;z-index:30;background:var(--green);color:white;padding:12px}.skip-link:focus{top:10px}
.topbar{display:flex;align-items:center;gap:48px;height:76px;padding:0 max(28px,calc((100vw - 1216px)/2));background:var(--paper);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;white-space:nowrap;font-size:1.35rem;font-weight:700;letter-spacing:.02em}.brandmark{width:32px;height:34px;border-radius:8px;background:var(--green);color:#fff;display:grid;place-items:center;font-size:1.15rem}.header-tools{display:flex;gap:12px;align-items:center;margin-left:auto;min-width:0}.identity-button{max-width:180px;min-height:44px;padding:8px 12px;border-radius:8px;font-size:.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.identity-button:hover{background:var(--soft)}.icon-button{border:1px solid var(--line);display:grid;place-items:center;width:34px;height:34px;border-radius:50%;flex-shrink:0;color:var(--muted)}#desktop-nav{display:flex;align-self:stretch;gap:8px}nav button{display:flex;gap:8px;align-items:center;justify-content:center;padding:0 22px;font-size:.9375rem;color:var(--muted);position:relative}nav button.active{color:var(--green);font-weight:600}#desktop-nav button.active:after{content:"";position:absolute;bottom:0;left:22px;right:22px;height:3px;background:var(--green);border-radius:3px 3px 0 0}.mobile-nav{display:none}
.app-shell{max-width:1272px;margin:auto}main{padding:38px 28px 0;min-height:400px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:30px}.page-heading>div{min-width:0}.page-heading h1{font-size:1.65rem;font-weight:650;letter-spacing:-.035em;line-height:1.35;overflow-wrap:anywhere}.page-heading p{font-size:.875rem;color:var(--muted);margin-top:7px}.page-heading>.button{flex-shrink:0}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:10px 17px;border:1px solid var(--line);border-radius:9px;background:var(--paper);font-size:.875rem;font-weight:600;white-space:nowrap}.button:hover{background:var(--soft)}.button.primary{color:white;background:var(--green);border-color:var(--green)}.button.primary:hover{background:#124a39}.button.danger,.text-button.danger{color:#b14941}.text-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 2px;color:var(--green);font-size:.875rem;font-weight:500;white-space:nowrap}.text-button:hover{color:#103f2f;text-decoration:underline;text-underline-offset:4px}.icon-small{display:grid;place-items:center;width:40px;height:44px;border-radius:8px;color:var(--muted);flex-shrink:0}.icon-small:hover{background:var(--soft)}.muted-note{font-size:.875rem;color:var(--muted);line-height:1.65}.count-label{font-size:.875rem;color:var(--muted)}.demo-banner{display:flex;justify-content:space-between;align-items:center;padding:11px 15px;background:var(--soft);border-radius:9px;margin:-10px 0 24px;font-size:.875rem}.demo-banner span{color:var(--muted)}.demo-banner button{color:var(--green);min-height:28px}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) 244px;gap:32px;align-items:start}.left-column{min-width:0}.section-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;min-height:44px}.section-header h2{font-size:1.0625rem;font-weight:600}.round-label,.round-tools{display:flex;align-items:center;gap:12px}.tag{font-size:.8125rem;color:var(--muted)}.tag.live{color:var(--green)}.round-tools{gap:16px}.more-menu{position:relative}.more-menu summary{display:grid;place-items:center;list-style:none;width:36px;height:44px;cursor:pointer;font-size:1.1rem;color:var(--muted)}.more-menu summary::-webkit-details-marker{display:none}.more-menu>div{position:absolute;right:0;top:44px;min-width:144px;z-index:4;padding:5px;background:var(--paper);border:1px solid var(--line);border-radius:9px;box-shadow:0 8px 24px #213b3110}.more-menu button{width:100%;min-height:44px;font-size:.875rem;border-radius:5px}.more-menu button:hover{background:var(--soft)}
.courts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.courts.single{grid-template-columns:1fr}.court-card{min-width:0;background:var(--paper);border:1px solid var(--line);border-radius:13px;overflow:hidden}.court-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px 20px}.court-heading h3{font-size:1rem;font-weight:600}.court-status{font-size:.8125rem;color:var(--muted);font-variant-numeric:tabular-nums}.court{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 66px minmax(0,1fr);align-items:center;background:var(--soft);min-height:180px;margin:0 14px 14px;padding:24px 12px;border-radius:8px;gap:6px}.net{position:absolute;top:16px;bottom:16px;left:50%;border-left:1px dashed #b9cec0;pointer-events:none}.team{display:flex;align-items:center;flex-direction:column;gap:12px;min-width:0;z-index:1}.team-label{font-size:.8125rem;color:var(--muted);margin-bottom:1px}.court-player{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;min-width:0;text-align:center;line-height:1.45}.court-player b{font-size:1.0625rem;font-weight:600;overflow-wrap:anywhere}.court-player small{color:var(--muted)}.seed-badge{display:inline-block;font-size:.75rem;color:#588069;font-weight:500;border:1px solid #d4e3d8;border-radius:4px;padding:1px 5px;vertical-align:middle}.versus{font-size:.875rem;font-weight:600;background:var(--soft);text-align:center;z-index:1;color:#779284;font-variant-numeric:tabular-nums;white-space:nowrap}.referee-slot{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:64px;padding:7px 19px;border-top:1px solid var(--line);font-size:.875rem}.referee-slot>div:first-child{display:flex;align-items:center;gap:10px;min-width:0}.referee-label{color:var(--muted);white-space:nowrap}.referee-slot strong{font-weight:500;overflow-wrap:anywhere}.referee-empty{color:#8b9690}.referee-controls{display:flex;align-items:center;gap:6px;flex-shrink:0}.saved-score{display:flex;justify-content:space-between;padding:0 20px 13px;font-size:.8125rem;color:var(--green)}.saved-score span{color:var(--muted)}.round-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:22px}.round-actions>.button{min-width:144px}.round-actions+.muted-note{margin-top:12px}.waiting-panel{padding:0 0 0 27px;border-left:1px solid var(--line);margin-top:0}.waiting-list{display:flex;flex-wrap:wrap;gap:9px}.wait-chip{display:inline-flex;gap:7px;align-items:center;padding:8px 11px;border:1px solid var(--line);border-radius:7px;font-size:.9375rem;background:var(--paper);overflow-wrap:anywhere;max-width:100%}.wait-chip small{color:var(--muted);font-size:.75rem}.waiting-panel>.muted-note{margin-top:12px}.manage-players{margin-top:10px}.page-footer{text-align:center;font-size:.75rem;color:#8c9791;padding:40px 28px 30px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-height:230px;padding:32px 20px;text-align:center;border:1px solid var(--line);border-radius:12px;background:var(--paper);grid-column:1/-1}.empty-state h2{font-size:1.125rem;font-weight:600}.empty-state p{font-size:.875rem;color:var(--muted);max-width:440px}
.player-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.search{max-width:320px}.player-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px;background:var(--paper);padding:0 20px;border:1px solid var(--line);border-radius:12px}.player-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:19px 0;min-width:0;border-bottom:1px solid var(--line)}.player-card:last-child{border-bottom:0}.player-info{min-width:0}.player-info strong{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:1rem;font-weight:600;overflow-wrap:anywhere}.player-info p{font-size:.8125rem;color:var(--muted);margin-top:5px}.player-card.paused .player-info strong{color:var(--muted)}.player-edit-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px}
.history-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-bottom:24px}.history-tabs button{position:relative;min-height:45px;font-size:.9375rem;color:var(--muted);padding:0 1px 12px}.history-tabs button.active{color:var(--green);font-weight:600}.history-tabs button.active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--green)}.history-card{background:var(--paper);border:1px solid var(--line);border-radius:12px;margin-bottom:20px;padding:20px 24px}.history-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.history-header h2{font-size:1rem;font-weight:600}.history-header h2 small{font-weight:400;margin-left:9px;color:var(--muted)}.history-header time{font-size:.8125rem;color:var(--muted)}.history-match{border-top:1px solid var(--line);margin-top:16px;padding-top:4px}.history-match-heading{display:flex;align-items:center;justify-content:space-between;font-size:.8125rem;color:var(--muted)}.match-result{display:grid;grid-template-columns:minmax(0,1fr) 110px minmax(0,1fr);align-items:center;gap:16px;padding:4px 0 12px}.team-names{position:relative;font-size:1rem;line-height:1.8;overflow-wrap:anywhere;min-width:0}.team-names:last-child{text-align:right}.team-names.winner{color:var(--green);font-weight:600}.win-label{font-size:.75rem;font-weight:500;margin-left:7px;padding:2px 5px;border-radius:4px;background:var(--soft);white-space:nowrap}.score{font-size:1.5rem;letter-spacing:.04em;text-align:center;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.score small{font-size:.875rem;letter-spacing:0;color:var(--muted);font-weight:400}.referee-history{font-size:.8125rem;color:var(--muted);padding-bottom:7px}.stats-filter{max-width:150px}.table-wrap{background:var(--paper);border:1px solid var(--line);border-radius:12px;overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:.9375rem;font-variant-numeric:tabular-nums}th,td{padding:17px 20px;border-bottom:1px solid var(--line)}th{font-size:.8125rem;font-weight:500;color:var(--muted);white-space:nowrap}tr:last-child td{border:0}td:first-child{overflow-wrap:anywhere}td:not(:first-child){white-space:nowrap}.rank-number{display:inline-block;width:28px;color:var(--muted);font-size:.8125rem}.points{color:var(--green)}.stats-note{margin-top:12px}
input,select,textarea{display:block;width:100%;min-height:44px;border:1px solid #cfd9d2;border-radius:8px;background:#fff;color:var(--ink);padding:11px 12px;font-size:1rem}textarea{resize:vertical;min-height:130px}select{appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23717f76' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}label{display:block;font-size:.875rem;font-weight:500;margin-bottom:8px}.field{margin-top:20px}.field-help{font-size:.8125rem;color:var(--muted);line-height:1.65;margin-top:7px}.check-label{display:flex;align-items:center;gap:10px;margin-top:20px}.check-label input{width:18px;height:18px;min-height:0;accent-color:var(--green)}dialog{padding:0;width:min(460px,calc(100% - 32px));max-height:88dvh;border:1px solid var(--line);border-radius:15px;background:var(--paper);color:var(--ink);box-shadow:0 20px 80px #18392b22}dialog::backdrop{background:#213b3155}#modal-content{padding:25px}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:10px}.modal-header h2{font-size:1.2rem;font-weight:600;letter-spacing:-.02em}.modal-description{font-size:.875rem;color:var(--muted);line-height:1.7}.modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:22px}.modal-actions .primary{flex:1}.form-error{color:#b14941;font-size:.875rem;line-height:1.6}.form-error:not(:empty){margin-top:12px}.score-entry{padding:20px 0 0;margin-top:20px;border-top:1px solid var(--line)}.score-entry h3{font-size:.875rem;font-weight:500;color:var(--muted);margin-bottom:16px}.score-fields{display:grid;grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr);gap:12px;align-items:end;text-align:center}.score-fields label{font-size:.875rem;line-height:1.5;min-height:42px;display:flex;align-items:center;justify-content:center;overflow-wrap:anywhere}.score-fields input{text-align:center;font-size:1.6rem;font-variant-numeric:tabular-nums}.score-fields>span{padding-bottom:16px;color:var(--muted)}.winner-field{margin-top:18px}.locked-settings{margin:20px 0 0;font-size:.875rem}.locked-settings>div{display:flex;align-items:start;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid var(--line)}.locked-settings dt{color:var(--muted);flex-shrink:0}.locked-settings dd{margin:0;text-align:right;line-height:1.6}.help-list{padding-left:21px;color:var(--muted);font-size:.875rem;line-height:1.8}.help-list li{margin:12px 0}.help-note{font-size:.8125rem;color:var(--muted);background:var(--soft);padding:12px 14px;border-radius:8px;margin-top:18px;line-height:1.7}
#toast{position:fixed;bottom:26px;left:50%;z-index:20;max-width:calc(100% - 36px);padding:12px 18px;border-radius:9px;background:#233e32;color:#fff;font-size:.875rem;line-height:1.5;text-align:center;opacity:0;transform:translate(-50%,10px);pointer-events:none;transition:opacity .18s,transform .18s}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:1100px){.courts.single .court{min-height:200px}.courts.single .team{gap:15px}.courts.single .court-player b{font-size:1.15rem}.history-card,.leaderboard{max-width:900px}.player-list{max-width:1100px}}
@media(max-width:1050px){.topbar{gap:28px}.workspace{grid-template-columns:minmax(0,1fr) 200px;gap:24px}.waiting-panel{padding-left:20px}.courts{grid-template-columns:1fr}.court{min-height:166px}}
@media(max-width:760px){.topbar{height:66px;padding:0 18px;gap:10px}.brand{font-size:1.2rem;gap:8px}.brandmark{width:29px;height:31px;font-size:1rem}.header-tools{gap:6px}.identity-button{max-width:165px;font-size:.8125rem;padding-inline:8px}#desktop-nav{display:none}main{padding:25px 18px 0;min-height:0}.page-heading{margin-bottom:22px;gap:16px}.page-heading h1{font-size:1.4rem;letter-spacing:-.025em}.page-heading p{font-size:.8125rem;margin-top:6px}.page-heading>.button{min-height:40px;padding:8px 12px;font-size:.8125rem}.workspace{grid-template-columns:1fr;gap:26px}.section-header{margin-bottom:12px}.section-header h2{font-size:1rem}.round-label{gap:10px}.courts{gap:14px}.court-heading{padding:14px 16px}.court{margin:0 10px 10px;min-height:158px;padding:20px 8px;grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr)}.court-player b{font-size:1rem}.team{gap:10px}.referee-slot{padding:6px 15px;min-height:58px}.referee-controls{gap:0}.referee-controls .text-button{font-size:.8125rem}.round-actions{margin-top:16px;gap:10px}.round-actions>.button{min-width:0;flex:1;padding:10px 12px}.waiting-panel{padding:18px 0 0;border-left:0;border-top:1px solid var(--line)}.waiting-panel .section-header{min-height:28px;margin-bottom:13px}.waiting-list{gap:8px}.wait-chip{font-size:.875rem;padding:7px 10px}.manage-players{margin-top:6px}.page-footer{padding:28px 18px 98px}.mobile-nav{position:fixed;left:0;right:0;bottom:0;z-index:10;display:grid;grid-template-columns:repeat(3,1fr);height:calc(66px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--paper);border-top:1px solid var(--line)}.mobile-nav button{padding:8px 0 6px;display:flex;flex-direction:column;gap:5px;font-size:.75rem;line-height:1.3}.mobile-nav .icon{width:20px;height:20px}.player-toolbar{align-items:center;gap:10px;margin-bottom:18px}.player-toolbar .muted-note{font-size:.75rem;white-space:nowrap}.search{max-width:200px;min-width:0}.player-list{grid-template-columns:1fr;gap:0;padding:0 16px}.player-card{padding:16px 0}.player-info p{font-size:.8125rem}.history-tabs{margin-bottom:20px}.history-card{padding:17px 16px;margin-bottom:16px}.history-header h2{font-size:.9375rem}.match-result{grid-template-columns:minmax(0,1fr) 85px minmax(0,1fr);gap:10px}.team-names{font-size:.9375rem}.score{font-size:1.3rem}.score small{font-size:.8125rem}.win-label{margin-left:4px;font-size:.6875rem}.history-match{margin-top:12px}.history-match-heading .text-button{font-size:.8125rem}th,td{padding:14px 10px;font-size:.8125rem}th{font-size:.75rem}.rank-number{width:21px;font-size:.75rem}.rank-table th:first-child{width:32%}.rank-table td:first-child{min-width:82px}.rank-table td:first-child small{display:block}.stats-filter{max-width:132px;font-size:.875rem}.leaderboard .section-header{gap:8px}.stats-note{font-size:.8125rem}#modal-content{padding:22px 20px}.modal-header h2{font-size:1.125rem}.score-fields{gap:9px}.score-fields input{font-size:1.5rem}.demo-banner{font-size:.8125rem}#toast{bottom:84px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
