:root{--bg:#f3f5f6;--ink:#132f2d;--muted:#637777;--green:#075b4d;--line:#dae2e1;--gold:#cda953;--white:#fff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 'Segoe UI','Malgun Gothic',sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer;border:1px solid var(--line);background:white;color:var(--ink);padding:10px 16px;border-radius:8px;font-size:14px;font-weight:600}button:hover{border-color:var(--green);background:#edf5f2}button:disabled{opacity:.5;cursor:default}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#03473c;color:white}.danger{color:#aa3d37}a{color:var(--green)}aside{position:fixed;inset:0 auto 0 0;width:238px;background:#0e302d;color:#dce8e3;padding:34px 22px;display:flex;flex-direction:column}.brand{color:white;text-decoration:none;font-size:23px;font-weight:800;letter-spacing:2px}.brand span{display:block;font-size:12px;letter-spacing:0;font-weight:400;color:#afc7bf;margin-top:7px}.nav-label{margin:58px 10px 16px;color:#92b2a8;font-size:12px;letter-spacing:2px}nav{display:grid;gap:9px}nav button{text-align:left;border:0;background:transparent;color:#bed0c9;padding:14px 13px;display:flex;justify-content:space-between;font-size:15px}nav button span{color:#809e94;font-size:12px}nav button.selected,nav button:hover{background:#244941;color:white}nav button.selected{box-shadow:inset 3px 0 var(--gold)}.aside-bottom{margin-top:auto;font-size:14px;line-height:2}.aside-bottom small{color:#a2beb4;font-size:12px}.aside-bottom a{display:block;color:#efd89c;margin-top:16px}.dot{display:inline-block;background:#98cba4;width:7px;height:7px;border-radius:50%;margin-right:5px}.workspace{margin-left:238px;padding:0 42px;max-width:1800px}header{padding:32px 0 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}.eyebrow{font-size:12px;letter-spacing:2px;color:var(--muted);font-weight:600}h1{font-size:30px;letter-spacing:-1px;margin:5px 0 0}h2{font-size:20px;margin:0 0 6px}h3{font-size:17px;margin:0 0 10px}p{margin:8px 0 16px}.header-actions,.actions{display:flex;gap:8px;flex-wrap:wrap}.hero{background:var(--green);color:white;padding:26px 30px;border-radius:14px;display:flex;justify-content:space-between;align-items:center;gap:20px}.hero h2{font-size:24px}.hero p{color:#d3e4df;margin:5px 0 0;font-size:14px}.hero strong{font-size:42px;letter-spacing:-2px;color:#f2da9c}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:22px 0}.metric{background:white;border:1px solid var(--line);border-radius:12px;padding:20px}.metric span{font-size:14px;color:var(--muted)}.metric strong{display:block;font-size:30px;margin-top:3px;letter-spacing:-1px}.metric small{font-size:13px;color:var(--muted)}.section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:25px 0 15px}.muted{color:var(--muted);font-size:14px}.leagues{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.league{border:1px solid var(--line);background:white;border-radius:12px;overflow:hidden}.league-top{padding:20px;border-bottom:1px solid var(--line);border-top:4px solid var(--green)}.league:nth-child(2) .league-top{border-top-color:#427ea4}.league:nth-child(3) .league-top{border-top-color:#a97c3b}.league:nth-child(4) .league-top{border-top-color:#81908b}.league-top .level{font-size:12px;color:var(--muted);letter-spacing:1px}.league-top h3{margin:7px 0}.member{display:flex;align-items:center;justify-content:space-between;padding:14px 17px;border-bottom:1px solid #edf0ef;gap:8px}.member:last-child{border-bottom:0}.member button{padding:0;border:0;text-align:left;background:transparent;font-size:16px}.avatar{width:34px;height:34px;display:flex;align-items:center;justify-content:center;background:#eef3f0;border-radius:50%;font-size:13px;font-weight:600;margin-right:8px;flex-shrink:0}.person{display:flex;align-items:center}.score{text-align:right;font-variant-numeric:tabular-nums}.score small{display:block;color:var(--muted);font-size:12px}.badge{display:inline-block;padding:3px 8px;border-radius:5px;background:#eef2f1;color:#4f6763;font-size:12px;white-space:nowrap}.badge.up{background:#e1f1e6;color:#236940}.badge.down{background:#fff0e3;color:#9b571e}.notice{background:#fff8e8;border:1px solid #eddfbd;border-radius:9px;padding:13px 17px;margin:20px 0;font-size:14px;color:#795f2b}.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:24px;margin:18px 0}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:14px;white-space:nowrap}th{text-align:left;font-size:12px;color:var(--muted);font-weight:600;background:#f7f9f8;padding:13px 12px;border-bottom:1px solid var(--line)}td{padding:13px 12px;border-bottom:1px solid #edf0ef}tr:last-child td{border-bottom:0}td button{font-size:12px;padding:6px 10px}.numeric{font-variant-numeric:tabular-nums}.filters{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.filters input{max-width:230px}.filters select{max-width:250px}.empty{text-align:center;padding:42px 20px;color:var(--muted)}.empty strong{display:block;font-size:19px;color:var(--ink);margin-bottom:8px}.two-col{display:grid;grid-template-columns:1.25fr 1fr;gap:20px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}label{display:block;font-size:14px;color:var(--muted)}label input,label select,label textarea{margin-top:6px}input,select,textarea{width:100%;border:1px solid #cfdad6;border-radius:7px;padding:10px 12px;color:var(--ink);background:white;font-size:15px}input[type=checkbox]{width:18px;height:18px;accent-color:var(--green)}textarea{min-height:80px;resize:vertical}.full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:24px}.check{display:flex;gap:8px;align-items:center}.check input{margin:0}dialog{border:0;border-radius:16px;max-width:620px;width:calc(100% - 32px);padding:30px;color:var(--ink);box-shadow:0 24px 90px #0004}dialog::backdrop{background:#102d2c88}dialog h2{margin-bottom:18px}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head button{border:0}.form-error{color:#a3342d;font-size:14px;min-height:22px;white-space:pre-wrap}.timeline{border-left:2px solid var(--line);margin:15px 0 0 8px;padding-left:24px}.event{position:relative;margin:0 0 25px}.event:before{content:'';position:absolute;left:-31px;top:7px;width:10px;height:10px;border:2px solid white;border-radius:50%;background:var(--green)}.event p{margin:5px 0;font-size:14px;white-space:pre-wrap}.event small{color:var(--muted);font-size:12px}.event details{font-size:13px;color:var(--muted)}.event pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.5 monospace;background:#f6f8f7;padding:12px}.chart{width:100%;height:auto;display:block}.chart line{stroke:#dce5e0}.chart polyline{fill:none;stroke:var(--green);stroke-width:3}.chart circle{fill:var(--green);stroke:white;stroke-width:2}.chart text{font-size:12px;fill:#526e65}.rule-note{font-size:14px;line-height:1.9;padding-left:20px}footer{font-size:12px;color:var(--muted);padding:30px 0}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:12px 24px;background:#143c32;color:white;border-radius:9px;box-shadow:0 4px 20px #0002;display:none;z-index:10;max-width:90vw}#toast.visible{display:block}.error-panel{color:#9a3d30}.nowrap{white-space:nowrap}.warning-mark{color:#a87017}.subtle-button{border:0;background:transparent;text-decoration:underline}.growth-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.growth-heading select{max-width:250px}
@media(max-width:1200px){.workspace{padding:0 24px}.leagues{grid-template-columns:repeat(2,1fr)}aside{width:210px}.workspace{margin-left:210px}.two-col{grid-template-columns:1fr}}@media(max-width:800px){aside{position:static;width:auto;padding:20px}.brand{font-size:20px}.brand span,.nav-label,.aside-bottom{display:none}nav{display:flex;overflow-x:auto;margin-top:14px;gap:4px}nav button{white-space:nowrap;padding:10px;font-size:13px}nav button span{display:none}.workspace{margin:0;padding:0 18px}header{align-items:flex-start;flex-direction:column;padding-top:22px}.metrics{grid-template-columns:repeat(2,1fr);gap:10px}.hero{padding:22px}.hero strong{font-size:34px}.hero h2{font-size:20px}.panel{padding:18px}.section-head{align-items:flex-start;flex-direction:column}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.growth-heading{align-items:flex-start;flex-direction:column}}@media(max-width:450px){.leagues{grid-template-columns:1fr}.hero{display:block}.hero strong{display:block;margin-top:10px}.header-actions button{padding:9px 11px}.metric{padding:16px}}
.login-page{min-height:100vh;display:grid;place-items:center;padding:28px;background:#0e302d}.login-card{width:100%;max-width:440px;background:white;border-radius:18px;padding:40px;box-shadow:0 24px 80px #0003}.login-brand{font-size:24px;font-weight:800;letter-spacing:3px;color:var(--green);margin-bottom:6px}.login-card h1{font-size:26px;margin-top:30px}.login-card form{margin-top:26px}.login-card label{margin:16px 0 6px}.login-card button{width:100%;padding:13px;font-size:16px}.login-card .form-error{margin-top:14px;margin-bottom:10px}.login-note{font-size:13px;color:var(--muted);margin:22px 0 0;text-align:center}@media(max-width:450px){.login-card{padding:28px}}

.league-emblem{display:block;width:76px;height:76px;margin-bottom:14px;flex-shrink:0}.player-league-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.player-league-title .league-emblem{width:46px;height:46px;margin:0}.league:nth-child(1) .league-top{border-top-color:#b38a33}.league:nth-child(2) .league-top{border-top-color:#3173a9}.league:nth-child(3) .league-top{border-top-color:#aa723e}.league:nth-child(4) .league-top{border-top-color:#667a8b}

.refresh-notice{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);width:min(720px,calc(100% - 32px));z-index:20;background:#fff8e8;color:#684e1e;border:1px solid #d9be80;border-radius:10px;padding:14px 18px;box-shadow:0 8px 30px #0002;display:flex;align-items:center;gap:16px;font-size:14px}.refresh-notice[hidden]{display:none}.refresh-notice button{flex-shrink:0}@media(max-width:600px){.refresh-notice{flex-direction:column;align-items:stretch}}

.promotion-candidate {background: #ddf6e7 !important; box-shadow: inset 4px 0 #16864b; color: #123b27;}
.demotion-candidate {background: #fff1e5 !important; box-shadow: inset 4px 0 #ce7726; color: #563014;}
.promotion-candidate .badge.up {font-weight: 800; border: 1px solid #16864b;}
.member .person {flex-wrap: wrap;}

.compare-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:20px 0}.compare-reference{background:#eef7f2}.compare-bar-row{display:grid;grid-template-columns:100px minmax(80px,1fr) 80px;gap:16px;align-items:center;margin:16px 0}.compare-bar{width:100%;height:20px;accent-color:var(--green);border:0;border-radius:6px;overflow:hidden}.compare-bar::-webkit-progress-bar{background:#edf2ef}.compare-bar::-webkit-progress-value{background:var(--green)}.compare-bar-row b{text-align:right}@media(max-width:450px){.compare-bar-row{grid-template-columns:70px minmax(40px,1fr) 65px;gap:8px;font-size:13px}}

#sync-status{font-size:12px;color:#52635b;max-width:260px;line-height:1.5} .header-actions{flex-wrap:wrap}

.stroke-chart{width:100%;height:auto;display:block}.stroke-chart line{stroke:#dce5e0}.stroke-chart polyline{fill:none;stroke-width:2.5}.stroke-chart circle{stroke:white;stroke-width:1.5}.stroke-chart text{font-size:12px;fill:#526e65}.stroke-legend{display:flex;flex-wrap:wrap;gap:12px 20px;margin-top:12px}.stroke-legend span{display:flex;align-items:center;gap:7px;font-size:14px}#strokes-count{max-width:230px;display:block}
