/* ==========================================================================
   home-gallery-match-card.css — karta meczu w galerii „Ostatnie top analizy”
   Osobny od simple-match-card (bez flip / bez wspólnych selektorów).
   Wymaga: variables, match-form-strip, match-pick-a3, match-score-stack
   Generowany: node scripts/build-home-gallery-match-css.js
   ========================================================================== */

.home-gallery-match {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  width: 100%;
  min-width: 0;
  padding: var(--space-14) var(--space-14);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fg);
}

/* Flatten leftover flip markup from category templates (front only) */
.home-gallery-match__flip {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  transform: none !important;
  transform-style: flat;
  -webkit-transform-style: flat;
  transition: none;
  will-change: auto;
}

.home-gallery-match__face {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  transform: none !important;
  transform-style: flat;
  -webkit-transform-style: flat;
  pointer-events: auto;
}

.home-gallery-match__face--back,
.home-gallery-match__head {
  display: none !important;
}

.home-gallery__card-shell .home-gallery-match__top {
  margin: 0;
  padding: var(--space-14) var(--space-14) var(--space-12);
  border-bottom: none;
}

html[data-theme="dark"] .home-gallery__card-shell .home-gallery-match__top {
  border-bottom: none;
}

/* --- Nagłówek liga / data (dawniej value top) --- */
.home-gallery-match--value {
  gap: var(--space-12);
  padding: var(--space-14) var(--space-14) var(--space-12);
}

/* --- Nagłówek: liga + data/godzina --- */
.home-gallery-match__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .home-gallery-match__top {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.home-gallery-match__league {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  min-width: 0;
  flex: 1 1 auto;
}

.home-gallery-match__league-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
}

.home-gallery-match__league-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

html[data-theme="light"] .home-gallery-match__league-img--dark {
  display: none;
}

html[data-theme="dark"] .home-gallery-match__league-img--light {
  display: none;
}

.home-gallery-match__league-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.home-gallery-match__league-name {
  font-size: var(--fs-14);
  font-weight: var(--fw-500);
  line-height: 1.2;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-gallery-match__country-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  min-width: 0;
}

.home-gallery-match__flag {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  object-fit: cover;
}

.home-gallery-match__country {
  font-size: var(--fs-12);
  font-weight: var(--fw-400);
  line-height: 1.2;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-gallery-match__schedule {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-4);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: right;
}

.home-gallery-match__date {
  font-size: var(--fs-13);
  font-weight: var(--fw-400);
  color: var(--fg);
}

.home-gallery-match__time {
  font-size: var(--fs-13);
  font-weight: var(--fw-500);
  color: var(--fg);
}

/* --- Treść karty (front simple, bez flip) --- */
/* ==========================================================================
   home-gallery-match.css — prosty widok (<600px / ręczny tryb prosty)
   Wymaga: variables.css, match-form-strip.css, match-pick-a3.css
   ========================================================================== */

/* --- Data / godzina --- */
.home-gallery-match__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  padding-bottom: var(--space-8);
}

.home-gallery-match__date,
.home-gallery-match__time {
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.home-gallery-match__date {
  font-size: var(--fs-13);
  font-weight: var(--fw-400);
  color: var(--fg);
}

.home-gallery-match__time {
  font-size: var(--fs-13);
  font-weight: var(--fw-500);
  color: var(--fg);
}

/* --- Zespoły · forma · wynik --- */
.home-gallery-match__teams-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 58px;
  grid-template-rows: repeat(2, auto);
  column-gap: var(--space-10);
  row-gap: var(--space-10);
  align-items: center;
}

.home-gallery-match__team-row {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  min-width: 0;
}

.home-gallery-match__team-row--home {
  grid-area: 1 / 1;
}

.home-gallery-match__form-row--home {
  grid-area: 1 / 2;
}

.home-gallery-match__team-row--away {
  grid-area: 2 / 1;
}

.home-gallery-match__form-row--away {
  grid-area: 2 / 2;
}

.home-gallery-match__score {
  grid-area: 1 / 3 / 3 / 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.home-gallery-match__logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.home-gallery-match__team-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-14);
  font-weight: var(--fw-500);
  line-height: var(--lh-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-gallery-match__form-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 22px;
}

.home-gallery-match--gole-ou .home-gallery-match__form-row,
.home-gallery-match--btts .home-gallery-match__form-row,
.home-gallery-match--gole-team-ou .home-gallery-match__form-row,
.home-gallery-match--polowa-1-gole-team-ou .home-gallery-match__form-row,
.home-gallery-match--cards-team-ou .home-gallery-match__form-row,
.home-gallery-match--polowa-2-gole-team-ou .home-gallery-match__form-row,
.home-gallery-match--polowa-1-1x2 .home-gallery-match__form-row,
.home-gallery-match--polowa-2-gole-ou .home-gallery-match__form-row,
.home-gallery-match--polowa-1-gole-ou .home-gallery-match__form-row,
.home-gallery-match--polowa-1-dc .home-gallery-match__form-row,
.home-gallery-match--polowa-2-dc .home-gallery-match__form-row,
.home-gallery-match--polowa-2-1x2 .home-gallery-match__form-row,
.home-gallery-match--corners-h2h .home-gallery-match__form-row,
.home-gallery-match--corners-ou .home-gallery-match__form-row,
.home-gallery-match--corners-team-ou .home-gallery-match__form-row,
.home-gallery-match--shots-ou .home-gallery-match__form-row,
.home-gallery-match--shots-total-ou .home-gallery-match__form-row,
.home-gallery-match--fouls-ou .home-gallery-match__form-row,
.home-gallery-match--offsides-ou .home-gallery-match__form-row,
.home-gallery-match--offsides-team-ou .home-gallery-match__form-row,
.home-gallery-match--fouls-team-ou .home-gallery-match__form-row,
.home-gallery-match--cards-ou .home-gallery-match__form-row {
  justify-content: stretch;
  width: 100%;
  min-width: 6.75rem;
}

.home-gallery-match--gole-ou .home-gallery-match__avg-goals,
.home-gallery-match--btts .home-gallery-match__avg-goals,
.home-gallery-match--gole-team-ou .home-gallery-match__avg-goals,
.home-gallery-match--polowa-1-gole-team-ou .home-gallery-match__avg-goals,
.home-gallery-match--cards-team-ou .home-gallery-match__avg-goals,
.home-gallery-match--polowa-2-gole-team-ou .home-gallery-match__avg-goals,
.home-gallery-match--polowa-1-1x2 .home-gallery-match__avg-goals,
.home-gallery-match--polowa-2-gole-ou .home-gallery-match__avg-goals,
.home-gallery-match--polowa-1-gole-ou .home-gallery-match__avg-goals,
.home-gallery-match--polowa-1-dc .home-gallery-match__avg-goals,
.home-gallery-match--polowa-2-dc .home-gallery-match__avg-goals,
.home-gallery-match--polowa-2-1x2 .home-gallery-match__avg-goals,
.home-gallery-match--corners-h2h .home-gallery-match__avg-goals,
.home-gallery-match--corners-ou .home-gallery-match__avg-goals,
.home-gallery-match--corners-team-ou .home-gallery-match__avg-goals,
.home-gallery-match--shots-ou .home-gallery-match__avg-goals,
.home-gallery-match--shots-total-ou .home-gallery-match__avg-goals,
.home-gallery-match--fouls-ou .home-gallery-match__avg-goals,
.home-gallery-match--offsides-ou .home-gallery-match__avg-goals,
.home-gallery-match--offsides-team-ou .home-gallery-match__avg-goals,
.home-gallery-match--fouls-team-ou .home-gallery-match__avg-goals,
.home-gallery-match--cards-ou .home-gallery-match__avg-goals {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  width: 100%;
  font-size: var(--fs-14);
  line-height: 1.2;
  white-space: nowrap;
}

.home-gallery-match--gole-ou .home-gallery-match__avg-label,
.home-gallery-match--btts .home-gallery-match__avg-label,
.home-gallery-match--gole-team-ou .home-gallery-match__avg-label,
.home-gallery-match--polowa-1-gole-team-ou .home-gallery-match__avg-label,
.home-gallery-match--cards-team-ou .home-gallery-match__avg-label,
.home-gallery-match--polowa-2-gole-team-ou .home-gallery-match__avg-label,
.home-gallery-match--polowa-1-1x2 .home-gallery-match__avg-label,
.home-gallery-match--polowa-2-gole-ou .home-gallery-match__avg-label,
.home-gallery-match--polowa-1-gole-ou .home-gallery-match__avg-label,
.home-gallery-match--polowa-1-dc .home-gallery-match__avg-label,
.home-gallery-match--polowa-2-dc .home-gallery-match__avg-label,
.home-gallery-match--polowa-2-1x2 .home-gallery-match__avg-label,
.home-gallery-match--corners-h2h .home-gallery-match__avg-label,
.home-gallery-match--corners-ou .home-gallery-match__avg-label,
.home-gallery-match--corners-team-ou .home-gallery-match__avg-label,
.home-gallery-match--shots-ou .home-gallery-match__avg-label,
.home-gallery-match--shots-total-ou .home-gallery-match__avg-label,
.home-gallery-match--fouls-ou .home-gallery-match__avg-label,
.home-gallery-match--offsides-ou .home-gallery-match__avg-label,
.home-gallery-match--offsides-team-ou .home-gallery-match__avg-label,
.home-gallery-match--fouls-team-ou .home-gallery-match__avg-label,
.home-gallery-match--cards-ou .home-gallery-match__avg-label {
  flex: 0 1 auto;
  font-weight: var(--fw-500);
  color: var(--muted-2);
  text-align: left;
}

.home-gallery-match--gole-ou .home-gallery-match__avg-value,
.home-gallery-match--btts .home-gallery-match__avg-value,
.home-gallery-match--gole-team-ou .home-gallery-match__avg-value,
.home-gallery-match--polowa-1-gole-team-ou .home-gallery-match__avg-value,
.home-gallery-match--cards-team-ou .home-gallery-match__avg-value,
.home-gallery-match--polowa-2-gole-team-ou .home-gallery-match__avg-value,
.home-gallery-match--polowa-1-1x2 .home-gallery-match__avg-value,
.home-gallery-match--polowa-2-gole-ou .home-gallery-match__avg-value,
.home-gallery-match--polowa-1-gole-ou .home-gallery-match__avg-value,
.home-gallery-match--polowa-1-dc .home-gallery-match__avg-value,
.home-gallery-match--polowa-2-dc .home-gallery-match__avg-value,
.home-gallery-match--polowa-2-1x2 .home-gallery-match__avg-value,
.home-gallery-match--corners-h2h .home-gallery-match__avg-value,
.home-gallery-match--corners-ou .home-gallery-match__avg-value,
.home-gallery-match--corners-team-ou .home-gallery-match__avg-value,
.home-gallery-match--shots-ou .home-gallery-match__avg-value,
.home-gallery-match--shots-total-ou .home-gallery-match__avg-value,
.home-gallery-match--fouls-ou .home-gallery-match__avg-value,
.home-gallery-match--offsides-ou .home-gallery-match__avg-value,
.home-gallery-match--offsides-team-ou .home-gallery-match__avg-value,
.home-gallery-match--fouls-team-ou .home-gallery-match__avg-value,
.home-gallery-match--cards-ou .home-gallery-match__avg-value {
  flex: 0 0 auto;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-600);
  color: var(--fg);
  text-align: right;
}

/* --- Pick: koło · typ · kurs --- */
.home-gallery-match__pick-row {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  min-width: 0;
  padding-top: var(--space-8);
}

.home-gallery-match__pick-row .match-pick-prob {
  flex: 0 0 auto;
}

.home-gallery-match__pick-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-16);
  font-weight: var(--fw-500);
  line-height: 1.25;
  color: var(--fg);
  text-align: center;
}

.home-gallery-match__pick-title--hit {
  color: #6cd896;
}

.home-gallery-match__odd-btn {
  flex: 0 0 auto;
  margin-left: auto;
}

/* --- Stopka: pasek 1X2 · powered by · logo (jedna linia) --- */
.home-gallery-match__footer {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  min-width: 0;
}

.home-gallery-match__compare {
  flex: 1 1 auto;
  min-width: 0;
}

.home-gallery-match__compare-track {
  display: flex;
  align-items: stretch;
  gap: var(--space-4);
  width: 100%;
  height: 6px;
}

.home-gallery-match__compare-seg {
  flex: 1 1 0;
  min-width: 6px;
  height: 100%;
  border-radius: var(--radius-pill);
}

.home-gallery-match__compare-seg--low {
  background: #f1757f;
}

.home-gallery-match__compare-seg--mid-low {
  background: #f0a060;
}

.home-gallery-match__compare-seg--mid {
  background: #eec170;
}

.home-gallery-match__compare-seg--high {
  background: #6cd896;
}

.home-gallery-match__compare-seg--empty {
  background: rgba(20, 20, 20, 0.12);
}

html[data-theme="dark"] .home-gallery-match__compare-seg--empty {
  background: rgba(255, 255, 255, 0.14);
}

.home-gallery-match__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-4);
  flex: 0 0 auto;
}

.home-gallery-match__brand-label {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: var(--fw-400);
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.home-gallery-match__brand-logo {
  display: block;
  flex: 0 0 auto;
  width: 56px;
  height: 20px;
  object-fit: contain;
  object-position: center center;
}

html[data-theme="dark"] .home-gallery-match__brand-logo--light {
  display: none;
}

html[data-theme="light"] .home-gallery-match__brand-logo--dark {
  display: none;
}

html:not([data-theme="dark"]) .home-gallery-match__brand-logo--dark {
  display: none;
}

@media (max-width: 1199px) {
  .home-gallery-match__teams-grid {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .home-gallery-match__form-row {
    display: none;
  }

  .home-gallery-match__score {
    grid-area: 1 / 2 / 3 / 3;
  }
}

@media (max-width: 949px) {
  .home-gallery-match__teams-grid {
    grid-template-columns: minmax(0, 1fr) auto 58px;
  }

  .home-gallery-match__form-row {
    display: flex;
  }

  .home-gallery-match__score {
    grid-area: 1 / 3 / 3 / 4;
  }
}

@media (max-width: 814px) {
  .home-gallery-match__teams-grid {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .home-gallery-match__form-row {
    display: none;
  }

  .home-gallery-match__score {
    grid-area: 1 / 2 / 3 / 3;
  }
}

@media (max-width: 609px) {
  .home-gallery-match__teams-grid {
    grid-template-columns: minmax(0, 1fr) auto 58px;
  }

  .home-gallery-match__form-row {
    display: flex;
  }

  .home-gallery-match__score {
    grid-area: 1 / 3 / 3 / 4;
  }
}

@media (max-width: 434px) {
  .home-gallery-match__teams-grid {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .home-gallery-match__form-row {
    display: none;
  }

  .home-gallery-match__score {
    grid-area: 1 / 2 / 3 / 3;
  }
}

/* --- HT/FT warianty --- */
.home-gallery-match--htft {
  --htft-simple-avg-col-w: 30px;
  --htft-simple-avg-label-w: 3.75rem;
  --htft-simple-avg-sep-w: 0.75rem;
  --htft-setup-accent: #ff7b7b;
  --htft-setup-fire-badge: 20px;
  --htft-setup-fire-icon: 13px;
}

.home-gallery-match--htft .home-gallery-match__teams-grid {
  grid-template-columns: minmax(0, 1fr) minmax(9rem, max-content) 58px;
}

.home-gallery-match--htft .home-gallery-match__form-row {
  justify-content: flex-end;
  width: 100%;
  min-width: 6.75rem;
}

/* Wąskie ekrany: bez kolumny Ø — inaczej pusta ~9rem przycina nazwę drużyny */
@media (max-width: 814px) {
  .home-gallery-match--htft .home-gallery-match__teams-grid {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .home-gallery-match--htft .home-gallery-match__form-row {
    display: none;
  }

  .home-gallery-match--htft .home-gallery-match__score {
    grid-area: 1 / 2 / 3 / 3;
  }
}

.home-gallery-match--htft .home-gallery-match__avg-goals {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-8);
  width: auto;
  max-width: 100%;
  margin-left: auto;
  font-size: var(--fs-14);
  line-height: 1.2;
  white-space: nowrap;
}

.home-gallery-match--htft .home-gallery-match__avg-label {
  flex: 0 0 var(--htft-simple-avg-label-w);
  font-weight: var(--fw-500);
  color: var(--muted-2);
  text-align: left;
}

.home-gallery-match--htft .home-gallery-match__avg-label::after {
  content: ":";
}

.home-gallery-match--htft .home-gallery-match__avg-value.home-gallery-match__avg-pair {
  display: grid;
  grid-template-columns: var(--htft-simple-avg-col-w) var(--htft-simple-avg-sep-w) var(--htft-simple-avg-col-w);
  column-gap: var(--space-4);
  align-items: center;
  flex: 0 0 auto;
  width: calc(
    var(--htft-simple-avg-col-w) * 2 + var(--htft-simple-avg-sep-w) + var(--space-4) * 2
  );
  font-variant-numeric: tabular-nums;
  overflow: visible;
}

.home-gallery-match--htft .home-gallery-match__avg-part {
  min-width: 0;
  width: 100%;
}

.home-gallery-match--htft .home-gallery-match__avg-part:first-child {
  justify-self: end;
  text-align: right;
}

.home-gallery-match--htft .home-gallery-match__avg-part:last-child {
  justify-self: end;
  text-align: right;
}

.home-gallery-match--htft .home-gallery-match__avg-sep {
  justify-self: center;
  text-align: center;
  color: var(--muted-2);
}

.home-gallery-match--htft .home-gallery-match__avg-part--high {
  color: #6cd896;
  font-weight: var(--fw-600);
}

.home-gallery-match--htft .home-gallery-match__avg-part--low {
  color: #f1757f;
  font-weight: var(--fw-600);
}


.home-gallery-match--htft .match-pick-prob--setup-hint {
  overflow: visible;
}
.home-gallery-match--htft .htft-setup-fire {
  display: none;
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: var(--htft-setup-fire-badge);
  height: var(--htft-setup-fire-badge);
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  pointer-events: none;
  transform: translate(-24%, 2%);
}
.home-gallery-match--htft .htft-setup-fire__icon {
  display: block;
  font-size: var(--htft-setup-fire-icon);
  line-height: 1;
  color: #333333;
}
html[data-theme="dark"] .home-gallery-match--htft .htft-setup-fire__icon {
  color: #ffffff;
}
.home-gallery-match--htft .match-pick-prob--setup-hint .htft-setup-fire {
  display: flex;
}

/* --- Przedział goli 1-3 w połowach --- */
.home-gallery-match--half-goal-range {
  --hgr-simple-avg-col-w: 30px;
  --hgr-simple-avg-label-w: 3.75rem;
  --hgr-simple-avg-sep-w: 0.75rem;
}

.home-gallery-match--half-goal-range .home-gallery-match__teams-grid {
  grid-template-columns: minmax(0, 1fr) minmax(9rem, max-content) 58px;
}

.home-gallery-match--half-goal-range .home-gallery-match__form-row {
  justify-content: flex-end;
  width: 100%;
  min-width: 6.75rem;
}

/* Wąskie ekrany: bez kolumny Ø — inaczej display:none na form-row zostawia pustą ~9rem
   i przycina nazwę drużyny (specificity przebija generic media z home-gallery-match.css). */
@media (max-width: 814px) {
  .home-gallery-match--half-goal-range .home-gallery-match__teams-grid {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .home-gallery-match--half-goal-range .home-gallery-match__form-row {
    display: none;
  }

  .home-gallery-match--half-goal-range .home-gallery-match__score {
    grid-area: 1 / 2 / 3 / 3;
  }
}

.home-gallery-match--half-goal-range .home-gallery-match__avg-goals {
  display: grid;
  grid-template-columns: var(--hgr-simple-avg-label-w) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-6);
  width: 100%;
  min-width: 0;
  font-size: var(--fs-14);
  line-height: 1.2;
  white-space: nowrap;
}

.home-gallery-match--half-goal-range .home-gallery-match__avg-label {
  width: var(--hgr-simple-avg-label-w);
  text-align: left;
  white-space: nowrap;
}

.home-gallery-match--half-goal-range .home-gallery-match__avg-label::after {
  content: none;
}

.home-gallery-match--half-goal-range .home-gallery-match__avg-value.home-gallery-match__avg-pair {
  display: grid;
  grid-template-columns: var(--hgr-simple-avg-col-w) var(--hgr-simple-avg-sep-w) var(--hgr-simple-avg-col-w);
  align-items: center;
  justify-items: center;
  width: max-content;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.home-gallery-match--half-goal-range .home-gallery-match__avg-sep {
  width: var(--hgr-simple-avg-sep-w);
  text-align: center;
}

/* --- Score stack HT/FT --- */
.home-gallery-match--htft .home-gallery-match__score .match-score-stack--htft,
.home-gallery-match--half-goal-range .home-gallery-match__score .match-score-stack--htft {
  gap: var(--space-10);
}

.home-gallery-match--htft .home-gallery-match__score .match-score-stack--htft .match-score-stack__row,
.home-gallery-match--half-goal-range .home-gallery-match__score .match-score-stack--htft .match-score-stack__row {
  gap: var(--space-10);
}

/* Home gallery: HT/FT i 1-3 w połowach — cyfry obok siebie, wysokość jak pojedynczy wynik */
.home-gallery-match__score .match-score-stack.match-score-stack--htft {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.home-gallery-match__score .match-score-stack.match-score-stack--htft .match-score-stack__row {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: 28px;
  white-space: nowrap;
}

.home-gallery-match__score .match-score-stack.match-score-stack--htft .match-score-stack__part {
  flex: 0 0 auto;
  min-height: 28px;
}

.analytical-match-card-2__cell--score .match-score-stack--htft .match-score-stack__row {
  gap: var(--space-8);
}

/* --- Phone: HT/FT w galerii (jak content-phone dla simple) --- */
html[data-device="phone"] .home-gallery-match--htft .home-gallery-match__teams-grid {
  grid-template-columns: minmax(0, 1fr) 58px;
}

html[data-device="phone"] .home-gallery-match--htft .home-gallery-match__form-row {
  display: none;
}

html[data-device="phone"] .home-gallery-match--htft .home-gallery-match__score {
  grid-area: 1 / 2 / 3 / 3;
}

html[data-device="phone"] .home-gallery-match--htft .home-gallery-match__score .match-score-stack {
  align-items: center;
}

html[data-device="phone"] .home-gallery-match--htft .home-gallery-match__score .match-score-stack__row,
html[data-device="phone"] .home-gallery-match--htft .home-gallery-match__score .match-score-stack--htft .match-score-stack__row {
  justify-content: center;
}

/* --- Phone: przedział goli 1-3 w galerii --- */
html[data-device="phone"] .home-gallery-match--half-goal-range .home-gallery-match__teams-grid {
  grid-template-columns: minmax(0, 1fr) 58px;
}

html[data-device="phone"] .home-gallery-match--half-goal-range .home-gallery-match__form-row {
  display: none;
}

html[data-device="phone"] .home-gallery-match--half-goal-range .home-gallery-match__score {
  grid-area: 1 / 2 / 3 / 3;
}

html[data-device="phone"] .home-gallery-match--half-goal-range .home-gallery-match__score .match-score-stack {
  align-items: center;
}

html[data-device="phone"] .home-gallery-match--half-goal-range .home-gallery-match__score .match-score-stack__row,
html[data-device="phone"] .home-gallery-match--half-goal-range .home-gallery-match__score .match-score-stack--htft .match-score-stack__row {
  justify-content: center;
}

/* --- Loga drużyn w galerii home: 36×36 --- */
.home-gallery-match__logo-wrap {
  width: 36px;
  height: 36px;
}

.home-gallery-match__logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* --- Wynik do prawej, cyfry równo nad sobą --- */
.home-gallery-match__score {
  justify-self: stretch;
  width: 100%;
  justify-content: flex-end;
}

.home-gallery-match__score .match-score-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: auto;
  max-width: 100%;
  margin-left: auto;
}

.home-gallery-match__score .match-score-stack__row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 28px;
  font-family: var(--font-score);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-16);
  font-weight: var(--fw-500);
  line-height: var(--lh-tight);
  color: var(--fg);
  text-align: center;
}

.home-gallery-match__score .match-score-stack.match-score-stack--htft {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: auto;
  margin-left: auto;
}

.home-gallery-match__score .match-score-stack.match-score-stack--htft .match-score-stack__row {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  width: auto;
  min-height: 28px;
  white-space: nowrap;
}

.home-gallery-match__score .match-score-stack.match-score-stack--htft .match-score-stack__part {
  flex: 0 0 auto;
  min-height: 28px;
}
