/* =====================================================================
   ISALTS – motyw (makieta). Kolory logo + kolor dla każdej ligi.
   ===================================================================== */
:root {
  --ink: #0e1320;
  --paper: #f4f5f9;
  --card: #ffffff;
  --card-2: #f7f8fb;
  --line: #e4e7ef;
  --text: #131826;
  --muted: #5d6478;
  --red: #e10f1a;
  --red-ink: #b30c15;
  --yellow: #ffc21a;
  --blue: #1f56d8;
  --green: #0c9a6a;
  --win: #11935c;
  --loss: #d92d3a;
  --gold: #f2b705; --silver: #aab2bd; --bronze: #c9783b;
  --zone-up: rgba(17,147,92,.10);
  --zone-play: rgba(255,194,26,.18);
  --zone-down: rgba(217,45,58,.09);
  --shadow: 0 1px 2px rgba(14,19,32,.06), 0 8px 24px rgba(14,19,32,.06);
  --radius: 14px;
  --lg: var(--red);            /* kolor aktywnej ligi – nadpisywany przez .liga-1/2/3 */
  --lg-soft: rgba(225,15,26,.08);
  --head-h: 64px;
  color-scheme: light;
}
.liga-1 { --lg: var(--red);   --lg-soft: rgba(225,15,26,.09); }
.liga-2 { --lg: var(--blue);  --lg-soft: rgba(31,86,216,.09); }
.liga-3 { --lg: var(--green); --lg-soft: rgba(12,154,106,.10); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0f19; --card: #141a28; --card-2: #1a2132; --line: #263048; --text: #e9ecf4; --muted: #9aa3b8;
    --red-ink: #ff5a62; --blue: #5b8cff; --green: #2fc58f; --win: #35c47f; --loss: #ff5d68;
    --zone-up: rgba(53,196,127,.14); --zone-play: rgba(255,194,26,.14); --zone-down: rgba(255,93,104,.13);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b0f19; --card: #141a28; --card-2: #1a2132; --line: #263048; --text: #e9ecf4; --muted: #9aa3b8;
  --red-ink: #ff5a62; --blue: #5b8cff; --green: #2fc58f; --win: #35c47f; --loss: #ff5d68;
  --zone-up: rgba(53,196,127,.14); --zone-play: rgba(255,194,26,.14); --zone-down: rgba(255,93,104,.13);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; background: var(--paper); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--red-ink); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.num { font-variant-numeric: tabular-nums; }
.brand { font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }

/* ---------------- nagłówek ---------------- */
.site-head { position: sticky; top: 0; z-index: 30; height: var(--head-h);
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--red) 0 33.3%, var(--blue) 33.3% 66.6%, var(--green) 66.6%); }
.head-in { max-width: 1180px; margin: 0 auto; height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo .ludzik { width: 46px; height: 46px; overflow: hidden; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--yellow); }
.logo .ludzik img { height: 40px; width: auto; max-width: none; object-fit: cover; object-position: left; margin-left: 10px; }
.logo .slowo { font-size: 26px; line-height: 1; }
.logo .slowo small { display: block; font-size: 9.5px; letter-spacing: .06em; color: var(--red-ink); font-weight: 800; margin-top: 2px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--text); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--card-2); }
.nav a.on { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .nav a.on { background: #fff; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a.on { background: #fff; color: var(--ink); } }
.head-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.head-btn:hover { border-color: var(--muted); }
.head-btn svg { width: 20px; height: 20px; }
@media (max-width: 1140px) {
  .nav { display: none; }
  .head-tools { margin-left: auto; }
}
.head-tools { display: flex; gap: 8px; }

/* ---------------- dolna nawigacja (telefon) ---------------- */
.tabbar { display: none; }
@media (max-width: 1140px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
    text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; background: none; border: 0; cursor: pointer; border-radius: 12px; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar .on { color: var(--red-ink); background: var(--lg-soft); }
}

/* menu „więcej” */
.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.open { display: block; }
.sheet .bg { position: absolute; inset: 0; background: rgba(5,8,15,.5); }
.sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 20px 20px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow); animation: wjazd .2s ease-out; }
.sheet .uchwyt { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet nav a { display: flex; justify-content: space-between; padding: 14px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px; }
@keyframes wjazd { from { transform: translateY(30px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------------- wyszukiwarka zawodników ---------------- */
.szukaj { position: fixed; inset: 0; z-index: 70; display: none; background: rgba(5,8,15,.55); padding: 10vh 16px 16px; }
.szukaj.open { display: block; }
.szukaj .box { max-width: 560px; margin: 0 auto; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.szukaj input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; font-size: 18px; padding: 18px 20px; outline: none; }
.szukaj ul { list-style: none; margin: 0; padding: 6px; max-height: 55vh; overflow: auto; }
.szukaj li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.szukaj li a:hover, .szukaj li a.akt { background: var(--card-2); }
.szukaj .pusto { padding: 18px; color: var(--muted); }

/* ---------------- układ ---------------- */
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; border: 1px solid var(--line); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } main { padding-top: 14px; } .card { padding: 16px; } }
.page-title { margin: 6px 0 18px; }
.page-title h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); line-height: 1.05; }
.page-title p { margin: 6px 0 0; color: var(--muted); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.sec-title h2 { margin: 0; font-size: 22px; }
.sec-title a { font-weight: 700; font-size: 14px; text-decoration: none; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------------- hero ---------------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; background: var(--ink); color: #fff; padding: 28px; margin-bottom: 22px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; min-height: 300px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(30px, 5.4vw, 54px); line-height: .98; }
.hero h1 em { color: var(--yellow); font-style: italic; }
.hero p { color: #c9cfdd; margin: 0 0 18px; max-width: 46ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 0; cursor: pointer; }
.btn-y { background: var(--yellow); color: var(--ink); }
.btn-o { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.btn-y:hover { filter: brightness(1.05); } .btn-o:hover { background: rgba(255,255,255,.14); }
.licznik { display: flex; gap: 8px; margin: 0 0 18px; }
.licznik div { background: rgba(255,255,255,.07); border-radius: 12px; padding: 8px 12px; min-width: 70px; text-align: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.licznik b { display: block; font-size: 28px; line-height: 1; font-style: italic; font-variant-numeric: tabular-nums; color: var(--yellow); }
.licznik span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #aeb5c6; }
/* stół do ping-ponga w CSS */
.stol { position: relative; aspect-ratio: 1.8 / 1; transform: perspective(700px) rotateX(48deg) rotateZ(-14deg); justify-self: center; width: min(100%, 420px); }
.stol .blat { position: absolute; inset: 0; background: linear-gradient(135deg, #2457d6, #173d9e); border: 4px solid #fff; border-radius: 6px;
  box-shadow: 0 30px 40px rgba(0,0,0,.45); }
.stol .blat::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(255,255,255,.9); transform: translateX(-50%); }
.stol .blat::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(255,255,255,.55); }
.stol .siatka { position: absolute; top: -10%; bottom: -10%; left: 50%; width: 7px; transform: translateX(-50%);
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.85) 0 2px, transparent 2px 5px); border-top: 4px solid #fff; border-bottom: 4px solid #fff; }
.pilka { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #ffd25a 55%, #e9a800);
  box-shadow: 0 0 18px rgba(255,194,26,.8); left: 12%; top: 60%; animation: lot 2.2s cubic-bezier(.45,.05,.55,.95) infinite alternate; }
@keyframes lot { 0% { left: 12%; top: 64%; } 50% { top: 18%; } 100% { left: 82%; top: 40%; } }
@media (prefers-reduced-motion: reduce) { .pilka { animation: none; } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 22px 18px; min-height: 0; border-radius: 18px; }
  .stol { position: absolute; right: -60px; top: -30px; width: 230px; opacity: .35; }
}

/* pasek ostatnich wyników */
.ticker { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; margin: 0 -2px 8px; scrollbar-width: thin; }
.ticker a { scroll-snap-align: start; flex: 0 0 auto; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--lg);
  border-radius: 12px; padding: 8px 12px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.ticker .t-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ticker .t-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ticker .t-row b { font-variant-numeric: tabular-nums; }
.ticker .t-row.w { font-weight: 800; }

/* karty lig na starcie */
.liga-card { border-top: 5px solid var(--lg); }
.liga-card h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 20px; }
.liga-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--lg-soft); color: var(--lg); text-transform: uppercase; letter-spacing: .04em; }
.lider { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--lg-soft); margin-bottom: 8px; }
.lider .info { flex: 1; min-width: 0; }
.lider .info b { display: block; font-size: 17px; }
.lider .pk { font-size: 30px; font-weight: 900; font-style: italic; color: var(--lg); line-height: 1; text-align: right; }
.lider .pk small { display: block; font-size: 11px; color: var(--muted); font-style: normal; font-weight: 700; }
.mini { width: 100%; border-collapse: collapse; font-size: 15px; }
.mini td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.mini td:last-child { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini td.p { width: 28px; color: var(--muted); font-weight: 700; }
.mini a, .tbl a, .mecz a, .lider a { color: inherit; text-decoration: none; }
.mini a:hover, .tbl a:hover, .mecz a:hover, .lider a:hover { color: var(--lg); text-decoration: underline; }

/* awatary z inicjałami */
.av { --h: 0; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px;
  color: #fff; background: hsl(var(--h) 62% 46%); letter-spacing: .02em; }
.av.l { width: 64px; height: 64px; font-size: 22px; }
.av.xl { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 4px var(--card), 0 0 0 7px var(--lg); }

/* przełączniki */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.seg a { text-decoration: none; color: var(--muted); font-weight: 800; padding: 7px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.seg a.on { color: #fff; background: var(--c, var(--ink)); }
.seg a[data-l="1"] { --c: var(--red); } .seg a[data-l="2"] { --c: var(--blue); } .seg a[data-l="3"] { --c: var(--green); }
.sel { font: inherit; font-size: 14px; font-weight: 700; padding: 8px 32px 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none; appearance: none; color: var(--text); max-width: 100%; box-shadow: var(--shadow); }

/* ---------------- tabela ligowa ---------------- */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 8px 6px; text-align: center; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--card); }
.tbl .l { text-align: left; }
.tbl td.zaw { text-align: left; font-weight: 700; white-space: normal; min-width: 150px; }
.tbl td.zaw .zw { display: flex; align-items: center; gap: 10px; }
.tbl td.pkt { font-weight: 900; font-size: 17px; color: var(--lg); }
.tbl tr.z-up td { background: linear-gradient(var(--zone-up), var(--zone-up)), var(--card); }
.tbl tr.z-play td { background: linear-gradient(var(--zone-play), var(--zone-play)), var(--card); }
.tbl tr.z-down td { background: linear-gradient(var(--zone-down), var(--zone-down)), var(--card); }
.tbl tr.z-up td:first-child { box-shadow: inset 4px 0 0 var(--win); }
.tbl tr.z-play td:first-child { box-shadow: inset 4px 0 0 var(--yellow); }
.tbl tr.z-down td:first-child { box-shadow: inset 4px 0 0 var(--loss); }
.poz { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 900; font-size: 14px; }
.poz.p1 { background: var(--gold); color: #3a2a00; } .poz.p2 { background: var(--silver); color: #1d232b; } .poz.p3 { background: var(--bronze); color: #fff; }
.trend { display: inline-block; font-size: 11px; font-weight: 800; }
.trend.up { color: var(--win); } .trend.dn { color: var(--loss); } .trend.eq { color: var(--muted); opacity: .5; }
.form { display: inline-flex; gap: 3px; }
.form i { width: 9px; height: 22px; border-radius: 3px; background: var(--loss); display: inline-block; }
.form i.W { background: var(--win); height: 22px; } .form i.P { height: 12px; align-self: flex-end; opacity: .85; }
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; min-width: 60px; }
.bar span { position: absolute; inset: 0 auto 0 0; background: var(--lg); border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.legend .up::before { background: var(--win); } .legend .play::before { background: var(--yellow); } .legend .down::before { background: var(--loss); }
/* telefon: przyklejona kolumna z nazwiskiem, mniej kolumn */
@media (max-width: 760px) {
  .tbl { font-size: 14px; }
  .tbl .opt { display: none; }
  .tbl td.zaw { min-width: 132px; }
  .tbl th:nth-child(2), .tbl td:nth-child(2) { position: sticky; left: 0; z-index: 1; }
  .tbl .av { width: 30px; height: 30px; font-size: 12px; }
}

/* ---------------- mecze ---------------- */
.dzien { display: flex; align-items: center; gap: 10px; margin: 24px 0 10px; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 15px; }
.dzien::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.dzien .kal { background: var(--lg); color: #fff; border-radius: 10px; padding: 4px 10px; font-style: normal; font-size: 13px; }
.kolejka { margin-bottom: 14px; }
.kolejka h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mecz { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); margin-bottom: 6px; }
.mecz .z1 { text-align: right; } .mecz .z2 { text-align: left; }
.mecz .w { font-weight: 800; }
.mecz .s { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; }
.wyn { font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; background: var(--ink); color: #fff; border-radius: 8px; padding: 2px 10px; letter-spacing: .04em; }
:root[data-theme="dark"] .wyn { background: #fff; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wyn { background: #fff; color: var(--ink); } }
.wyn.brak { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.pipy { display: flex; gap: 3px; }
.pipy i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.pipy i.a { background: var(--lg); }
.tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 6px; background: var(--zone-play); color: var(--text); }
.pauza { font-size: 13px; color: var(--muted); padding: 2px 12px 8px; }
.mecz.moj { box-shadow: inset 0 0 0 2px var(--lg); background: var(--lg-soft); }
@media (max-width: 520px) {
  .mecz { padding: 9px 8px; gap: 8px; font-size: 14px; }
  .mecz .s { min-width: 58px; }
  .wyn { font-size: 16px; padding: 2px 7px; }
}

/* krzyżowa */
.krz td, .krz th { border: 1px solid var(--line); padding: 6px; font-size: 13px; text-align: center; }
.krz td.x { background: repeating-linear-gradient(45deg, var(--card-2) 0 6px, var(--line) 6px 8px); }
.krz .w { color: var(--win); font-weight: 800; } .krz .p { color: var(--loss); }
.krz th.n { min-width: 54px; }

/* ---------------- zawodnik ---------------- */
.prof { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.prof h1 { margin: 0; font-size: clamp(26px, 5vw, 40px); line-height: 1.05; }
.prof .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 28px; font-style: italic; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.ring { --p: 50; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--win) calc(var(--p) * 1%), var(--loss) 0); display: grid; place-items: center; float: right; }
.ring::after { content: attr(data-t); width: 46px; height: 46px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.wykres { width: 100%; height: auto; display: block; }
.wykres .os { stroke: var(--line); stroke-width: 1; }
.wykres text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.wykres .linia { fill: none; stroke: var(--lg); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.wykres .pole { fill: var(--lg-soft); }
.wykres circle { fill: var(--card); stroke: var(--lg); stroke-width: 2.5; }
.medale { display: flex; gap: 10px; flex-wrap: wrap; }
.medal { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--card-2); }
.medal .poz { width: 34px; height: 34px; font-size: 16px; }

/* ---------------- lista zawodników ---------------- */
.zaw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.zaw-grid a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); text-decoration: none; color: var(--text); font-weight: 700; border: 1px solid transparent; }
.zaw-grid a:hover { border-color: var(--lg); }
.zaw-grid small { display: block; font-weight: 500; color: var(--muted); }

/* ---------------- historia ---------------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; text-align: center; max-width: 560px; margin: 0 auto 8px; }
.podium .st { border-radius: 12px 12px 0 0; padding: 12px 8px; color: #fff; font-weight: 900; font-style: italic; font-size: 28px; }
.podium .p1 .st { background: linear-gradient(var(--gold), #d79f00); height: 120px; color: #3a2a00; }
.podium .p2 .st { background: linear-gradient(var(--silver), #8d96a3); height: 90px; color: #1d232b; }
.podium .p3 .st { background: linear-gradient(var(--bronze), #a85f28); height: 70px; }
.podium .nm { font-weight: 800; margin-bottom: 8px; line-height: 1.2; }
.podium .nm a { color: inherit; text-decoration: none; }
.lata { display: grid; gap: 8px; }
.rok { display: grid; grid-template-columns: 60px 1fr 1fr 1fr; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card-2); font-size: 14px; }
.rok b { font-style: italic; font-size: 16px; }
.rok a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.rok .poz { width: 20px; height: 20px; font-size: 11px; flex-shrink: 0; }
@media (max-width: 600px) { .rok { grid-template-columns: 1fr; gap: 3px; } }

/* ---------------- aktualności / treści ---------------- */
.posty { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.post .okl { aspect-ratio: 16/8; background: linear-gradient(135deg, var(--ink), #1d2a4d); position: relative; display: grid; place-items: center; }
.post .okl::before { content: ""; position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.8); background: linear-gradient(135deg, #2457d6, #173d9e); border-radius: 4px; transform: perspective(300px) rotateX(35deg); }
.post .okl span { position: relative; color: var(--yellow); font-size: 30px; }
.post .tresc { padding: 16px 18px 18px; }
.post .data { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.post h3 { margin: 6px 0 8px; font-size: 20px; line-height: 1.2; }
.post h3 a { color: var(--text); text-decoration: none; }
.post p { margin: 0; color: var(--muted); }
.prose { max-width: 760px; font-size: 17px; line-height: 1.7; }
.prose h2 { margin-top: 32px; } .prose h3 { margin-top: 26px; font-style: italic; text-transform: uppercase; }
.prose table { border-collapse: collapse; } .prose td, .prose th { border-bottom: 1px solid var(--line); padding: 6px 12px; }
.callout { border-radius: 12px; padding: 14px 16px; background: var(--zone-play); border-left: 5px solid var(--yellow); }

/* ---------------- stopka ---------------- */
.site-foot { background: var(--ink); color: #b9c0d0; margin-top: 30px; }
.site-foot .in { max-width: 1180px; margin: 0 auto; padding: 32px 16px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-foot b { color: #fff; } .site-foot a { color: var(--yellow); }
.site-foot .pasy { height: 6px; background: linear-gradient(90deg, var(--red) 0 33.3%, var(--blue) 33.3% 66.6%, var(--green) 66.6%); }
@media (max-width: 760px) { .site-foot .in { grid-template-columns: 1fr; } }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

@media print {
  .site-head, .tabbar, .site-foot, .toolbar { display: none !important; }
  body { background: #fff; padding: 0; } .card { box-shadow: none; }
}

/* poprawki po przeglądzie */
.liga-chip { text-decoration: none; }
.pauza a { color: inherit; font-weight: 700; }
.pkm { font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl td.pz { width: 44px; line-height: 1; }
.tbl td.pz .trend { display: block; width: auto; margin-top: 3px; font-size: 10px; }
.wykres text { font-size: 12px; }

/* zdjęcia zawodników, mali awatary, mistrzowie, wyróżniony wpis */
img.av { object-fit: cover; background: var(--card-2); }
.av.s { width: 26px; height: 26px; font-size: 10px; }
.mistrzowie { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.mistrzowie > b { font-size: 18px; margin-right: 6px; }
.mistrzowie a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 700; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--lg-soft); }
.mistrzowie a small { display: block; font-size: 10px; color: var(--lg); font-weight: 800; letter-spacing: .05em; }
.mistrzowie a.wiecej { background: none; margin-left: auto; color: var(--red-ink); font-size: 14px; }
.wyroz { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; padding: 0; }
.wyroz .okl { min-height: 220px; aspect-ratio: auto; }
.wyroz .tresc { padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; }
.wyroz h3 { font-size: clamp(22px, 3vw, 30px); }
.wyroz p { font-size: 16px; }
.wyroz .btn { align-self: flex-start; margin-top: 14px; }
@media (max-width: 760px) { .wyroz { grid-template-columns: 1fr; } .wyroz .okl { min-height: 140px; } }

/* ===== nowości ===== */
.nav a.zapisy { background: var(--yellow); color: var(--ink); margin-left: 4px; }
.btn-s { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); font-size: 14px; padding: 9px 14px; }
.btn-s:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.akcje { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.udost { border: 0; background: var(--lg-soft); color: var(--lg); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 9px; margin-left: 6px; cursor: pointer; letter-spacing: .03em; text-transform: none; }
.udost:hover { background: var(--lg); color: #fff; }
.odz { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; vertical-align: 1px; white-space: nowrap; }
.odz.zl { background: rgba(242,183,5,.22); color: #8a6400; } .odz.up { background: var(--zone-up); color: var(--win); }
.odz.ok { background: var(--card-2); color: var(--muted); } .odz.dn { background: var(--zone-down); color: var(--loss); }
:root[data-theme="dark"] .odz.zl { color: var(--yellow); }
/* porównanie */
.por-glowa { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 10px; margin-bottom: 14px; }
.por-glowa > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.por-glowa .h2h b { font-size: 40px; font-style: italic; font-weight: 900; line-height: 1; }
.por-glowa .h2h span { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 800; letter-spacing: .05em; }
.por-w { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.por-w .pa { text-align: right; } .por-w .pl { font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 800; letter-spacing: .04em; text-align: center; min-width: 110px; }
.por-w .lepszy { font-weight: 900; color: var(--win); }
/* rekordy */
.rekord h3 { margin: 0; font-size: 19px; } .rekord p { margin: 2px 0 12px; }
.rek-1 { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--card-2); margin-bottom: 6px; }
.rek-1 > div:nth-child(2) { flex: 1; } .rek-1 b { display: block; }
.rek-1 .pk { font-size: 32px; font-weight: 900; font-style: italic; color: var(--red-ink); }
/* formularz */
.formularz label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.formularz input:not([type=checkbox]), .formularz select { display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); }
.formularz input:focus, .formularz select:focus { outline: 2px solid var(--yellow); border-color: transparent; }
.pola2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .pola2 { grid-template-columns: 1fr; } }
.formularz fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 6px 0 12px; }
.formularz legend { font-weight: 800; font-size: 13px; padding: 0 6px; }
.formularz .ch { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.formularz .ch input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--red); }
.foto-info { display: flex; align-items: center; gap: 14px; margin: -4px 0 14px; }
.zg-uklad { grid-template-columns: 1.4fr 1fr; align-items: start; }
@media (max-width: 760px) { .zg-uklad { grid-template-columns: 1fr; } }
.kroki { padding-left: 20px; } .kroki li { margin-bottom: 10px; }
/* galeria + lightbox */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 12px 0; }
.galeria a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 3/2; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.galeria a:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5,8,15,.94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; cursor: pointer; line-height: 1; }
.lb-x { top: 14px; right: 14px; } .lb-p { left: 14px; top: 50%; } .lb-n { right: 14px; top: 50%; }
.lb-o { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #c9cfdd; font-size: 14px; }
@media (max-width: 600px) { .lb-p, .lb-n { display: none; } }

.por-glowa a, .rek-1 a { color: inherit; text-decoration: none; }
.por-glowa a:hover, .rek-1 a:hover { text-decoration: underline; }

/* ===== hero: wymiana 3D + klapki ===== */
.hero { background: radial-gradient(120% 90% at 85% 40%, #1a2547 0%, var(--ink) 60%); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 50% at 15% 110%, rgba(225,15,26,.35), transparent 70%), radial-gradient(30% 40% at 100% 0%, rgba(255,194,26,.12), transparent 70%); }
.hero > div { position: relative; z-index: 1; }
canvas.wymiana { width: 100%; height: 100%; min-height: 300px; display: block; position: relative; z-index: 0; }
@media (max-width: 760px) {
  canvas.wymiana { height: 230px; min-height: 0; width: calc(100% + 36px); margin: -6px -18px -22px; }
}
.klapki { display: flex; gap: 10px; margin: 0 0 20px; flex-wrap: wrap; }
.kl-gr { text-align: center; }
.kl-gr > span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #aeb5c6; margin-top: 5px; font-weight: 700; }
.kl-cyfry { display: flex; gap: 3px; }
.kl { position: relative; width: 34px; height: 48px; perspective: 200px; }
.kl b { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 7px; font-size: 30px; font-weight: 900; font-style: normal; color: var(--yellow);
  background: linear-gradient(#232c44 0 49%, #10172a 51% 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 4px 10px rgba(0,0,0,.35); font-variant-numeric: tabular-nums; }
.kl::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.55); }
.kl.flip b { animation: klap .45s cubic-bezier(.3,.1,.3,1); transform-origin: 50% 50%; }
@keyframes klap { 0% { transform: rotateX(0); } 45% { transform: rotateX(-90deg); filter: brightness(.6); } 55% { transform: rotateX(90deg); filter: brightness(.6); } 100% { transform: rotateX(0); } }
@media (max-width: 400px) { .kl { width: 28px; height: 40px; } .kl b { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .kl.flip b { animation: none; } }
