/* Soccer odds widget — embeddable iframe stylesheet.
 * Self-contained: no external fonts, no resets, no JS framework.
 * Two themes: midnight (default) and ocean. Pass ?theme=ocean.
 */

:root {
  /* midnight theme (default) — translates the NBA reference's purple-on-navy to a pitch-night aesthetic */
  --bg-0: #0b1224;
  --bg-1: #131e3a;
  --bg-2: #1b2848;
  --border: #2a3a66;
  --border-glow: #6f5cff;
  --text-0: #ffffff;
  --text-1: #c9d3ee;
  --text-2: #8093bf;
  --text-3: #56668e;
  --accent-0: #8b5cff;
  --accent-1: #c46aff;
  --accent-grad: linear-gradient(135deg, #8b5cff 0%, #c46aff 100%);
  --cta-text: #1a0d3a;
  --ok: #4ade80;
  --warn: #fbbf24;
  --live: #ff3b6b;
}

[data-theme="ocean"] {
  --bg-0: #061425;
  --bg-1: #0a2238;
  --bg-2: #103452;
  --border: #1f4c75;
  --border-glow: #29c4ff;
  --text-0: #ffffff;
  --text-1: #cbe7ff;
  --text-2: #7aa4cf;
  --text-3: #466a8c;
  --accent-0: #29c4ff;
  --accent-1: #7df5ff;
  --accent-grad: linear-gradient(135deg, #29c4ff 0%, #7df5ff 100%);
  --cta-text: #042032;
}

/* Light theme — newsroom / editorial. White surface with green accent
 * (a wink at Brazilian football pitches). Contrast pairs verified
 * against WCAG AA: text-0 #0a1424 on bg-1 #ffffff = 16.8:1; accent
 * #00a14b on bg-1 = 4.5:1 (large display only — body uses text-0/1).
 */
[data-theme="light"] {
  --bg-0: #eef2f6;
  --bg-1: #ffffff;
  --bg-2: #f1f5fa;
  --border: #d8e0ea;
  --border-glow: #00a14b;
  --text-0: #0a1424;
  --text-1: #2c3a52;
  --text-2: #5a6a85;
  --text-3: #8b97ad;
  --accent-0: #00a14b;
  --accent-1: #ffdf1c;
  --accent-grad: linear-gradient(135deg, #00a14b 0%, #00c25a 70%, #ffdf1c 130%);
  --cta-text: #0a1424;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Card frame --- */

.widget {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 380px;
  min-height: 460px;
  margin: 12px auto;
  padding: 18px 18px 16px;
  background: var(--bg-1);
  border: 1.5px solid var(--accent-0);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(139, 92, 255, 0.08),
    0 20px 50px -20px rgba(0, 0, 0, 0.6),
    0 0 60px -10px var(--border-glow);
  overflow: hidden;
}

.widget::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 16.5px;
  background:
    radial-gradient(circle at 80% -10%, rgba(139, 92, 255, 0.18) 0%, transparent 50%),
    radial-gradient(circle at -10% 110%, rgba(196, 106, 255, 0.10) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .widget {
  background: var(--bg-1);
  box-shadow:
    0 0 0 1px rgba(10, 20, 36, 0.04),
    0 18px 40px -22px rgba(10, 20, 36, 0.25),
    0 0 40px -16px rgba(0, 161, 75, 0.18);
}
[data-theme="light"] .widget::before {
  background:
    radial-gradient(circle at 80% -10%, rgba(0, 161, 75, 0.10) 0%, transparent 55%),
    radial-gradient(circle at -10% 110%, rgba(255, 223, 28, 0.10) 0%, transparent 50%);
}
[data-theme="light"] .team__crest {
  background: var(--bg-2);
  border-color: var(--border);
}
[data-theme="light"] .cta {
  color: #ffffff;
  box-shadow:
    0 10px 22px -10px rgba(0, 161, 75, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
[data-theme="light"] .head__round {
  background: rgba(0, 161, 75, 0.10);
  color: #00763a;
}
[data-theme="light"] .head__round--live {
  background: rgba(220, 38, 80, 0.12);
  color: #b51f3e;
}
[data-theme="light"] .foot {
  border-top-color: rgba(10, 20, 36, 0.08);
}
[data-theme="light"] .skel {
  background: linear-gradient(
    90deg,
    rgba(10, 20, 36, 0.05) 0%,
    rgba(10, 20, 36, 0.12) 50%,
    rgba(10, 20, 36, 0.05) 100%
  );
  background-size: 200% 100%;
}
[data-theme="light"] .fact__icon {
  background: var(--bg-2);
}

.widget > * { position: relative; z-index: 1; }

/* --- Skeleton (loading) --- */

.widget__skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.skel {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: 8px;
}
.skel--crest { width: 56px; height: 56px; border-radius: 50%; }
.skel--line { width: 70%; height: 14px; }
.skel--score { width: 50%; height: 36px; }
.skel--bar { width: 100%; height: 8px; }
.skel--cta { width: 100%; height: 56px; margin-top: auto; border-radius: 16px; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* --- Header (competition + round) --- */

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-2);
}
.head__comp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
}
.head__comp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 8px var(--accent-0);
}
.head__round {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(139, 92, 255, 0.12);
  color: var(--text-1);
}
.head__round--live {
  background: rgba(255, 59, 107, 0.18);
  color: #ffd0db;
  animation: pulseLive 1.6s ease-in-out infinite;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* --- Matchup row (home / vs / away) --- */

.matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 0 14px;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  min-width: 0;
}
.team__crest {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--border);
  display: grid; place-items: center;
  overflow: hidden;
  position: relative;
}
.team__crest img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.team__crest--fallback {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: 0.04em;
}
.team__name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team__abbr {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-0);
  letter-spacing: 0.02em;
}

.vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}
.vs__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-3);
}
.vs__score {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.vs__score-sep {
  color: var(--text-3);
  margin: 0 4px;
}

/* --- Status line (kickoff / live clock / final) --- */

.status-line {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  margin-bottom: 14px;
}
.status-line__strong {
  color: var(--text-0);
}
.status-line--live {
  color: #ffd0db;
}
.status-line--live::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(255, 59, 107, 0.6);
  animation: ringPulse 1.4s ease-out infinite;
  vertical-align: middle;
}
@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 107, 0.5); }
  100% { box-shadow: 0 0 0 10px rgba(255, 59, 107, 0); }
}

/* --- Headline (the prop / market / venue) --- */

.headline {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-0);
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: 0.005em;
}

/* --- Stat list (reasons / facts) --- */

.facts {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fact {
  display: grid;
  grid-template-columns: 18px 36px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-1);
  line-height: 1.35;
}
.fact__check {
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  color: var(--accent-0);
  font-weight: 900;
}
.fact__icon {
  display: grid;
  place-items: center;
  width: 36px; height: 24px;
  background: var(--bg-2);
  border: 1.5px solid var(--accent-0);
  border-radius: 6px;
  font-size: 13px;
}
.fact__text {
  color: var(--text-1);
}

/* --- Sparkbar (the rebound-style hit-rate strip from ref 2) --- */

.sparkbar {
  display: flex;
  gap: 3px;
  height: 8px;
  margin: 8px 0 10px;
  overflow: hidden;
}
.sparkbar__cell {
  flex: 1 0 auto;
  width: 3px;
  border-radius: 2px;
  opacity: 0.85;
}
.sparkbar__cell--hit { background: var(--ok); }
.sparkbar__cell--miss { background: var(--live); }
.sparkbar__cell--neutral { background: var(--text-3); opacity: 0.4; }

.sparklegend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-1);
  margin-bottom: 10px;
}
.sparklegend__strong {
  color: var(--ok);
  font-weight: 800;
  font-size: 13px;
}
.sparklegend__expand {
  color: var(--accent-0);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Countdown --- */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0;
  margin: 0 0 6px;
}
.cd__cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cd__num {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-0);
  letter-spacing: 0.04em;
  line-height: 1;
  /* faux LCD effect */
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.cd__lab {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- CTA --- */

.cta-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: var(--accent-grad);
  color: var(--cta-text);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
  box-shadow:
    0 8px 20px -8px rgba(139, 92, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cta:active { transform: translateY(0); filter: brightness(0.95); }

.cta__chev {
  display: inline-block;
  transition: transform 120ms ease;
}
.cta:hover .cta__chev { transform: translateX(2px); }

/* --- Error state --- */

.widget[data-state="error"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 24px;
  min-height: 320px;
}
.widget__err {
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.4;
}
.widget__err strong { color: var(--text-0); font-weight: 800; display: block; margin-bottom: 4px; }
.widget__err em { color: var(--text-3); font-style: normal; font-size: 11px; }

/* --- Footer / attribution --- */

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--text-1); }

/* --- Narrow viewport (embed in narrow column) --- */
@media (max-width: 360px) {
  .widget { padding: 14px 14px 12px; }
  .team__crest { width: 48px; height: 48px; }
  .vs__score { font-size: 24px; }
  .cta { padding: 12px 14px; font-size: 12px; }
}

/* --- Picks (1X2 / O-U / BTTS rows) --- */

.picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0;
}
.picks--stack { grid-template-columns: 1fr; gap: 10px; }
.picks--stack .picks { margin: 0; }

.picks__cap {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 6px;
}

.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: transform 120ms ease, border-color 120ms ease;
}
.pick:hover { transform: translateY(-1px); border-color: var(--accent-0); }

.pick__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.pick__odd {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.pick--fav {
  background: linear-gradient(180deg, rgba(139, 92, 255, 0.20) 0%, rgba(196, 106, 255, 0.10) 100%);
  border-color: var(--accent-0);
  box-shadow: 0 0 0 1px rgba(139, 92, 255, 0.35), 0 6px 18px -10px rgba(139, 92, 255, 0.55);
}
.pick--fav .pick__odd { color: var(--accent-1); }
[data-theme="light"] .pick--fav {
  background: linear-gradient(180deg, rgba(0, 161, 75, 0.16) 0%, rgba(255, 223, 28, 0.10) 100%);
}
[data-theme="light"] .pick--fav .pick__odd { color: #00763a; }

/* --- Score grid (exact-score variant) --- */

.scoregrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 6px;
}
.scorebox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 120ms ease, border-color 120ms ease;
}
.scorebox:hover { transform: translateY(-1px); border-color: var(--accent-0); }
.scorebox__score {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.scorebox__odd {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.scorebox--fav {
  background: linear-gradient(180deg, rgba(139, 92, 255, 0.22) 0%, rgba(196, 106, 255, 0.10) 100%);
  border-color: var(--accent-0);
  box-shadow: 0 0 0 1px rgba(139, 92, 255, 0.35), 0 6px 18px -10px rgba(139, 92, 255, 0.55);
}
.scorebox--fav .scorebox__odd { color: var(--accent-1); }
[data-theme="light"] .scorebox--fav {
  background: linear-gradient(180deg, rgba(0, 161, 75, 0.16) 0%, rgba(255, 223, 28, 0.10) 100%);
}
[data-theme="light"] .scorebox--fav .scorebox__odd { color: #00763a; }

/* --- Scorer list (anytime goal scorer variant) --- */

.scorers {
  list-style: none;
  margin: 6px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scorer {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform 120ms ease, border-color 120ms ease;
}
.scorer:hover { transform: translateX(2px); border-color: var(--accent-0); }
.scorer__rank {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.scorer__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scorer__odd {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.scorer--fav {
  background: linear-gradient(90deg, rgba(139, 92, 255, 0.22) 0%, rgba(196, 106, 255, 0.06) 100%);
  border-color: var(--accent-0);
}
.scorer--fav .scorer__name { color: var(--accent-1); }
[data-theme="light"] .scorer--fav {
  background: linear-gradient(90deg, rgba(0, 161, 75, 0.18) 0%, rgba(255, 223, 28, 0.06) 100%);
}
[data-theme="light"] .scorer--fav .scorer__name { color: #00763a; }

/* --- Bookmaker line + no-odds hint --- */

.bookline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bookline__lab { color: var(--text-3); font-weight: 700; }
.bookline__name { color: var(--text-1); font-weight: 800; }

.noodds {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  margin: 8px 0;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-2);
  font-size: 12px;
  text-align: center;
}
.noodds__icon { font-size: 18px; }

/* --- Formation line (lineup variant) --- */

.formation-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.formation-line__side {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1 1 0;
}
.formation-line__side--right { justify-content: flex-end; }
.formation-line__side strong {
  color: var(--text-0);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.formation-line__form {
  color: var(--accent-1);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}
.formation-line__sep { color: var(--text-3); }
.formation-line__vs {
  flex: 0 0 auto;
  color: var(--text-3);
  font-weight: 800;
}

/* --- Pitch (lineup variant) --- */

.pitch {
  position: relative;
  width: 100%;
  height: 260px;
  margin: 8px 0;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(34, 139, 80, 0.85) 0%, rgba(28, 110, 64, 0.85) 50%, rgba(34, 139, 80, 0.85) 100%),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0 24px, transparent 24px 48px);
  border: 1px solid var(--border);
}
.pitch__halfline {
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px dashed rgba(255, 255, 255, 0.45);
}
.pitch__center-circle {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.pitch__box {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.pitch__box--top    { top: 0; border-top: 0; border-radius: 0 0 8px 8px; }
.pitch__box--bottom { bottom: 0; border-bottom: 0; border-radius: 8px 8px 0 0; }

.pitch__dot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 60px;
  pointer-events: none;
}
.pitch__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 2px solid #fff;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.pitch__dot--home .pitch__num { background: var(--accent-0); color: var(--cta-text); border-color: rgba(255, 255, 255, 0.85); }
.pitch__dot--away .pitch__num { background: var(--bg-2); color: var(--text-0); border-color: rgba(255, 255, 255, 0.85); }
.pitch__name {
  font-size: 8.5px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
  letter-spacing: 0;
}

/* --- Coach row (lineup variant) --- */

.coachrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.coach {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.coach--right { flex-direction: row-reverse; text-align: right; }
.coach__photo {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--border);
}
.coach__meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.coach__lab {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--text-3);
  font-weight: 800;
  text-transform: uppercase;
}
.coach__name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Timeline (events variant) --- */

.timeline {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.timeline__row {
  display: grid;
  grid-template-columns: 36px 22px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left-width: 3px;
}
.timeline__row--home { border-left-color: var(--accent-0); }
.timeline__row--away { border-left-color: var(--text-2); }
.timeline__row--goal { background: linear-gradient(90deg, rgba(139, 92, 255, 0.22) 0%, rgba(196, 106, 255, 0.06) 100%); border-color: var(--accent-0); }
.timeline__row--red  { background: linear-gradient(90deg, rgba(220, 38, 80, 0.22) 0%, rgba(220, 38, 80, 0.05) 100%); }
[data-theme="light"] .timeline__row--goal { background: linear-gradient(90deg, rgba(0, 161, 75, 0.18) 0%, rgba(255, 223, 28, 0.06) 100%); }
.timeline__min {
  font-size: 11px;
  font-weight: 900;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.timeline__icon { font-size: 14px; line-height: 1; text-align: center; }
.timeline__body { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.timeline__title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline__sub {
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Star list (stats variant) --- */

.starlist {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.starlist__row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.starlist__row--fav {
  background: linear-gradient(90deg, rgba(139, 92, 255, 0.22) 0%, rgba(196, 106, 255, 0.06) 100%);
  border-color: var(--accent-0);
}
[data-theme="light"] .starlist__row--fav {
  background: linear-gradient(90deg, rgba(0, 161, 75, 0.18) 0%, rgba(255, 223, 28, 0.06) 100%);
}
.starlist__photo {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-0);
  border: 1px solid var(--border);
}
.starlist__photo--fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 800;
}
.starlist__meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.starlist__head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.starlist__crest { width: 14px; height: 14px; object-fit: contain; flex: 0 0 auto; }
.starlist__name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.starlist__sub {
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.starlist__rating {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* --- Player spotlight (player variant) --- */

.phero {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(139, 92, 255, 0.10) 100%);
  border: 1px solid var(--accent-0);
  border-radius: 14px;
  margin: 8px 0 6px;
}
[data-theme="light"] .phero {
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(0, 161, 75, 0.12) 100%);
}
.phero__photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-0);
  background: var(--bg-0);
}
.phero__photo--fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-0);
  font-size: 22px;
  font-weight: 900;
}
.phero__meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.phero__name {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-0);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phero__sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-2);
  font-weight: 600;
}
.phero__crest { width: 16px; height: 16px; object-fit: contain; }
.phero__dot { color: var(--text-3); }
.phero__rating {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0;
}
.phero__rating-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-1);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
[data-theme="light"] .phero__rating-num { color: #00763a; }
.phero__rating-lab {
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  font-weight: 800;
  text-transform: uppercase;
}

.pstats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 4px 0 6px;
}
.pstats__cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pstats__lab {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  font-weight: 800;
  text-transform: uppercase;
}
.pstats__val {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
}

.pmatch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-1);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}
.pmatch__sub { color: var(--text-3); font-weight: 500; font-size: 10px; text-overflow: ellipsis; overflow: hidden; }

/* --- League table (standings variant) --- */

.headline--centered { text-align: center; }

.table {
  list-style: none;
  margin: 6px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.table__head, .table__row {
  display: grid;
  grid-template-columns: 28px 1fr 28px 36px 36px;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
}
.table__head {
  background: var(--bg-0);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-3);
  text-transform: uppercase;
}
.table__row { background: var(--bg-2); border-top: 1px solid var(--border); }
.table__row:first-child { border-top: 0; }

.table__col { font-size: 12px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table__col--rank {
  font-weight: 900;
  color: var(--text-2);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.table__col--team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.table__col--num { text-align: center; font-variant-numeric: tabular-nums; }
.table__col--pts { color: var(--text-0); font-weight: 900; }
.table__crest { width: 16px; height: 16px; object-fit: contain; flex: 0 0 auto; }
.table__teamname {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table__row--liber { box-shadow: inset 3px 0 0 #29c4ff; }
.table__row--sula  { box-shadow: inset 3px 0 0 #f59e0b; }
.table__row--rel   { box-shadow: inset 3px 0 0 #dc2650; }

.tlegend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
  justify-content: center;
}
.tlegend__chip {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.tlegend__chip--liber { background: rgba(41, 196, 255, 0.10); color: #b7e9ff; border-color: rgba(41, 196, 255, 0.4); }
.tlegend__chip--sula  { background: rgba(245, 158, 11, 0.12); color: #ffd991; border-color: rgba(245, 158, 11, 0.4); }
.tlegend__chip--rel   { background: rgba(220, 38, 80, 0.12); color: #ffd0db; border-color: rgba(220, 38, 80, 0.4); }
[data-theme="light"] .tlegend__chip--liber { color: #0073a8; }
[data-theme="light"] .tlegend__chip--sula  { color: #8b5a00; }
[data-theme="light"] .tlegend__chip--rel   { color: #a8123a; }
