/* Publiczny serwis TopGames — styl „dashboard" jak panel (płaskie karty z cienką ramką, jeden akcent) na tle z miękkim gradientem marki (--grad). Jasny domyślnie, ciemny z ustawień systemu. */
:root {
  color-scheme: light dark;
  --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f8f9fb; --line: #dfe2e7; --line-2: #eceef2;
  --txt: #1c1f24; --muted: #68707d; --accent: #0b62d6; --accent-weak: #e7f0fd; --brand: #f6821f;
  --ok: #17794a; --ok-bg: #e5f4ec; --ok-line: #b4dcc6;
  --gold: #e8b12c; --silver: #aab3c0; --bronze: #cf8a52; --r: 6px; --r-s: 5px; --r-l: 12px;
  --lift: 0 12px 28px rgba(20, 24, 32, .12);
  /* gradient marki (logo, tytuł, podkreślenia) i natężenie poświaty tła */
  --grad: linear-gradient(100deg, #ff8a1f 0%, #f6427f 48%, #7b5be6 100%); --glow: .2;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014; --surface: #171a20; --surface-2: #1c2027; --line: #2b3039; --line-2: #232830;
    --txt: #e7e9ee; --muted: #98a1af; --accent: #5aa2ff; --accent-weak: rgba(90, 162, 255, .14);
    --ok: #5fd39a; --ok-bg: rgba(95, 211, 154, .12); --ok-line: rgba(95, 211, 154, .35);
    --lift: 0 14px 32px rgba(0, 0, 0, .5); --glow: .26;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--txt); background: var(--bg); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
/* tło: trzy plamy koloru u góry strony, które gasną w neutralne tło (nie przewija się z treścią) */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(58% 46% at 8% -6%, rgba(123, 91, 230, var(--glow)), transparent 70%),
  radial-gradient(52% 42% at 94% -4%, rgba(255, 138, 31, var(--glow)), transparent 70%),
  radial-gradient(60% 40% at 52% -14%, rgba(246, 66, 127, calc(var(--glow) * .8)), transparent 72%); }
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; letter-spacing: -.01em; }
.dim { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 4px 20px 48px; flex: 1; }

/* pasek u góry na całą szerokość */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 74%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad); opacity: .55; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 4px 12px rgba(246, 66, 127, .35); }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav a { padding: 6px 12px; border-radius: var(--r-s); color: var(--muted); font-weight: 600; font-size: 14px; }
.top-nav a:hover { background: var(--surface-2); color: var(--txt); }
.top-nav a.on { background: color-mix(in srgb, var(--txt) 8%, transparent); color: var(--txt); }
/* wybór języka: przycisk z kodem i rozwijana lista (działa bez skryptu — <details>) */
.langs { position: relative; margin-left: 6px; }
.langs summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; cursor: pointer; user-select: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.langs summary:hover, .langs[open] summary { color: var(--txt); border-color: var(--muted); }
.langs-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 6; min-width: 168px; padding: 6px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--lift); }
.top-nav .langs-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-weight: 500; }
.langs-menu b { width: 24px; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.top-nav .langs-menu a.on { background: var(--accent-weak); color: var(--accent); } .langs-menu a.on b { color: inherit; }
.foot { max-width: 1120px; width: 100%; margin: 0 auto; padding: 16px 20px 24px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.foot a:hover { color: var(--txt); text-decoration: underline; }

.glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); color: var(--txt); font: 600 14px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn.ghost { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* nagłówek strony, liczby zbiorcze, karty gier */
.hero { padding: 44px 0 26px; }
.hero h1 { display: inline-block; font-size: 52px; line-height: 1.1; font-weight: 800; letter-spacing: -.035em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 16px; border-radius: 2px; background: var(--grad); }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi b { font-size: 26px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
/* biblioteka gier: pionowe okładki jak pudełka na półce; po najechaniu okładka unosi się, pochyla za kursorem i łapie odblask (site.js ustawia --rx/--ry/--mx/--my) */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 30px 24px; perspective: 1400px; padding-bottom: 12px; }
.card { --accent: #0b62d6; min-width: 0; animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.card:nth-child(2) { animation-delay: 50ms; } .card:nth-child(3) { animation-delay: 100ms; } .card:nth-child(4) { animation-delay: 150ms; }
.card:nth-child(5) { animation-delay: 200ms; } .card:nth-child(6) { animation-delay: 250ms; } .card:nth-child(7) { animation-delay: 300ms; }
.card:nth-child(8) { animation-delay: 350ms; } .card:nth-child(n+9) { animation-delay: 400ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.cap { --rx: 0deg; --ry: 0deg; --s: 1; --mx: 50%; --my: 0%; position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 7px; transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s)); transform-style: preserve-3d; transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, .25), 0 10px 22px rgba(0, 0, 0, .28); cursor: pointer; }
.card:hover .cap, .cap:focus-visible { --s: 1.05; box-shadow: 0 4px 8px rgba(0, 0, 0, .3), 0 26px 48px rgba(0, 0, 0, .5); }
.cap.tilt { transition: transform .06s linear, box-shadow .25s ease; }
.cap-art { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: var(--surface-2); }
.cap-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* krawędź pudełka: cień grzbietu z lewej i cienka jasna ramka */
.cap-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(0, 0, 0, .34) 0, rgba(255, 255, 255, .14) 2.4%, rgba(255, 255, 255, 0) 5.5%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .22); pointer-events: none; }
.cap-shine { position: absolute; inset: 0; background: radial-gradient(120% 90% at var(--mx) var(--my), rgba(255, 255, 255, .34), rgba(255, 255, 255, .06) 38%, rgba(255, 255, 255, 0) 62%); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.card:hover .cap-shine, .cap:focus-visible .cap-shine { opacity: 1; }
/* gra bez obrazka: inicjały na kolorze akcentu */
.cover-ph { position: absolute; inset: 0; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 56px; font-weight: 800; letter-spacing: -.03em; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.cover-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(0, 0, 0, .34)); }
.cap .live { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 1px 8px; font-size: 11.5px; background: rgba(13, 15, 19, .84); color: #7be3ae; border-color: transparent; transform: translateZ(18px); }
.card h2 { margin-top: 12px; font-size: 14.5px; line-height: 1.3; font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s ease; }
.card:hover h2 { color: var(--accent); }
.btn.play { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.play:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.1); }

/* okno gry: galeria zrzutów po lewej, po prawej okładka, nazwa, adres i „Graj” */
.gm { --accent: #0b62d6; width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--txt); box-shadow: 0 40px 90px rgba(0, 0, 0, .6); overflow: hidden; }
.gm::backdrop { background: rgba(6, 7, 10, .6); backdrop-filter: blur(6px); }
/* tło pod oknem: rozmyta okładka gry i poświata w jej kolorze (pod przyciemnieniem) */
.gm-bg { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.gm-bg.on { opacity: 1; }
.gm-bg img { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(50px) saturate(1.4); opacity: .6; }
.gm-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(55% 50% at 50% 50%, color-mix(in srgb, var(--accent) 50%, transparent), transparent 72%); }
.gm[open] { animation: gm-in .22s cubic-bezier(.2, .7, .2, 1); }
.gm[open]::backdrop { animation: gm-fade .22s ease; }
@keyframes gm-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes gm-fade { from { opacity: 0; } }
/* przelot karta ↔ okno (View Transitions): bez zwykłego wejścia okna, ramka i okładka lecą razem */
.gm.vt[open], .gm.vt[open]::backdrop { animation: none; }
::view-transition-group(gm-box), ::view-transition-group(gm-cover) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-group(gm-box) { overflow: clip; border-radius: 14px; }
::view-transition-old(gm-box), ::view-transition-new(gm-box) { width: 100%; height: 100%; object-fit: cover; object-position: top; }
::view-transition-old(gm-box) { animation-duration: .2s; }
::view-transition-new(gm-box) { animation-duration: .35s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
.gm-in { display: grid; grid-template-columns: minmax(0, 1fr) 300px; max-height: calc(100vh - 34px); }
.gm-gal { min-width: 0; display: flex; flex-direction: column; background: #0b0c10; }
.gm-stage { position: relative; aspect-ratio: 16 / 9; background: #0b0c10; overflow: hidden; touch-action: pan-y; }
/* zrzuty przenikają się; bieżący powoli się przybliża (kb0–kb3 — różne punkty zbliżenia) */
.gm-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .6s ease; user-select: none; -webkit-user-drag: none; }
.gm-shot.on { opacity: 1; animation: gm-kb 16s ease-out both; }
.gm-shot.kb0 { transform-origin: 30% 40%; } .gm-shot.kb1 { transform-origin: 70% 35%; } .gm-shot.kb2 { transform-origin: 40% 70%; } .gm-shot.kb3 { transform-origin: 65% 65%; }
@keyframes gm-kb { from { transform: scale(1); } to { transform: scale(1.08); } }
.gm-nav { z-index: 1; }
.gm-nav { position: absolute; top: 50%; width: 40px; height: 56px; margin-top: -28px; border: 0; border-radius: 6px; background: rgba(13, 15, 19, .6); color: #fff; font: 600 22px var(--font); cursor: pointer; opacity: .75; transition: opacity .15s, background .15s; }
.gm-nav:hover { opacity: 1; background: rgba(13, 15, 19, .88); }
.gm-prev { left: 10px; } .gm-next { right: 10px; }
.gm-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: thin; }
.gm-thumbs button { flex: none; width: 104px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 5px; background: #16181d; overflow: hidden; cursor: pointer; opacity: .6; transition: opacity .15s, border-color .15s; }
.gm-thumbs button:hover { opacity: 1; }
.gm-thumbs button.on { opacity: 1; border-color: var(--accent); }
.gm-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gm-side { display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 20px; min-width: 0; overflow-y: auto; }
.gm-cover { width: 96px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.gm-side h2 { font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.gm-url { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-url::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.gm-url:hover { color: var(--txt); text-decoration: underline; }
.gm-stats { display: flex; gap: 22px; margin: 0; }
.gm-stats dt { color: var(--muted); font-size: 12.5px; }
.gm-stats dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gm-acts { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.gm-acts .btn { padding: 10px 14px; font-size: 15px; }
.gm-acts .btn.play { padding: 13px 14px; font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.gm-soon { margin: auto 0 0; color: var(--muted); font-size: 14px; }
.gm-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(13, 15, 19, .55); color: #fff; font: 400 22px/1 var(--font); cursor: pointer; }
.gm-x:hover { background: rgba(13, 15, 19, .9); }
/* pasek zrzutów na stronie gry */
.shotstrip { display: flex; gap: 10px; margin: 0 0 18px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.shotstrip a { flex: none; width: 240px; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #0b0c10; }
.shotstrip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #0b62d6); }
.live { display: inline-flex; align-items: center; gap: 7px; padding: 1px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok-line); }
.live b { font-variant-numeric: tabular-nums; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .pulse, .card, .gm[open], .gm[open]::backdrop, .gm-shot.on { animation: none; } .gm-shot, .gm-bg { transition: none; } .cap { transition: none; transform: none; } }

/* strona gry */
.game-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 22px 0 16px; }
.game-h h1 { display: flex; align-items: center; gap: 10px; font-size: 24px; line-height: 1.2; font-weight: 600; }
.game-h h1 .dot { width: 12px; height: 12px; flex: none; border-radius: 3px; }
/* strona gry z okładką: obrazek po lewej, nazwa obok, przyciski po prawej */
/* nagłówek gry z okładką: karta z poświatą w kolorze gry */
.game-h.has-cover { align-items: center; justify-content: flex-start; margin: 22px 0 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-l); background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 26%, var(--surface)) 0%, var(--surface) 62%); }
.game-h.has-cover h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.game-cover { flex: none; width: 112px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 7px; background: var(--surface-2); box-shadow: 0 10px 22px rgba(0, 0, 0, .3); }
.game-t { flex: 1; min-width: 180px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.crumb a { color: var(--accent); }
.crumb a:hover { text-decoration: underline; }
.game-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; overflow-x: auto; margin-bottom: 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 8px 14px; color: var(--muted); font-weight: 600; font-size: 14.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--txt); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg a { padding: 6px 14px; font-size: 14px; color: var(--muted); white-space: nowrap; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a:hover { color: var(--txt); background: var(--surface-2); }
.seg a.on { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.find { display: flex; gap: 8px; margin-left: auto; }
.find input { width: 180px; max-width: 46vw; font: inherit; font-size: 14px; color: var(--txt); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 7px 10px; }
.find input::placeholder { color: var(--muted); }
.note { margin: 0 0 12px; padding: 10px 14px; font-size: 14.5px; border-left: 4px solid var(--accent); }
.note a { color: var(--accent); }
.tiers { margin: 0 0 12px; }

/* tablica wyników jako tabela */
.board { overflow: hidden; }
.board-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 13px 18px; }
.board-h h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.board-h h2 a { color: var(--accent); }
.board-h .dot { width: 9px; height: 9px; border-radius: 2px; }
.board-h .dim { font-size: 13px; }
.empty, .empty-in { padding: 30px 20px; text-align: center; color: var(--muted); margin: 0; }
.empty-in { border-top: 1px solid var(--line); }
.empty-in .btn { margin: 8px 0 0 4px; }
.empty-in + .rhead, .rhead:has(+ .empty-in) { display: none; }
.rank, .prof { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 104px; align-items: center; gap: 10px; padding: 9px 18px; border-top: 1px solid var(--line-2); }
.rhead { padding: 8px 18px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: -1px; color: var(--muted); font-size: 12px; font-weight: 600; }
.rhead span:nth-child(n+3) { text-align: right; }
.prof .row { grid-template-columns: minmax(0, 1fr) auto 64px; }
li.row:hover { background: var(--surface-2); }
.pos { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.row.p1 .pos, .row.p2 .pos, .row.p3 .pos, .pos.p1, .pos.p2, .pos.p3 { color: #1b1b1b; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; }
.row.p1 .pos, .pos.p1 { background: var(--gold); } .row.p2 .pos, .pos.p2 { background: var(--silver); } .row.p3 .pos, .pos.p3 { background: var(--bronze); }
.pos.rk { text-align: right; }
.pos.rk.p1, .pos.rk.p2, .pos.rk.p3 { width: auto; min-width: 30px; height: 24px; border-radius: 99px; padding: 0 8px; justify-self: end; }
.row.me { background: var(--accent-weak); box-shadow: inset 3px 0 0 var(--accent); }
.who { min-width: 0; display: flex; flex-direction: column; }
.who a, .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who a { font-weight: 600; }
.who a:hover { text-decoration: underline; }
.who small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.val { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 16px; text-align: right; }
.when { font-size: 13px; text-align: right; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); }
.stack { display: grid; gap: 16px; }
.nf { margin-top: 40px; display: grid; gap: 12px; justify-items: center; }
.nf h1 { font-size: 24px; }

@media (max-width: 600px) {
  .wrap { padding: 2px 12px 40px; } .top-in { padding: 0 12px; } .foot { padding: 14px 12px 22px; }
  .hero { padding: 26px 0 18px; }
  .hero h1 { font-size: 38px; }
  .game-h.has-cover h1 { font-size: 24px; }
  .game-h.has-cover { margin: 14px 0 16px; padding: 14px; }
  .top-nav a { padding: 6px 8px; } .brand span:last-child { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 22px 14px; }
  .game-cover { width: 84px; }
  .gm-in { grid-template-columns: 1fr; overflow-y: auto; }
  .gm-cover { display: none; }
  .gm-side { padding: 16px; gap: 12px; }
  .gm-thumbs button { width: 84px; }
  .board-h { padding: 12px 14px; }
  .row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 9px 14px; gap: 8px; }
  .row .when, .rhead span:nth-child(4) { display: none; }
  .prof .row { grid-template-columns: minmax(0, 1fr) auto 54px; }
  .pager { padding: 12px 14px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .find { width: 100%; margin-left: 0; } .find input { flex: 1; width: auto; max-width: none; }
  .game-side { width: 100%; }
}

/* ranga (odznaka), kolor nicka, ikona, warstwy i archiwum sezonów */
.gr { display: inline-block; width: 12px; height: 14px; margin-right: 7px; vertical-align: -1px; clip-path: polygon(50% 0, 100% 18%, 100% 62%, 50% 100%, 0 62%, 0 18%); background: var(--muted); flex: none; }
.gr-brass { background: #cd7f32; } .gr-silver { background: #a9b3c2; } .gr-gold { background: #e8b12c; } .gr-platinum { background: #4fc4c0; }
.gr-diamond { background: #4a9bf0; } .gr-none { background: var(--line); }
.nick .ico, h1.nick .ico { margin-right: 6px; font-size: .95em; }
.nc-f2f2f2 { color: #f2f2f2; }
.nc-b8c0cc { color: #b8c0cc; }
.nc-ff5a5a { color: #ff5a5a; }
.nc-ff9a3a { color: #ff9a3a; }
.nc-ffc233 { color: #ffc233; }
.nc-ffe14a { color: #ffe14a; }
.nc-9be15d { color: #9be15d; }
.nc-4fd47a { color: #4fd47a; }
.nc-2fd0b5 { color: #2fd0b5; }
.nc-5dd6ff { color: #5dd6ff; }
.nc-5a8dff { color: #5a8dff; }
.nc-7b6bff { color: #7b6bff; }
.nc-b46bff { color: #b46bff; }
.nc-ff6bd5 { color: #ff6bd5; }
.nc-ff7a9c { color: #ff7a9c; }
.nc-d9b88a { color: #d9b88a; }
/* kolory nicków są dobrane pod ciemne tło — na jasnym przyciemniamy je, żeby były czytelne */
@media (prefers-color-scheme: light) { .nick[class*="nc-"] { filter: brightness(.6) saturate(1.5); } }
.medals { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; } .medals .gr { margin-right: 0; width: 10px; height: 12px; }

/* strona polityki prywatności */
.privacy { padding: 22px 24px; margin-top: 16px; }
.privacy h1 { font-size: 22px; font-weight: 600; } .privacy h2 { margin-top: 22px; font-size: 17px; } .privacy h3 { margin: 18px 0 6px; font-size: 15px; }
.privacy p { margin: 10px 0; color: var(--txt); }
.privacy a { color: var(--accent); text-decoration: underline; }
.privacy code { font-size: 13px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; }

/* statystyki gry: wykresy słupkowe (kiedy grają) */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-bottom: 18px; }
.chart-card { padding: 14px 16px 12px; min-width: 0; }
.chart-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-card h2 { font-size: 15px; font-weight: 600; }
.chart-card header .dim { font-size: 12.5px; }
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11px var(--font); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: var(--accent-weak); }
.chart .bar { fill: #7fb0ee; }
.chart .bar.best { fill: var(--brand); }
.best { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.best b { color: var(--txt); }
/* okno gry bez żadnego obrazka: sama kolumna z nazwą i przyciskami */
.gm-in.solo { grid-template-columns: 1fr; }
.gm:has(.gm-in.solo) { width: min(420px, calc(100vw - 32px)); }
