/* CDTV — wspólny arkusz stylów dla wszystkich podstron */

/* Michroma (SIL Open Font License) — hostowana lokalnie, bez Google Fonts */
@font-face {
  font-family: "Michroma"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/michroma-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Michroma"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/michroma-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@view-transition { navigation: auto; }

:root {
  color-scheme: light;
  /* paleta z ekranu startowego CDTV (6 pasów gradientu + błękity logo) */
  --cdtv-1: #7363ef; --cdtv-2: #8c63de; --cdtv-3: #9c63ce;
  --cdtv-4: #ad63bd; --cdtv-5: #bd63ad; --cdtv-6: #ce638c;
  --cdtv-ice: #bdefff; --cdtv-frost: #deefff;
  --bg: #f5f4fb;
  --surface: #ffffff;
  --surface-2: #efedf8;
  --border: rgba(12, 14, 20, .09);
  --text: #12141a;
  --text-2: #454b59;
  --muted: #6b7182;
  --accent: #5b4bd8;
  --accent-soft: rgba(115, 99, 239, .12);
  --glass: rgba(245, 244, 251, .72);
  --shadow: 0 1px 2px rgba(16, 20, 40, .05), 0 10px 30px -12px rgba(16, 20, 40, .16);
  --grid: #e7e5f0;
  --axis: #c9ccd6;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --grad: linear-gradient(115deg, var(--cdtv-1), var(--cdtv-2), var(--cdtv-3), var(--cdtv-4), var(--cdtv-5), var(--cdtv-6));
  --glow: rgba(115, 99, 239, .8);
  --logo: #000;
  --ice-glow: rgba(189, 239, 255, .35);
  --radius: 22px;
  --radius-sm: 14px;
  --wrap: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Michroma", var(--font);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0b16; --surface: #171422; --surface-2: #211d30;
    --border: rgba(255, 255, 255, .08);
    --text: #f2f3f7; --text-2: #b8bdca; --muted: #868c9b;
    --accent: #ad8cde; --accent-soft: rgba(173, 140, 222, .14);
    --glass: rgba(13, 11, 22, .72);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px -16px rgba(0, 0, 0, .7);
    --grid: #27233a; --axis: #3a3550; --ice-glow: rgba(189, 239, 255, .07); --logo: #fff;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0b16; --surface: #171422; --surface-2: #211d30;
  --border: rgba(255, 255, 255, .08);
  --text: #f2f3f7; --text-2: #b8bdca; --muted: #868c9b;
  --accent: #ad8cde; --accent-soft: rgba(173, 140, 222, .14);
  --glass: rgba(13, 11, 22, .72);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px -16px rgba(0, 0, 0, .7);
  --grid: #27233a; --axis: #3a3550; --ice-glow: rgba(189, 239, 255, .07); --logo: #fff;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;
}

/* ---------- baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  font: 16px/1.6 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; text-wrap: pretty; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; view-transition-name: header;
  background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.logo {
  width: 58px; aspect-ratio: 1300 / 700; background: var(--logo);  /* czarne; w ciemnym motywie białe, by było widoczne */
  -webkit-mask: url(logo.svg) center / contain no-repeat; mask: url(logo.svg) center / contain no-repeat;
}
.brand-name { font-family: var(--display); font-size: .78rem; letter-spacing: .08em; line-height: 1.25; }
.brand-name small { display: block; color: var(--muted); font-size: .62rem; letter-spacing: .12em; }
.nav { display: flex; gap: 2px; }
.nav a, .menu a {
  color: var(--text-2); text-decoration: none; font-size: .93rem; padding: 8px 12px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px; transition: background .2s, color .2s;
}
.nav a:hover, .menu a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"], .menu a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.nav .icon, .menu a .icon { width: .9em; height: .9em; opacity: .7; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--text-2); border: 1px solid var(--border); transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
/* ikona pokazuje bieżący tryb: auto (wg systemu) → jasny → ciemny */
.theme-btn .i-sun, .theme-btn .i-moon { display: none; }
:root[data-theme] .theme-btn .i-auto { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
.menu-btn { display: none; }
.menu {
  inset: 72px 12px auto auto; margin: 0; width: min(300px, calc(100vw - 24px)); padding: 10px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.menu a { padding: 12px 14px; font-size: 1rem; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.menu:popover-open { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 5vw, 64px); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -64px 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 12% 20%, rgba(115, 99, 239, .22), transparent 70%),
    radial-gradient(35% 45% at 88% 10%, var(--ice-glow), transparent 70%),
    radial-gradient(30% 40% at 70% 90%, rgba(206, 99, 140, .16), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: -64px 0 0; z-index: -1; pointer-events: none; opacity: .5;
  background: radial-gradient(var(--border) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(#000, transparent 85%); mask: linear-gradient(#000, transparent 85%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 12px 6px 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 3px var(--accent-soft); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-2); max-width: 58ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; padding: 0; list-style: none; }
.chip {
  font-size: .85rem; padding: 6px 12px; border-radius: 999px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
}
.chip b { color: var(--text); font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { position: relative; }
.hero-visual .photo {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--border); aspect-ratio: 4 / 3; background: var(--surface-2);
}
.hero-visual .photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-caption {
  position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: .85rem; color: #fff;
  background: rgba(10, 11, 16, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.disc {
  position: absolute; z-index: -1; width: 46%; aspect-ratio: 1; top: -14%; right: -9%; border-radius: 50%;
  background:
    radial-gradient(circle, var(--bg) 0 13%, rgba(255, 255, 255, .6) 13.5% 15%, transparent 15.5% 33%, rgba(255, 255, 255, .25) 33.5% 34%, transparent 34.5%),
    conic-gradient(from 20deg, var(--cdtv-frost), var(--cdtv-ice), #9c9cef, #ad8cde, #ffd9a0, #c8f0b0, var(--cdtv-frost), #cecece, var(--cdtv-frost));
  box-shadow: 0 20px 60px -20px rgba(115, 99, 239, .6);
  animation: spin 24s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

/* mniejszy nagłówek podstron */
.page-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(20px, 3vw, 36px); }
.page-hero + .section { padding-top: 0; }
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
.page-hero .actions { margin-top: 24px; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; border-radius: 999px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { color: #fff; text-shadow: 0 1px 2px rgba(40, 20, 90, .35); background: var(--grad); border-color: transparent; box-shadow: 0 8px 24px -10px var(--glow); }
.btn-primary:hover { box-shadow: 0 12px 30px -10px var(--glow); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .88rem; }

/* ---------- sekcje ---------- */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); margin: 0; }
.section-head p { color: var(--text-2); margin: 8px 0 0; max-width: 60ch; }
.kicker { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* ---------- karty ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.grid-fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in oklab, var(--accent) 35%, var(--border)); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .count {
  position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #fff;
  background: rgba(10, 11, 16, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.card-body p { color: var(--text-2); font-size: .95rem; margin-bottom: .6em; }
.card-body h3 { margin-bottom: .35em; }
.tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; margin-bottom: 10px; color: var(--accent); background: var(--accent-soft);
}
.meta { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--border); }
.meta .icon { width: 1em; height: 1em; }
.meta a { color: var(--text-2); }

/* bento — zestawy */
.bento { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.bento .card-media { aspect-ratio: 16 / 10; }
.specs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.specs li { display: flex; gap: 10px; align-items: baseline; font-size: .95rem; color: var(--text-2); }
.specs li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); translate: 0 -2px; }

/* filtr kategorii (bez JS) */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; border: 0; padding: 0; }
.filters input { position: absolute; opacity: 0; pointer-events: none; }
.filters label {
  cursor: pointer; font-size: .9rem; padding: 8px 14px; border-radius: 999px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); transition: background .2s, color .2s, border-color .2s;
}
.filters label:hover { color: var(--text); }
.filters label span { color: var(--muted); margin-left: 4px; font-size: .8rem; }
.filters input:checked + label { color: var(--bg); background: var(--text); border-color: var(--text); }
.filters input:checked + label span { color: inherit; opacity: .7; }
.filters input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.catalog:has(#f-mem:checked) .card:not([data-cat~="mem"]),
.catalog:has(#f-disk:checked) .card:not([data-cat~="disk"]),
.catalog:has(#f-av:checked) .card:not([data-cat~="av"]),
.catalog:has(#f-io:checked) .card:not([data-cat~="io"]),
.catalog:has(#f-test:checked) .card:not([data-cat~="test"]) { display: none; }

/* programy / linki */
.tile { padding: 24px; gap: 4px; }
.tile .tile-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px;
  color: #fff; background: var(--grad); box-shadow: 0 8px 20px -10px var(--glow);
}
.tile .tile-icon .icon { width: 24px; height: 24px; }
.tile h3 { font-size: 1.15rem; }
.tile .sub { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.tile p { color: var(--text-2); font-size: .95rem; }
.tile .foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile .foot small { color: var(--muted); }
a.tile { color: inherit; text-decoration: none; }
a.tile .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--accent); }
a.tile .go .icon { transition: transform .25s; }
a.tile:hover .go .icon { transform: translateX(4px); }

/* ---------- formularz ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; }
.contact aside { padding: clamp(24px, 4vw, 40px); background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.contact aside p { color: var(--text-2); }
.contact form { padding: clamp(24px, 4vw, 40px); display: grid; gap: 14px; }
.links { display: grid; gap: 8px; margin-top: 8px; }
.links a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.links a:hover { border-color: var(--accent); transform: translateX(3px); }
.links small { display: block; color: var(--muted); font-size: .8rem; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; font: inherit; color: var(--text); padding: 12px 14px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 140px; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

/* ---------- stopka ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 6px; }
.site-footer nav a { color: var(--text-2); }

/* ---------- lightbox ---------- */
.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: #fff;
}
.lb::backdrop { background: rgba(6, 7, 10, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.lb figure { margin: 0; display: grid; place-items: center; min-height: 0; padding: 56px 16px 8px; }
.lb img { max-width: min(100%, 1100px); max-height: 100%; width: auto; border-radius: 14px; box-shadow: 0 30px 80px -20px #000; animation: zoom .25s ease-out; }
@keyframes zoom { from { opacity: 0; transform: scale(.97); } }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 16px 20px; }
.lb-cap { text-align: center; min-width: 0; flex: 0 1 60ch; font-size: .95rem; color: #d8dbe4; }
.lb-cap small { display: block; color: #8b90a0; }
.lb .icon-btn { color: #fff; border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); }
.lb .icon-btn:hover { background: rgba(255, 255, 255, .14); }
.lb-close { position: absolute; top: 12px; right: 12px; }
.lb[data-single] .lb-nav { visibility: hidden; }

/* ---------- galeria (harlequin) ---------- */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.gallery a {
  position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); cursor: zoom-in;
}
.gallery img { width: 100%; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.gallery a:hover img { transform: scale(1.04); }
.gallery span {
  position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; font: 600 .75rem var(--font); color: #fff;
  background: rgba(10, 11, 16, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.zx-stripes { display: inline-flex; gap: 0; height: 18px; transform: skewX(-30deg); margin-left: 6px; vertical-align: middle; }
.zx-stripes i { width: 9px; }
.zx-stripes i:nth-child(1) { background: #d7263d; }
.zx-stripes i:nth-child(2) { background: #f4c20d; }
.zx-stripes i:nth-child(3) { background: #3cba54; }
.zx-stripes i:nth-child(4) { background: #1ea7e1; }

/* ---------- animacja pojawiania się (CSS scroll-driven, bez JS) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.98); } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .disc { width: 38%; right: -4%; }
}
@media (max-width: 480px) { .brand-name small { display: none; } .logo { width: 48px; } }

/* ---------- pomiary meteo ---------- */
.status { color: var(--muted); font-size: .9rem; margin: 16px 0 0; }
.note { color: var(--muted); font-size: .85rem; margin-top: 16px; }
.note.center { text-align: center; }
.seg { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; padding: 7px 16px; border-radius: 999px; font-size: .9rem; color: var(--text-2); transition: background .2s, color .2s; }
.seg label:hover { color: var(--text); }
.seg input:checked + label { background: var(--text); color: var(--bg); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin-bottom: 20px; min-height: 150px; }
.stat { padding: 16px 18px 12px; gap: 2px; }
.stat-l { font-size: .82rem; color: var(--text-2); }
.stat-v { font-size: clamp(1.45rem, 5vw, 1.9rem); font-weight: 650; line-height: 1.2; letter-spacing: -.01em; }
.stat-v small { font-size: .55em; font-weight: 600; color: var(--text-2); margin-left: 3px; }
.stat-s { font-size: .78rem; color: var(--muted); }
.spark { height: 36px; margin-top: 8px; }
.sp { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; opacity: .7; }
.chart-card { padding: 20px 20px 8px; margin-bottom: 20px; }
.chart-card:hover { transform: none; }
.chart-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.chart-grid .chart-card { margin: 0; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 8px 24px; margin-bottom: 12px; }
.chart-title { font: 650 1.05rem var(--font); margin: 0; }
.chart-sub { font-size: .82rem; color: var(--muted); margin: 2px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--s1); }
.key.s2 { background: var(--s2); } .key.s3 { background: var(--s3); }
.plot { position: relative; min-height: 200px; outline-offset: 4px; color: var(--muted); font-size: .9rem; }
.plot svg { display: block; overflow: visible; touch-action: pan-y; }
.meteo.loading .plot svg, .meteo.loading .stats { opacity: .5; transition: opacity .2s; }
.gl { stroke: var(--grid); stroke-width: 1; }
.bl { stroke: var(--axis); stroke-width: 1; }
.tk { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.vl { fill: var(--text); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ln.s1 { stroke: var(--s1); } .ln.s2 { stroke: var(--s2); } .ln.s3 { stroke: var(--s3); }
.ar { opacity: .1; } .ar.s1 { fill: var(--s1); }
.dot { stroke: var(--surface); stroke-width: 2; }
.dot.s1 { fill: var(--s1); } .dot.s2 { fill: var(--s2); } .dot.s3 { fill: var(--s3); }
.xh { stroke: var(--axis); stroke-width: 1; }
.tip {
  position: absolute; top: 8px; z-index: 2; pointer-events: none; min-width: 120px; padding: 8px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .82rem; white-space: nowrap;
}
.tip-t { color: var(--muted); margin-bottom: 4px; }
.tip-r { display: flex; align-items: center; gap: 8px; }
.tip-r b { color: var(--text); font-weight: 650; }
.tip-r span { color: var(--text-2); }
.data { border-top: 1px solid var(--border); margin-top: 8px; }
.data summary { cursor: pointer; padding: 10px 0; font-size: .85rem; color: var(--text-2); }
.tbl { max-height: 320px; overflow: auto; margin-bottom: 12px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-weight: 600; }

/* ---------- memory ---------- */
.banner {
  display: flex; align-items: center; gap: 14px; margin: 20px 0 0; padding: 14px 18px; max-width: 620px;
  border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
}
.banner .icon { width: 28px; height: 28px; color: var(--accent); }
.banner p { margin: 0; }
.scores { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.scores td { padding: 12px 8px; border-bottom: 1px solid var(--border); }
.scores tr:last-child td { border-bottom: 0; }
.scores td:first-child { width: 44px; }
.scores td:last-child { text-align: right; color: var(--text-2); }
.rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: .85rem; background: var(--surface-2); color: var(--text-2); }
.scores tr:first-child .rank { background: var(--grad); color: #fff; }
.fan { position: relative; height: 200px; margin: 8px 0 20px; }
.fan img {
  position: absolute; left: 50%; top: 10px; width: 130px; border-radius: 14px; background: #fff; padding: 6px;
  box-shadow: var(--shadow); border: 1px solid var(--border); transform-origin: 50% 120%;
}
.fan img:nth-child(1) { translate: -50% 0; rotate: -14deg; }
.fan img:nth-child(2) { translate: -50% -6px; }
.fan img:nth-child(3) { translate: -50% 0; rotate: 14deg; }
.dlg {
  width: min(420px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.dlg::backdrop { background: rgba(6, 7, 10, .55); backdrop-filter: blur(4px); }
.dlg[open] { animation: pop .2s ease-out; }
.dlg form { display: grid; gap: 16px; }
.dlg h2 { font-size: 1.2rem; margin: 0; }
.dlg .actions { justify-content: flex-end; }
.game-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.game-bar h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: flex; align-items: baseline; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .88rem; color: var(--text-2); }
.pill b { font-size: 1.2rem; color: var(--text); font-variant-numeric: tabular-nums; }
.board { display: grid; gap: clamp(8px, 1.5vw, 14px); grid-template-columns: repeat(5, 1fr); max-width: 820px; margin: 0 auto; perspective: 1200px; }
@media (max-width: 560px) { .board { grid-template-columns: repeat(4, 1fr); } }
.mcard { position: relative; aspect-ratio: 178 / 166; padding: 0; border: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .4s, scale .4s; }
.mcard .face { position: absolute; inset: 0; border-radius: clamp(10px, 1.6vw, 16px); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow); }
.mcard .back { background: var(--grad); overflow: hidden; }
.mcard .back::before {
  content: ""; position: absolute; inset: 22% 18%; background: rgba(255, 255, 255, .92);
  -webkit-mask: url(logo.svg) center / contain no-repeat; mask: url(logo.svg) center / contain no-repeat;
}
.mcard .back::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1.5px) 0 0 / 10px 10px; }
.mcard .front { transform: rotateY(180deg); background: #fff center / contain no-repeat; border: 1px solid var(--border); }
.mcard:hover:not(.open) { transform: translateY(-3px); }
.mcard.open { transform: rotateY(180deg); cursor: default; }
.mcard.done { opacity: 0; scale: .85; pointer-events: none; }
.win { text-align: center; padding: 32px 0 0; }
.win h2 { font-size: 1.6rem; }

.privacy { font-size: .8rem; color: var(--muted); margin: 0; }
