.draw-heading{display:flex;justify-content:space-between;align-items:end;gap:30px;margin:45px 0 30px}.draw-heading h1{font-family:Impact,"Arial Narrow",sans-serif;font-size:clamp(54px,6.5vw,84px);line-height:.95;margin:10px 0}.draw-heading h1 span{color:var(--lime)}.draw-heading p:not(.overline){color:var(--muted);max-width:670px}.heading-steps{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.heading-steps span{font-size:10px;color:#a6b4bb;padding:8px 10px;border:1px solid #3a515c;border-radius:10px}.heading-steps .on{color:#0d170b;background:var(--lime);border-color:var(--lime)}.gate{margin-bottom:80px}.inline-action{display:inline-block;width:auto}.tournament-head{display:flex;align-items:center;justify-content:space-between;gap:15px;background:linear-gradient(105deg,#143027,#15232b)}.tournament-head h2{margin:0;font-size:31px}.tournament-head p{margin:3px 0}.head-actions{display:flex;align-items:center;gap:12px}.light-button{border:1px solid #4a626c;color:#e9f8f8;background:transparent;padding:11px 14px;border-radius:10px;font-weight:800;font-size:12px;cursor:pointer;text-decoration:none}.light-button:hover{border-color:var(--lime)}.draw-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin:15px 0 24px}.draw-metrics>div{background:#17262f;border:1px solid #32454d;border-radius:12px;padding:17px 20px}.draw-metrics small{color:#a9bec5;letter-spacing:.1em;font-weight:900;font-size:10px;display:block}.draw-metrics strong{color:var(--lime);font-size:38px;line-height:1.2}.section-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}.section-bar h2{font:900 36px/1.1 Impact,"Arial Narrow",sans-serif;margin:6px 0}.section-bar p:not(.overline){margin:0;color:var(--muted);font-size:13px;max-width:600px}.section-bar button{white-space:nowrap}.help-note,.fixture-note{padding:12px 14px;border-left:3px solid var(--lime);background:#20312e;border-radius:0 9px 9px 0;color:#cae2cf;font-size:12px;margin:18px 0}.division-tabs{display:flex;gap:9px;flex-wrap:wrap;padding:10px 0 22px}.division-tabs button{border:1px solid #425862;border-radius:24px;padding:10px 18px;background:#17232c;color:#e0edef;font-weight:800}.division-tabs button[aria-pressed="true"]{background:var(--lime);color:#0d1518;border-color:var(--lime)}.draw-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.draw-group{background:#0a151d;border:1px solid #324951;border-radius:15px;min-height:230px;overflow:hidden;transition:border-color .15s,background .15s}.draw-group.highlight{border-color:var(--lime);background:#1a2b2b}.draw-group-head{display:flex;align-items:center;gap:13px;padding:17px 18px;border-bottom:1px solid #2d454b}.group-tag{width:54px;height:54px;border-radius:13px;background:var(--lime);color:#0c1714;display:grid;place-items:center;font-size:32px;font-weight:1000}.draw-group-head h3{margin:0;font-size:22px;color:#f4fafb}.draw-group-head p{margin:2px 0;color:#9ab3bc;font-size:11px}.draw-group-head .count{margin-left:auto;border:1px solid #46606a;color:#c6d5d9;border-radius:22px;padding:7px 11px;font-size:10px;white-space:nowrap}.draw-group-list{padding:11px;min-height:85px}.draw-pair{border:1px solid #2c3f48;background:#15222b;border-radius:10px;padding:13px;display:flex;align-items:center;gap:11px;margin:7px 0;min-height:57px;transition:background .15s,border-color .15s}.draw-pair[draggable="true"]{cursor:grab}.draw-pair.drag-over{border-color:var(--lime);background:#253b30}.draw-pair.dragging{opacity:.55}.pair-pos{background:#293f46;border-radius:50%;height:27px;width:27px;display:grid;place-items:center;color:#e3f5e5;font-size:11px;font-weight:900;flex:none}.pair-details{flex:1;min-width:0}.pair-details strong{display:block;overflow-wrap:anywhere;font-size:12px}.pair-details small{display:block;color:#8ba7b0;font-size:10px;margin-top:3px}.test-label{color:#eafeb0;font-size:9px;font-weight:900;margin-right:5px}.manage-pair{border:1px solid #516974;border-radius:8px;background:transparent;color:#e8f2f4;font-size:10px;font-weight:800;padding:8px 9px;white-space:nowrap}.manage-pair:hover{border-color:var(--lime)}.no-pairs{color:#7fa0ad;font-size:12px;padding:17px}.assign-panel{background:#1b3032;border:1px solid #71934d;border-radius:12px;padding:18px;margin:0 0 20px}.assign-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.assign-panel-title h3{margin:0 0 10px;font-size:19px;color:white}.assign-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:11px}.assign-panel p{font-size:11px;margin-bottom:0}.fixture-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.fixture-group{border:1px solid #354951;background:#0a151d;border-radius:14px;padding:15px}.fixture-group h3{font-size:18px;color:var(--lime);margin:0 0 9px}.fixture-group small{color:#a2b6bf}.fixture-round{margin-top:14px;padding-top:10px;border-top:1px solid #31434b}.fixture-round h4{font-size:10px;letter-spacing:.12em;color:#98b4bf;margin:0 0 7px}.fixture-match{display:flex;align-items:center;gap:10px;padding:10px 4px;border-bottom:1px solid #223740}.fixture-match span{font-size:11px;color:#dbe8e9;flex:1;overflow-wrap:anywhere}.fixture-match b{color:var(--lime);font-size:10px}.fixture-match:last-child{border:0}.next-workflow{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:20px 0 45px}.next-workflow strong{display:block;color:var(--lime);font-size:12px}.next-workflow small{display:block;color:#acbec7;margin-top:5px}.empty-groups{border:1px dashed #45606c;border-radius:12px;padding:25px;text-align:center;color:#adc3cb}.disabled-explainer{color:#e6bc9c}.status-indicator{font-size:10px;color:#d8f88c;font-weight:900}.sticky-tournament-link{white-space:nowrap}
@media(max-width:1000px){.draw-heading{align-items:start;flex-direction:column}.heading-steps{margin-top:4px}.section-bar{align-items:start;flex-direction:column}.section-bar button{align-self:start}}
@media(max-width:740px){.draw-group-grid,.fixture-columns,.assign-form{grid-template-columns:1fr}.draw-metrics{grid-template-columns:repeat(2,1fr)}.draw-heading{margin:25px 0}.tournament-head{flex-direction:column;align-items:stretch}.next-workflow{flex-direction:column;align-items:start}.heading-steps span{font-size:9px}.draw-group-head{padding:13px}.section-bar h2{font-size:30px}}
@media(prefers-reduced-motion:reduce){.draw-pair,.draw-group{transition:none}}


/* Draft-only group-count builder: responsive, preview-first and no surprise writes. */
.group-count-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:15px 20px;align-items:center;
 background:linear-gradient(120deg,#132d30,#1a2835);border:1px solid #55776a;border-radius:16px;
 padding:22px;margin:0 0 22px;box-shadow:0 10px 24px #00000015}
.group-count-copy h3{font:900 clamp(23px,3vw,31px)/1 "Barlow Condensed",Impact,"Arial Narrow",sans-serif;color:#f4fbfa;margin:6px 0}
.group-count-copy>p:last-child{font-size:12px;color:#adc6c9;line-height:1.5;margin:9px 0 0}
.group-count-actions{display:flex;align-items:end;justify-content:flex-end;gap:13px;flex-wrap:wrap}
.group-count-presets{display:flex;align-items:center;gap:5px}
.group-count-presets button{display:grid;place-items:center;min-width:39px;height:43px;border:1px solid #587680;
 background:#152731;color:#e5f2f2;border-radius:10px;font-weight:900;font-size:14px;cursor:pointer}
.group-count-presets button[aria-pressed="true"]{background:var(--lime);border-color:var(--lime);color:#0d1712}
.group-count-presets button:hover{border-color:var(--lime)}
.group-count-input-label{display:flex;flex-direction:column;gap:5px;min-width:66px;font-size:10px;font-weight:900;letter-spacing:.07em;color:#afd0cc}
.group-count-input-label input{width:70px;height:43px;padding:7px 10px;border:1px solid #66868c;border-radius:9px;
 background:#081c23;color:#fff;font-size:17px;font-weight:900;text-align:center}
.group-count-input-label input:focus-visible{outline:3px solid #d6fc36}
#applyGroupCountBtn{min-height:43px;padding:10px 15px;font-size:12px}
#applyGroupCountBtn:disabled{opacity:.44;cursor:not-allowed}
.group-count-preview{grid-column:1/-1;display:block;padding:12px 14px;margin:0;background:#0c1b25;
 border-left:3px solid var(--lime);border-radius:0 10px 10px 0;color:#cde1db;font-size:12px;line-height:1.6}
.group-count-control[hidden]{display:none}
@media(max-width:970px){.group-count-control{grid-template-columns:1fr}.group-count-actions{justify-content:flex-start}}
@media(max-width:600px){.group-count-control{padding:16px;gap:14px}.group-count-actions{display:grid;grid-template-columns:minmax(0,1fr) 80px;gap:9px}
 .group-count-presets{grid-column:1;flex-wrap:wrap}.group-count-input-label{grid-column:2}
 #applyGroupCountBtn{grid-column:1/-1;width:100%}.group-count-presets button{min-width:39px;height:44px}}


/* Clearly visible feedback adjacent to the button and a native centered dialog.
   The top notice stays as a secondary trace; no scrolling is needed to find errors. */
.group-action-feedback{
 grid-column:1/-1;margin:0;padding:12px 14px;border-radius:10px;
 border:1px solid #557e63;background:#1e3e31;color:#dcf6e6;
 font-size:12px;font-weight:750;line-height:1.55;overflow-wrap:anywhere
}
.group-action-feedback.is-error{
 border-color:#c9858b;background:#47252e;color:#ffe4e5
}
.group-action-feedback[hidden]{display:none!important}
.draw-error-dialog{
 position:fixed;inset:0;margin:auto;
 width:min(480px,calc(100vw - 32px));max-height:min(90vh,700px);
 overflow-y:auto;box-sizing:border-box;padding:0;
 border:1px solid #b57681;border-radius:19px;
 color:#f5f8f7;background:#101e28;
 box-shadow:0 30px 100px #000000a6
}
.draw-error-dialog::backdrop{
 background:rgba(1,7,14,.74);backdrop-filter:blur(5px)
}
.draw-error-shell{padding:30px 28px 25px}
.draw-error-icon{
 width:45px;height:45px;display:grid;place-items:center;margin-bottom:18px;
 border:1px solid #c8818d;border-radius:13px;background:#582c37;
 color:#ffdee1;font-size:27px;font-weight:900
}
.draw-error-shell .overline{margin:0 0 6px;color:#e3a0ad}
.draw-error-shell h2{
 font:900 clamp(27px,6vw,35px)/1.05 Impact,"Arial Narrow",sans-serif;
 letter-spacing:.02em;color:#fff;margin:0 0 13px
}
.draw-error-shell>p:not(.overline){
 margin:0;color:#f7edf0;font-size:14px;line-height:1.55;overflow-wrap:anywhere
}
.draw-error-shell .draw-error-help{
 margin-top:14px!important;color:#bcd1d6!important;font-size:12px!important
}
.draw-error-details{margin:18px 0;color:#aabdc5;font-size:11px}
.draw-error-details summary{
 cursor:pointer;display:list-item;width:fit-content;
 padding:5px 0;color:#aabdc5;font-weight:750
}
.draw-error-details code{
 display:block;padding:11px 12px;margin-top:9px;overflow-wrap:anywhere;
 border-radius:9px;background:#07131b;border:1px solid #3a5662;
 white-space:pre-wrap;font-family:ui-monospace,monospace;font-size:11px
}
.draw-error-close{display:block;width:100%;min-height:46px;border-radius:11px}
.draw-error-close:focus-visible{outline:3px solid #fff;outline-offset:3px}
@media(max-width:520px){
 .draw-error-shell{padding:23px 20px 20px}
 .draw-error-dialog{width:calc(100vw - 24px);max-height:90dvh}
}
@media(prefers-reduced-motion:reduce){
 .draw-error-dialog::backdrop{backdrop-filter:none}
}



/* Stage 02 → Stage 03 workflow panel, matching the Participating Pairs navigation. */
.next-workflow.draw-next-workflow{
 display:grid;grid-template-columns:minmax(0,1.12fr) minmax(310px,.88fr);
 align-items:stretch;gap:28px;padding:25px 27px;margin:25px 0 35px;
 border-radius:18px;border:1px solid #537d58;
 background:linear-gradient(118deg,#183529 0%,#152b25 58%,#101e23 100%)
}
.draw-next-primary-area{min-width:0;display:flex;flex-direction:column;align-items:flex-start}
.draw-next-eyebrow{color:var(--lime);font-size:10px;font-weight:900;letter-spacing:.11em;margin:0 0 9px}
.draw-next-primary-area h3{font-size:clamp(18px,2.1vw,23px);font-weight:900;letter-spacing:-.025em;line-height:1.25;color:#f1faf4;margin:0}
.draw-next-primary-area>p:not(.draw-next-eyebrow){color:#bad3cb;font-size:12px;line-height:1.65;max-width:570px;margin:10px 0 0}
.draw-next-primary{
 display:inline-flex;align-items:center;justify-content:center;gap:16px;
 min-height:47px;margin-top:21px;padding:12px 20px;border-radius:12px;
 font-size:13px;font-weight:900;text-decoration:none;white-space:normal;
 box-shadow:0 5px 18px #07180c1c;transition:transform .18s ease,box-shadow .18s ease
}
.draw-next-primary:hover{transform:translateY(-2px);text-decoration:none;box-shadow:0 10px 22px #07180c4d}
.draw-next-shortcuts{
 border-left:1px solid #45675b;padding-left:27px;min-width:0;
 display:flex;flex-direction:column;justify-content:center;gap:14px
}
.draw-next-shortcut-label{color:#e6f6ed;font-size:10px;font-weight:900;letter-spacing:.10em;margin:0}
.draw-next-shortcut-label span{color:#8daea5;font-weight:700;letter-spacing:.02em}
.draw-next-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.draw-next-tool-link{
 display:flex;align-items:center;justify-content:space-between;gap:10px;
 min-height:46px;padding:11px 14px;min-width:0;border-radius:11px;
 border:1px solid #4a6967;background:#12262b;color:#e8f6ef;
 font-size:12px;font-weight:800;line-height:1.35;text-decoration:none;
 transition:background .18s ease,border-color .18s ease,transform .18s ease
}
.draw-next-tool-link>span{color:#c7f28a;flex:none}
.draw-next-tool-link:hover{border-color:#a8c58b;background:#1b3a3b;transform:translateY(-2px);text-decoration:none}
.draw-next-tool-link[hidden]{display:none!important}
.draw-next-tool-link:focus-visible,.draw-next-primary:focus-visible{outline:3px solid var(--lime);outline-offset:3px}

/* Indeterminate progress: no artificial percent claims while RPC is processing. */
.group-apply-progress{
 grid-column:1/-1;display:flex;align-items:center;gap:15px;
 background:#172f30;border:1px solid #7e9d4f;border-radius:12px;
 padding:14px 17px;color:#eaf8eb;min-width:0
}
.group-apply-progress[hidden]{display:none!important}
.group-progress-spinner{
 display:block;flex:0 0 33px;width:33px;height:33px;border-radius:50%;
 border:3px solid #526b5e;border-top-color:var(--lime);
 animation:rift-group-spin .9s linear infinite
}
.group-progress-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px}
.group-progress-copy strong{color:#f6fbec;font-size:13px;font-weight:900}
.group-progress-copy small{color:#b9d3c5;font-size:11px;line-height:1.5}
.group-progress-track{position:relative;display:block;height:4px;overflow:hidden;border-radius:7px;background:#334e46;margin-top:8px}
.group-progress-track span{
 position:absolute;left:-35%;top:0;bottom:0;width:35%;border-radius:7px;
 background:var(--lime);animation:rift-group-sweep 1.7s ease-in-out infinite
}
#applyGroupCountBtn.is-working{
 display:inline-flex;align-items:center;justify-content:center;gap:9px;
 opacity:.85;cursor:progress
}
#applyGroupCountBtn.is-working::before{
 content:"";display:inline-block;width:13px;height:13px;flex:none;
 border:2px solid #0d1b1b55;border-top-color:#0b1716;border-radius:50%;
 animation:rift-group-spin .75s linear infinite
}
.group-count-control [data-group-preset]:disabled,.division-tabs button:disabled{opacity:.6;cursor:wait}
@keyframes rift-group-spin{to{transform:rotate(360deg)}}
@keyframes rift-group-sweep{0%{left:-35%}50%{left:45%}100%{left:100%}}
@media(max-width:960px){
 .next-workflow.draw-next-workflow{grid-template-columns:1fr;gap:20px;padding:22px}
 .draw-next-shortcuts{border-left:0;border-top:1px solid #45675b;padding:19px 0 0}
}
@media(max-width:600px){
 .next-workflow.draw-next-workflow{padding:19px 16px;gap:19px}
 .draw-next-primary{width:100%;text-align:center}
 .draw-next-action-grid{grid-template-columns:1fr;gap:9px}
 .draw-next-shortcut-label span{display:block;margin-top:3px}
 .group-apply-progress{padding:12px;gap:11px}
 .group-progress-spinner{width:26px;height:26px;flex-basis:26px}
}
@media(prefers-reduced-motion:reduce){
 .group-progress-spinner,.group-progress-track span,#applyGroupCountBtn.is-working::before{animation:none}
 .group-progress-track span{left:35%}
 .draw-next-primary,.draw-next-tool-link{transition:none}
 .draw-next-primary:hover,.draw-next-tool-link:hover{transform:none}
}

/* Organizer-designated group seeds: quiet, compact and mobile-tappable. */
.draw-pair.is-top-seed{border-color:#7a6751;background:linear-gradient(100deg,#233037,#19252c);box-shadow:inset 3px 0 #d5b66b}
.draw-pair.is-top-seed .pair-details small{color:#e6c888;font-weight:800;letter-spacing:.03em}
.pair-controls{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.seed-pair{border:1px solid #4c616a;border-radius:8px;padding:8px 9px;background:transparent;color:#b3c6cb;font-size:10px;font-weight:800;white-space:nowrap}
.seed-pair:hover,.seed-pair:focus-visible{border-color:#d5b66b;color:#fff2d3}
.seed-pair[aria-pressed="true"]{border-color:#9a8050;background:#3e3526;color:#ffe5a0}
.seed-pair:disabled{opacity:.5;cursor:wait}
@media(max-width:570px){.draw-pair{flex-wrap:wrap}.pair-controls{width:100%;justify-content:flex-start;padding-left:38px}}
