/* =========================================================
   Liga BW – style strony
   Mobile-first: najpierw telefon, potem @media dla większych ekranów.
   Kolory w zmiennych (:root) – motyw ciemny ustawia je na nowo.
   ========================================================= */

:root {
  color-scheme: light dark;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e7eaef;
  --text: #0d1117;
  --text-2: #3b4351;
  --muted: #626b7a;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;

  --accent: #3d5afe;
  --accent-2: #7b3ff2;
  --accent-text: #3149d6;
  --accent-soft: #eef1ff;
  --gold: #f5b700;
  --gold-text: #8a5a00;
  --win: #067647;
  --draw: #667085;
  --loss: #d92d20;
  --loss-text: #b42318;
  --focus: #3d5afe;

  --header-bg: rgb(245 246 248 / 0.82);
  --shimmer: rgb(255 255 255 / 0.65);
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 24px -10px rgb(16 24 40 / 0.14);
  --shadow-lg: 0 2px 4px rgb(16 24 40 / 0.04), 0 22px 44px -14px rgb(16 24 40 / 0.26);

  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 60px;
  --tabbar-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090b10;
    --surface: #10131a;
    --surface-2: #171b24;
    --surface-3: #1f2430;
    --text: #eceff4;
    --text-2: #c3c9d4;
    --muted: #98a1b2;
    --border: #222734;
    --border-strong: #303747;

    --accent: #5b74ff;
    --accent-text: #8c9eff;
    --accent-soft: rgb(91 116 255 / 0.16);
    --gold-text: #ffd166;
    --loss-text: #ff8a80;
    --focus: #8c9eff;

    --header-bg: rgb(9 11 16 / 0.78);
    --shimmer: rgb(255 255 255 / 0.06);
    --shadow-sm: none;
    --shadow: 0 10px 30px -12px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 24px 48px -16px rgb(0 0 0 / 0.75);
  }
}

/* ---------- Podstawy ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

main:focus {
  outline: none; /* fokus po „Przejdź do treści” – sam kontener nie potrzebuje ramki */
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 4.5rem);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

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

.muted {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 0 0 12px 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.skip-link:focus {
  top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Nagłówek i menu ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Szklane tło na pseudo-elemencie – dzięki temu dolne menu (position: fixed) działa poprawnie */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 6px 16px -6px rgb(61 90 254 / 0.7);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-10deg) scale(1.06);
}

.brand-name {
  display: block;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-tag {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

/* Telefon: menu jako dolny pasek jak w aplikacji */
.main-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 45;
  padding-bottom: env(safe-area-inset-bottom);
}

.main-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-top: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

.main-nav ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--tabbar-h);
  margin: 0;
  padding: 0 0.25rem;
  list-style: none;
}

.main-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  height: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.main-nav .icon {
  width: 23px;
  height: 23px;
  transition: transform 0.3s var(--ease);
}

.main-nav a:active .icon {
  transform: scale(0.86);
}

.main-nav a[aria-current="page"] {
  color: var(--accent-text);
}

.main-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ---------- Nagłówki podstron ---------- */

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-head {
  padding-block: 2rem 0.75rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 3.2rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.page-lead {
  max-width: 40rem;
  margin: 0.7rem 0 1.1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Pastylka statusu danych */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
}

.status-pill::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
}

.status-pill[data-kind="loading"]::before {
  background: var(--accent);
  animation: blink 0.8s ease-in-out infinite alternate;
}

.status-pill[data-kind="ok"]::before {
  background: #12b76a;
  animation: ping 2.2s var(--ease) infinite;
}

.status-pill[data-kind="warning"]::before {
  background: var(--gold);
}

.status-pill[data-kind="error"]::before {
  background: var(--loss);
}

/* ---------- Hero (strona główna) ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 1.6rem 1.25rem 1.4rem;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  background: #0a0e1f;
  box-shadow: var(--shadow-lg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, #1b2766 0%, transparent 55%),
    linear-gradient(140deg, #0a0e1f 0%, #10163a 60%, #0a0e1f 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.6;
  animation: drift 18s var(--ease) infinite alternate;
}

.blob--1 {
  top: -9rem;
  left: -7rem;
  width: 24rem;
  height: 24rem;
  background: #3d5afe;
}

.blob--2 {
  right: -6rem;
  bottom: -10rem;
  width: 20rem;
  height: 20rem;
  background: #7b3ff2;
  animation-duration: 23s;
  animation-delay: -7s;
}

.blob--3 {
  top: 25%;
  right: 28%;
  width: 13rem;
  height: 13rem;
  background: #06b6d4;
  opacity: 0.28;
  animation-duration: 27s;
  animation-delay: -13s;
}

.hero-pitch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-pitch * {
  fill: none;
  stroke: rgb(255 255 255 / 0.07);
  stroke-width: 2;
}

.hero .eyebrow {
  color: rgb(255 255 255 / 0.68);
}

.hero h1 {
  margin: 0;
  padding-bottom: 0.08em; /* miejsce na „g”, które inaczej ucina background-clip */
  font-size: clamp(3rem, 12vw, 5.25rem);
  letter-spacing: -0.055em;
  line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #ffffff 35%, #b4c0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  max-width: 34rem;
  margin: 0.9rem 0 1.1rem;
  color: rgb(255 255 255 / 0.76);
  font-size: 1.05rem;
}

.hero .status-pill {
  border-color: rgb(255 255 255 / 0.14);
  background: rgb(255 255 255 / 0.08);
  color: rgb(255 255 255 / 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 6rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 16px;
  background: rgb(255 255 255 / 0.06);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.25s, transform 0.25s var(--ease);
}

.stat:hover {
  background: rgb(255 255 255 / 0.1);
  transform: translateY(-2px);
}

.stat-label {
  color: rgb(255 255 255 / 0.66);
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  overflow: hidden;
  color: rgb(255 255 255 / 0.58);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader {
  position: relative;
  padding: 1.3rem 1.2rem 1.2rem;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 22px;
  background: linear-gradient(160deg, rgb(255 255 255 / 0.13), rgb(255 255 255 / 0.03));
  text-align: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.leader-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.leader-crest {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0.8rem auto 0.5rem;
}

.leader-crest::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(245 183 0 / 0.5), transparent 68%);
  animation: glow 3.2s ease-in-out infinite alternate;
}

.leader-crest .crest {
  position: relative;
  animation: float 5s ease-in-out infinite;
}

.leader-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.leader-points {
  margin: 0.1rem 0 0.9rem;
  color: rgb(255 255 255 / 0.72);
}

.leader-pts {
  color: #fff;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.leader-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.7rem 0;
  border-block: 1px solid rgb(255 255 255 / 0.12);
}

.leader-meta dt {
  color: rgb(255 255 255 / 0.6);
  font-size: 0.7rem;
  font-weight: 600;
}

.leader-meta dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.leader-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: rgb(255 255 255 / 0.6);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ---------- Sekcje ---------- */

.block {
  margin-block: 2.5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-text);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.section-link::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

.section-link:hover::after {
  transform: translateX(4px);
}

.section-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.empty {
  margin: 0;
  padding: 1.4rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.alert {
  margin: 1rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgb(217 45 32 / 0.35);
  border-radius: var(--radius);
  background: rgb(217 45 32 / 0.06);
}

.alert p {
  margin: 0 0 0.8rem;
}

.alert-title {
  font-weight: 800;
}

.noscript {
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

/* ---------- Przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #5a4cf6);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgb(61 90 254 / 0.75);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgb(61 90 254 / 0.85);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--surface-2);
  box-shadow: none;
  filter: none;
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease);
}

.icon-button:hover {
  background: var(--surface-2);
  transform: rotate(90deg);
}

/* ---------- Herby ---------- */

.crest {
  flex: none;
  display: inline-grid;
  place-items: center;
  object-fit: contain;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Herby są wycięte z tła (przezroczyste PNG/WebP) – cień idzie po kształcie herbu, bez przycinania do koła */
img.crest {
  filter: drop-shadow(0 1px 1.5px rgb(16 24 40 / 0.22)) drop-shadow(0 4px 10px rgb(16 24 40 / 0.1));
}

@media (prefers-color-scheme: dark) {
  img.crest {
    /* delikatna poświata, żeby ciemne tarcze (np. czarne) nie zlewały się z tłem */
    filter: drop-shadow(0 0 0.6px rgb(255 255 255 / 0.4)) drop-shadow(0 4px 10px rgb(0 0 0 / 0.5));
  }
}

.crest--sm {
  width: 24px;
  height: 24px;
  font-size: 0.58rem;
}

.crest--md {
  width: 32px;
  height: 32px;
  font-size: 0.7rem;
}

.crest--lg {
  width: 44px;
  height: 44px;
  font-size: 0.9rem;
}

.crest--xl {
  width: 88px;
  height: 88px;
  font-size: 1.7rem;
}

.crest--initials,
.crest--empty {
  border-radius: 50%;
}

.crest--initials {
  background: linear-gradient(135deg, hsl(var(--hue) 55% 46%), hsl(calc(var(--hue) + 30) 55% 34%));
  color: #fff;
}

.crest--empty {
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  color: var(--muted);
}

/* ---------- Tabele ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.7rem 0.45rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

thead th {
  padding-block: 0.8rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

tbody > tr > * {
  transition: background-color 0.18s;
}

tbody tr:hover > * {
  background: var(--surface-2);
}

/* Kolumna z drużyną zostaje na miejscu przy przewijaniu tabeli w bok */
.col-team {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 9.5rem;
  background: var(--surface);
  text-align: left;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.team-name {
  font-weight: 650;
  line-height: 1.25;
  white-space: normal;
}

.pos-badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.is-playoff .pos-badge {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.is-leader .pos-badge {
  background: linear-gradient(135deg, #ffd666, var(--gold));
  color: #3d2a00;
}

td.col-pts {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.col-gd,
.col-goals {
  color: var(--text-2);
}

/* Telefon: skrócona tabela (M, +/−, Pkt). Pełną włącza przycisk (klasa .is-full) albo szerszy ekran. */
.standings .col-wdl,
.standings .col-goals,
.standings .col-form {
  display: none;
}

.is-full .standings .col-wdl,
.is-full .standings .col-goals,
.is-full .standings .col-form {
  display: table-cell;
}

.table-toggle {
  margin-top: 0.8rem;
}

.form {
  display: inline-flex;
  gap: 4px;
}

.chip {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
}

.chip--W {
  background: var(--win);
}

.chip--R {
  background: var(--draw);
}

.chip--P {
  background: var(--loss);
}

.legend {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.legend p {
  margin: 0.3rem 0;
}

.legend-zone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-2);
  font-weight: 600;
}

.legend-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Strzelcy */
.scorers .col-pos {
  width: 3.5rem;
}

.scorers .col-name,
.scorers .col-club,
.checks th,
.checks td {
  text-align: left;
  white-space: normal;
}

.scorers th.col-name {
  font-weight: 700;
}

.scorers thead th.col-name {
  font-weight: 700;
}

.scorers td.col-club {
  color: var(--text-2);
  font-size: 0.9rem;
}

.team-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.goals-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.goals-num {
  min-width: 1.6rem;
  font-size: 1.02rem;
  font-weight: 800;
  text-align: right;
}

.goal-bar {
  display: none;
  width: 5.5rem;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.goal-bar > span {
  display: block;
  width: calc(var(--w) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  animation: grow 0.9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms + 150ms);
}

/* ---------- Mecze ---------- */

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.match {
  position: relative;
  padding: 0.95rem 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.match:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.match-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.match-label {
  color: var(--text-2);
  font-weight: 700;
}

.match-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  text-align: center;
}

.side .crest {
  transition: transform 0.35s var(--ease);
}

.match:hover .side .crest {
  transform: scale(1.08);
}

.side-name {
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.side.is-winner .side-name {
  color: var(--text);
  font-weight: 800;
}

.side.is-loser .side-name {
  color: var(--muted);
}

.is-tbd {
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
}

.team-note {
  margin-top: -0.25rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scoreboard {
  display: grid;
  place-items: center;
  min-width: 5.6rem;
  min-height: 3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.digits {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.digits .sep {
  color: var(--muted);
  font-weight: 600;
  transform: translateY(-0.06em);
}

.match--walkower .scoreboard {
  color: var(--text-2);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--surface-3) 8px 9px);
}

.scoreboard--empty {
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.match-note {
  margin: 0.85rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.badge {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--wo {
  background: rgb(245 183 0 / 0.16);
  color: var(--gold-text);
}

.badge--none {
  background: rgb(217 45 32 / 0.1);
  color: var(--loss-text);
}

.badge--waiting {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Pasek kolejek (wyniki) */
.round-jump {
  position: sticky;
  top: calc(var(--header-h) + 0.5rem);
  z-index: 5;
  margin: 0 0 1.5rem;
  padding: 0.35rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--header-bg);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  scrollbar-width: none;
}

.round-jump::-webkit-scrollbar {
  display: none;
}

.round-jump ul {
  display: flex;
  gap: 0.2rem;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.round-jump a {
  display: inline-grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}

.round-jump a:hover {
  background: var(--surface-2);
}

.round-jump a.is-active {
  background: var(--text);
  color: var(--bg);
}

/* ---------- Drabinka fazy pucharowej ---------- */

.bracket {
  display: grid;
  gap: 0.8rem;
}

.bracket-col {
  position: relative;
  display: grid;
  gap: 0.8rem;
}

.bm {
  position: relative;
  padding: 0.8rem 0.95rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.bm-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.45rem;
  color: var(--text-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bm-label > span:first-child {
  display: inline-flex;
  align-items: center;
}

.bm-date {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.bm-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
}

.bm-row + .bm-row {
  border-top: 1px solid var(--border);
}

.bm-name {
  flex: 1;
  font-size: 0.94rem;
  font-weight: 650;
}

.bm-row.is-winner .bm-name,
.bm-row.is-winner .bm-score {
  font-weight: 800;
}

.bm-score {
  min-width: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bm--final {
  border-color: rgb(245 183 0 / 0.55);
  box-shadow: 0 0 0 4px rgb(245 183 0 / 0.12), var(--shadow);
}

.bm--final .bm-label > span:first-child {
  color: var(--gold-text);
}

.bracket-third {
  max-width: 26rem;
  margin-top: 0.8rem;
}

/* ---------- Strzelcy: filtr, podium, top 5 ---------- */

.chips {
  display: flex;
  gap: 0.5rem;
  margin: 0 -1rem 0.4rem;
  padding: 0.25rem 1rem 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

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

.chip-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  padding: 0.3rem 0.95rem 0.3rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.chip-btn--all {
  padding-left: 0.95rem;
}

.chip-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.chip-btn[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.filter-count {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.6rem;
  margin: 1.4rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.podium-card--1 {
  order: 2;
  padding-top: 1.9rem;
  border-color: rgb(245 183 0 / 0.55);
  box-shadow: 0 0 0 4px rgb(245 183 0 / 0.1), var(--shadow);
}

.podium-card--2 {
  order: 1;
}

.podium-card--3 {
  order: 3;
}

.medal {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe08a, var(--gold));
  color: #3d2a00;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 4px 10px -3px rgb(0 0 0 / 0.3);
  transform: translateX(-50%);
}

.podium-card--2 .medal {
  background: linear-gradient(135deg, #f2f4f7, #b9c0cc);
  color: #1d2330;
}

.podium-card--3 .medal {
  background: linear-gradient(135deg, #f6c49a, #c98447);
  color: #3a1d06;
}

.podium-name {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.podium-team {
  margin: 0.1rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.podium-goals {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.podium-goals span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
}

.top-list {
  margin: 0;
  padding: 0.35rem;
  list-style: none;
}

.top-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.65rem;
  border-radius: 12px;
  transition: background-color 0.2s;
}

.top-list li:hover {
  background: var(--surface-2);
}

.top-list li:first-child .pos-badge {
  background: linear-gradient(135deg, #ffd666, var(--gold));
  color: #3d2a00;
}

.top-who {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.top-name {
  font-weight: 750;
}

.top-team {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-goals {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.check-list {
  margin: 0;
  padding: 1rem 1rem 1rem 2.2rem;
}

.check-list li {
  margin-bottom: 0.5rem;
}

/* ---------- Szkielety ładowania ---------- */

.sk {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}

.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--shimmer), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

.skeleton-card {
  padding: 0.6rem;
}

.sk-row {
  height: 2.6rem;
  margin: 0.35rem 0.25rem;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 0.8rem;
}

.sk-card {
  height: 8.5rem;
  border-radius: var(--radius);
}

.hero .sk {
  background: rgb(255 255 255 / 0.07);
}

.hero .sk::after {
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.08), transparent);
}

.sk-stat {
  min-height: 6rem;
  border-radius: 16px;
}

.sk-leader {
  min-height: 21rem;
  border-radius: 22px;
}

.has-error [data-skeleton] {
  display: none;
}

/* ---------- Dokumenty (polityki, regulamin) ---------- */

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin: 2.4rem 0 0.75rem;
  font-size: 1.3rem;
}

.prose p,
.prose li {
  color: var(--text-2);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose .table-scroll {
  margin: 1rem 0;
  box-shadow: none;
}

.prose table {
  min-width: 36rem; /* na telefonie tabela przewija się w bok zamiast ściskać tekst */
}

.prose th,
.prose td {
  font-size: 0.9rem;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.prose thead th {
  font-size: 0.72rem;
}

.doc-meta {
  color: var(--muted);
}

mark.todo {
  padding: 0 0.25em;
  border-radius: 4px;
  outline: 1px dashed currentColor;
  background: #fff2a8;
  color: #3d3000;
}

/* ---------- 404 ---------- */

.notfound {
  padding-block: 3rem 1rem;
  text-align: center;
}

.nf-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1em;
  margin-bottom: 1.5rem;
  font-size: clamp(5.5rem, 24vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.nf-digit {
  color: var(--text);
  background: linear-gradient(180deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nf-ball {
  position: relative;
  display: grid;
  place-items: center;
  width: 0.78em;
  height: 1em;
}

.nf-ball svg {
  width: 0.74em;
  height: 0.74em;
  animation: bounce 0.9s cubic-bezier(0.5, 0, 0.75, 0) infinite alternate;
}

.nf-ball svg circle {
  fill: #fff;
  stroke: var(--text);
  stroke-width: 3;
}

.nf-ball svg path {
  fill: var(--text);
  stroke: var(--text);
  stroke-width: 3;
  stroke-linejoin: round;
}

.nf-ball::after {
  content: "";
  position: absolute;
  bottom: 0.02em;
  width: 0.5em;
  height: 0.06em;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.18);
  animation: shadow 0.9s cubic-bezier(0.5, 0, 0.75, 0) infinite alternate;
}

.notfound h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}

.notfound .page-lead {
  margin-inline: auto;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.6rem;
  max-width: 40rem;
  margin: 2rem auto 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.link-list a:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ---------- Stopka ---------- */

.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  padding-block: 2.75rem 1.75rem;
}

.site-footer h2 {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.6rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 0.5rem;
}

.site-footer a,
.site-footer .link-button {
  color: var(--text-2);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer .link-button:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.footer-bottom {
  padding-block: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Zgody cookies ---------- */

.consent-banner {
  position: fixed;
  right: 0.75rem;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 0.75rem);
  left: 0.75rem;
  z-index: 50;
  max-width: 42rem;
  margin-inline: auto;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px -12px rgb(0 0 0 / 0.35);
  animation: slide-up 0.5s var(--ease) both;
}

.consent-banner p {
  margin: 0 0 0.8rem;
  color: var(--text-2);
  font-size: 0.92rem;
}

.consent-title {
  margin-bottom: 0.35rem !important;
  color: var(--text) !important;
  font-size: 1.05rem !important;
  font-weight: 800;
}

.consent-actions,
.dialog-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.consent-actions .btn,
.dialog-foot .btn {
  flex: 1 1 10rem;
}

body.has-consent-banner {
  padding-bottom: calc(var(--tabbar-h) + 18rem);
}

.consent-dialog {
  width: min(36rem, calc(100vw - 1.5rem));
  max-height: min(88vh, 48rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.consent-dialog[open] {
  animation: pop 0.3s var(--ease);
}

.consent-dialog::backdrop {
  background: rgb(9 11 16 / 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dialog-title {
  margin: 0;
  font-size: 1.15rem;
}

.dialog-body {
  padding: 1rem 1.15rem 0.25rem;
  color: var(--text-2);
}

.dialog-foot {
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--border);
}

.category {
  margin-bottom: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.category-name {
  color: var(--text);
  font-weight: 750;
}

.category p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tool-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.switch input {
  position: relative;
  flex: none;
  width: 2.9rem;
  height: 1.65rem;
  margin: 0;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 0.25s;
}

.switch input::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  transition: transform 0.25s var(--ease);
}

.switch input:checked {
  background: var(--accent);
}

.switch input:checked::before {
  transform: translateX(1.25rem);
}

.switch input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.switch-state {
  min-width: 5.5em;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 1rem);
  left: 50%;
  z-index: 60;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1.15rem;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  animation: slide-up 0.35s var(--ease) both;
}

/* ---------- Animacje ---------- */

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    translate: 0 24px;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    scale: 0.96;
  }
}

@keyframes drift {
  50% {
    translate: 3rem 2rem;
    scale: 1.12;
  }
  100% {
    translate: -2rem 3rem;
    scale: 0.94;
  }
}

@keyframes float {
  50% {
    translate: 0 -6px;
  }
}

@keyframes glow {
  from {
    opacity: 0.55;
    scale: 0.92;
  }
  to {
    opacity: 1;
    scale: 1.06;
  }
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgb(18 183 106 / 0.55);
  }
  80%,
  100% {
    box-shadow: 0 0 0 8px rgb(18 183 106 / 0);
  }
}

@keyframes blink {
  to {
    opacity: 0.3;
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

@keyframes bounce {
  from {
    translate: 0 -0.32em;
    rotate: 0deg;
  }
  to {
    translate: 0 0.06em;
    rotate: 200deg;
  }
}

@keyframes shadow {
  from {
    opacity: 0.25;
    scale: 0.55;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* Wejście elementów narysowanych z danych (kolejno, z małym opóźnieniem) */
.reveal {
  animation: rise 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

tr.reveal {
  animation-name: fade;
}

/* Przeglądarki z animacjami sterowanymi przewijaniem: karty pojawiają się, gdy wjeżdżają na ekran */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .match.reveal,
    .bm.reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
      animation-delay: 0s;
    }
  }
}

/* Płynne przejścia między podstronami (Chrome, Edge, Safari 18+) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
}

/* ---------- Większe ekrany ---------- */

@media (min-width: 30rem) {
  .goal-bar {
    display: block;
  }
}

@media (min-width: 40rem) {
  th,
  td {
    padding-inline: 0.8rem;
  }

  .col-team {
    min-width: 15rem;
  }

  .standings .col-wdl,
  .standings .col-goals,
  .standings .col-form {
    display: table-cell;
  }

  .table-toggle {
    display: none;
  }
}

@media (min-width: 48rem) {
  :root {
    --header-h: 68px;
  }

  body {
    padding-bottom: 0;
  }

  .main-nav {
    position: static;
    padding: 0;
  }

  .main-nav::before {
    display: none;
  }

  .main-nav ul {
    display: flex;
    gap: 0.2rem;
    height: auto;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
  }

  .main-nav a {
    flex-direction: row;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    color: var(--text-2);
    font-size: 0.9rem;
  }

  .main-nav .icon {
    width: 18px;
    height: 18px;
  }

  .main-nav a:hover {
    color: var(--text);
  }

  .main-nav a[aria-current="page"] {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgb(16 24 40 / 0.12);
  }

  .main-nav a[aria-current="page"]::before {
    display: none;
  }

  .main-nav a[aria-current="page"] .icon {
    color: var(--accent);
  }

  .consent-banner {
    bottom: 1.25rem;
  }

  body.has-consent-banner {
    padding-bottom: 14rem;
  }

  .toast {
    bottom: 1.5rem;
  }

  .bracket {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
  }

  /* linie łączące półfinały z finałem */
  .bracket-col--semis .bm::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -1.5rem;
    width: 1.5rem;
    border-top: 2px solid var(--border-strong);
  }

  .bracket-col--semis::after {
    content: "";
    position: absolute;
    top: calc((100% - 0.8rem) / 4);
    right: -1.5rem;
    bottom: calc((100% - 0.8rem) / 4);
    border-right: 2px solid var(--border-strong);
  }

  .bm--final::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -1.5rem;
    width: 1.5rem;
    border-top: 2px solid var(--border-strong);
  }

  .podium {
    gap: 1rem;
  }

  .podium-card {
    padding-inline: 1rem;
  }
}

@media (min-width: 52rem) {
  .hero {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: center;
    gap: 2.5rem;
    margin-top: 1.5rem;
    padding: 2.75rem;
  }
}

/* ---------- Dostępność i druk ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .hero h1,
  .nf-digit {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

@media print {
  .main-nav,
  .site-footer,
  .skip-link,
  .round-jump,
  .consent-banner,
  .toast,
  .hero-bg {
    display: none !important;
  }

  body {
    padding: 0;
    background: #fff;
    color: #000;
  }

  .hero {
    color: #000;
    background: none;
    box-shadow: none;
  }
}
