:root{color-scheme:dark;font-family:Segoe UI,Arial,sans-serif;color:#f7f8fa;background:#0c0e12;font-synthesis:none;--green:#43c784;--red:#ed626b;--yellow:#efcd72}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 0 20%,#265d3e24,transparent 60%),radial-gradient(ellipse at 100% 20%,#79313c24,transparent 60%),linear-gradient(100deg,#11271f,#101317 48%,#29171e);min-height:100vh}#scoreboard{max-width:2400px;margin:auto;padding:clamp(16px,2vw,42px)}
header{text-align:center;margin-bottom:8px}.eyebrow{font-size:clamp(14px,1.2vw,24px);font-weight:700;letter-spacing:.3em;color:#bfc7d2;margin:0 0 10px}
h1{font-size:clamp(26px,2.8vw,64px);line-height:1.15;margin:0;overflow-wrap:anywhere}.versus{color:#8995a5;margin:0 .2em}.date{color:#bdc6d2;font-size:clamp(15px,1.4vw,28px);margin:4px 0 0}
.club{vertical-align:middle;display:inline-flex;align-items:center;justify-content:center;gap:clamp(8px,1vw,20px);min-width:0}.club-name{min-width:0;overflow-wrap:anywhere}.club-logo{width:clamp(42px,4.5vw,100px);height:clamp(42px,4.5vw,100px);object-fit:contain;flex:none}.club-logo[hidden]{display:none}header .club{display:inline}header .club-logo{vertical-align:middle;margin-right:.25em}
.lanes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(16px,2vw,36px)}
.lane{--accent:var(--green);min-width:0;background:linear-gradient(145deg,#202730e6,#14191fd9 65%);border:1px solid color-mix(in srgb,var(--accent) 48%,#303843);border-top:5px solid var(--accent);border-radius:16px;padding:clamp(16px,1.8vw,32px);box-shadow:0 14px 32px #0005,inset 0 1px #ffffff08}.lane[data-ries="1"]{--accent:var(--red)}
.lane-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:14px;border-bottom:1px solid #414b58}h2{font-size:clamp(24px,2.2vw,44px);margin:0;letter-spacing:.08em}.lane-heading h2{color:var(--accent)}.throw-progress{font-size:clamp(18px,1.65vw,34px);font-weight:800;color:var(--yellow);white-space:nowrap;background:#0e1219;padding:8px 12px;border-radius:7px;font-variant-numeric:tabular-nums}.throw-progress.finished{color:var(--green)}
.team{font-size:clamp(17px,1.5vw,30px);margin:20px 0 8px;color:#d3dce7;overflow-wrap:anywhere}.team span{font-weight:800;color:var(--green);margin-right:10px}.guest .team span{color:var(--red)}
.player-name{font-size:clamp(30px,3.1vw,66px);line-height:1.15;margin:0 0 24px;white-space:nowrap;overflow-wrap:normal;color:var(--yellow);font-weight:800}
table{width:100%;border-collapse:collapse;table-layout:fixed;font-variant-numeric:tabular-nums}th,td{text-align:center;padding:clamp(8px,1vh,14px) 4px;border-bottom:1px solid #3a434f}thead th{font-size:clamp(12px,1.15vw,23px);color:#c4ccd7;font-weight:600}tbody th{font-size:clamp(18px,1.7vw,34px);color:#b5c1d0}tbody td{font-size:clamp(26px,2.65vw,56px);font-weight:750;line-height:1.15}th:first-child{width:14%}.pass-result{background:color-mix(in srgb,var(--accent) 9%,transparent);border-left:1px solid #4a5462;color:#fff;font-weight:800}
.personal-total,.total-space{min-height:clamp(54px,6vh,90px);margin-top:16px}.personal-total{display:flex;justify-content:space-between;align-items:center;border-top:2px solid var(--accent);padding:10px 14px 0;background:linear-gradient(90deg,#080d1480,#080d1430)}.personal-total span{font-size:clamp(18px,1.5vw,30px);letter-spacing:.15em;color:#c5ced9}.personal-total strong{font-size:clamp(36px,3.4vw,72px);color:#fff;line-height:1;font-variant-numeric:tabular-nums}
.ready{min-height:clamp(250px,42vh,620px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.ready strong{font-size:clamp(30px,3.7vw,74px);color:#aab9c9;letter-spacing:.12em}.ready p{font-size:clamp(18px,1.7vw,34px);color:#aebccb;max-width:24ch;line-height:1.5}
.final-result{border:1px solid #a18d52;border-top:4px solid var(--yellow);background:radial-gradient(ellipse at 50% 0,#e8c76b18,transparent 70%),linear-gradient(110deg,#1d302b,#1c222b 50%,#332429);border-radius:14px;padding:16px 24px;margin-bottom:24px;text-align:center;box-shadow:0 12px 28px #0005}.final-result h2{font-size:clamp(18px,1.7vw,36px);color:var(--yellow);margin-bottom:8px}.final-result>div{display:flex;align-items:center;justify-content:space-evenly;gap:20px}.final-result .club{flex:1;font-size:clamp(20px,2vw,40px);font-weight:700}.final-result .club:first-child{color:var(--green)}.final-result .club:last-child{color:var(--red);flex-direction:row-reverse}.final-result strong{font-size:clamp(42px,5.3vw,112px);white-space:nowrap;letter-spacing:.03em;font-variant-numeric:tabular-nums}
.waiting{min-height:80vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.waiting>p:last-child{font-size:clamp(18px,2vw,32px);color:#aebccc}
@media(min-width:801px){#scoreboard:has(.final-result){padding-top:24px;padding-bottom:24px}.final-result{padding-top:10px;padding-bottom:10px}.final-result strong{line-height:1}.final-result~.lanes .lane{padding:clamp(14px,1.2vw,26px)}.final-result~.lanes .lane-heading{padding-bottom:8px}.final-result~.lanes .team{margin-top:12px}.final-result~.lanes .player-name{font-size:clamp(26px,2.1vw,44px);margin-bottom:12px}.final-result~.lanes th,.final-result~.lanes td{padding-top:.7vh;padding-bottom:.7vh}.final-result~.lanes tbody td{font-size:clamp(24px,2vw,40px)}.final-result~.lanes .personal-total,.final-result~.lanes .total-space{min-height:48px;margin-top:10px}.final-result~.lanes .ready{min-height:30vh}}
@media(max-width:800px){h1{flex-wrap:wrap}.lanes{grid-template-columns:1fr}.ready{min-height:200px}.final-result>div{flex-direction:column;gap:8px}.player-name{font-size:32px}tbody td{font-size:30px}.club-logo{width:42px;height:42px}.final-result .club:last-child{flex-direction:row}.throw-progress{padding:6px 8px}}

.ready.completed strong{font-size:clamp(18px,2.7vw,54px);letter-spacing:.06em;color:#b9c6c1}
/* Spiegelbildlicher Kopf: feste Mittelachse, unabhaengig von Namenslaengen. */
header h1{position:relative;font-size:clamp(22px,2.6vw,58px);display:flex;align-items:center;gap:60px}
header .club{position:relative;display:block;flex:1;min-width:0;padding-left:clamp(50px,5.5vw,120px)}
header .club:last-child{padding-left:0;padding-right:clamp(50px,5.5vw,120px)}
header .club-logo{position:absolute;left:0;top:50%;transform:translateY(-50%);margin:0}
header .club:last-child .club-logo{left:auto;right:0}
header .versus{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0}
header h1{min-height:clamp(42px,4.5vw,100px)}
.lane.has-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.48fr);gap:18px;align-content:start}
.has-details .lane-heading{grid-column:1/-1}.lane-primary,.lane-details{min-width:0}
.lane-details{border-left:1px solid #ffffff18;padding-left:14px;color:#c4ced9}
.roster-progress{margin:0 0 5px;font-size:clamp(14px,1.05vw,24px);font-weight:700;color:#eef1f5}
.status-legend{font-size:clamp(10px,.7vw,16px);margin:0 0 10px}
.roster{list-style:none;padding:0;margin:0;display:grid;gap:3px}
.roster-player{display:flex;align-items:center;gap:5px;font-size:clamp(12px,.95vw,22px);padding:3px 4px;border-radius:4px;min-width:0}
.roster-name{display:block;flex:1;min-width:0;white-space:nowrap}.roster-player small{font-size:9px;color:#aebaca}
.roster-player.current{background:#efcd721a;outline:1px solid #efcd7260;color:var(--yellow);font-weight:800}
.records{margin-top:14px;border-top:1px solid #ffffff20;padding-top:10px;display:grid;gap:12px}
.record h4{font-size:clamp(11px,.8vw,18px);letter-spacing:.06em;margin:0 0 4px;color:#b8c6d4}.record strong{font-size:clamp(24px,1.9vw,40px);color:#fff;display:block;line-height:1.1}.record-name{display:block;white-space:nowrap;font-size:clamp(13px,1vw,22px);margin-top:3px}.record small{display:block;font-size:clamp(10px,.8vw,18px);overflow-wrap:anywhere;color:#b3bfcc}
.has-details .team{font-size:clamp(15px,1.25vw,26px);margin-top:0}.has-details .player-name{font-size:clamp(28px,2.8vw,60px)}
.has-details .ready{min-width:0}.has-details .ready strong{font-size:clamp(22px,2.8vw,54px)}.has-details .ready.completed strong{font-size:clamp(17px,1.7vw,36px)}
.has-details thead th{font-size:clamp(10px,.95vw,20px)}.has-details tbody td{font-size:clamp(24px,2.3vw,48px)}
@media(max-width:1200px){.lane.has-details{grid-template-columns:minmax(0,1fr)}.lane-details{border-left:0;border-top:1px solid #ffffff18;padding:12px 0 0}.roster{grid-template-columns:repeat(2,minmax(0,1fr))}.records{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){header h1{gap:30px;font-size:22px}header .club{padding:0 0 48px}header .club:last-child{padding:0 0 48px}header .club-logo,header .club:last-child .club-logo{top:auto;bottom:0;left:50%;right:auto;transform:translateX(-50%)}header .versus{top:20px}.has-details .ready.completed strong{font-size:22px}}
header h1{display:block;font-size:0}
header .club{display:inline-block;width:calc(50% - 30px);margin-right:30px;vertical-align:middle;font-size:clamp(22px,2.6vw,58px)}
header .club:last-child{margin-left:30px;margin-right:0}
header .versus{font-size:clamp(22px,2.6vw,58px)}
.roster-player{font-size:clamp(12px,.84vw,20px);line-height:1.1;padding:2px 3px}.roster{gap:2px}
.records{margin-top:10px;padding-top:8px;gap:8px}.record h4{margin-bottom:2px}.record strong{font-size:clamp(24px,1.55vw,34px)}.record-name{font-size:clamp(12px,.85vw,19px);margin-top:2px}.record small{font-size:clamp(10px,.7vw,16px)}
@media(min-width:1201px){.final-result~.lanes .roster{grid-template-columns:repeat(2,minmax(0,1fr))}.final-result~.lanes .records{grid-template-columns:repeat(2,minmax(0,1fr))}.final-result~.lanes .roster-player small{display:none}}
@media(min-width:1201px){#scoreboard:has(.lane-details){padding-top:24px;padding-bottom:24px}.lane.has-details{padding:24px}}
@media(max-width:800px){header .club{padding:0 0 0 46px;font-size:20px}header .club:last-child{padding:0 46px 0 0}header .club-logo,header .club:last-child .club-logo{top:50%;bottom:auto;left:0;right:auto;transform:translateY(-50%)}header .club:last-child .club-logo{left:auto;right:0}header .versus{top:50%}}
/* V2: breite LIVE-Karten und darunter vier eindeutig getrennte Mannschaften. */
.ries-column{min-width:0;--accent:var(--green)}.ries-column[data-ries="1"]{--accent:var(--red)}.ries-column .lane{--accent:inherit}
.ries-overview{margin-top:16px;padding:14px 18px;background:#121920c9;border:1px solid #ffffff20;border-top:3px solid var(--accent);border-radius:12px}
.ries-overview>h2{font-size:18px;color:var(--accent);margin:0 0 8px}.team-overviews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.team-overview{min-width:0}.team-overview+section{border-left:1px solid #ffffff20;padding-left:18px}
.team-overview h3{font-size:16px;line-height:1.15;margin:0 0 4px;color:#d5dce5;overflow-wrap:anywhere}.team-overview[data-side="HEIM"] h3{color:var(--green)}.team-overview[data-side="GAST"] h3{color:var(--red)}
.team-overview .roster-progress{font-size:14px;margin-bottom:6px}.team-overview .roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 6px}.team-overview .roster-player{font-size:14px;padding:2px;line-height:1.1}.records{grid-template-columns:1fr;gap:4px;margin-top:8px;padding-top:6px}.record h4{font-size:10px}.record-value{display:flex;gap:6px;align-items:baseline;min-width:0}.record strong{font-size:20px;flex:none}.record-name{font-size:14px;flex:1;min-width:0}.record small{display:none}
@media(min-width:801px){
#scoreboard:has(.ries-overview){padding-top:14px;padding-bottom:14px}
#scoreboard:has(.ries-overview) header{margin-bottom:12px}
#scoreboard:has(.ries-overview) header h1{min-height:64px;font-size:0}
#scoreboard:has(.ries-overview) header .club-logo{width:64px;height:64px}
#scoreboard:has(.ries-overview) header .club{font-size:clamp(22px,2.2vw,46px)}
.with-overview .lane{padding:16px 24px;height:400px}
.with-overview .lane-heading{padding-bottom:8px}.with-overview .lane-heading h2{font-size:32px}.with-overview .throw-progress{font-size:24px;padding:6px 10px}
.with-overview .team{font-size:22px;margin:4px 0 2px}.with-overview .player-name{font-size:42px;line-height:1.05;margin-bottom:2px}
.with-overview th,.with-overview td{padding:2px 4px}.with-overview thead th{font-size:16px}.with-overview tbody td{font-size:36px;line-height:1}.with-overview tbody th{font-size:24px}
.with-overview .personal-total,.with-overview .total-space{min-height:30px;margin-top:2px}.with-overview .personal-total{padding-top:2px}.with-overview .personal-total strong{font-size:44px}.with-overview .ready{min-height:320px}.with-overview .ready strong{font-size:40px}.with-overview .ready p{font-size:24px}
#scoreboard:has(.ries-overview) .final-result{margin-bottom:10px;padding:8px 16px}#scoreboard:has(.ries-overview) .final-result strong{font-size:62px}#scoreboard:has(.ries-overview) .final-result .club-logo{width:52px;height:52px}
.final-result~.lanes .with-overview .lane{height:380px}.final-result~.lanes .with-overview .ready{min-height:270px}.final-result~.lanes .with-overview .team{margin-top:6px}.final-result~.lanes .with-overview .player-name{font-size:30px;margin-bottom:6px}.final-result~.lanes .with-overview th,.final-result~.lanes .with-overview td{padding:3px 4px}.final-result~.lanes .with-overview tbody td{font-size:26px}.final-result~.lanes .with-overview .personal-total strong{font-size:32px}
}
@media(max-width:800px){.team-overviews{grid-template-columns:1fr}.team-overview+section{border-left:0;border-top:1px solid #ffffff20;padding:12px 0 0}.ries-column{margin-bottom:10px}.ries-overview{padding:14px}.with-overview .lane{height:auto}.ries-overview .record-name{font-size:14px}}
/* Visueller Feinschliff: gemeinsame Zeilen und sieben reservierte Spielerzeilen. */
.team-overviews{grid-template-rows:auto auto 120px auto;row-gap:6px}
.team-overview{display:grid;grid-template-rows:subgrid;grid-row:span 4}
.team-overview h3{font-size:18px;margin:0}
.team-overview .roster-progress{font-size:16px;margin:0}
.team-overview .roster{grid-template-rows:repeat(7,24px);gap:2px 6px;align-content:start}
.team-overview .roster-player{font-size:16px;line-height:1.15;padding:2px}
.team-overview .roster-player>span:first-child{font-size:17px;flex:none}
.team-overview .records{margin-top:2px;padding-top:6px;gap:5px}
.team-overview .record h4{font-size:12px}.team-overview .record strong{font-size:24px;font-weight:800}.team-overview .record-name{font-size:16px}
.ries-overview{padding-top:10px;padding-bottom:10px;margin-top:10px}
@media(min-width:801px){.with-overview .lane{height:480px}.with-overview .team{margin-top:6px;margin-bottom:4px}.with-overview .player-name{margin-bottom:8px}}
@media(max-width:800px){.team-overviews{grid-template-rows:auto}.team-overview{grid-template-rows:auto auto 180px auto;grid-row:auto;row-gap:6px}.team-overview .record-name{font-size:16px}}
.ries-overview{margin-top:6px}
@media(min-width:801px){
.final-result~.lanes .with-overview .lane-heading h2{font-size:28px;line-height:1.1}
.final-result~.lanes .with-overview .throw-progress{font-size:20px;padding:4px 8px}
.final-result~.lanes .with-overview .team{font-size:18px;line-height:1.1;margin:4px 0}
.final-result~.lanes .with-overview tbody th{font-size:20px;line-height:1.1}
.final-result~.lanes .with-overview .personal-total{min-height:34px;margin-top:4px;padding-top:4px}
.final-result~.lanes .with-overview .personal-total span{font-size:20px}
}
.team-overview .records{grid-auto-rows:1fr}
/* Letzter visueller Feinschliff: LIVE-Prioritaet und klare Ueberschriftenhierarchie. */
.ries-overview>h2{font-size:26px;font-weight:800;margin-bottom:10px}
.team-overview h3{font-size:19px}.team-overview .roster-progress{font-size:17px}
.team-overview .roster-player{font-size:17px}.team-overview .roster-player>span:first-child{font-size:18px;line-height:1}
.team-overview .records{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.team-overview .record strong{font-size:25px}.team-overview .record-name{font-size:17px}
@media(min-width:801px){
#scoreboard:has(.ries-overview){padding-top:12px;padding-bottom:12px}
#scoreboard:has(.ries-overview) header h1{min-height:84px}
#scoreboard:has(.ries-overview) header .club-logo{height:auto;width:auto;max-height:84px;max-width:110px;object-fit:contain}
.with-overview .lane{height:400px}.with-overview .player-name{font-size:44px}.with-overview .team{font-size:24px}
.with-overview .throw-progress{font-size:26px}.with-overview tbody td{font-size:40px}.with-overview th,.with-overview td{padding-top:4px;padding-bottom:4px}
.with-overview .personal-total strong{font-size:46px}
.final-result~.lanes .with-overview .lane{height:356px}
}
/* Gemeinsame Statuserklaerung im freien unteren Rand, ohne Inhaltsverschiebung. */
.shared-status-legend{display:none;position:fixed;bottom:0;left:50%;transform:translateX(-50%);align-items:center;justify-content:center;gap:12px;margin:0;white-space:nowrap;font-size:16px;line-height:20px;color:#b8c3cf;font-weight:400}
.shared-status-legend b{font-weight:400;color:#81909f}
#scoreboard:has(.ries-overview)+.shared-status-legend{display:flex}
@media(max-width:800px){.shared-status-legend{position:static;transform:none;white-space:normal;padding:4px 0;font-size:14px;gap:8px}}
@media(min-width:801px){.final-result~.lanes .ries-overview{padding-bottom:0}}
/* Werbung Zuschaueranzeige */
.spectator-advertising {
  width: calc(100% - 48px);
  max-width: 1600px;
  height: 225px;
  margin: 6px auto 34px;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.spectator-advertising img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Werbung w채hrend eines laufenden Wettspiels */
body.spectator-has-match .spectator-advertising {
  width: min(92%, 1400px);
  height: 160px;
  margin: 8px auto 34px;
  background: transparent;
}

body.spectator-has-match .spectator-advertising img {
  object-fit: contain;
}

/* Grosse Werbung im Wartezustand */
body:not(.spectator-has-match) .spectator-advertising {
  position: fixed;
  left: 50%;
  top: 64%;
  transform: translate(-50%, -50%);
  width: min(65%, 1000px);
  height: 188px;
  margin: 0;
  background: transparent;
}

body:not(.spectator-has-match) .spectator-advertising img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Bei geringer Bildschirmhoehe Werbung nur waehrend eines Wettspiels ausblenden */
@media (max-height: 800px) {
  body.spectator-has-match .spectator-advertising {
    display: none;
  }
}

/* Statuslegende im Wartezustand ausblenden */
body:not(.spectator-has-match) .shared-status-legend {
  display: none !important;
}
/* Während des Wettspiels vorerst keine Werbung */
body.spectator-has-match .spectator-advertising {
  display: none !important;
}
/* Dynamische Mannschaftsübersicht für grössere Teams */
@media (min-width:801px) {
  .team-overview .roster {
    grid-template-rows: none;
    grid-auto-rows: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    overflow: visible;
  }

  .team-overview .roster-player {
    font-size: 15px;
    line-height: 1;
    padding: 1px 2px;
  }

  .team-overview .roster-player > span:first-child {
    font-size: 16px;
  }
}
@media (min-width:801px) {
  .with-overview .personal-total {
    min-height: 26px;
    height: 26px;
    margin-top: 0;
    padding-top: 0;
    line-height: 26px;
  }

  .with-overview .personal-total strong {
    font-size: 36px;
    line-height: 26px;
  }
}
@media (min-width:801px) {
  .with-overview .lane {
    height: 440px;
  }
}
@media (min-width:801px) {
  .with-overview .personal-total {
    height: 34px;
    min-height: 34px;
    margin-top: 0;
    padding: 0 12px;
    line-height: 34px;
    box-sizing: border-box;
  }

  .with-overview .personal-total span {
    line-height: 34px;
  }

  .with-overview .personal-total strong {
    font-size: 32px;
    line-height: 34px;
  }
}
@media (min-width:801px) {
  .with-overview .personal-total strong {
    transform: translateX(-30px);
  }
}
/* Abschlussansicht: Platz fuer die Resultat-Uebersichten schaffen */
@media (min-width: 801px) {
  #scoreboard:has(.final-result) header {
    margin-bottom: 6px;
  }

  #scoreboard:has(.final-result) .final-result {
    margin-bottom: 6px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  #scoreboard:has(.final-result) .final-result ~ .lanes .with-overview .lane {
    height: 300px;
  }

  #scoreboard:has(.final-result) .final-result ~ .lanes .with-overview .ready {
    min-height: 215px;
  }
}