:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--background);font-synthesis:none;--ink:#20252a;--background:#f4f5f1;--surface:#ffffff;--lime:#d5f766;--muted:#777e80;--line:#e1e5dd;--dark:#171b20;--blue:#5c72e8}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:8px;padding:11px 16px;font-size:13px;font-weight:650;background:#e9ece5;color:var(--ink);transition:background .15s,transform .15s}button:hover{background:#dfe5d6}button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:not-allowed}button.primary{background:var(--lime);color:#202a0a}button.dark{background:var(--dark);color:white}button.ghost{background:transparent;border:1px solid var(--line)}button.small{padding:7px 10px;font-size:12px}a{color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #5c72e8;outline-offset:3px}input,select,textarea{border:1px solid #d9ded4;background:var(--surface);border-radius:8px;padding:11px;width:100%;color:inherit}label{display:block;font-size:12px;font-weight:650;margin:13px 0 6px}textarea{resize:vertical}.shell{display:grid;grid-template-columns:224px 1fr;min-height:100vh}.sidebar{background:var(--dark);color:#f2f4ee;padding:30px 20px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:224px}.brand{font-size:25px;font-weight:800;letter-spacing:-1.2px;display:flex;align-items:center;gap:10px}.brand-mark{background:var(--lime);color:var(--dark);width:32px;height:32px;display:grid;place-items:center;border-radius:9px;font-size:23px;transform:rotate(-7deg)}.brand small{font-weight:500;font-size:10px;letter-spacing:1.5px;color:#9a9f98;display:block;margin-top:3px}.nav{margin-top:45px;display:grid;gap:8px}.nav button{text-align:left;background:transparent;color:#b3b8b5;padding:13px 14px;font-size:13px;font-weight:500;display:flex;gap:12px;align-items:center}.nav button.selected{background:#2b3325;color:var(--lime)}.nav svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6}.side-bottom{margin-top:auto;border-top:1px solid #31352f;padding-top:22px}.side-bottom p{font-size:11px;color:#969e96;line-height:1.7}.side-bottom .caption{color:var(--lime);letter-spacing:1.8px;font-size:10px}.main{grid-column:2;padding:0 40px 40px;min-width:0}.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:12px}.crumb{font-size:12px;color:#7b827c}.crumb b{color:#2a3028;font-weight:550}.connection{display:flex;align-items:center;gap:8px;font-size:11px;color:#5c6952}.dot{width:6px;height:6px;background:#79a64a;border-radius:50%}.dot.offline{background:#d68b51}.avatar{width:30px;height:30px;border-radius:50%;background:#dbe1d4;display:grid;place-items:center;font-size:10px;font-weight:700}.top-right{display:flex;align-items:center;gap:20px}.hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:32px 0 24px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:1.7px;color:#878e81;text-transform:uppercase}.hero h1{font-size:32px;letter-spacing:-1.2px;margin:7px 0 7px;line-height:1.2}.sub{font-size:12px;color:#7d847a;line-height:1.7;margin:0}.actions{display:flex;gap:8px;flex-wrap:wrap}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.stat{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px 22px}.stat-top{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#7f877a}.stat .number{font-size:30px;font-weight:650;letter-spacing:-1px;margin-top:12px}.stat small{color:#8a9283;font-size:10px}.stat.feature{background:var(--lime);border-color:var(--lime)}.stat.feature .stat-top,.stat.feature small{color:#50642f}.section-head{display:flex;justify-content:space-between;align-items:center;margin:29px 0 16px;gap:10px}.section-head h2{font-size:17px;letter-spacing:-.4px;margin:0}.section-head span{font-size:11px;color:#7e8877}.pill{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:650;border-radius:5px;padding:5px 7px;background:#edf1e8;color:#6a785c;letter-spacing:.5px}.pill.live{background:#eff6dc;color:#5d7a21}.pill.review{background:#fff1dc;color:#a7742b}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.match-card{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}.match-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #eef0e9}.match-header .caption{color:#89907e;font-size:10px;letter-spacing:1.2px}.match-header b{font-size:12px}.battle-strip{padding:10px 20px;background:#f8f9f5;display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#7d8971}.players-score{display:grid;grid-template-columns:1fr 44px 1fr;padding:24px 20px 18px;align-items:center;text-align:center}.player-name{font-size:14px;font-weight:650;overflow-wrap:anywhere}.initial{height:35px;width:35px;margin:0 auto 8px;border-radius:9px;background:#eaf0ff;color:#6576bc;display:grid;place-items:center;font-weight:700;font-size:12px}.right .initial{background:#f2ece6;color:#b0906c}.score{font-size:48px;line-height:1.2;letter-spacing:-2px;font-weight:750}.vs{font-size:10px;color:#adb3a6}.side{font-size:9px;letter-spacing:.5px;color:#8d9587}.side.x{color:#536abd}.scoring{padding:0 16px 14px;display:grid;grid-template-columns:1fr 1fr;gap:20px}.score-buttons{display:grid;grid-template-columns:1fr 1fr;gap:5px}.score-buttons button{background:#f1f4ea;padding:9px 5px;font-size:10px;font-weight:500;text-align:left}.score-buttons button strong{float:right;font-weight:750}.score-buttons .xtreme{background:#eef3d9}.score-buttons .penalty{grid-column:1/-1;background:#fff7eb;color:#8b6d44;text-align:center}.card-footer{border-top:1px solid #eef0e9;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;color:#85907b}.card-footer .actions{gap:5px}.ready-row{padding:22px;display:flex;justify-content:space-between;align-items:center;gap:15px}.ready-row strong{font-size:14px}.ready-row p{font-size:11px;color:#7c8671;margin:8px 0}.ready-row select{width:110px;padding:8px;font-size:11px}.layout-bottom{display:grid;grid-template-columns:1.65fr 1fr;gap:20px;margin-top:10px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.panel-head h3{font-size:14px;margin:0}.panel-head small{font-size:10px;color:#88917d}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px}th{text-align:left;font-size:9px;letter-spacing:.8px;font-weight:550;color:#9aA18f;padding:10px 6px;border-bottom:1px solid var(--line)}td{padding:12px 6px;border-bottom:1px solid #f0f2eb}td.rank{color:#929a86;width:25px}tr:last-child td{border:0}.leader{background:#f3f7ea}.feed{display:grid;gap:16px}.feed-item{display:flex;gap:11px}.feed-mark{width:27px;height:27px;flex-shrink:0;background:#eef3df;color:#7e9356;border-radius:8px;display:grid;place-items:center;font-size:12px}.feed-item p{font-size:11px;margin:0 0 4px;line-height:1.5}.feed-item small{font-size:9px;color:#9aa18e}.rule-strip{margin-top:25px;padding:17px 20px;background:#eaeedF;border:1px solid #dde4d0;border-radius:10px;font-size:11px;color:#6b795e;line-height:1.7;display:flex;gap:20px;justify-content:space-between}.rule-strip strong{color:#435735}.empty{border:1px dashed #cfd7c3;border-radius:12px;padding:38px;text-align:center;background:#f9fbf6}.empty h2{font-size:23px;letter-spacing:-.6px;margin:12px 0}.empty p{font-size:12px;color:#7a8670;line-height:1.8}.empty .symbol{font-size:40px;color:#71894e}.empty .actions{justify-content:center;margin-top:20px}.welcome{max-width:730px;margin:70px auto}.welcome h1{font-size:48px;letter-spacing:-2px;line-height:1.1}.welcome .intro{font-size:14px;line-height:1.8;color:#75816b;max-width:470px}.format-chips{display:flex;flex-wrap:wrap;gap:8px;margin:30px 0}.format-chips span{background:var(--surface);border:1px solid var(--line);border-radius:20px;font-size:11px;padding:9px 13px}.footer-note{font-size:10px;color:#9aa28e;margin-top:28px}.tabs{display:flex;gap:6px;margin:16px 0;flex-wrap:wrap}.tabs button{background:transparent;font-weight:500;color:#7e8875}.tabs button.selected{background:#e5ebdc;color:#3e5132}.brackets{display:flex;gap:18px;overflow:auto;padding-bottom:10px;align-items:start}.bracket-col{min-width:235px;display:grid;gap:12px}.bracket-col h3{font-size:12px;color:#89957b}.bracket-box{padding:15px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:11px}.bracket-box .line{display:flex;justify-content:space-between;padding:6px 0;gap:15px}.bracket-box small{color:#8a957c;font-size:9px}.winner{color:#5d781f;font-weight:700}.champion{background:var(--dark);color:white;padding:25px;border-radius:12px;display:flex;align-items:center;justify-content:space-between;margin-top:20px}.champion b{font-size:24px}.champion .eyebrow{color:var(--lime)}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.key-row{display:flex;gap:8px;margin-top:15px}.detail{line-height:1.8;font-size:12px;color:#78846d}.detail strong{color:#313b29}.history{max-height:250px;overflow:auto;font-size:11px}.history p{padding:10px;border-bottom:1px solid var(--line);margin:0}.banner{background:#f9eed8;padding:12px 16px;border-radius:8px;font-size:12px;margin:15px 0;color:#83672e}dialog{border:0;border-radius:16px;padding:28px;width:min(530px,94vw);box-shadow:0 25px 100px #151c2440;color:var(--ink)}dialog::backdrop{background:#10181488;backdrop-filter:blur(4px)}dialog h2{font-size:23px;letter-spacing:-.7px;margin:0 0 5px}.dialog-head{display:flex;justify-content:space-between;gap:10px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 15px}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.form-note{font-size:10px;color:#8a927f;line-height:1.7;margin-top:14px}.error{color:#b34935;font-size:12px;margin-top:12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--dark);color:white;padding:13px 20px;border-radius:9px;font-size:12px;max-width:90%;box-shadow:0 6px 20px #0002;display:none;z-index:100}#toast.show{display:block}@media(min-width:1500px){.main{max-width:1500px;padding:0 60px 40px}}@media(max-width:1050px){.sidebar{width:185px;padding:24px 15px}.shell{grid-template-columns:185px 1fr}.main{padding:0 25px 30px}.stats{gap:10px}.stat{padding:17px}.hero h1{font-size:28px}.cards{gap:12px}.scoring{gap:10px}.layout-bottom{grid-template-columns:1fr}}@media(max-width:760px){.shell{display:block}.sidebar{position:static;width:100%;padding:16px;display:block}.brand{font-size:22px}.brand small{display:none}.nav{margin-top:18px;display:flex;gap:3px;overflow:auto}.nav button{padding:9px;font-size:11px;white-space:nowrap}.nav svg{width:14px;height:14px}.side-bottom{display:none}.main{padding:0 16px 25px}.topbar{height:58px}.top-right{gap:8px}.hero{padding:22px 0;align-items:start;flex-direction:column}.hero h1{font-size:27px}.stats{grid-template-columns:1fr 1fr}.stat{padding:16px}.stat .number{font-size:26px}.cards{grid-template-columns:1fr}.rule-strip{flex-direction:column;gap:6px}.settings-grid{grid-template-columns:1fr}.welcome{margin:40px 0}.welcome h1{font-size:38px}.form-grid{grid-template-columns:1fr}.connection{font-size:10px}.champion{gap:15px}.champion b{font-size:20px}}

[hidden]{display:none!important}
.main{display:flex;flex-direction:column}.topbar{flex-shrink:0}
.preferences-footer{margin-top:auto;padding-top:32px;display:flex;justify-content:flex-end;gap:18px;flex-wrap:wrap}.preferences-footer>div{display:flex;align-items:center;gap:9px}.preferences-footer label{margin:0;color:var(--muted);font-weight:500}.preferences-footer select{width:auto;max-width:215px;font-size:12px;padding:9px 12px}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark;--ink:#e8ede4;--background:#101518;--surface:#1a2226;--line:#344039;--muted:#a5afa1}
html[data-theme="dark"] .sidebar{background:#11171a;border-right:1px solid var(--line)}
html[data-theme="dark"] button{background:#2b3631;color:var(--ink)}html[data-theme="dark"] button:hover{background:#3b4c40}
html[data-theme="dark"] button.ghost{background:transparent}html[data-theme="dark"] button.primary,html[data-theme="dark"] button.dark{background:var(--lime);color:#202a0a}
html[data-theme="dark"] .nav button{background:transparent;color:#aab5aa}html[data-theme="dark"] .nav button.selected{background:#2b3b24;color:var(--lime)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{border-color:var(--line)}html[data-theme="dark"] dialog{background:var(--surface)}
html[data-theme="dark"] .crumb b,html[data-theme="dark"] .detail strong{color:var(--ink)}
html[data-theme="dark"] .connection,html[data-theme="dark"] .crumb,html[data-theme="dark"] .sub,html[data-theme="dark"] .detail,html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .stat-top,html[data-theme="dark"] .stat small,html[data-theme="dark"] .section-head span,html[data-theme="dark"] .form-note,html[data-theme="dark"] .footer-note,html[data-theme="dark"] .ready-row p,html[data-theme="dark"] .empty p,html[data-theme="dark"] .welcome .intro,html[data-theme="dark"] .side,html[data-theme="dark"] .card-footer,html[data-theme="dark"] th,html[data-theme="dark"] td.rank,html[data-theme="dark"] .feed-item small,html[data-theme="dark"] .bracket-box small,html[data-theme="dark"] .bracket-col h3{color:var(--muted)}
html[data-theme="dark"] .avatar{background:#344b3c}html[data-theme="dark"] .stat.feature{color:#202a0a}html[data-theme="dark"] .stat.feature .stat-top,html[data-theme="dark"] .stat.feature small{color:#50642f}
html[data-theme="dark"] .battle-strip{background:#18221d;color:#abbf99}html[data-theme="dark"] .match-header,html[data-theme="dark"] .card-footer,html[data-theme="dark"] td{border-color:var(--line)}
html[data-theme="dark"] .score-buttons button{background:#29372c}html[data-theme="dark"] .score-buttons .xtreme{background:#34472a;color:#d8eea7}html[data-theme="dark"] .score-buttons .penalty{background:#3a3025;color:#e9be83}
html[data-theme="dark"] .initial{background:#263855;color:#b0c3fa}html[data-theme="dark"] .right .initial{background:#443327;color:#e0be98}html[data-theme="dark"] .side.x{color:#a9b9fa}
html[data-theme="dark"] .pill{background:#2a382d;color:#c1d4b0}html[data-theme="dark"] .pill.live{background:#35482a;color:#d5ef91}html[data-theme="dark"] .pill.review{background:#493b28;color:#ecc68d}
html[data-theme="dark"] .leader,html[data-theme="dark"] .tabs button.selected{background:#2a3929}html[data-theme="dark"] .tabs button.selected{color:#d1e5bd}html[data-theme="dark"] .feed-mark{background:#314228;color:#c6e594}
html[data-theme="dark"] .rule-strip{background:#243122;border-color:#3b4c34;color:#b0c7a0}html[data-theme="dark"] .rule-strip strong{color:#d4edbf}html[data-theme="dark"] .empty{background:#17201a;border-color:#43573c}html[data-theme="dark"] .winner{color:#c8ef7d}html[data-theme="dark"] .banner{background:#3b3020;color:#efc783}
html[lang="zh-Hant"]{font-family:ui-sans-serif,system-ui,"Noto Sans TC","Microsoft JhengHei","PingFang TC",sans-serif}html[lang="zh-Hant"] .eyebrow,html[lang="zh-Hant"] th{letter-spacing:.3px}html[lang="zh-Hant"] .hero h1{letter-spacing:-.4px}
@media(max-width:760px){.preferences-footer{justify-content:flex-start;gap:12px}.preferences-footer>div{flex:1;min-width:150px;justify-content:space-between}.preferences-footer select{max-width:185px}}

.sidebar-toggle{align-self:flex-end;margin-top:18px;background:#28322a;color:#d5f766;padding:6px 12px;font-size:18px}.nav{margin-top:16px}.nav svg{flex-shrink:0}.shell.compact{grid-template-columns:76px 1fr}.compact .sidebar{width:76px;padding:24px 12px}.compact .brand-name,.compact .nav-label,.compact .side-bottom{display:none}.compact .brand{justify-content:center}.compact .sidebar-toggle{align-self:center}.compact .nav button{justify-content:center;padding:14px 10px}.compact .nav{gap:9px}.live-count{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;margin-bottom:20px}.live-display .score{font-size:64px}.live-display .players-score{padding:28px 20px}.admin-match-tools{display:flex;justify-content:flex-end;gap:8px;padding:10px 16px;border-top:1px solid var(--line);background:var(--background)}.admin-panel{margin:24px 0}.admin-panel .actions{margin-top:12px}button.danger,html[data-theme="dark"] button.danger{background:#b84330;color:white}.pagination{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.tournament-directory small{color:var(--muted)}.champion,html[data-theme="dark"] .champion{background:linear-gradient(120deg,#ffef9d,#f5c746);color:#4b350b;border:1px solid #d7a628;box-shadow:0 6px 22px #ad7f1617}.champion .eyebrow,html[data-theme="dark"] .champion .eyebrow{color:#77520b}.champion>span{color:#62440c;font-weight:650}
@media(max-width:760px){.shell.compact{display:grid;grid-template-columns:64px 1fr}.compact .sidebar{position:fixed;inset:0 auto 0 0;width:64px;padding:18px 8px;display:flex}.compact .nav{display:grid;margin-top:16px;gap:4px;overflow:visible}.compact .nav svg{width:18px;height:18px}.compact .main{grid-column:2}.sidebar-toggle{position:absolute;top:12px;right:16px;margin-top:0}.compact .sidebar-toggle{position:static;margin-top:18px}.nav-label{font-size:11px}.tournament-directory .table-wrap{overflow:auto}}

.scope-toolbar{display:flex;align-items:center;gap:16px;margin:0 0 24px}.scope-toolbar label{margin:0;white-space:nowrap}.scope-toolbar select{width:min(100%,470px)}button.player-link,html[data-theme="dark"] button.player-link{background:transparent;color:inherit;padding:3px 0;text-align:left;border-radius:3px;font-size:inherit;text-decoration:underline;text-decoration-color:#9cac8266;text-underline-offset:4px;overflow-wrap:anywhere}button.player-link:hover,html[data-theme="dark"] button.player-link:hover{color:#73952e;text-decoration-color:currentColor}.records-swiss{margin-top:20px}.records-swiss summary{cursor:pointer;font-size:13px;font-weight:650}.player-profile-dialog{width:min(720px,94vw)}.player-match-list{max-height:65vh;overflow:auto;margin-top:20px}.profile-match{border:1px solid var(--line);border-radius:10px;margin-bottom:12px;overflow:hidden}.profile-match summary{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:16px;cursor:pointer;background:var(--background)}.profile-match summary small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.profile-score{font-size:21px;font-weight:750;white-space:nowrap}.profile-match-body{padding:0 16px 16px}.profile-opponents{font-weight:650;font-size:13px}.player-battles{list-style:none;padding:0;font-size:12px}.player-battles li{padding:12px 0;border-bottom:1px solid var(--line);line-height:1.7}.player-battles small{color:var(--muted);font-size:10px}.profile-room-link{font-size:11px}.profile-match summary:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}@media(max-width:760px){.scope-toolbar{align-items:stretch;flex-direction:column;gap:8px}.scope-toolbar select{width:100%}}

.table-wrap th{white-space:nowrap}

.topbar+.tournament-toolbar{margin-top:28px}
