/* Compact brackets: one round label, two player rows, one schedule strip. */
.compact-bracket{gap:28px;align-items:stretch;padding:4px 2px 16px;--draw-surface:#f8faf5;--draw-ink:#183943;--draw-border:#afc0b5}
.compact-bracket .bracket-round{flex:0 0 280px;min-width:280px}.compact-bracket .bracket-round>h3{margin-bottom:12px;font-size:12px;letter-spacing:.04em}
.compact-bracket .bracket-round>div{height:var(--bracket-height);min-height:0;gap:0;justify-content:initial}
.bracket-cell{position:relative;flex:1;display:flex;align-items:center;min-height:110px}
.bracket-cell.has-next:after{content:'';position:absolute;left:100%;width:14px;height:var(--connector-height);border-right:1px solid #91a99e;pointer-events:none}
.bracket-cell.has-next.upper:after{top:50%;border-top:1px solid #91a99e}.bracket-cell.has-next.lower:after{bottom:50%;border-bottom:1px solid #91a99e}
.compact-bracket .bracket-round+.bracket-round .bracket-cell:before{content:'';position:absolute;right:100%;top:50%;width:14px;border-top:1px solid #91a99e;pointer-events:none}
.compact-draw-match{width:100%;padding:0;overflow:hidden;background:var(--draw-surface,#f8faf5);border:1px solid var(--draw-border,#afc0b5);border-radius:8px;color:var(--draw-ink,#183943)}
.compact-draw-match.complete{border-color:#96ae91}.draw-match-open{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;font:500 14px/1.35 Manrope,Arial,sans-serif;cursor:pointer}
.draw-match-open:hover:not(:disabled){background:#dfeacf}.draw-match-open:focus-visible{outline:3px solid #427b72;outline-offset:-3px}.draw-match-open:disabled{opacity:1;cursor:default}
.compact-draw-match .draw-side{display:flex;align-items:center;gap:8px;min-height:34px;padding:5px 10px;font-size:13px;border-bottom:1px solid #bbc9c255}
.compact-draw-match .draw-side.seeded{color:#173c37;font-weight:800}.compact-draw-match .draw-player{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden}.draw-player>.notranslate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draw-player .country-flag{width:17px;height:12px;flex:none;border-radius:0;margin:0;object-fit:cover}
.draw-set-scores{display:flex;flex:none;gap:0;margin-left:auto}.draw-set-scores b{display:inline-block;min-width:21px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
.draw-match-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:22px;padding:3px 10px;background:#e6ece5;color:#415b59;font:500 10px/1.35 Manrope,Arial,sans-serif}.draw-match-meta time{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draw-match-meta:empty{display:none}.draw-live{color:#245b26}.tournament-detail-actions{display:flex;gap:10px;flex-wrap:wrap}.tournament-detail-actions>.btn{flex:1;justify-content:center;min-height:44px}.tournament-detail-score{margin:12px 0}
.entry-list{margin-top:12px}.entry-row{padding:10px 0;align-items:center}.entry-row h3{margin:0;font-size:14px;line-height:1.5}.entry-row h3 small,.entry-row small{font-size:11px}.division-heading{margin:16px 0;gap:12px}.division-heading h2{font-size:23px;margin-bottom:6px}.division-nav{margin-bottom:14px}.draw-toolbar{padding:12px 0;gap:8px}.draw-stage-title{font-size:21px;margin:20px 0 12px}
.tournament-schedule-list{gap:6px;margin-top:12px}.tournament-schedule-row{padding:10px 12px;gap:12px}.tournament-schedule-row>div{gap:3px}.tournament-schedule-time b{font-size:20px}.tournament-schedule-row strong{font-size:14px}.tournament-schedule-actions .btn{padding:8px 10px}
/* Manual placement stays usable with a pointer, touch or keyboard. */
#modal:has(.manual-draw-dialog){width:min(1000px,calc(100% - 24px));padding:20px}.manual-draw-dialog h2{margin-bottom:12px}.manual-stage-tabs{display:flex;gap:6px;flex-wrap:wrap}.manual-stage-tabs button{font:750 13px/1.4 Manrope,Arial,sans-serif;padding:10px 12px;border:1px solid #91a99e;border-radius:7px;background:#edf2e5;color:#183943;min-height:44px}.manual-stage-tabs button[aria-pressed=true]{background:#d7e7b1;border-color:#5c7d4a}.manual-hint{font-size:13px;line-height:1.5;margin:10px 0}
.manual-draw-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:16px}.manual-roster,.manual-grid{min-width:0}.manual-roster input{margin:0 0 8px!important}.manual-player-list{display:grid;gap:6px;max-height:48dvh;overflow:auto;padding:2px}.manual-player-list>button,.manual-slot>button:first-child{display:flex;align-items:center;gap:8px;width:100%;padding:10px 8px;min-height:44px;border:1px solid #a5b8ac;border-radius:6px;background:#f1f4e9;color:#183943;font:650 14px/1.35 Manrope,Arial,sans-serif;text-align:left;cursor:grab;min-width:0}.manual-player-list .notranslate,.manual-slot .notranslate{overflow-wrap:anywhere;min-width:0}.manual-player-list>button small{margin-left:auto;flex:none}.manual-grip{color:#6a8078;font-size:20px;flex:none}
.manual-draw-dialog button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #527d45;background:#dbeab9}.manual-draw-dialog button:focus-visible{outline:3px solid #4aa194;outline-offset:2px}.manual-grid-head{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px;font-size:14px}.manual-grid-head button{min-height:44px;padding:8px}.manual-slots{display:grid;gap:12px;max-height:54dvh;overflow:auto;padding:2px 3px}.manual-slot-pair{display:grid;gap:2px}.manual-slot-pair>strong{font-size:13px;margin:4px 0}.manual-slot{display:flex;position:relative;min-width:0}.manual-slot>button:first-child{border-radius:5px;padding-right:38px}.manual-slot>button:first-child small{width:19px;flex:none;color:#5c756d;font-size:11px}.manual-remove{position:absolute;right:0;top:0;bottom:0;width:36px;border:0;background:transparent;color:#36564b;font:22px/1 Arial;cursor:pointer}.manual-return{width:100%;margin-top:8px;min-height:44px;border:1px dashed #91a99e;border-radius:6px;background:transparent;color:inherit;font:650 13px/1.4 Manrope,Arial,sans-serif}.manual-return:disabled{opacity:.45}.manual-progress{font-size:13px;margin:12px 0 0}
@media(max-width:600px){#modal:has(.manual-draw-dialog){padding:14px;width:calc(100% - 16px)}.manual-draw-workspace{gap:8px;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}.manual-player-list>button,.manual-slot>button:first-child{font-size:12px;padding:9px 5px;gap:4px}.manual-grip{display:none}.manual-slot>button:first-child{padding-right:27px}.manual-remove{width:26px}.manual-grid-head{font-size:12px}.manual-grid-head button{font-size:12px}.manual-slots{max-height:48dvh}.manual-player-list{max-height:42dvh}.compact-bracket .bracket-round{min-width:260px;flex-basis:260px}.manual-hint{font-size:12px}.entry-actions{flex-direction:row;flex-wrap:wrap;gap:8px}}
@media(prefers-reduced-motion:reduce){.compact-bracket{scroll-behavior:auto}}
.schedule-filters{display:flex;gap:8px;margin:12px 0}.schedule-filters select{width:auto;min-width:0;max-width:50%;margin:0;font-size:13px;padding:10px}.tournament-schedule-row[hidden]{display:none}.manual-stage-tabs:has(>button:only-child){display:none}
.tournament-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.tournament-title-row h1{margin:0;min-width:0;font-size:clamp(26px,4vw,42px)}.tournament-inline-actions{display:flex;gap:4px;align-items:center;flex:none}.tournament-icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);padding:9px}.tournament-icon-button svg{width:22px;height:22px}.tournament-icon-button:hover{background:#e2eccf}.tournament-meta-row{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}.tournament-meta-row p{margin:8px 0;font-size:13px}.tournament-publication{font-size:12px;min-height:40px}.tournament-content-icons{margin:0 0 12px;justify-content:flex-end}.tournament-editorial:empty{display:none}.division-nav-row{display:flex;gap:8px;align-items:flex-start;justify-content:space-between}.division-nav-row .division-nav{margin:0;flex:1;min-width:0;gap:6px}.division-nav-row .division-nav a{padding:10px 12px;font-size:13px}.division-heading{align-items:center}.division-heading h2{margin:0}.tournament-unified-tabs{display:flex}.tournament-unified-tabs button{flex:1;min-height:44px;font-size:14px;padding:10px 8px}.tournament-remove-button{display:block;width:100%;margin-top:20px;min-height:44px;background:transparent;border:1px solid #b57568;border-radius:7px;color:#a33624;font-weight:750}.tournament-danger{background:#9f3525!important;color:#fff!important}.interface-setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0}.interface-settings .judge-segment{display:flex;gap:3px;padding:3px;border-radius:8px;background:#e6eddf}.interface-settings .judge-segment button{min-height:44px;padding:8px 14px;border-radius:6px;background:transparent;color:#183943;font-weight:700}.interface-settings .judge-segment button[aria-pressed=true]{background:#173e47;color:#f3f7e6}
body.site-dark{--bg:#0d2029;--surface:#233f49;--ink:#f0f5e8;--muted:#bdccc8;--line:#6f8b8b;--deep:#193e48;--accent:#d3e8ae;--accent-text:#e2f2bf;color-scheme:dark}
.site-dark .tournament-card,.site-dark .tournament-schedule-row,.site-dark .group-standings,.site-dark .entry-list,.site-dark .panel{background:#203f49}.site-dark .tournament-icon-button{background:#e4edce;color:#153b43}.site-dark .tournament-icon-button:hover{background:#d2e5af}.site-dark .compact-draw-match{background:#244650;color:#f1f5e9;border-color:#7f9b93}.site-dark .compact-draw-match .draw-side.seeded{color:#e2f2bf}.site-dark .draw-match-open:hover:not(:disabled){background:#3f6062}.site-dark .draw-match-meta{background:#d9e7c3;color:#193d40}.site-dark #modal{background:linear-gradient(140deg,#244550,#18353e);color:#f1f5e9}.site-dark input,.site-dark select,.site-dark textarea{background:#edf2e3;color:#173943;border-color:#819a91}.site-dark .btn.secondary,.site-dark .division-nav a{background:#e4edce;color:#173943;border-color:#8da393}.site-dark .division-nav a.selected{background:#c6dfa0;color:#173943}.site-dark .tournament-remove-button{color:#ffd4c5;border-color:#bd8d7e}.site-dark .data-table{background:#244650;color:#f1f5e9}.site-dark .data-table th{background:#33555b;color:#f1f5e9}
@media(max-width:600px){.tournament-title-row{align-items:flex-start}.tournament-title-row h1{font-size:25px}.tournament-card{padding:14px;gap:6px}.tournament-card h2{font-size:20px;margin:6px 0}.tournament-unified-tabs button{font-size:12px}.tournament-content-icons{margin:0 0 8px}.interface-setting-row{flex-wrap:wrap}.interface-setting-row .judge-segment{flex:1;justify-content:center}.interface-settings .judge-segment button{font-size:13px;padding:8px 11px}}
.unified-tournament-top{padding:14px 0 12px!important;margin:0!important}.unified-tournament-top+.tournament-editorial:empty{display:none}.tournament-title-row{flex-wrap:wrap}.tournament-title-row .tournament-manager-tools{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}.tournament-manager-tools{max-width:100%}.division-heading{flex-direction:row!important;justify-content:space-between;text-align:left}.draw-capacity{padding:8px 12px;margin:10px 0}.draw-capacity p{font-size:12px;margin:0}.site-dark .site-header{background:#203e48;color:#f0f5e8}.site-dark .tabs button{background:#dce8ca;color:#193d43;border-color:#91a79a}.site-dark .tabs button.active{background:#355c61;color:#f1f5e9}.site-dark .draw-capacity{background:#dce8ca;color:#193d43}.site-dark .draw-capacity-warning{background:#f4d5b5;color:#5b3019}
.tournament-dialog .console-setting-group{border:1px solid #91a99e;padding:10px;margin:14px 0;border-radius:8px}.tournament-dialog .console-setting-group legend{font-size:14px;font-weight:750}.site-dark .judge-switch{color:#f1f5e9}.tournament-dialog .judge-choice{display:flex;gap:5px}.site-dark .interface-settings strong{color:#f1f5e9}
@media(max-width:600px){.tournament-manager-tools{width:100%;margin-top:4px}.tournament-title-row:has(.tournament-manager-tools) h1{font-size:26px}.division-heading{margin:12px 0}.unified-tournament-top .tournament-meta-row{font-size:12px}}
.tournament-detail-score .draw-player>.notranslate{white-space:normal;overflow-wrap:anywhere}.site-dark .settings-choice>span{background:#e5edcf;color:#173c43}.site-dark .settings-choice:has(:checked)>span{background:#c9dfa8;color:#153a40}

.initial-page-loading{min-height:45vh;display:grid;place-items:center;color:var(--muted,#36535b)}
.console-device-settings{display:grid;gap:10px;margin:12px 0 16px}.console-device-settings .judge-switch{margin:0}.console-device-settings .console-fullscreen{width:100%;min-height:44px}.console-device-settings .console-screen-status{margin:0;line-height:1.4}.console-device-settings .console-screen-status[hidden]{display:none}

.manual-tools{display:flex;justify-content:flex-end;margin:0 0 12px}.manual-tools .btn{min-height:44px;font-size:13px;padding:10px 14px}.manual-tools [hidden]{display:none}.manual-seed-warning{margin:12px 0 0;padding:10px 12px;border:1px solid #b48031;border-radius:7px;background:#fff1d8;color:#684418;font:500 12px/1.45 Manrope,Arial,sans-serif}.manual-seed-warning[hidden]{display:none}.manual-seed-warning strong{font-size:13px}.manual-seed-warning ul{margin:5px 0 0;padding-left:16px}.manual-slot.seed-conflict>button:first-child{border-color:#b48031;box-shadow:inset 3px 0 #b48031}.site-dark .manual-seed-warning{background:#493c25;color:#ffe5b5;border-color:#bd9457}.manual-player-list>.small{margin:8px 2px}.manual-seed-warning li{overflow-wrap:anywhere}@media(max-width:600px){.manual-tools{justify-content:stretch;margin-bottom:10px}.manual-tools .btn{width:100%}}
.draw-pdf-dialog{max-width:520px;margin:auto}.draw-pdf-modes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.draw-pdf-modes label{margin:0;position:relative;cursor:pointer}.draw-pdf-modes input{position:absolute;opacity:0}.draw-pdf-modes span{display:flex;justify-content:center;align-items:center;min-height:64px;border:1px solid var(--border,#a5b7af);border-radius:8px;padding:12px}.draw-pdf-modes input:checked+span{background:#d7e6ad;color:#17333d;box-shadow:inset 0 0 0 2px #637d45}.draw-pdf-modes input:focus-visible+span{outline:3px solid #75b9a6;outline-offset:2px}.draw-pdf-dialog form>.btn{width:100%}
.tournament-unified-tabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:thin;margin-bottom:20px}.tournament-unified-tabs button{white-space:nowrap;flex:1;min-width:max-content;padding:12px 18px}.tournament-overview-actions,.tournament-match-tools{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.tournament-match-tools .tournament-icon-button{width:auto;height:auto;padding:10px 16px;gap:8px}.tournament-match-tools .tournament-icon-button::after{content:'Пульты судьи'}.tournament-match-tools .tournament-icon-button svg{width:22px;height:22px}html[lang=en] .tournament-match-tools .tournament-icon-button::after{content:'Umpire consoles'}.tournament-overview-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.tournament-overview-summary a{display:grid;gap:5px;padding:24px;border:1px solid var(--line,#afbeb6);border-radius:12px;color:inherit;text-decoration:none}.tournament-overview-summary b{font-size:32px}.tournament-division-list article{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid var(--line,#afbeb6)}.tournament-division-list h3,.tournament-division-list p{margin:0 0 8px}.tournament-division-list article>div:last-child{display:flex;gap:16px}.participant-search{width:100%;margin:0 0 14px}.participant-seeding{margin:0 0 10px}.participant-list{display:grid;gap:0}.participant-row.entry-row{display:flex;align-items:center;gap:12px;padding:14px 0;border:0;border-bottom:1px solid var(--line,#afbeb6);border-radius:0;background:none}.participant-open{display:flex;flex:1;min-width:0;align-items:center;gap:12px;border:0;background:none;color:inherit;padding:0;text-align:left;cursor:pointer}.participant-open>span:last-child{display:grid;gap:4px}.participant-open strong{font-size:17px}.participant-open small{font-size:12px;font-weight:400}.participant-open img,.participant-avatar{width:48px;height:48px;flex-shrink:0;object-fit:cover;border-radius:50%}.participant-avatar{display:grid;place-items:center;background:#dce6d2;color:#213b42;font-size:22px}.participant-row-actions{display:flex;gap:12px;flex-wrap:wrap}.participant-row-actions .plain{padding:6px 0}.participant-profile-heading>div{display:flow-root;margin-bottom:14px}.participant-profile-heading img{width:80px;height:80px;border-radius:12px;object-fit:cover;float:left;margin-right:16px}.participant-profile-heading h2{font-size:26px;line-height:1.2;margin:0 0 8px;padding-right:28px}.participant-profile-heading p{margin:0}.participant-profile-actions{display:flex;gap:16px;align-items:center;margin:16px 0}.participant-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;border-block:1px solid var(--line,#718987);padding:14px 0;margin:20px 0}.participant-summary span{display:grid;gap:3px;text-align:center;font-size:11px}.participant-summary b{font-size:24px}.participant-match{display:flex;justify-content:space-between;align-items:center;width:100%;padding:12px 0;gap:12px;border:0;border-bottom:1px solid var(--line,#718987);background:none;color:inherit;text-align:left;cursor:pointer}.participant-match>span{display:grid;gap:4px}.participant-match small,.participant-match span>span{font-size:12px}.participant-photo-field{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}.participant-photo-field img{width:60px;height:60px;border-radius:10px;object-fit:cover}.participant-photo-choose{position:relative;overflow:hidden;cursor:pointer}.participant-photo-choose input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.participant-row[hidden]{display:none!important}.tournament-participants .tournament-section-head{align-items:center}
@media(max-width:600px){.tournament-unified-tabs button{padding:11px 13px;font-size:14px}.participant-row.entry-row{display:block}.participant-row-actions{margin:10px 0 0 60px;font-size:13px;gap:18px}.participant-summary{gap:3px}.participant-summary b{font-size:21px}.tournament-overview-summary a{padding:16px}.tournament-division-list article{align-items:flex-start;flex-direction:column}.tournament-overview-actions .btn{flex:1 1 45%;font-size:14px}.tournament-match-tools{gap:8px}.tournament-match-tools .btn{flex:1}}
.tabs.tournament-unified-tabs{flex-wrap:nowrap;gap:4px}.tabs.tournament-unified-tabs button{padding:11px 10px;font-size:13px}.participant-row-actions .plain.tournament-danger,.participant-profile-actions .plain.tournament-danger{background:none;color:#a1433d;opacity:1}.participant-row-actions .plain.tournament-danger:disabled,.participant-profile-actions .plain.tournament-danger:disabled{color:var(--muted);opacity:.55}.site-dark .participant-row-actions .plain.tournament-danger,.site-dark .participant-profile-actions .plain.tournament-danger{color:#efaaa3}
.tournament-participants .participant-row .participant-open:focus-visible,.participant-match:focus-visible{outline:2px solid #659482;outline-offset:4px}.participant-photo-field .participant-photo-choose:focus-within{outline:2px solid #659482;outline-offset:3px}
.plain.tournament-danger{background:none!important;color:#a1433d!important}.plain.tournament-danger:disabled{color:var(--muted)!important;opacity:.55}.site-dark .plain.tournament-danger{color:#efaaa3!important}.tabs.tournament-unified-tabs button{font-size:12px;padding:10px 6px;min-height:44px}.tabs.tournament-unified-tabs{margin-top:14px}@media(max-width:360px){.tabs.tournament-unified-tabs{gap:3px}.tabs.tournament-unified-tabs button{font-size:11px;padding:10px 4px}}
.draw-set-scores .historical-set{min-width:23px;font-size:13px}.compact-draw-match .historical-advance{font-size:14px}
.group-standings .data-table{border:1px solid var(--line,#b8c9be);font-size:13px}.group-standings .data-table th,.group-standings .data-table td{font-size:inherit}
