/* Scoreboard-Popup (siehe js/scoreboard.js) */
.gm.has-det { cursor: pointer; transition: background .15s; }
.gm.has-det:hover, .gm.has-det:focus-visible { background: var(--panel-2); outline: 0; }
.gm.has-det:hover .sc, .gm.has-det:focus-visible .sc { color: var(--accent-2); }
.gm.has-det:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-2); }

html.sb-lock { overflow: hidden; }
dialog#sb { position: fixed; inset: 0; margin: auto; width: min(1120px, 100% - 16px); max-height: calc(100dvh - 16px); overflow: auto; padding: 0; color: var(--text); background: var(--bg-2); border: 1px solid var(--bd); }
dialog#sb::backdrop { background: rgba(5, 3, 8, .78); backdrop-filter: blur(3px); }
.sb-in { padding: 0; } .sb-pad { padding: 0 clamp(12px, 3vw, 28px) 18px; }
.sb-bar { margin-bottom: -44px; position: sticky; top: 0; z-index: 4; display: flex; justify-content: flex-end; align-items: flex-start; gap: 10px; height: 44px; pointer-events: none; }
.sb-bar button { pointer-events: auto; }
.sb-bar button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; font: 700 18px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--text); background: rgba(11, 9, 14, .85); border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s, color .15s; }
.sb-bar button svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter; transition: transform .15s; }
.sb-bar button:hover, .sb-bar button:focus-visible { background: var(--accent); color: #1e1b26; outline: 0; }
.sb-bar button:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-2); }
.sb-back { margin-right: auto; border-left: 0 !important; border-right: 1px solid var(--line); }
.sb-back[hidden] { display: none; }
.sb-close { width: 44px; padding: 0 !important; }
.sb-more[aria-pressed="true"] { color: var(--accent-2); box-shadow: inset 0 -2px 0 var(--accent-2); }
.sb-more[aria-pressed="true"]:hover, .sb-more[aria-pressed="true"]:focus-visible { color: #1e1b26; }
.sb-more[aria-pressed="true"] svg { transform: rotate(180deg); }

.sb-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.sb-team { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--muted); }
.sb-team b { font: 700 clamp(22px, 3.6vw, 34px) var(--font-head); text-transform: uppercase; letter-spacing: .03em; overflow-wrap: anywhere; line-height: 1.05; }
.sb-team.win { color: var(--text); }
.sb-team.b { justify-content: flex-start; text-align: right; flex-direction: row-reverse; }
.sb-score { font: 800 clamp(46px, 9vw, 76px)/1 var(--font-head); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.sb-score .win { color: var(--accent-2); }
.sb-score i { font-style: normal; padding: 0 .2em; opacity: .6; }

/* Rundenverlauf: oben Siege von Team A, unten von Team B */
.sb-rounds { margin: 12px 0 4px; padding: 8px 10px 6px; background: rgba(0, 0, 0, .25); }
.sb-rl { display: flex; gap: 2px; }
.rc { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 2px 0; border-radius: 3px; }
.rc:hover, .rc:focus-visible { background: rgba(255, 255, 255, .08); outline: 0; }
.rc span { font: 600 clamp(9px, 1.4vw, 13px) var(--font-body); color: var(--muted); line-height: 1.2; }
.rc i { display: grid; place-items: center; width: 100%; max-width: 30px; aspect-ratio: 1; }
.rc i.rw { color: var(--tc); background: rgba(255, 255, 255, .07); } .rc i.rn { background: rgba(255, 255, 255, .03); }
.rc i .ri { color: inherit; }
.ri { display: block; width: 78%; height: 78%; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.rh { flex: 0 0 30px; } .rh .badge { width: 100%; max-width: 30px; height: auto; aspect-ratio: 1; font-size: 10px; } .rh:hover { background: none; }

.sb-tw { overflow-x: auto; margin-top: 10px; }
.sb-t { width: 100%; table-layout: fixed; --cw: 84px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sb-t thead th:not(.sb-pn), .sb-t tbody td { width: var(--cw); }
dialog#sb.more .sb-t { --cw: 58px; min-width: 780px; }
.sb-t th, .sb-t td { padding: 5px 10px; text-align: right; white-space: nowrap; font-size: 17px; }
.sb-t thead th { font: 600 15px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--tc) 22%, #0b090e); cursor: help; }
.sb-t thead th:hover, .sb-t thead th:focus-visible { color: var(--text); outline: 0; }
.sb-t tbody tr { border-top: 1px solid var(--line); background: rgba(0, 0, 0, .12); }
.sb-t td.b { font-weight: 700; color: var(--accent-2); }
.sb-pn { text-align: left !important; font-weight: 600; }
thead .sb-pn { cursor: default; color: var(--text) !important; font-size: 22px !important; letter-spacing: .04em; }
thead .sb-pn .badge { width: 28px; height: 28px; font-size: 11px; }
.sb-pn a { border-bottom: 1px solid var(--line); } .sb-pn a:hover { color: var(--accent-2); border-color: var(--accent-2); }
.sb-pn .guest { color: var(--muted); font-weight: 400; }
.mvp { margin-left: 8px; padding: 1px 6px; font: 700 12px var(--font-head); letter-spacing: .1em; color: #1e1b26; background: var(--accent-2); vertical-align: 2px; cursor: help; }
.x { display: none; } dialog#sb.more .x { display: table-cell; }

.sb-tip { position: absolute; z-index: 5; max-width: min(300px, calc(100% - 16px)); padding: 8px 11px; font: 400 15px/1.35 var(--font-body); color: var(--text); background: #0b090e; border: 1px solid var(--accent-2); box-shadow: 0 6px 24px rgba(0, 0, 0, .6); pointer-events: none; text-align: left; white-space: normal; }
.sb-tip[hidden] { display: none; }
.sb-tip span { display: block; text-wrap: balance; }

@media (max-width: 640px) {
  .sb-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sb-team, .sb-team.b { justify-content: center; flex-direction: row; text-align: center; }
  .sb-t th, .sb-t td { padding: 7px 6px; font-size: 15px; }
  .sb-t thead th { font-size: 13px; letter-spacing: .04em; }
}

@media (prefers-reduced-transparency: reduce) { dialog#sb::backdrop { backdrop-filter: none; background: rgba(5, 3, 8, .96); } }

.sb-who { display: inline-flex; align-items: center; gap: 10px; }
.sb-pn .av { width: 28px; height: 28px; font-size: 15px; }


/* keine sichtbare Scrollleiste, Scrollen bleibt auf kleinen Bildschirmen möglich */
dialog#sb { scrollbar-width: none; -ms-overflow-style: none; } dialog#sb::-webkit-scrollbar { display: none; }

/* Kopfbereich: Kartenbild unscharf und abgedunkelt im Hintergrund */
.sb-hero { position: relative; isolation: isolate; overflow: hidden; padding: 52px clamp(12px, 3vw, 28px) 14px; }
.sb-hero::before { content: ""; position: absolute; inset: -24px; z-index: -2; background: var(--img, none) center / cover, var(--panel-2); filter: blur(7px) brightness(.8) saturate(1.2); }
.sb-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(11, 9, 14, .1) 0%, rgba(11, 9, 14, .25) 55%, var(--bg-2) 100%); }
.sb-hero .sb-team b, .sb-hero .sb-score { text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.sb-mapname { margin-top: 2px; text-align: center; font: 700 22px var(--font-head); letter-spacing: .3em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }

.sb-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sb-tab { font: 700 16px var(--font-head); letter-spacing: .08em; text-transform: uppercase; padding: 4px 14px; color: var(--muted); background: rgba(11, 9, 14, .55); border: 1px solid var(--line); cursor: pointer; }
.sb-tab.on, .sb-tab:hover { color: var(--text); border-color: var(--accent-2); }

.sb-t .th-in { display: flex; align-items: center; gap: 10px; }
.sb-t .sb-pn { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .sb-t { --cw: 46px; } dialog#sb.more .sb-t { --cw: 46px; min-width: 640px; } }

/* Handy: schmale Zahlenspalten, Namen behalten Platz, Rundenverlauf scrollt seitlich */
@media (max-width: 640px) {
  .sb-t { --cw: 40px; }
  dialog#sb.more .sb-t { --cw: 40px; min-width: 560px; }
  .sb-t th, .sb-t td { padding: 6px 3px; font-size: 15px; }
  .sb-t .sb-pn { padding-left: 8px; }
  .sb-pn .av { display: none; }
  thead .sb-pn .badge { display: none; }
  thead .sb-pn { font-size: 18px !important; }
  .sb-t thead th { font-size: 12px; letter-spacing: .02em; }
  .sb-rl { overflow-x: auto; padding-bottom: 4px; }
  .rc { flex: 0 0 26px; }
  .rh { flex: 0 0 28px; }
  .sb-hero { padding-top: 56px; }
}

/* Spielverlauf eines Teams (Klick auf die Zeile in der Gruppentabelle) */
.stand tr.clk { cursor: pointer; transition: background .15s; }
.stand tr.clk:hover, .stand tr.clk:focus-within { background: var(--panel-2); }
.stand tr.clk:hover .tnb, .stand .tnb:focus-visible { color: var(--accent-2); }
.tnb { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; text-transform: inherit; letter-spacing: inherit; }
.tnb:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
dialog#sb.tview .sb-more { display: none; }
dialog#sb.tview { width: min(720px, 100% - 16px); }
.tm-head { display: flex; align-items: center; gap: 14px; padding: 22px clamp(12px, 3vw, 28px) 6px; }
.tm-head h2 { margin: 0; font: 700 clamp(26px, 5vw, 40px) var(--font-head); text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; overflow-wrap: anywhere; }
.tm-cols, .tm-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 120px 112px; align-items: center; column-gap: 16px; }
.tm-cols { padding: 0 16px 6px 20px; color: var(--muted); font: 600 13px var(--font-body); text-transform: uppercase; letter-spacing: .1em; }
.tm-cols span:nth-child(3), .tm-cols span:nth-child(4) { text-align: center; }
.tm-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tm-row { padding: 12px 16px 12px 16px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.tm-row.w { border-left-color: var(--accent-2); }
.tm-row.l { border-left-color: #c0445a; }
.tm-row.has-det { cursor: pointer; transition: background .15s; }
.tm-row.has-det:hover, .tm-row.has-det:focus-visible { background: var(--panel-2); outline: 0; }
.tm-row.has-det:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-2); }
.tm-where { color: var(--muted); font-weight: 600; }
.tm .sh, .tm-where .sh, .tm-st .sh, .tm-cols .sh { display: none; }
.tm-opp { display: flex; align-items: center; gap: 12px; min-width: 0; font: 700 20px var(--font-head); text-transform: uppercase; letter-spacing: .03em; }
.tm-opp span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-sc { display: grid; grid-template-columns: 1fr 14px 1fr; align-items: center; justify-items: center; font: 700 28px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.tm-sc b { font-weight: 700; } .tm-sc i { font-style: normal; color: var(--muted); }
.tm-sc b:first-child { justify-self: end; } .tm-sc b:last-child { justify-self: start; }
.tm-sc > i:only-child { grid-column: 1 / -1; }
.tm-row.w .tm-sc b:first-child { color: var(--accent-2); }
.tm-row.l .tm-sc b:last-child { color: var(--accent-2); }
.tm-st { display: flex; justify-content: center; }
.tm-st > span { min-width: 96px; text-align: center; padding: 4px 8px; font: 700 14px var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); }
.tm-row.w .tm-st > span { color: var(--accent-2); border-color: var(--accent-2); }
.tm-row.l .tm-st > span { color: #e0788c; border-color: #c0445a; }
@media (max-width: 560px) {
  .tm-cols, .tm-row { grid-template-columns: 34px minmax(0, 1fr) 62px 66px; column-gap: 6px; }
  .tm-cols { padding: 0 8px 6px 12px; font-size: 11px; letter-spacing: .04em; }
  .tm-row { padding: 10px 8px 10px 8px; }
  .tm-where .lg, .tm-st .lg, .tm-cols .lg { display: none; }
  .tm-where .sh, .tm-st .sh, .tm-cols .sh { display: inline; }
  .tm-where { font-size: 14px; }
  .tm-opp { font-size: 14px; gap: 6px; }
  .tm-sc { font-size: 20px; grid-template-columns: 1fr 8px 1fr; }
  .tm-st > span { min-width: 0; width: 100%; padding: 3px 2px; font-size: 10px; letter-spacing: .02em; }
}

/* Gespielte Zeilen im Spielplan: Kartenbild unscharf und abgedunkelt im Hintergrund */
.gm.has-det { position: relative; isolation: isolate; overflow: hidden; }
.gm.has-det[style*="--mapimg"]::before { content: ""; position: absolute; inset: -10px; z-index: -2; background: var(--mapimg) center / cover; filter: blur(7px) brightness(.34) saturate(1.1); }
.gm.has-det[style*="--mapimg"]::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 9, 14, .5), rgba(11, 9, 14, .3) 50%, rgba(11, 9, 14, .5)); }
.gm.has-det[style*="--mapimg"]:hover::before { filter: blur(5px) brightness(.46) saturate(1.15); }

/* Turnierbaum: Team-Avatare unter dem Namen */
.mteam { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mteam .mname { flex: none; }
#bracket-box .crew { display: flex; flex-wrap: wrap; gap: 4px; }
#bracket-box .champ .crew { margin-top: 2px; gap: 6px; }
#bracket-box .crew .av { width: 26px; height: 26px; font-size: 13px; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); }
#bracket-box .champ .crew .av { width: 42px; height: 42px; font-size: 18px; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
#bracket-box .crew a { display: inline-flex; border-radius: 2px; }
#bracket-box .crew a:hover .av, #bracket-box .crew a:focus-visible .av { outline: 2px solid var(--accent-2); outline-offset: 1px; }
#bracket-box .crew .multi { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: color-mix(in srgb, var(--accent-2) 22%, #0b090e); color: var(--accent-2); clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); transition: background .15s, color .15s; }
#bracket-box .crew .multi:hover, #bracket-box .crew .multi:focus-visible { background: var(--accent-2); color: #1e1b26; }

/* Turnierbaum: Klick auf Halbfinale/Finale öffnet die Maps des Matches */
.mcard.has-mdet { cursor: pointer; }
.mcard.has-mdet:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.mmore { color: var(--accent); transition: color .15s; }
.mcard.has-mdet:hover .mmore, .mcard.has-mdet:focus-visible .mmore { color: var(--accent-2); }

/* Match-Übersicht im Popup: pro Map eine Zeile mit Kartenbild wie im Spielplan */
dialog#sb.mview { width: min(640px, 100% - 16px); }
dialog#sb.mview .sb-more { display: none; }
.mv-title { margin: 0; height: 44px; padding: 0 56px 0 clamp(12px, 3vw, 20px); display: flex; align-items: center; font: 700 20px var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.mv-list { list-style: none; margin: 0; padding: 0; }
.mv-row { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 10px clamp(12px, 3vw, 20px); border-top: 1px solid var(--line); background: var(--panel-2); }
.mv-row[style*="--mapimg"]::before { content: ""; position: absolute; inset: -10px; z-index: -2; background: var(--mapimg) center / cover; filter: blur(7px) brightness(.34) saturate(1.1); }
.mv-row[style*="--mapimg"]::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 9, 14, .5), rgba(11, 9, 14, .3) 50%, rgba(11, 9, 14, .5)); }
.mv-row.off { opacity: .6; min-height: 64px; }
.mv-pick { flex: none; display: flex; }
.mv-pick.sp { width: 56px; height: 56px; }
@media (max-width: 640px) { .mv-pick.sp { display: none; } }
.mv-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.mv-n { font: 600 14px var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.mv-name { font: 700 clamp(22px, 5vw, 30px)/1.1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.mv-sc { flex: none; display: flex; align-items: baseline; font: 800 clamp(32px, 7vw, 42px)/1 var(--font-head); font-variant-numeric: tabular-nums; color: var(--muted); text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.mv-sc i { font-style: normal; padding: 0 .15em; opacity: .6; }
.mv-sc .win { color: var(--accent-2); }
.mv-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; color: var(--accent-2); background: rgba(11, 9, 14, .7); border: 1px solid var(--line); cursor: pointer; transition: background .15s, color .15s; }
.mv-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: square; }
.mv-ico:hover, .mv-ico:focus-visible { background: var(--accent); color: #1e1b26; border-color: var(--accent); outline: 0; }
.mv-ico.off { border: 0; background: none; cursor: default; }

/* Team-Ansicht: kompakter Kopf neben dem Schließen-Knopf, mit Luft zur Tabelle */
dialog#sb.tview .sb-hero { padding: 14px 0 16px; }
dialog#sb.tview .tm-head { padding: 0 64px 0 clamp(16px, 3vw, 28px); min-height: 48px; gap: 14px; }
dialog#sb.tview .tm-head .badge { width: 42px; height: 42px; font-size: 13px; }
dialog#sb.tview .tm-head h2 { font-size: clamp(26px, 5vw, 36px); }
dialog#sb.tview .sb-pad { padding-top: 6px; }

/* Agent mit Rolle */
.ag { position: relative; flex: none; width: 30px; height: 30px; background: rgba(0, 0, 0, .35); border-radius: 3px; cursor: help; }
.ag img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; }
.ag .rl { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; padding: 1px; background: #0b090e; border-radius: 50%; }
.ag:hover, .ag:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
@media (max-width: 640px) { .ag { width: 26px; height: 26px; } }

.sb-who { min-width: 0; }
.mvp { white-space: nowrap; }


/* Turnierbaum: Hover wie bei den Spielplan-Zeilen (Hintergrund heller, Stand und Rahmen in Akzentfarbe) */
.mcard.has-mdet::before { transition: background .15s; }
.mcard.has-mdet { transition: background .15s; }
.mcard.has-mdet:hover, .mcard.has-mdet:focus-visible { --fill: var(--panel-2); --bd: var(--accent-2); }
.mcard.has-mdet:hover .mscore, .mcard.has-mdet:focus-visible .mscore { color: var(--accent-2); }

/* Decider: neutrales Abzeichen statt Team-Logo */
.badge.dec { --tc: #8b8497; color: #cfc9da; }
.badge.dec svg { width: 52%; height: 52%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }

/* Handy: Multistream-Symbol ausblenden (rutschte in eine zweite Zeile, wird mobil kaum genutzt) */
@media (max-width: 640px) { #bracket-box .crew .multi, .stand .crew .multi { display: none; } }


/* Zwischenstand der laufenden Map in der Match-Karte (Turnierbaum) */
.mlive { padding: 6px 12px; font: 600 17px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(255, 46, 171, .08); border-top: 1px solid var(--line); }
.mlive b { color: var(--text); }

