/* Spiele-Page (#spiele) — eigenes Layout im BSCG-Stil
   Folgt dem Vokabular von sponsoring.css: sl-page, sl-hero, sl-section, sl-h1, …
   Akzentfarbe via var(--accent), Background var(--bg), Schrift via t.displayFont/Bodyfont. */

.sl-page {
  min-height: 100vh;
  padding-bottom: 80px;
  /* Defensive fallback colors if CSS vars from <App> haven't propagated yet
     (e.g. very early paint on mobile). The component's inline style still wins
     for the actual theme — these only kick in if the inline style is missing. */
  background: #0a0a0a;
  color: #f4f1ea;
}
/* Spiele-Page-Nav: Burger-Menu auf Mobile statt 4 grid-cells, sonst wird
   die Header zu hoch und der eigentliche Inhalt rutscht weit nach unten. */
.sl-page .vB-nav { gap: 14px; }
@media (max-width: 640px) {
  .sl-page .vB-nav {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .sl-page .vB-logo { width: 38px; height: 38px; }
  .sl-page .vB-nav-name {
    font-size: 11px;
    flex: 1; min-width: 0;
    line-height: 1.2;
  }
  /* Auf Mobile zeigen wir nur den primären CTA in der Nav (Mitspielen)
     plus einen "Zurück"-Link. Mehr braucht's nicht — es ist eine Single-Purpose-Page. */
  .sl-page .vB-links {
    display: flex; flex-direction: row; gap: 6px;
    width: auto; order: unset; margin-top: 0;
    border-top: none; padding-top: 0;
    grid-template-columns: none;
    flex-shrink: 0;
  }
  .sl-page .vB-links a:not(.vB-cta) {
    display: none;
  }
  .sl-page .vB-links a.vB-link-active,
  .sl-page .vB-links a[href='#home'] {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    font-size: 11px;
    border-radius: 6px;
    background: rgba(255,255,255,.06);
  }
  .sl-page .vB-links .vB-cta {
    grid-column: auto;
    margin-top: 0;
    padding: 10px 14px;
    font-size: 11px;
  }
}

/* Hero */
.sl-hero {
  padding: clamp(40px, 8vh, 96px) clamp(20px, 6vw, 80px) 32px;
  max-width: 1100px; margin: 0 auto;
  text-align: left;
}
.sl-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  padding: 7px 14px;
  border: 1px solid;
  border-radius: 999px;
  margin-bottom: 22px;
  text-transform: uppercase;
}
.sl-h1 {
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0 0 22px;
  white-space: pre-line;
}
.sl-lede {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.55;
  max-width: 640px;
  color: var(--muted);
  margin: 0 0 22px;
}
.sl-summary {
  display: flex;
  gap: clamp(22px, 5vw, 56px);
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 6px;
}
.sl-summary-cell { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }
.sl-summary-num {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sl-summary-slash { opacity: .4; padding: 0 4px; font-weight: 500; }
.sl-summary-lbl {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--muted); text-transform: uppercase;
}

/* Section (per Spieltag) */
.sl-section {
  padding: 28px clamp(20px, 6vw, 80px);
  max-width: 1400px; margin: 0 auto;
}
.sl-section + .sl-section { padding-top: 12px; }
.sl-section-head { margin-bottom: 18px; }
.sl-h2 {
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 800; letter-spacing: -0.02em;
  margin: 8px 0 0; line-height: 1.05;
}
.sl-h2-sub {
  font-size: 0.6em; font-weight: 600;
  color: var(--muted); margin-left: 6px;
}

.sl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: flex-start;
}
.sl-col { min-width: 0; }
.sl-col-h {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 14px;
  display: inline-block;
  min-width: 200px;
}

/* Spielplan-Liste — Karte pro Match (kein Tabellen-Look) */
.sl-matches { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sl-match {
  display: grid;
  grid-template-columns: 64px 1fr 110px 130px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .12s, border-color .15s;
}
.sl-match:hover {
  background: rgba(255,255,255,.07);
  transform: translateX(2px);
}
.sl-match.is-ours {
  background: color-mix(in oklab, var(--accent) 8%, rgba(255,255,255,.035));
  border-color: var(--accent);
}
.sl-match.is-ours:hover {
  background: color-mix(in oklab, var(--accent) 14%, rgba(255,255,255,.035));
}
.sl-match-time {
  font-size: 17px; font-weight: 800;
  color: var(--fg); font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.sl-match-pair { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sl-match-team {
  font-size: 14.5px; font-weight: 600;
  color: var(--fg); opacity: 0.85;
  line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis;
}
.sl-match-team.is-ours {
  color: var(--accent);
  opacity: 1;
  font-weight: 800;
}
.sl-match-team-away {
  position: relative; padding-left: 14px;
}
.sl-match-team-away::before {
  content: 'vs.';
  position: absolute; left: 0; top: 0;
  font-size: 10px; font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.sl-match-score {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
  color: var(--fg);
}
.sl-match-colon { padding: 0 4px; opacity: 0.4; font-weight: 500; }
.sl-match-cta {
  display: flex; align-items: center; gap: 6px; justify-content: flex-end;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.sl-match-arrow {
  display: inline-block;
  transition: transform .15s;
  font-size: 17px; font-weight: 700;
}
.sl-match:hover .sl-match-arrow { transform: translate(2px, -2px); }

/* Tabelle */
.sl-table-wrap {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.sl-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.sl-table th, .sl-table td {
  padding: 11px 10px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.sl-table th {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  background: rgba(255,255,255,.03);
}
.sl-table tbody tr:last-child td { border-bottom: 0; }
.sl-table tr.is-ours {
  background: color-mix(in oklab, var(--accent) 14%, transparent);
}
.sl-table tr.is-ours .sl-t-team {
  color: var(--accent); font-weight: 800;
}
.sl-t-rank {
  width: 36px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.sl-t-team { font-weight: 600; }
.sl-t-num { width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.sl-t-pts { font-weight: 800; color: var(--fg); }

.sl-empty { padding: 60px 24px; text-align: center; }

/* Freundschaftsspiel-CTA — mittig zwischen Hero und erstem Spieltag */
.sl-friendly {
  padding: 12px clamp(20px, 6vw, 80px) 20px;
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: center;
}
.sl-friendly-card {
  width: 100%;
  max-width: 720px;
  text-align: center;
  padding: 28px clamp(20px, 4vw, 36px) 30px;
  border-radius: 18px;
  border: 1.5px solid;
  background: rgba(255,255,255,.025);
  position: relative;
  overflow: hidden;
}
.sl-friendly-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%);
  pointer-events: none;
}
.sl-friendly-card > * { position: relative; }
.sl-friendly-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  padding: 6px 14px;
  border: 1px solid;
  border-radius: 999px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.sl-friendly-h {
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.sl-friendly-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 22px;
}
.sl-friendly-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 800; letter-spacing: 0.02em;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.sl-friendly-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0,0,0,.28);
}

/* Light mode */
.sl-page[style*='#f4f1ea'] .sl-friendly-card { background: rgba(0,0,0,.025); }

@media (max-width: 640px) {
  .sl-friendly { padding: 0 14px 20px; }
  .sl-friendly-card { padding: 22px 18px 24px; border-radius: 14px; }
  .sl-friendly-btn { padding: 14px 22px; width: 100%; }
}

/* Match-Report Modal — passt sich Theme an (var(--bg)/--fg) */
.sl-mr {
  position: fixed; inset: 0; z-index: 2147483640;
  background: rgba(0,0,0,.78);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  animation: slMrFade .15s ease-out;
}
@keyframes slMrFade { from { opacity: 0 } to { opacity: 1 } }
.sl-mr-card {
  width: 100%; max-width: 580px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 30px 28px 24px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.sl-mr-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: inherit;
  font-size: 18px; cursor: pointer;
  transition: background .15s;
}
.sl-mr-close:hover { background: rgba(255,255,255,.1); }

.sl-mr-meta {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-right: 40px; line-height: 1.5;
}

.sl-mr-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 4px;
}
.sl-mr-team {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800; line-height: 1.15;
  text-align: right;
  letter-spacing: -0.01em;
}
.sl-mr-team-away { text-align: left; }
.sl-mr-team.is-ours { color: var(--accent); }
.sl-mr-score {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: flex; align-items: baseline;
}
.sl-mr-colon { padding: 0 6px; opacity: 0.35; font-weight: 500; }

.sl-mr-divider {
  height: 3px; width: 56px;
  margin: 22px 0 16px;
  border-radius: 2px;
}

.sl-mr-ticker-h {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px;
}
.sl-mr-empty {
  font-size: 13.5px;
  padding: 12px 0;
  font-style: italic;
}
.sl-mr-ticker { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sl-mr-ev {
  display: grid;
  grid-template-columns: 44px 28px 1fr;
  gap: 12px; align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background .12s;
}
.sl-mr-ev.is-ours {
  background: color-mix(in oklab, var(--accent) 10%, rgba(255,255,255,.04));
  border-color: color-mix(in oklab, var(--accent) 35%, var(--line));
}
.sl-mr-ev-goal.is-ours {
  background: color-mix(in oklab, var(--accent) 18%, rgba(255,255,255,.04));
}
.sl-mr-min {
  font-size: 18px; font-weight: 800;
  text-align: right; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.sl-mr-icon { font-size: 20px; text-align: center; }
.sl-mr-body { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; min-width: 0; }
.sl-mr-label {
  font-size: 13.5px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sl-mr-player {
  font-size: 14.5px; font-weight: 700;
}
.sl-mr-opp { color: var(--muted); font-weight: 500; }
.sl-mr-num {
  font-size: 12px; font-weight: 800;
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}
.sl-mr-note { font-size: 12.5px; color: var(--muted); font-style: italic; }

/* Light-Mode anpassungen — bei hellem Hintergrund mehr Kontrast */
.sl-page[style*='#f4f1ea'] .sl-match,
.sl-page[style*='#f4f1ea'] .sl-table-wrap,
.sl-page[style*='#f4f1ea'] .sl-mr-ev {
  background: rgba(0,0,0,.04);
}
.sl-page[style*='#f4f1ea'] .sl-match:hover { background: rgba(0,0,0,.08); }
.sl-page[style*='#f4f1ea'] .sl-table th { background: rgba(0,0,0,.03); }
.sl-page[style*='#f4f1ea'] .sl-mr-card { background: #f4f1ea; }
.sl-page[style*='#f4f1ea'] .sl-mr-close { background: rgba(0,0,0,.04); }

/* ─── Mobile ─── */
@media (max-width: 900px) {
  .sl-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .sl-page { padding-bottom: 40px; }
  .sl-hero { padding: 20px 16px 18px; }
  .sl-tag { font-size: 10px; padding: 6px 10px; margin-bottom: 14px; }
  .sl-h1 { font-size: clamp(30px, 9vw, 44px); margin-bottom: 14px; }
  .sl-lede { font-size: 14.5px; margin-bottom: 16px; }
  .sl-summary { gap: 18px; padding: 14px 0 0; }
  .sl-summary-cell { padding: 4px 0; }
  .sl-summary-num { font-size: 22px; }
  .sl-section { padding: 18px 14px; }
  .sl-section + .sl-section { padding-top: 6px; }
  .sl-h2 { font-size: clamp(20px, 5.5vw, 28px); }
  .sl-col-h { font-size: 10px; padding-bottom: 7px; margin-bottom: 10px; }
  .sl-match {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "time     score"
      "pair     pair"
      "cta      cta";
    gap: 8px 14px;
    padding: 14px 16px;
  }
  .sl-match-time { grid-area: time; font-size: 15px; }
  .sl-match-pair { grid-area: pair; }
  .sl-match-team { font-size: 15px; }
  .sl-match-score { grid-area: score; text-align: right; font-size: 24px; }
  .sl-match-cta { grid-area: cta; justify-content: flex-end; padding-top: 4px; border-top: 1px solid var(--line); }
  .sl-table { font-size: 13px; }
  .sl-table th, .sl-table td { padding: 9px 7px; }
  .sl-t-team { font-size: 13px; line-height: 1.3; }
  .sl-t-num { width: 42px; }
  .sl-mr { padding: 8px; }
  .sl-mr-card { padding: 24px 18px 20px; max-height: calc(100vh - 16px); border-radius: 14px; }
  .sl-mr-team { font-size: 16px; }
  .sl-mr-score { font-size: 32px; }
  .sl-mr-ev { grid-template-columns: 36px 24px 1fr; gap: 10px; padding: 10px 12px; }
  .sl-mr-min { font-size: 16px; }
}
