@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;550;600;650;700&display=swap');
:root{color-scheme:light;--bg:#f5f7f8;--surface:#fff;--raised:#f0f3f5;--text:#202c35;--muted:#52636f;--subtle:#596c78;--border:#d6dee3;--control:#8c9ca6;--accent:#176a49;--accent-hover:#105638;--on-accent:#fff;--pale:#e3f2e9;--on-pale:#195b3e;--focus:#178253;--danger:#a52a2c;--danger-bg:#fff0f0;--warning:#735015;--warning-bg:#fff4dc;--draft-border:#ac7d2c;--disabled:#53636e;--disabled-bg:#e8edf0;--shadow:0 18px 70px #17242e26;--overlay:#101a2477;--rank:#edf1f3;--row-line:#e4eaee;--font:'Golos Text',Arial,sans-serif;font-family:var(--font);font-size:14px;font-synthesis:none;background:var(--bg);color:var(--text)}
:root[data-theme=dark]{color-scheme:dark;--bg:#1b222a;--surface:#252f39;--raised:#2e3a45;--text:#f0f4f7;--muted:#bdc9d3;--subtle:#b4c1cc;--border:#465663;--control:#7d919f;--accent:#8bdeb5;--accent-hover:#a9eacc;--on-accent:#153b2a;--pale:#294b3c;--on-pale:#b7edce;--focus:#a0e9c3;--danger:#ffb6b6;--danger-bg:#4b3037;--warning:#f0d190;--warning-bg:#493f2b;--draft-border:#bd9b54;--disabled:#a6b5c0;--disabled-bg:#34414c;--shadow:0 18px 70px #0005;--overlay:#0a111ba8;--rank:#344450;--row-line:#3a4854}
*{box-sizing:border-box}body{margin:0;line-height:1.5}button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:13px;font-weight:500;cursor:pointer}button:hover:not(:disabled){background:var(--raised);border-color:var(--control)}button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:600}button.primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}button.ghost{background:transparent;border-color:transparent}button.danger{color:var(--danger);border-color:var(--danger);background:var(--danger-bg)}button:disabled,button.primary:disabled{color:var(--disabled);background:var(--disabled-bg);border-color:var(--border);cursor:not-allowed;opacity:1}a{color:var(--accent)}:focus-visible{outline:3px solid var(--focus);outline-offset:3px}#main-content:focus{outline:0}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}input,textarea,select{background:var(--surface);color:var(--text);border:1px solid var(--control);border-radius:7px;padding:10px 11px;min-height:42px;max-width:100%}input::placeholder,textarea::placeholder{color:var(--subtle);opacity:1}input:read-only{background:var(--raised);color:var(--muted);border-color:var(--border)}input:disabled,select:disabled{background:var(--disabled-bg);color:var(--disabled);opacity:1}input[aria-invalid=true],select[aria-invalid=true]{border:2px solid var(--danger);background:var(--danger-bg)}textarea{resize:vertical;line-height:1.7}h1,h2,h3,p{margin-top:0}h1{font-size:30px;font-weight:650;letter-spacing:-.8px;line-height:1.2;margin-bottom:10px}h2{font-size:22px;letter-spacing:-.4px;font-weight:600;line-height:1.3;margin:0}h3{font-size:16px;font-weight:600;margin:0}p{line-height:1.7}.skip-link{position:fixed;top:-80px;left:20px;z-index:200;background:var(--accent);color:var(--on-accent);padding:10px 16px;border-radius:8px}.skip-link:focus{top:12px}[hidden]{display:none!important}
.app-header{height:72px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:20px;padding:0 max(28px,calc((100vw - 1080px)/2));background:var(--surface)}.app-brand{padding:0;border:0;background:none;font-size:21px;font-weight:650;letter-spacing:-.6px;white-space:nowrap}.app-brand:hover:not(:disabled){background:none;border:0}.header-tools{display:flex;align-items:center;gap:16px}.appearance-control select{font-size:12px;min-height:38px;padding:7px 9px;border-color:var(--border);background:transparent;width:134px}.appearance-control>span{display:none}main{max-width:1136px;padding:30px 28px 60px;margin:auto}.tournament-heading{margin-bottom:24px}.back-link{padding:0;min-height:26px;font-size:12px;background:none;border:0;color:var(--muted);margin-bottom:14px;gap:3px}.back-link svg{transform:rotate(180deg);width:14px;height:14px}.event-date{color:var(--muted);font-size:13px}.main-nav{display:flex;gap:28px;border-bottom:1px solid var(--border);margin-bottom:28px}.main-nav button{border:0;background:none;border-radius:0;min-height:42px;padding:0 0 14px;color:var(--muted);position:relative;font-size:14px}.main-nav button.active{color:var(--text);font-weight:600}.main-nav button.active:after{content:'';height:3px;position:absolute;bottom:-1px;left:0;right:0;background:var(--accent);border-radius:2px}.main-nav button span{font-size:11px;background:var(--raised);color:var(--muted);padding:1px 6px;border-radius:5px}.section-heading,.round-head,.home-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}.heading-count{font-weight:400;color:var(--muted);font-size:17px;margin-left:8px}.subtle,.muted{color:var(--muted)}p.subtle{font-size:13px;margin:7px 0 0}.round-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}.round-tabs button{font-size:12px;min-height:34px;padding:6px 12px;border-color:transparent;background:transparent;color:var(--muted)}.round-tabs button.active{background:var(--raised);border-color:var(--border);color:var(--text)}.game-toolbar select{font-size:12px;min-height:38px;border-color:var(--border)}
.more-menu,.row-menu{position:relative}.more-menu summary,.row-menu summary{display:flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;min-height:38px;padding:7px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;list-style:none;user-select:none}.more-menu summary::-webkit-details-marker,.row-menu summary::-webkit-details-marker{display:none}.more-menu summary svg{width:14px;height:14px}.menu-items{position:absolute;right:0;top:calc(100% + 8px);width:250px;padding:6px;background:var(--surface);border:1px solid var(--control);border-radius:10px;box-shadow:var(--shadow);z-index:30;display:grid}.menu-items button{border:0;background:none;justify-content:flex-start;text-align:left;padding:10px 12px;font-size:13px;min-height:40px}.menu-items hr{width:calc(100% - 18px);height:1px;border:0;background:var(--border);margin:5px auto}.row-menu summary{width:36px;min-height:34px;border:0;letter-spacing:2px}.row-menu .menu-items{width:180px}.row-tools{width:56px}.participants-table{overflow:visible}.participants-table tr:last-child .row-menu .menu-items{top:auto;bottom:calc(100% + 4px)}
.games{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.game{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;scroll-margin:20px}.game.has-draft{border-color:var(--draft-border)}.game:focus-within{box-shadow:0 0 0 1px var(--control)}.game-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;border-bottom:1px solid var(--row-line)}.game-title{display:flex;align-items:center;gap:9px}.game-header h3{font-size:15px}.game-number{display:none}.repeat-note{display:flex;color:var(--warning)}.repeat-note svg{width:15px;height:15px}.pill{display:inline-flex;align-items:center;gap:5px;background:var(--pale);color:var(--on-pale);padding:4px 7px;border-radius:5px;font-size:11px;white-space:nowrap}.pill svg{width:12px;height:12px}.pill.neutral{background:transparent;color:var(--muted)}.pill.draft{background:var(--warning-bg);color:var(--warning)}.game-labels,.player-row{display:grid;grid-template-columns:minmax(90px,1fr) 80px 42px 56px;align-items:center;gap:10px;padding-left:18px;padding-right:18px}.game-labels{padding-top:15px;padding-bottom:5px;font-size:11px;color:var(--muted)}.game-labels span:not(:first-child){text-align:right}.player-row{min-height:60px;padding-top:8px;padding-bottom:8px;border-bottom:1px solid var(--row-line)}.player-row:last-of-type{border-bottom:0}.player-name{font-size:14px;line-height:1.5;overflow-wrap:anywhere}.player-row input{width:100%;min-width:0;min-height:38px;height:38px;padding:7px 8px;text-align:right;font-size:14px;font-variant-numeric:tabular-nums}.cell-number{text-align:right;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}.cell-number.points{color:var(--text);font-weight:550}.has-draft .cell-number{color:var(--warning)}.game-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;min-height:64px;border-top:1px solid var(--row-line)}.game-draft-label{font-size:12px;color:var(--warning)}.game-footer button{min-height:36px;font-size:12px;padding:7px 11px}.game-finals .game-labels,.game-finals .player-row{grid-template-columns:minmax(90px,1fr) 90px 68px}.game-finals select{width:100%;min-height:38px;padding:7px}.form-error:not(:empty),.inline-error:not(:empty){color:var(--danger);background:var(--danger-bg);padding:10px 14px;font-size:13px;border-radius:6px;margin-top:8px}.form-error:not(:empty){border-radius:0;margin:0}.next-block{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:24px;padding:18px 0}.next-block h3{font-size:15px}.next-block:has(button:disabled){color:var(--muted)}
.player-entry{max-width:760px;margin-bottom:24px}.player-entry>label{display:block;font-size:13px;font-weight:500;margin-bottom:8px}.entry-line{display:flex;align-items:flex-start;gap:10px}.entry-search{flex:1;min-width:0;position:relative}.entry-search input{width:100%;min-height:46px;font-size:14px}.entry-line>button{min-height:46px}.entry-search [role=listbox]{position:absolute;z-index:20;top:calc(100% + 6px);left:0;right:0;max-height:290px;overflow:auto;background:var(--surface);border:1px solid var(--control);border-radius:9px;box-shadow:var(--shadow);padding:5px}.entry-search [role=option]{width:100%;justify-content:flex-start;border:0;background:none;text-align:left;font-size:13px;font-weight:400;padding:10px;min-height:42px}.entry-search [role=option].focused,.entry-search [role=option][aria-selected=true]{background:var(--pale)}.entry-search [aria-disabled=true]{color:var(--muted);cursor:default}.entry-search [role=option] small{margin-left:auto;font-size:10px;color:var(--muted)}.pick-check{width:18px;height:18px;border:1px solid var(--control);border-radius:4px;display:flex;flex:none;color:var(--accent)}.pick-check svg{width:16px;height:16px}.pending-players{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.name-chip{font-size:12px;background:var(--raised);min-height:32px;padding:5px 9px;gap:8px}.name-chip svg{width:13px;height:13px}.empty-roster{color:var(--muted);font-size:13px;max-width:560px;line-height:1.8}.registration-summary{margin-top:14px!important}.panel{background:var(--surface);border:1px solid var(--border);border-radius:10px}.panel-pad{padding:24px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:14px;white-space:nowrap}th{text-align:left;background:var(--raised);color:var(--muted);font-size:12px;font-weight:500;padding:13px 18px;border-bottom:1px solid var(--border)}td{padding:14px 18px;border-bottom:1px solid var(--row-line);color:var(--muted)}tr:last-child td{border-bottom:0}td.name{color:var(--text);font-weight:500}td strong{color:var(--text);font-weight:600}td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}th button{padding:2px 0;border:0;border-radius:2px;background:none;font-size:12px;min-height:30px;color:inherit}th[aria-sort=ascending],th[aria-sort=descending]{color:var(--text)}.rank{display:inline-grid;place-content:center;min-width:28px;height:28px;border-radius:6px;background:var(--rank);color:var(--muted);font-size:12px}.rank.top{background:var(--pale);color:var(--on-pale)}.person{white-space:normal;overflow-wrap:anywhere}.mobile-rounds{display:none}.participants-table th:first-child{width:64px}.participants-table td:last-child{padding:6px 12px}.participants-table td.name{width:100%}.participants-table .seat{font-size:12px}.panel:has(.participants-table){overflow:visible}.home-heading{margin-bottom:30px}.home-heading h1{margin:0}.home-empty{padding:38px 0;color:var(--muted);max-width:500px}.home-empty h2{color:var(--text)}.home-empty p{margin-top:12px}.tournament-list{background:var(--surface);border:1px solid var(--border);border-radius:12px}.tournament-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border-bottom:1px solid var(--row-line)}.tournament-item:last-child{border-bottom:0}.tournament-item h3{font-size:16px;overflow-wrap:anywhere}.tournament-item p{font-size:12px;color:var(--muted);margin:7px 0 0}.tournament-item button{flex:none}.archive-list{margin-top:30px}.archive-list>summary{color:var(--muted);font-size:13px;cursor:pointer;margin-bottom:14px;min-height:32px}.empty{text-align:center;padding:40px 24px}.empty>svg{width:30px;height:30px;color:var(--muted);margin-bottom:16px}.empty p{color:var(--muted);max-width:480px;margin:10px auto 20px;font-size:13px}.empty h3{font-size:18px}
.field{display:grid;gap:7px;font-size:13px;font-weight:500}.field input,.field textarea{width:100%}.field-hint{font-size:12px;font-weight:400;color:var(--muted);line-height:1.7}.settings-grid{display:grid;gap:20px;max-width:600px}.toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.instruction{color:var(--muted);font-size:14px;line-height:1.85}.instruction h3{color:var(--text);margin-top:25px}.instruction h3:first-child{margin-top:0}.instruction p{margin-top:9px}.history-row{display:flex;gap:22px;padding:20px 24px;border-bottom:1px solid var(--row-line);font-size:13px}.history-row:last-child{border-bottom:0}.history-row time{flex:none;width:110px;color:var(--muted);font-size:12px}.history-row strong{font-weight:500}.history-row p{color:var(--muted);margin:6px 0 0}.banner,.draft-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:20px;background:var(--warning-bg);color:var(--warning);border:1px solid var(--draft-border);border-radius:8px;font-size:13px}.draft-banner>div{display:flex;align-items:center;gap:12px}.draft-banner strong{font-weight:550}.draft-banner small{display:block;margin-top:3px;font-size:12px}.draft-banner button{background:transparent;font-size:12px}.sync{display:none}.loading{display:grid;place-content:center;min-height:65vh;color:var(--muted)}
dialog{border:1px solid var(--border);border-radius:14px;padding:0;max-width:600px;width:calc(100% - 32px);max-height:90dvh;background:var(--surface);color:var(--text);box-shadow:var(--shadow);overflow:auto}dialog::backdrop{background:var(--overlay)}.modal-head{padding:20px 24px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:18px}.modal-head h2{font-size:21px}.modal-head>button{border:0;min-height:36px;min-width:36px;padding:6px}.modal-body{padding:24px}.modal-body>p,.modal-body form>p{font-size:14px;color:var(--muted)}.modal-body .field{margin-bottom:18px}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:26px}.actions button{min-height:42px}.modal-error{font-size:13px;color:var(--danger);line-height:1.7}.modal-error:not(:empty){background:var(--danger-bg);padding:12px;border-radius:7px;margin-top:16px}.confirm-detail{padding:12px 14px;background:var(--warning-bg);border:1px solid var(--draft-border);border-radius:7px;font-size:13px;line-height:1.8;color:var(--warning)!important}.final-counts{display:flex;justify-content:space-between;gap:12px;background:var(--raised);padding:12px;border-radius:6px;font-size:12px;margin:15px 0}.final-assignment-list{max-height:350px;overflow:auto;border:1px solid var(--border);border-radius:8px}.final-assignment-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:11px 12px;border-bottom:1px solid var(--border);font-size:13px}.final-assignment-row:last-child{border-bottom:0}.final-assignment-row>span{display:flex;align-items:center;gap:10px}.final-assignment-row small{color:var(--muted);min-width:22px}.final-assignment-row select{font-size:12px;min-height:38px;width:150px;flex:none;padding:7px}.rating-export p{font-size:14px;color:var(--muted)}.rating-export h3{margin-bottom:12px}.rating-export .export-warning{font-size:12px}.rating-export>button{margin-top:18px}.export-secondary{border-top:1px solid var(--border);margin-top:24px;padding-top:20px;display:flex;flex-wrap:wrap;gap:10px}.export-secondary button{font-size:12px}#share-link{font-size:12px;font-family:ui-monospace,monospace}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:var(--text);color:var(--surface);box-shadow:var(--shadow);border-radius:9px;padding:13px 18px;font-size:13px;max-width:min(90vw,650px);opacity:0;pointer-events:none;z-index:100}#toast.visible{opacity:1}#toast.error{background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger)}
@media(max-width:760px){.games{grid-template-columns:1fr;max-width:620px}.app-header{height:64px;padding:0 20px}.header-tools{gap:10px}main{padding:24px 20px 45px}.section-heading,.round-head{margin-bottom:18px}.tournament-heading{margin-bottom:20px}.main-nav{margin-bottom:24px}.tournament-item{padding:20px}.tournament-item h3{font-size:14px}}
@media(max-width:480px){.app-header{height:60px;padding:0 16px}.app-brand{font-size:18px}.header-tools{gap:8px}.appearance-control select{width:116px;font-size:11px;padding:6px;min-height:36px}.more-menu summary{font-size:12px;min-height:36px;padding:6px 8px}main{padding:20px 16px 40px}h1{font-size:25px}h2{font-size:21px}.back-link{margin-bottom:11px}.event-date{font-size:12px}.tournament-heading{margin-bottom:19px}.main-nav{gap:26px;margin-bottom:22px}.main-nav button{font-size:13px;padding-bottom:12px;min-height:38px}.section-heading,.round-head{align-items:center;gap:12px}.section-heading>button{font-size:12px;padding:8px 10px}.round-tabs{gap:5px;margin-bottom:18px}.round-tabs button{font-size:11px;padding:6px 10px;min-height:32px}.game-toolbar .subtle{font-size:12px}.game-toolbar select{font-size:11px;width:122px}.games{gap:16px}.game-header{padding:13px 14px}.game-header h3{font-size:14px}.game-labels,.player-row{grid-template-columns:minmax(78px,1fr) 67px 34px 48px;padding-left:14px;padding-right:14px;gap:7px}.game-labels{font-size:10px;padding-top:12px}.player-row{min-height:60px}.player-name{font-size:13px}.player-row input{font-size:13px;padding:7px 6px}.cell-number{font-size:12px}.game-footer{padding:11px 14px;min-height:60px}.game-footer button{min-height:38px}.game-draft-label{font-size:11px}.pill{font-size:10px}.game-finals .player-row,.game-finals .game-labels{grid-template-columns:minmax(90px,1fr) 74px 60px}.game-finals select{font-size:12px}.entry-line{gap:8px}.entry-search input{font-size:13px}.entry-line>button{padding:9px 11px;font-size:12px}.player-entry>label{font-size:12px}.entry-search [role=listbox]{width:calc(100% + 90px)}.entry-search [role=option]{font-size:12px}.entry-search [role=option] small{font-size:9px}.pending-players{gap:6px}.name-chip{font-size:11px}.registration-summary,.empty-roster{font-size:12px!important}.participants-table td,.participants-table th{padding:13px 12px}.participants-table th:first-child{width:40px}.row-tools{width:46px}.participants-table td.name{font-size:13px;white-space:normal;overflow-wrap:anywhere}.home-heading{margin-bottom:22px}.home-heading h1{font-size:25px}.home-heading>button{font-size:12px;padding:8px 10px}.home-empty{padding-top:24px;font-size:13px}.home-empty h2{font-size:22px}.tournament-item{padding:17px 16px;gap:10px}.tournament-item>div{min-width:0}.tournament-item h3{font-size:14px}.tournament-item button{font-size:11px;padding:8px 10px}.tournament-item button svg{width:13px;height:13px}.tournament-item p{font-size:11px}.standings-table{table-layout:fixed;white-space:normal}.standings-table th,.standings-table td{padding:12px 8px}.standings-table th:first-child{width:54px}.standings-table th:nth-child(6){width:69px}.standings-table th:nth-child(7){width:48px}.standings-table th:nth-child(3),.standings-table th:nth-child(4),.standings-table th:nth-child(5),.standings-table td:nth-child(3),.standings-table td:nth-child(4),.standings-table td:nth-child(5){display:none}.standings-table .mobile-rounds{display:block;font-size:10px;line-height:1.8;color:var(--muted);font-weight:400;margin-top:6px}.standings-table td.name{font-size:12px}.standings-table th button{font-size:10px}.standings-table td.num{font-size:12px}.panel-pad{padding:20px}.modal-head{padding:17px 20px}.modal-head h2{font-size:19px}.modal-head>button{min-height:40px;min-width:40px}.modal-body{padding:20px}.modal-body p,.rating-export p{font-size:13px}.actions{gap:8px;flex-wrap:wrap}.actions button{font-size:12px}.final-assignment-row{gap:8px;font-size:11px;padding:10px}.final-assignment-row>span{gap:5px}.final-assignment-row select{width:130px;font-size:11px}.final-counts{font-size:10px}.history-row{flex-direction:column;gap:7px;padding:17px}.draft-banner{flex-wrap:wrap;font-size:12px}.draft-banner button{margin-left:28px}.next-block{align-items:flex-start;flex-wrap:wrap}.next-block h3{font-size:14px}.next-block button{font-size:12px}.empty{padding:30px 20px}.menu-items{width:240px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media print{:root,:root[data-theme=dark]{color-scheme:light;--bg:#fff;--surface:#fff;--raised:#fff;--text:#111;--muted:#333;--border:#bbb;--control:#888;--accent:#222;--pale:#eee;--on-pale:#111;--rank:#eee;--row-line:#ddd}.app-header,.back-link,.main-nav,.round-tabs,.game-toolbar>select,.game-footer,.next-block,.draft-banner,.player-entry,.banner,button,dialog,#toast,.skip-link,.mobile-rounds{display:none!important}main{max-width:none;padding:0}.games{grid-template-columns:1fr 1fr;gap:14px}.game{break-inside:avoid;box-shadow:none}.player-row input{border:0;background:none}.panel{border:0}.table-wrap{overflow:visible}.game-labels,.player-row{grid-template-columns:1fr 60px 35px 50px;gap:6px}.game-finals .player-row,.game-finals .game-labels{grid-template-columns:1fr 70px 50px}.standings-table th:nth-child(n),.standings-table td:nth-child(n){display:table-cell}h1{font-size:22px}.has-draft .cell-number{color:#111}.form-error{display:none}.row-tools{display:none}.tournament-heading{margin-bottom:24px}}

.draw-start{display:flex;align-items:center;gap:16px}.draw-start p{font-size:12px;color:var(--muted);margin:0;max-width:290px;line-height:1.7}.draw-start p.invalid{color:var(--muted)}.draw-start button{flex:none}@media(max-width:760px){.section-heading:has(.draw-start){align-items:flex-start;flex-wrap:wrap}.draw-start{width:100%;justify-content:space-between;gap:12px}.draw-start p{max-width:260px}.draw-start button{font-size:12px;padding:9px 11px}}@media(max-width:480px){.draw-start{align-items:center}.draw-start p{font-size:11px;max-width:150px}.draw-start button{font-size:11px;min-height:42px;padding:8px 10px}}@media print{.draw-start{display:none}}

.app-logo{display:block;width:36px;height:36px;flex:none}.app-brand{gap:9px}@media(max-width:480px){.app-logo{width:30px;height:30px}.app-brand{gap:6px;font-size:17px}.app-header{gap:10px}}
@media(max-width:360px){.app-brand{font-size:0;gap:0}}
/* Native popup options need their own colors; transparent select backgrounds do not theme the popup. */
select{color-scheme:inherit;accent-color:var(--accent)}select option,select optgroup{background-color:var(--surface);color:var(--text)}select option:checked{background-color:var(--pale);color:var(--on-pale)}select option:disabled{background-color:var(--disabled-bg);color:var(--disabled)}input[type=date]{color-scheme:inherit;accent-color:var(--accent)}

.tournament-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.tournament-title{min-width:0;flex:1}.tournament-title h1{overflow-wrap:anywhere}.tournament-links{display:flex;gap:8px;flex:none;padding-bottom:1px}.tournament-links button{font-size:12px;padding:8px 11px;min-height:38px}.tournament-links svg{width:14px;height:14px}.game-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.game-actions button{font-size:12px;min-height:38px}.game-toolbar{flex-wrap:wrap}@media(max-width:1000px){.tournament-heading{align-items:flex-start;flex-direction:column;gap:16px}.tournament-links{padding:0}}@media(max-width:480px){.tournament-links{gap:7px;max-width:100%;width:100%}.tournament-links button{font-size:11px;gap:5px;padding:8px 9px;flex:1;min-height:38px;white-space:nowrap}.game-actions{width:100%;justify-content:space-between;gap:8px}.game-actions button{font-size:11px;padding:8px 10px}.game-toolbar .game-actions select{width:116px}.tournament-title{width:100%}}@media(max-width:360px){.tournament-links button{font-size:10px;padding:7px}.tournament-links svg{display:none}}@media print{.tournament-links,.game-actions{display:none!important}}
@media(max-width:480px){.game-actions{width:auto;justify-content:flex-end}.game-actions:has([data-action=swap]){width:100%;justify-content:space-between}}

.tournament-item-info{min-width:0;flex:1}.tournament-item .tournament-item-actions{display:flex;align-items:center;gap:8px;flex:none;min-width:max-content}.delete-icon{color:var(--danger);background:transparent;border-color:transparent;width:44px;min-width:44px;min-height:44px;padding:10px;flex:none}.delete-icon svg{width:20px;height:20px;stroke-width:2}.delete-icon:hover:not(:disabled){color:var(--danger);background:var(--danger-bg);border-color:var(--danger)}@media(max-width:480px){.tournament-item .tournament-item-actions{gap:4px}.tournament-item .delete-icon{padding:10px;width:44px;min-height:44px}.tournament-item .delete-icon svg{width:20px;height:20px}.tournament-item .tournament-item-info h3{overflow-wrap:anywhere}.tournament-item{gap:8px}}

.participant-status{display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:4px}.inactive-player td.name{color:var(--muted)}.edit-score{padding:4px!important;min-height:30px;min-width:30px}.edit-score svg{width:15px;height:15px}.export-example{margin:18px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:12px 0}.export-example summary{cursor:pointer;color:var(--text);font-size:13px;min-height:28px}.export-example a{display:inline-block;margin-top:12px;font-size:12px}.export-preview{font-size:11px;margin-top:12px;white-space:normal}.export-preview td{padding:8px 7px;color:var(--text);border:1px solid var(--border);overflow-wrap:anywhere}.export-preview tr:first-child{background:var(--raised)}.export-preview td:nth-child(3){min-width:100px}.export-preview td:last-child{text-align:right;font-variant-numeric:tabular-nums}#roster-impact,#swap-impact{font-size:13px;line-height:1.8}
@media(max-width:480px){.round-tabs{margin-bottom:12px}.game-toolbar{margin-bottom:12px}}

.game-finals .final-range{margin:0;padding:0 22px 6px;font-size:12px}@media(max-width:480px){.game-finals .final-range{padding:0 14px 6px;font-size:11px}}

.game-finals .legacy-final-note{margin:0;padding:0 22px 8px;font-size:11px}@media(max-width:480px){.game-finals .legacy-final-note{padding:0 14px 8px}}

.absence-controls{border-top:1px solid var(--border);padding-top:12px;margin:12px 0}.absence-controls summary{cursor:pointer;font-weight:600}.absence-list{max-height:240px;overflow:auto;display:grid;gap:6px;margin-top:10px}.absence-list label{display:flex;gap:10px;align-items:center;font-size:13px;padding:4px}.absence-list input{min-height:20px;width:18px;height:18px;flex:none;accent-color:var(--accent)}.round-missed{font-size:12px;color:var(--muted);margin:0 0 16px}.round-missed button{font-size:11px;min-height:30px;padding:4px 8px}

.chair-row{color:var(--muted);background:var(--raised)}.chair-row .player-name{font-weight:400}.chair-row small{display:block;font-size:10px;color:var(--muted);margin-top:2px}.chair-placeholder{text-align:right;color:var(--muted);font-size:12px}.chair-tools{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:12px}.chair-tools button{min-width:26px;min-height:28px;padding:4px;border:0}.chair-tools svg{width:14px;height:14px}.chair-controls{padding:6px 16px 8px}.chair-controls button{min-height:32px;padding:5px 8px;font-size:11px;color:var(--muted)}.chair-controls svg{width:14px;height:14px}@media(max-width:480px){.chair-controls{padding:5px 8px 7px}}@media print{.chair-controls{display:none!important}}

.main-nav{justify-content:space-between;gap:20px;align-items:stretch}.tournament-tabs{display:flex;gap:28px;min-width:0}.tournament-tools{display:flex;gap:16px;flex:none}.main-nav .tournament-tools button{display:flex;gap:6px;white-space:nowrap}.main-nav .tournament-tools svg{width:16px;height:16px}.settings-heading{align-items:flex-start;flex-wrap:wrap}.settings-actions{display:flex;gap:8px;align-items:center;margin-left:auto}.player-entry-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.player-entry-heading label{font-size:13px;font-weight:600}.player-entry-heading button{font-size:11px;min-height:30px;padding:4px 8px}.import-player-list{margin:0 0 12px;padding:5px 8px;font-size:12px}@media(max-width:600px){.main-nav{gap:12px}.tournament-tabs{gap:24px}.tournament-tools{gap:8px}.main-nav .tournament-tools button{min-width:34px;justify-content:center;padding-left:4px;padding-right:4px}.main-nav .tournament-tools .tool-label{display:none}.main-nav .tournament-tools svg{width:18px;height:18px}}@media(max-width:360px){.main-nav{gap:8px}.tournament-tabs{gap:16px}.tournament-tools{gap:4px}.main-nav .tournament-tools button{min-width:30px}.settings-actions button:not(.delete-icon){font-size:12px}}@media print{.player-entry-heading,.settings-actions{display:none!important}}
.main-nav .tournament-tools .tool-label{font-size:inherit;background:none;color:inherit;padding:0;border-radius:0}

.results-modes{display:flex;gap:6px;margin:-4px 0 18px;flex-wrap:wrap}.results-modes button{font-size:12px;min-height:38px;padding:7px 12px}.results-modes [aria-pressed=true]{background:var(--pale);color:var(--on-pale);border-color:var(--accent)}.final-heading-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.export-image-entry{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);padding-bottom:18px;margin-bottom:22px}.export-image-entry h3,.export-image-entry p{margin:0}.export-image-entry p{margin-top:5px}.export-image-entry button{flex:none}.game-actions [data-result-image]{font-size:12px}.result-image-preview{border:1px solid var(--border);border-radius:8px;overflow:auto;max-height:48dvh;background:#fff;margin:12px 0}.result-image-preview:empty{display:none}.result-image-preview img{display:block;width:100%;height:auto}.image-paging{display:flex;align-items:center;justify-content:center;gap:18px;font-size:13px}.image-paging[hidden]{display:none}.image-paging button{min-width:44px}.result-image-text{margin-top:18px;font-size:12px}.result-image-text summary{cursor:pointer;min-height:32px}.result-image-text>div{overflow:auto;max-height:40dvh}.result-image-text table{font-size:11px;white-space:normal}.result-image-text th,.result-image-text td{padding:7px}.result-image-text td{overflow-wrap:anywhere}dialog:has(#result-image-preview){max-width:780px}.image-actions{margin-top:16px}.image-actions button{font-size:13px}.standings-table th:last-child{white-space:normal;min-width:56px}.game-toolbar{align-items:flex-start}.game-actions{justify-content:flex-end;max-width:100%}
@media(max-width:760px){.game-toolbar{flex-wrap:wrap}.game-toolbar .game-actions{margin-left:auto}.final-heading-actions{justify-content:flex-end}}
@media(max-width:480px){.round-head:has([data-result-image]){flex-wrap:wrap;align-items:flex-start}.round-head:has([data-result-image])>button{font-size:12px;padding:7px 10px}.game-actions [data-result-image]{font-size:11px}.game-toolbar .game-actions{width:100%;justify-content:flex-end;gap:8px}.game-actions [data-action=swap]{margin-right:auto}.image-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.image-actions button{font-size:11px;padding:8px 7px}.export-image-entry{gap:10px}.export-image-entry button{font-size:12px;padding:8px 10px}.standings-table th:nth-child(7){width:60px}.results-modes button{font-size:12px}}
@media print{.results-modes,.final-heading-actions,.export-image-entry{display:none!important}}

.text-block-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:12px 0 8px}.text-block-tools>button{font-size:12px}.text-block-tools .image-paging{gap:10px}.result-image-text #result-text-block{display:block;width:100%;max-width:100%;min-height:200px;max-height:45dvh;resize:vertical;padding:12px;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}.result-image-text #result-text-status{font-size:12px;margin:8px 0;line-height:1.6}.result-image-text>summary{color:var(--text)}
