/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE - index / front-page
   Page-specific styles for the club landing page.
   Loaded conditionally on the home route only.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Card variant ── */
.card--grey {
  background: #f7f7f7;
  border: 1.5px solid var(--border);
}

/* ══════════════════════════════════════
   NEWS / HERO SLIDER
   ══════════════════════════════════════ */
.news-card {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 480px;
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
}

.news-slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover !important;
  background-position: center;
  background-position-y: top !important;
  transform: scale(1);
  transition: transform 9s ease;
}

.slide.is-active .slide__bg {
  transform: scale(1.05);
}

.slide__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 18, 38, 0.95) 0%,
    rgba(10, 18, 38, 0.35) 55%,
    transparent 100%
  );
}

.slide__body {
  position: absolute;
  bottom: 72px;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 0 64px;
}

.slide__cat {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f0b429;
  border-bottom: 1px solid rgba(240, 180, 41, 0.5);
  padding-bottom: 2px;
  margin-bottom: 12px;
}

.slide__date {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

.slide__title {
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-white);
  margin-bottom: 10px;
  max-width: 820px;
}

.slide__excerpt {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
}

.news-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 64px;
  background: linear-gradient(transparent, rgba(8, 14, 32, 0.6));
}

.ctrl-arrow {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition:
    color 0.15s,
    background 0.15s;
}

.ctrl-arrow:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.1);
}

.ctrl-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill {
  height: 3px;
  border-radius: 99px;
  width: 18px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: width 0.3s;
}

.pill.is-active {
  width: 44px;
}

.pill.is-active::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--text-white);
  border-radius: 99px;
  animation: pfill var(--dur, 5500ms) linear forwards;
}

@keyframes pfill {
  to {
    width: 100%;
  }
}

.ctrl-counter {
  position: absolute;
  right: 20px;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════
   SPONSORS TICKER
   ══════════════════════════════════════ */
.powered-card {
  padding: 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card);
  border-radius: var(--r);
  border: 1.5px solid var(--border);
}

.powered-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.powered-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.powered-all {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-dim);
  transition: color 0.15s;
}

.powered-all svg {
  height: 14px;
}

.powered-all:hover {
  color: var(--ink);
}

.ticker-wrap {
  align-items: center;
  display: inline-flex;
  position: relative;
  overflow: hidden;
  height: 52px;
}

.ticker-wrap::before,
.ticker-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.ticker-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--card), transparent);
}

.ticker-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--card), transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  will-change: transform;
}

/* Motion + hover-pause are driven by the Web Animations API in
   home-slider.js (see initTicker), including prefers-reduced-motion. */

/* Wraps a logo pair when the partner has a website — takes over the
   ticker-track flex-item role (flex-shrink) from .sponsor-logo so the
   link hugs the image instead of stretching to fill the row. */
.sponsor-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.sponsor-logo {
  height: 32px;
  max-width: 90px;
  filter: invert(0.75) opacity(0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: filter 0.2s;
  object-fit: contain;
  cursor: pointer;
}

.sponsor-logo:hover {
  filter: invert(0.75) opacity(1);
}

/* ══════════════════════════════════════
   NEXT GAME CARD
   ══════════════════════════════════════ */
.nextgame-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.ng-eyebrow {
  grid-column: 1/-1;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ng-eyebrow::before,
.ng-eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ng-team {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ng-team--home {
  align-items: flex-end;
  text-align: right;
}

.ng-team--away {
  align-items: flex-start;
}

.ng-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

.ng-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ng-city {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ng-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ng-score {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--card);
}

.ng-datetime {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: #f0b429;
  padding: 4px 14px;
  border-radius: 99px;
  white-space: nowrap;
}

.ng-meta {
  grid-column: 1/-1;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ng-ticket {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f0b429;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(240, 180, 41, 0.3);
  padding-bottom: 1px;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.ng-ticket:hover {
  color: var(--card);
  border-color: rgba(255, 255, 255, 0.3);
}

.ng-ticket svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s;
}

.ng-ticket:hover svg {
  transform: translateX(3px);
}

.ng-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.ng-season-over {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  padding: 24px 0;
}

/* ── Actions row ── */
.ng-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
}

.ng-action-btn {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.ng-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.ng-action-btn--primary {
  background: var(--gold);
  color: var(--navy);
  border-color: transparent;
}

.ng-action-btn--primary:hover {
  background: #f8c84a;
  color: var(--navy);
}

.ng-action-btn svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s;
}

.ng-action-btn:hover svg {
  transform: translateX(3px);
}

/* ── Game Center toggle ── */
.ng-gamecenter-toggle {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
  flex-shrink: 0;
}

.ng-gamecenter-toggle:hover {
  color: rgba(255, 255, 255, 0.65);
}

.ng-gamecenter-toggle svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s;
}

.ng-gamecenter-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ── Game Center panel ── */
.ng-gamecenter {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.ng-gamecenter.is-open {
  grid-template-rows: 1fr;
}

.ng-gamecenter__inner {
  overflow: hidden;
}

.ng-gamecenter__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.ng-gc-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ng-gc-item__label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.ng-gc-item__value {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* ══════════════════════════════════════
   ENERGY / PROMO CARD
   ══════════════════════════════════════ */
.energy-card {
  background: var(--green);
  border-radius: var(--r);
  padding: 56px 64px;
  color: var(--card);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
  position: relative;
  overflow: hidden;
}

.energy-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.energy-tag::before {
  content: "";
  width: 20px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.energy-title {
  font-size: clamp(1.4rem, 2.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-white);
  margin-bottom: 12px;
}

.energy-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
  max-width: 480px;
  margin-bottom: 24px;
}

.energy-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s;
  margin-top: 8px;
}

.energy-link svg {
  transition: transform 0.18s;
}

.energy-link:hover {
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.7);
}

.energy-link:hover svg {
  transform: translateX(3px);
}

.energy-partner {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 32px 28px;
  backdrop-filter: blur(4px);
}

.energy-partner__label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.energy-partner__logo {
  height: 64px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* ══════════════════════════════════════
   LEAGUE TABLE
   ══════════════════════════════════════ */
.table-card {
  overflow: hidden;
  padding: 0;
}

.table-card__header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-card__title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.table-card__season {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-dim);
}

.table-scroll-wrap {
  overflow-x: auto;
  scrollbar-width: none;
}

.table-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.league-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 280px;
}

.league-table th {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 10px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.league-table th:first-child,
.league-table th.st-logo-th,
.league-table th.st-team-th {
  text-align: left;
}

.league-table td {
  padding: 12px 16px;
  font-size: 0.82rem;
  text-align: center;
  border-bottom: 1px solid #f5f5f5;
}

.st-rank {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--ink-dim);
  text-align: center !important;
  width: 32px;
  position: relative;
}

.rank-home-playoff .st-rank {
  box-shadow: inset 3px 0 0 #1a6b3a;
}

.rank-away-playoff .st-rank {
  box-shadow: inset 3px 0 0 #2563eb;
}

.rank-pre-playoff .st-rank {
  box-shadow: inset 3px 0 0 #f0b429;
}

.st-logo {
  width: 36px;
  padding: 8px 4px 8px 16px !important;
}

.st-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.st-team {
  text-align: left !important;
  font-weight: 600;
}

.st-team-long {
  display: inline;
}

.st-team-short {
  display: none;
  font-size: 0.78rem;
}

.league-table tr.is-us,
.league-table tr.is-allied {
  background: rgba(15, 30, 60, 0.04);
}

.league-table tr.is-us td,
.league-table tr.is-allied td {
  font-weight: 700;
}

.league-table tr.is-us .st-team,
.league-table tr.is-allied .st-team {
  color: var(--navy);
}

.st-points {
  font-weight: 800;
  color: var(--ink);
}

.league-table tr.is-us .st-points,
.league-table tr.is-allied .st-points {
  font-weight: 800;
}

.pts {
  font-weight: 800;
  color: var(--ink);
}

/* ── Responsive standings columns ── */
/* Base: keep identity columns only (rank/logo/team) */
.st-points,
.st-games,
.st-win,
.st-loss,
.st-gd,
.st-gf,
.st-ga,
.st-ot,
.st-gpg {
  display: none;
}

.st-gd-value {
  font-weight: 400;
}

.league-table tr.is-us .st-gd,
.league-table tr.is-us .st-gd-value,
.league-table tr.is-allied .st-gd,
.league-table tr.is-allied .st-gd-value {
  font-weight: 700;
}

/* Order of importance (small -> large): Pkt, Sp, S/N, +/-, T+/T-, OT, GPG */
@media (min-width: 320px) {
  .st-points {
    display: table-cell;
  }
}

@media (min-width: 340px) {
  .st-games {
    display: table-cell;
  }
}

@media (min-width: 360px) {
  .st-win,
  .st-loss {
    display: table-cell;
  }
}

@media (min-width: 375px) {
  .st-gd {
    display: table-cell;
  }
}

@media (min-width: 768px) {
  .st-gf,
  .st-ga {
    display: table-cell;
  }
}

@media (min-width: 992px) {
  .st-ot {
    display: table-cell;
  }
}

@media (min-width: 1200px) {
  .st-gpg {
    display: table-cell;
  }
}

@media (max-width: 430px) {
  .league-table th,
  .league-table td {
    padding: 10px 8px;
    font-size: 0.74rem;
  }

  .st-logo {
    padding: 8px 4px 8px 8px !important;
  }

  .st-team-logo {
    width: 22px;
    height: 22px;
  }
}

.table-fade {
  position: relative;
}

/* ── Tab bar ── */
.table-card__tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scroll-padding-left: 32px;
  scrollbar-width: none; /* Firefox */
}

.table-card__tabs::-webkit-scrollbar {
  display: none;
}

.table-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 18px 0;
  margin-right: 28px;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.table-tab:hover {
  color: var(--ink);
}

.table-tab.is-active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.table-tab.is-hidden {
  display: none;
}

/* ── Panels ── */
.table-panel--hidden {
  display: none;
}

/* ── Playoff phases ── */
.playoff-phase {
  padding: 20px 32px 16px;
  border-top: 1px solid var(--border);
}

.playoff-phase:first-child {
  border-top: none;
}

.playoff-phase__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.playoff-phase__label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.phase-toggle {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}

.phase-toggle:hover {
  color: var(--ink);
}

.playoff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

/* ── Encounter card ── */
.encounter-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.encounter-card.is-us {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.encounter-card__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 12px;
  gap: 8px;
}

.enc-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.enc-team--right {
  align-items: center;
}

.enc-team__logo-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enc-team__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: filter 0.15s;
}

.enc-team__logo--loser {
  filter: grayscale(1) opacity(0.3);
}

.enc-team__tbd {
  width: 36px;
  height: 36px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
}

.enc-team__name {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

.enc-team__name--winner {
  color: var(--navy);
}

.enc-score {
  text-align: center;
  flex-shrink: 0;
}

.enc-score__val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.enc-score__meta {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 3px;
}

.enc-score__val--pending {
  color: var(--ink-dim);
  font-size: 1rem;
}

/* ── Encounter game rows ── */
.enc-games {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}

.enc-games.is-open {
  display: block;
}

.enc-game-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #f5f5f5;
}

.enc-game-row:last-child {
  border-bottom: none;
}

.enc-game-team {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}

.enc-game-team--right {
  text-align: right;
}

.enc-game-score {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 8px;
  white-space: nowrap;
}

.enc-game-score--ot::after {
  content: " OT";
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.enc-game-score--so::after {
  content: " SO";
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

/* ── Playoff TBD stub ── */
.playoff-tbd-note {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-dim);
  padding: 8px 0 4px;
}

/* ── Info box ── */
.playoff-info {
  margin: 16px 32px 24px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.playoff-info__toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}

.playoff-info__toggle:hover {
  color: var(--ink);
  background: var(--ink-faint);
}

.playoff-info__toggle svg {
  flex-shrink: 0;
  transition: transform 0.18s;
}

.playoff-info__toggle.is-open svg {
  transform: rotate(180deg);
}

.playoff-info__body {
  display: none;
  padding: 18px;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
}

.playoff-info__body.is-open {
  display: block;
}

.playoff-info__body p {
  margin: 0 0 10px;
}

.playoff-info__body p:last-child {
  margin: 0;
}

/* ── Qualification legend ── */
.table-legend {
  display: flex;
  gap: 20px;
  padding: 12px 32px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .table-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 16px;
  }
}

.table-legend__item {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-legend__item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.table-legend__item--green::before {
  background: #1a6b3a;
}

.table-legend__item--blue::before {
  background: #2563eb;
}

.table-legend__item--amber::before {
  background: #f0b429;
}

/* ══════════════════════════════════════
   PARTNERS (HOME)
   ══════════════════════════════════════ */
.partners-card {
  padding: 48px 52px;
  gap: 20px;
}

.partners-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.partners-header__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}

.partners-header__line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* .partner-tier {
  margin-bottom: 44px;
} */

.partner-tier:last-child {
  margin-bottom: 0;
}

.partner-tier__label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.partner-tier__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Tier grids (width-driven, set per category in the plugin admin) ── */
.partner-grid {
  display: grid;
  gap: 12px;
}

.partner-grid--fullwide {
  grid-template-columns: 1fr;
  gap: 16px;
}

.partner-grid--wide {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.partner-grid--normal {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.partner-grid--narrow {
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

/* fullwide inherits the former single-card .partner-hauptsponsor treatment.
   Height and logo size are fixed and identical on desktop and mobile.
   Selectors are chained with .partner-item (not just the modifier class alone)
   so they reliably outrank the base .partner-item rules below regardless of
   source order — a bare .partner-item--fullwide has the same specificity as
   .partner-item and would otherwise lose to whichever is declared later. */
.partner-item.partner-item--fullwide {
  padding: 24px 48px;
  border-radius: 12px;
  min-height: 100px;
}

.partner-item.partner-item--fullwide img {
  max-height: 70px;
  max-width: 100%;
}

.partner-item.partner-item--wide {
  min-height: 90px;
  padding: 20px 24px;
}

.partner-item.partner-item--wide img {
  max-height: 50px;
}

.partner-item {
  background: #fafafa;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  transition:
    border-color 0.2s,
    background 0.2s;
  cursor: pointer;
}

.partner-item:hover {
  border-color: var(--ink-dim);
  background: #f0f0f0;
}

.partner-item img {
  max-height: 48px;
  max-width: 80%;
  width: auto;
  object-fit: contain;
  filter: invert(0.75) opacity(0.75);
  transition: filter 0.2s;
}

.partner-item:hover img {
  filter: invert(0.75) opacity(1);
}

/* ══════════════════════════════════════
   BOTTOM BAR
   ══════════════════════════════════════ */
.bottom-bar {
  background: var(--bg);
  border-radius: var(--r);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.bottom-copy {
  font-size: 0.68rem;
  color: var(--ink-dim);
}

.bottom-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.bottom-links a {
  font-size: 0.68rem;
  color: var(--ink-dim);
  transition: color 0.15s;
}

.bottom-links a:hover {
  color: var(--ink);
}

/* ══════════════════════════════════════
   AD / PROMO STRIP
   ══════════════════════════════════════ */
.promo-strip {
  background: var(--navy);
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  flex-shrink: 0;
}

.promo-strip__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.promo-strip__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
color: var(--text-white);
  line-height: 1.2;
}

.promo-strip__sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1px;
}

.promo-strip__cta {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: #f0b429;
  padding: 11px 22px;
  border-radius: 10px;
  transition: background 0.15s;
  white-space: nowrap;
}

.promo-strip__cta:hover {
  background: #e0a820;
}

.promo-strip__cta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.promo-strip__cta:hover svg {
  transform: translateX(3px);
}

@keyframes ad-cta-jiggle {
  0%,
  55%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  60% {
    transform: scale(1.07) rotate(-4deg);
  }
  67% {
    transform: scale(1.07) rotate(4deg);
  }
  74% {
    transform: scale(1.05) rotate(-3deg);
  }
  81% {
    transform: scale(1.05) rotate(3deg);
  }
  88% {
    transform: scale(1.02) rotate(-1deg);
  }
  94% {
    transform: scale(1.02) rotate(1deg);
  }
}

.promo-strip__cta.is-jiggle {
  animation: ad-cta-jiggle 2.8s ease-in-out infinite;
}

.promo-strip__cta:hover {
  animation: none;
}

/* ══════════════════════════════════════
   MODAL
   ══════════════════════════════════════ */
.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(21, 21, 21, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 16px;
}

.modal-bg.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 44px;
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-bg.open .modal {
  transform: translateY(0);
}

.modal::-webkit-scrollbar {
  display: none;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--ink);
}

/* ══════════════════════════════════════
   RESPONSIVE - HOME
   ══════════════════════════════════════ */

/* ── Tablet ≤ 900px ── */
@media (max-width: 900px) {
  body.rebels-fse-home .content > .news-card {
    order: -2;
    max-height: calc(100vh - 120px);
    width: 100%;
  }

  body.rebels-fse-home .content > .promo-strips {
    order: -1;
  }

  .slide__body {
    padding: 0 32px;
    bottom: 64px;
  }

  .slide.is-active .slide__bg {
    transform: scale(1);
  }

  .news-controls {
    padding: 0 32px;
  }

  .nextgame-card {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .ng-eyebrow {
    font-size: 0.52rem;
  }

  .ng-team--home {
    align-items: center;
    text-align: center;
  }

  .ng-team--away {
    align-items: center;
    text-align: center;
  }

  .ng-teams-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    width: 100%;
  }

  .ng-score {
    font-size: 2.4rem;
  }

  .energy-card {
    grid-template-columns: 1fr;
    padding: 48px 36px;
    gap: 32px;
  }

  .energy-partner {
    flex-direction: row;
    justify-content: flex-start;
    padding: 20px 24px;
  }

  .energy-partner__logo {
    height: 44px;
  }

  .partners-card {
    padding: 36px 28px;
  }

  .partner-grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }

  .partner-grid--normal {
    grid-template-columns: repeat(3, 1fr);
  }

  .partner-grid--narrow {
    grid-template-columns: repeat(4, 1fr);
  }

  .powered-card {
    padding: 24px 28px;
  }
}

/* ── Mobile ≤ 580px ── */
@media (max-width: 580px) {
  .news-card {
    aspect-ratio: auto;
    height: calc(100vh - var(--nav-h) - var(--frame) * 2);
  }

  .slide__body {
    padding: 0 20px;
    bottom: 56px;
  }

  .slide__title {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }

  .slide__excerpt {
    display: none;
  }

  .news-controls {
    padding: 0 16px;
  }

  .ctrl-counter {
    right: 8px;
  }

  .powered-card {
    padding: 20px;
  }

  .powered-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .powered-all {
    font-size: 0.7rem;
  }

  .nextgame-card {
    gap: 16px;
  }

  .ng-name {
    font-size: 0.95rem;
  }

  .ng-score {
    font-size: 2rem;
  }

  .ng-meta {
    flex-direction: column;
    gap: 10px;
    font-size: 0.62rem;
  }

  .ng-actions {
    gap: 6px;
  }

  .ng-gamecenter-toggle {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2px;
  }

  .ng-gamecenter__body {
    gap: 16px 28px;
  }

  .energy-card {
    padding: 36px 24px;
  }

  .energy-partner {
    padding: 16px 20px;
  }

  .energy-partner__logo {
    height: 36px;
  }

  .table-card__tabs {
    padding: 0 20px;
    scroll-padding-left: 20px;
  }

  .playoff-phase {
    padding: 16px 20px 12px;
  }

  .playoff-grid {
    grid-template-columns: 1fr 1fr;
  }

  .playoff-info {
    margin: 12px 20px 20px;
  }

  .partners-card {
    padding: 20px 14px;
  }

  .partner-item.partner-item--fullwide {
    padding: 20px 16px;
  }

  /* Every sponsor logo is exported on the same 650×200 canvas. 4 columns of
     that on a ~375px phone leaves very little width no matter what — padding
     and gaps are cut to the minimum that still reads as a card, to give the
     logo as much of that width as possible. */
  .partner-grid--wide {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .partner-grid--wide .partner-item {
    padding: 14px 10px;
    min-height: 72px;
  }

  .partner-grid--normal {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .partner-grid--narrow {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .partner-item {
    padding: 16px 10px;
  }

  .partner-grid--normal .partner-item {
    padding: 10px 6px;
    min-height: 64px;
  }

  .partner-grid--narrow .partner-item {
    padding: 6px 4px;
    min-height: 52px;
    border-radius: 8px;
  }

  .partner-grid--narrow .partner-item img {
    max-height: 34px;
    max-width: 92%;
  }

  .bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 12px;
  }

  .promo-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
  }

  .promo-strip__cta {
    width: 100%;
    justify-content: center;
  }

  .st-team-long {
    display: none;
  }

  .st-team-short {
    display: inline;
  }
}

/* ── Very small ≤ 380px ── */
@media (max-width: 380px) {
  .partner-grid--normal,
  .partner-grid--narrow {
    grid-template-columns: 1fr 1fr;
  }

  .ng-name {
    font-size: 0.85rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Performance graph (Formkurve) panel
   ───────────────────────────────────────────────────────────────────────────── */

#performance-panel {
  padding: 20px 24px 24px;
}

.perf-chart-wrap {
  position: relative;
  width: 100%;
}

#performance-chart {
  display: block;
  width: 100% !important;
  height: 340px !important;
}

.perf-no-data {
  text-align: center;
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  padding: 24px 0;
}

/* ── Mobile week selection bar (hidden on desktop) ── */
.perf-week-bar {
  display: none;
}

@media (max-width: 600px) {
  .perf-week-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    /* background: var(--navy-faint, rgba(15, 30, 60, 0.07)); */
    border-radius: 8px;
    margin-bottom: 10px;
  }
}

.perf-week-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border, #e4e4e4);
  border-radius: 8px;
  background: var(--card, var(--card));
  color: var(--ink, #151515);
  font-size: 0.7rem;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}

.perf-week-btn:hover:not(:disabled) {
  background: var(--ink-faint, #eeeeee);
}

.perf-week-btn:disabled {
  color: var(--ink-dim, #b3b3b3);
  border-color: var(--ink-faint, #eeeeee);
  cursor: default;
}

.perf-week-label {
  font-weight: 700;
  font-size: 0.78rem;
  min-width: 72px;
  text-align: center;
  color: var(--ink, #151515);
}

/* ── Legend ── */
.perf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.perf-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary, #6b7280);
  line-height: 1;
}

.perf-legend__item--us {
  font-weight: 700;
  color: var(--text-primary, #141e3c);
  order: -1; /* Always first */
}

.perf-legend__swatch {
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  #performance-panel {
    padding: 12px;
  }

  #performance-chart {
    height: 260px !important;
  }

  .perf-legend {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 4px 8px;
  }

  .perf-legend__item {
    font-size: 0.68rem;
  }

  .perf-tooltip {
    min-width: 0;
    max-width: calc(100vw - 24px);
    white-space: normal;
  }
}

/* ── External tooltip ── */
.perf-tooltip {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  background: var(--card, var(--card));
  border: 1px solid var(--border, #e4e4e4);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 7px 11px 8px;
  font-family: inherit;
  font-size: 0.72rem;
  white-space: nowrap;
  width: max-content;
  display: none;
}

.perf-tooltip__title {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim, #b3b3b3);
  margin-bottom: 5px;
}

.perf-tooltip__grid {
  display: block;
}

.perf-tooltip__row {
  display: flex;
  align-items: center;
  gap: 5px;
  break-inside: avoid;
  color: var(--ink, #151515);
  line-height: 1.55;
}

.perf-tooltip__row--us {
  color: var(--gold, #f0b429);
  font-weight: 700;
}

.perf-tooltip__pos {
  color: var(--ink-dim, #b3b3b3);
  font-size: 0.65rem;
  min-width: 22px;
  font-variant-numeric: tabular-nums;
}

.perf-tooltip__row--us .perf-tooltip__pos {
  color: var(--gold, #f0b429);
}

/* ── Topscorer table ──────────────────────────────────────────────────────── */
.ts-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 280px;
}

.ts-table th {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 10px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.ts-table td {
  padding: 12px 16px;
  font-size: 0.82rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

/* Rank column */
.ts-table th.ts-rank,
.ts-table td.ts-rank {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--ink-dim);
  text-align: center;
  width: 32px;
}

/* Photo column */
.ts-table th.ts-photo,
.ts-table td.ts-photo {
  width: 36px;
  padding: 4px 4px 4px 4px;
}

/* Team column – tight right padding toward photo */
.ts-table th.ts-team,
.ts-table td.ts-team {
  padding-left: 6px;
  padding-right: 4px;
}

.ts-photo__img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.ts-photo__placeholder {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
}

/* Name column – left-aligned like .st-team */
.ts-table th.ts-name,
.ts-table td.ts-name {
  text-align: left;
  font-weight: 600;
}

.ts-nation {
  font-weight: 400;
  opacity: 0.55;
  font-size: 0.85em;
}

/* Team column */
.ts-table th.ts-team,
.ts-table td.ts-team {
  text-align: left;
  color: var(--ink-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Stat columns */
.ts-table th.ts-num,
.ts-table td.ts-num {
  font-variant-numeric: tabular-nums;
}

/* Points column – bold like .st-points */
.ts-table th.ts-pts,
.ts-table td.ts-pts {
  font-weight: 800;
  color: var(--ink);
}

/* Our team row – mirrors .league-table tr.is-us */
.ts-row--us {
  background: rgba(15, 30, 60, 0.04);
}

.ts-row--us td {
  font-weight: 700;
}

.ts-row--us .ts-name {
  color: var(--navy);
}

.ts-row--us .ts-pts {
  font-weight: 800;
}

/* Loading / empty state */
.ts-loading,
.ts-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--ink-dim);
  font-size: 0.82rem;
}

/* Responsive – progressive column reveal, mirrors standings ladder */
/* Base (all widths): rank / photo / name / Pkt always visible */
.ts-table .ts-pos,
.ts-table .ts-team,
.ts-table .ts-sp,
.ts-table .ts-g,
.ts-table .ts-a,
.ts-table .ts-pm,
.ts-table .ts-sog,
.ts-table .ts-pim {
  display: none;
}

/* 320 px: + T (goals) */
@media (min-width: 320px) {
  .ts-table .ts-g {
    display: table-cell;
  }
}

/* 360 px: + A (assists) */
@media (min-width: 360px) {
  .ts-table .ts-a {
    display: table-cell;
  }
}

/* 430 px: + Team */
@media (min-width: 430px) {
  .ts-table .ts-team {
    display: table-cell;
  }
}

/* 520 px: + +/- */
@media (min-width: 520px) {
  .ts-table .ts-pm {
    display: table-cell;
  }
}

/* 640 px: + Pos */
@media (min-width: 640px) {
  .ts-table .ts-pos {
    display: table-cell;
  }
}

/* 768 px: + Sp (games played) */
@media (min-width: 768px) {
  .ts-table .ts-sp {
    display: table-cell;
  }
}

/* 900 px: + SOG */
@media (min-width: 900px) {
  .ts-table .ts-sog {
    display: table-cell;
  }
}

/* 1024 px: + Str (penalty minutes) */
@media (min-width: 1024px) {
  .ts-table .ts-pim {
    display: table-cell;
  }
}

@media (max-width: 430px) {
  .ts-table th,
  .ts-table td {
    padding: 10px 8px;
    font-size: 0.74rem;
  }

  .ts-table th.ts-photo,
  .ts-table td.ts-photo {
    padding: 8px 4px 8px 8px;
  }

  .ts-photo__img,
  .ts-photo__placeholder {
    width: 22px;
    height: 22px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   MATCH SCHEDULE STRIP (index page)
   Horizontal scroll row of compact match cards.
═══════════════════════════════════════════════════════════════════ */

.upcoming-strip {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.upcoming-strip::-webkit-scrollbar {
  display: none;
}

/* ── Strip controls (arrows + scrollbar) ── */
.strip-controls {
  display: none; /* hidden on mobile */
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 900px) {
  .strip-controls {
    display: flex;
  }
}

.strip-ctrl-arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
}

.strip-ctrl-arrow:hover {
  color: var(--ink);
  background: var(--surface-2, #f5f5f7);
  border-color: var(--border-hover, #ccc);
}

.strip-ctrl-arrow:disabled {
  color: #aeb4bf;
  border-color: #dfe3ea;
  background: #f7f8fa;
  cursor: default;
  pointer-events: none;
}

.strip-ctrl-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.strip-scrollbar {
  flex: 1;
  height: 20px;
  border-radius: 99px;
  position: relative;
  cursor: pointer;
}

/* Visual-only track line centred inside the larger hit area */
.strip-scrollbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  border-radius: 99px;
  background: var(--border, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.strip-scrollbar__thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  border-radius: 99px;
  background: var(--ink-dim, rgba(0, 0, 0, 0.35));
  transition:
    width 0.08s linear,
    background 0.15s;
  cursor: grab;
}

/* Invisible expanded hit area around the thumb */
.strip-scrollbar__thumb::before {
  content: "";
  position: absolute;
  inset: -9px 0;
}

.strip-scrollbar__thumb:hover {
  background: var(--ink, rgba(0, 0, 0, 0.6));
}

.strip-scrollbar__thumb:active,
.strip-scrollbar__thumb.is-dragging {
  cursor: grabbing;
  background: var(--ink, rgba(0, 0, 0, 0.6));
  transition: none;
}

/* ── Base card ── */
.match-card {
  flex-shrink: 0;
  width: 200px;
  overflow: clip;
  padding: 18px;
  gap: 0;
}

/* Date stays at top with fixed spacing below */
.match-card__date {
  margin-bottom: 10px;
  margin-top: 5px;
}

/* Body: fills available space and centres its children vertically */
.match-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-block: 5px;
}

/* Home row layout split: fixed details block + actions block underneath */
.match-card:not(.match-card--event) .match-card__body {
  flex: 0 0 var(--match-details-h);
  min-height: var(--match-details-h);
}

.match-card--past > *:not(.match-card__link__wrapper) {
  opacity: 0.65;
}

.match-card--next {
  border-color: var(--border);
}

/* ── Promo label (full-bleed top banner) ── */
.match-card__promo-label {
  display: block;
  margin: -18px -18px 0;
  padding: 5px 18px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 580px) {
  .match-card__promo-label {
    margin: -16px -14px 0;
  }
}

/* ── Date label ── */
.match-card__date {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
}

.match-card--next .match-card__date {
  color: var(--ink-dim);
}

/* ── Team matchup row ── */
.match-card__matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.match-card__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

/* Logo image - same visual size as the badge */
.match-card__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

/* Fallback abbreviation badge when no logo is available */
.match-card__badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.48rem;
  font-weight: 700;
  color: var(--ink-dim);
}

.match-card__abbr {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
}

.match-card__vs {
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--ink-dim);
}

/* ── Score (past games) ── */
.match-card__score {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.match-card__score span {
  font-size: 0.9rem;
  color: var(--ink-dim);
}

/* Win → Stuttgart's score green; loss → Stuttgart's score red */
.match-card--w .match-card__score-rebels {
  color: #1a6b3a;
}
.match-card--l .match-card__score-rebels {
  color: #c0392b;
}

/* ── Time wrapper (upcoming games) ── */
.match-card__time-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.match-card__time-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.match-card__time {
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
}

/* ── Venue ── */
.match-card__venue {
  font-size: 0.58rem;
  color: var(--ink-dim);
  text-align: center;
  line-height: 1.4;
}

/* ── Action links ──
   Icon-only buttons styled after the mobile nav's .nav-mobile-action bar.
   Rows hold at most 3 buttons (see actionRowsHtml() in schedule-live.js) —
   a 4th+ action wraps onto a new row instead of squeezing into the first.
   Within a row, flex:1 children split evenly (1 action fills the whole
   row, 3 actions get a third each). ── */
.match-card__link__wrapper {
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  margin-top: 10px;
}

.match-card__link-row {
  display: flex;
  gap: 6px;
}

.match-card__link {
  flex: 1 1 0;
  min-width: 32px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--ink-faint);
  color: var(--ink);
  transition:
    color 0.15s,
    background 0.15s;
}

.match-card__link svg {
  width: 16px;
  height: 16px;
}

.match-card__link:hover {
  background: var(--navy);
  color: var(--text-white);
  fill: var(--text-white);
}

/* Tickets CTA */
.match-card__link--tickets {
  background: #f0b429;
  color: var(--ink);
}

.match-card__link--tickets:hover {
  background: #e0a820;
  color: var(--ink);
}

/* ── Mobile ── */
@media (max-width: 580px) {
  .match-card {
    /* --match-details-h: 108px; */
    width: 168px;
    padding: 16px 14px;
  }

  .match-card__link__wrapper {
    gap: 4px;
  }

  .match-card__link-row {
    gap: 4px;
  }

  .match-card__link {
    height: 30px;
    min-width: 28px;
  }

  .match-card__link svg {
    width: 14px;
    height: 14px;
  }
}

/* ── Event cards in the home strip ── */
.match-card--event {
  border-color: var(--gold);
}

/* Hide the team-logo slots for event cards */
.match-card--event .match-card__matchup {
  display: none;
}

.match-card__event-badge {
  background: var(--event-badge-color, #cc0000);
  color: var(--card);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 3px 8px;
  align-self: center;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-card__event-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  margin-top: 4px;
  word-break: break-word;
}

/* ── Action link used inside event cards ── */
.match-card__action {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 8px;
  padding: 6px 14px;
  transition:
    color 0.15s,
    background 0.15s;
}

.match-card__action:hover {
  color: var(--navy);
  background: var(--gold);
}

.match-card__event-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 25px;
  margin: 4px 0;
}
.match-card__event-image img {
  max-height: 25px;
  max-width: 100%;
  object-fit: contain;
}
.match-card__event-desc {
  font-size: 0.6rem;
  color: var(--ink-dim);
  text-align: center;
  line-height: 1.4;
  margin-top: 4px;
  word-break: break-word;
}
