.sg-wires{position:absolute;inset:0;pointer-events:none;fill:none;stroke:#6c879b;stroke-width:1.5;opacity:.65}
.sg-group{position:absolute;border:1px solid #6e8597;background:#0b141de8;border-radius:5px;box-sizing:border-box}
.sg-group>h3{position:absolute;left:0;right:0;bottom:100%;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;margin:0 0 7px;font-size:20px;color:#c6e1f2;letter-spacing:2px;border:0;background:none!important}
.sg-placeholder{height:50px;display:flex;align-items:center;justify-content:center;font-size:15px;color:#98a6b2}
#stage.swiss-stage .sg-group .sg-match{display:flex;align-items:center;width:100%!important;height:50px!important;margin:0;border:0;border-bottom:1px solid #53637566;border-radius:0;outline:0;box-shadow:none;background:transparent}
.sg-match:before,.sg-match:after{display:none!important}
#stage.swiss-stage .sg-match .slot{height:49px!important;flex:1;min-width:0;padding:0 6px;gap:4px;border:0;background:none;box-shadow:none;font-size:20px!important;position:relative}
#stage.swiss-stage .sg-match .slot:nth-of-type(2){flex-direction:row-reverse}
#stage.swiss-stage .sg-match .slot:after{display:none}
#stage.swiss-stage .sg-match .slot .name{top:0;line-height:1.2;padding:0;font-size:inherit;text-align:center}
#stage.swiss-stage .sg-match .slot .race{top:0;flex:0 0 20px;width:20px!important;height:24px!important}
#stage.swiss-stage .sg-match .slot .score-value{flex:0 0 18px;width:18px;background:none;border:0;box-shadow:none;padding:0;font-size:20px!important;align-self:center;line-height:1}
/* Both horizontal formats use one neutral surface and the same center marker. */
.sg-vs,.de-vs{flex:0 0 20px;text-align:center;font-size:10px;line-height:1;color:#9cabb8;pointer-events:none}

#stage:is(.swiss-stage,.double-stage) .match-card>.slot:not(.selected-player):not(.drop-allowed){background:none!important}
.sg-advance{position:absolute;top:850px;margin:0;box-sizing:border-box}
.sg-result-player .race{flex:0 0 22px;width:22px;height:24px;font-size:14px}
.sg-result-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sg-result-player small{font-size:14px;color:#b4cfdf}
.sg-result-panel.eliminated{background:#14191fef;border-color:#49525d}.sg-result-panel.eliminated h3{color:#aab4bf}.eliminated .sg-result-player{color:#7e8894}
.overlay .eliminated .race{opacity:.36;filter:saturate(.15)}
.admin .eliminated .race{opacity:.35;filter:none}
.admin .sg-result-panel{background:#202b30}.admin .sg-result-panel.eliminated{background:#232527}
.admin .sg-group{background:linear-gradient(135deg,#2b3945aa,#151f2bd9);border-color:#ffffff24;border-radius:10px;box-shadow:inset 0 1px 0 #ffffff08,0 6px 18px #0002}
.admin .sg-group>h3{color:#e2e5eb;border-color:#60656e}
.admin #stage.swiss-stage .sg-match[data-status=ready]{background:#ffffff04;box-shadow:inset 2px 0 #ffe0ce80}
.admin #stage.swiss-stage .sg-match .slot{font-size:18px!important}
.admin .sg-match .sw-win{flex:0 0 22px;width:22px;margin:0;font-size:11px}
.admin .sg-match .slot .name:after{content:none}
.admin .sg-match .race{font-size:13px}
.overlay #stage.swiss-stage .sg-match .slot{font-size:17px!important;padding:0 10px;gap:6px}
.overlay #stage.swiss-stage .sg-match .slot .race{flex-basis:17px;width:17px!important;height:20px!important}
.overlay #stage.swiss-stage .sg-match .slot .score-value{font-size:18px!important}
.overlay .sg-group>h3{font-size:18px}
.sg-result-player .race{flex-basis:18px;width:18px;height:20px}
/* Center race letters inside their fixed boxes; compensate Sebang glyph metrics separately. */
.admin #stage.swiss-stage .sg-match .slot .race,.admin .sg-result-player .race{display:flex;align-items:center;justify-content:center;line-height:1}
.overlay #stage.swiss-stage .sg-match .slot .name{top:1.5px}
.overlay #stage.swiss-stage .sg-match .slot .score-value{position:relative;top:1px}
.overlay .sg-result-name{position:relative;top:1px}
/* Optical correction only: preserve name/score geometry and race icon sizes. */
#stage .slot .race-emblem,#stage .sg-result-player .race-emblem{translate:0 -1px}
/* Keep the existing text width; draw the empty-slot plus independently of fonts. */
#stage .slot.empty .race{position:relative;top:0;align-self:center;height:20px;line-height:20px;color:transparent;transform:none;translate:none}
#stage .slot.empty .race:before,#stage .slot.empty .race:after{content:'';position:absolute;left:50%;top:50%;background:#8ea3b3;transform:translate(-50%,-50%);pointer-events:none}
#stage .slot.empty .race:before{width:8px;height:2px}
#stage .slot.empty .race:after{width:2px;height:8px}

.sg-group>h3 small{font-size:11px;line-height:14px;letter-spacing:1.4px;color:#e5edf5;text-shadow:0 2px 3px #000}
.sg-group>h3>span{color:#c6e1f2}
.sg-result-panel{position:absolute;padding:7px 12px;background:#0c1824f2;border:1px solid #7bb9d4;border-radius:5px}
.sg-result-panel h3{position:absolute;bottom:100%;left:0;right:0;margin:0 0 8px;text-align:center;font-size:17px;line-height:22px;letter-spacing:1px;color:#cff1ff;white-space:nowrap}
.sg-result-panel h3 span{font-size:13px}
.sg-result-list{display:flex;flex-direction:column;gap:0}
.sg-result-player{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;height:28px;font-size:16px;color:#edf7ff}
.sg-result-name{flex:0 1 auto}
.sg-result-empty{text-align:center;color:#93a3b3;font-size:13px;line-height:28px}
.admin #stage.swiss-stage .sg-match .slot{font-size:16px!important;gap:3px;padding:0 5px}
.overlay #stage.swiss-stage .sg-match .slot{font-size:16px!important;gap:4px;padding:0 6px}
