/* GALA ZŁOTYCH OKAPÓW - arkusz v4
   Wartości przeniesione 1:1 z projektu w Paper (artboardy 1440 px): rozmiary, odstępy, gradienty, cienie.
   Węższe ekrany skalują je clamp()-em tak, żeby przy 1440 px wychodziła dokładnie wartość z projektu.
   Warstwy: reset < tokeny < baza < komponenty < ruch. */

@layer reset, tokeny, baza, komponenty, ruch;

/* ═══ RESET ═══════════════════════════════════════════════════════════════ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, p, ol, ul, figure, fieldset, legend { margin: 0; padding: 0; }
  ol, ul { list-style: none; }
  fieldset { border: 0; min-inline-size: 0; }
  img, svg, canvas { display: block; max-width: 100%; }
  button, input, textarea { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; padding: 0; }
  a { color: inherit; text-decoration: none; }
  [hidden] { display: none !important; }
}

/* ═══ TOKENY (paleta z pliku Paper) ═══════════════════════════════════════ */
@layer tokeny {
  :root {
    --noc: #16130F;
    --glebia: #0E0C09;
    --stal: #2B2621;
    --stal-jasna: #5C544A;
    --krawedz: #4A433A;
    --kreda: #F3ECDF;
    --popiol: #BDB3A2;
    --szary-1: #9A9083;
    --szary-2: #8C8375;
    --zloto: #E2B04A;
    --zloto-jasne: #F7DC8F;
    --zloto-ciemne: #9A6B17;
    --atrament: #1E1710;
    --folia: linear-gradient(112deg, #9A6B17 0%, #E9C46A 24%, #F7DC8F 40%, #E2B04A 56%, #B8862F 78%, #EFD08A 100%);

    --f-tytul: "Aboreto", "Cinzel", Georgia, serif;
    --f-tekst: "Wix Madefor Text", "Segoe UI", system-ui, sans-serif;

    /* 120 px przy 1440 px, 20 px na telefonie */
    --margines: clamp(20px, 8.3334vw, 120px);
    --tresc: 1200px;
    /* nagłówek strony: 30 + 27 + 30 */
    --naglowek-h: 87px;

    /* okap nad potwierdzeniem - ten sam rozmiar ma okap, który zjeżdża po kartę */
    --potw-okap-w: 560px;
    --potw-okap-top: -40px;
    /* pasek z kategoriami pod sceną - musi się zmieścić na pierwszym ekranie */
    --afisz-h: 108px;

    --ease-wyjscie: cubic-bezier(.16, 1, .3, 1);
    --ease-obie: cubic-bezier(.65, 0, .35, 1);

    --z-scena: 1;
    --z-tekst: 2;
    --z-naglowek: 20;
    --z-pasek: 30;
    --z-lot: 15;   /* okap z lotu wisi pod nagłówkiem, jak okap potwierdzenia */
  }
}

@property --swiatlo { syntax: "<number>"; inherits: true; initial-value: 0; }

/* ═══ BAZA ════════════════════════════════════════════════════════════════ */
@layer baza {
  html { background: var(--glebia); scroll-behavior: smooth; }
  body {
    min-height: 100svh;
    display: flex; flex-direction: column;
    background: var(--noc);
    color: var(--kreda);
    font: 400 17px/1.55 var(--f-tekst);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; overflow-x: clip;
  }
  main { position: relative; flex: 1; }

  ::selection { background: var(--zloto); color: var(--atrament); }
  :focus-visible { outline: 2px solid var(--zloto-jasne); outline-offset: 4px; }

  .pomin {
    position: absolute; left: var(--margines); top: -4rem; z-index: 60;
    padding: 12px 16px; background: var(--zloto-jasne); color: var(--atrament);
    font: 700 15px/1 var(--f-tekst);
  }
  .pomin:focus-visible { top: 16px; }

  .ukryte { position: absolute; width: 0; height: 0; overflow: hidden; }
  .ukryte-wizualnie {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* ═══ KOMPONENTY ══════════════════════════════════════════════════════════ */
@layer komponenty {

  /* ── nagłówek i stopka ──────────────────────────────────────────────── */
  .naglowek {
    position: absolute; inset: 0 0 auto; z-index: var(--z-naglowek);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: max(30px, env(safe-area-inset-top)) var(--margines) 30px;
  }
  .marka { display: inline-flex; align-items: center; gap: 14px; view-transition-name: marka; }
  .marka-znak { width: 34px; height: 27px; flex: none; }
  .marka-slowo { font: 400 17px/20px var(--f-tytul); letter-spacing: .01em; color: var(--kreda); white-space: nowrap; }

  .wstecz {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
    font: 600 16px/20px var(--f-tekst); color: var(--popiol);
    white-space: nowrap;
    transition: color .2s;
  }
  .wstecz svg { width: 18px; height: 18px; flex: none; }

  .stopka {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
    padding: 36px var(--margines) max(40px, env(safe-area-inset-bottom));
    background: var(--glebia);
    box-shadow: inset 0 1px 0 var(--stal);
    font: 400 14px/20px var(--f-tekst); color: var(--szary-1);
  }
  .stopka p { display: flex; align-items: center; gap: 12px; }
  .stopka-znak { width: 24px; height: 19px; flex: none; }

  /* ── przyciski ──────────────────────────────────────────────────────── */
  .przycisk-zloty {
    display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    height: 60px; padding: 0 28px 0 32px;
    border-radius: 2px;
    background: var(--folia);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(90, 58, 10, .35), 0 18px 40px -16px rgba(226, 176, 74, .65);
    color: var(--atrament);
    font: 700 17px/20px var(--f-tekst);
    white-space: nowrap;
    cursor: pointer;
    transition: filter .2s, transform .15s, box-shadow .3s;
  }
  .przycisk-zloty svg { width: 20px; height: 20px; flex: none; transition: transform .35s var(--ease-wyjscie); }
  .przycisk-zloty:active { transform: translateY(1px); }
  .przycisk-zloty:disabled {
    background: var(--stal); color: var(--szary-2);
    box-shadow: inset 0 0 0 1px var(--krawedz);
    filter: none; transform: none; cursor: not-allowed;
  }
  .przycisk-zloty:disabled svg { transform: none; }
  .przycisk-zloty[aria-busy="true"] { cursor: progress; }

  .przycisk-stal {
    display: inline-flex; align-items: center; justify-content: center;
    height: 54px; padding: 0 26px; border-radius: 2px;
    box-shadow: inset 0 0 0 1px var(--stal-jasna);
    font: 600 16px/20px var(--f-tekst); color: var(--kreda);
    white-space: nowrap;
    transition: box-shadow .2s, color .2s;
  }

  .link-cichy {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 44px;
    font: 600 16px/20px var(--f-tekst); color: var(--popiol);
    white-space: nowrap;
    transition: color .2s;
  }
  .link-cichy::after { content: ""; height: 1px; background: rgba(189, 179, 162, .4); transition: background .2s; }

  .akcje { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 36px; }

  /* efekty najechania tylko dla myszki: na telefonie hover „przykleja się” do elementu pod palcem */
  @media (hover: hover) and (pointer: fine) {
    .wstecz:hover { color: var(--zloto-jasne); }
    .przycisk-zloty:hover {
    filter: brightness(1.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(90, 58, 10, .35), 0 22px 56px -16px rgba(226, 176, 74, .8);
  }
    .przycisk-zloty:hover svg { transform: translateX(4px); }
    .przycisk-stal:hover { box-shadow: inset 0 0 0 1px var(--zloto); color: var(--zloto-jasne); }
    .link-cichy:hover { color: var(--kreda); }
    .link-cichy:hover::after { background: var(--zloto); }
    .przycisk-duzy:hover {
    filter: brightness(1.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -3px 0 rgba(90, 58, 10, .35), 0 0 0 1px rgba(154, 107, 23, .7), 0 46px 110px -30px rgba(226, 176, 74, .9);
  }
    .przycisk-duzy:hover svg { transform: translateX(6px); }
  }


  /* ═══ STRONA GŁÓWNA ════════════════════════════════════════════════════ */
  .scena {
    --okap-x: 79%;
    --okap-y: 39%;
    --stozek-l: 62%;
    --stozek-p: 96%;
    position: relative;
    /* pierwszy ekran = scena + afisz. Blok tekstu ma ok. 396 px + 1,885 × rozmiar tytułu
       (675 px przy 148 px), więc: odstęp od góry = 100svh - afisz - blok - 48 px dołu,
       a gdy ekran jest za niski nawet na 100 px odstępu, zmniejsza się tytuł */
    min-height: calc(100svh - var(--afisz-h));
    display: flex; flex-direction: column;
    padding: clamp(100px, calc(100svh - 831px), 196px) var(--margines) 48px;
    overflow: hidden; overflow: clip;
  }
  .scena-swiatlo { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  .scena-swiatlo::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(40% 55% at var(--okap-x) calc(var(--okap-y) + 22%), rgba(233, 204, 140, .16), transparent 70%);
  }
  .scena-swiatlo::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(243, 225, 170, .13), rgba(243, 225, 170, 0) 88%);
    clip-path: polygon(var(--stozek-l) var(--okap-y), var(--stozek-p) var(--okap-y), calc(var(--stozek-p) + 12%) 100%, calc(var(--stozek-l) - 12%) 100%);
    filter: blur(18px);
    opacity: calc(.35 + var(--swiatlo) * .65);
    transition: opacity 1.4s ease;
  }
  .okap-3d {
    position: absolute; inset: 0; z-index: var(--z-scena);
    width: 100%; height: 100%; pointer-events: none;
    opacity: 0; transition: opacity 1.4s ease .1s;
  }
  .scena.gotowa .okap-3d { opacity: 1; }
  .okap-zastepczy {
    position: absolute; z-index: var(--z-scena);
    width: min(40vw, 34rem); left: var(--okap-x); top: var(--okap-y);
    translate: -50% -80%;
    filter: drop-shadow(0 30px 60px rgba(226, 176, 74, .25));
    opacity: .9; transition: opacity .8s ease;
  }
  .scena.gotowa .okap-zastepczy { opacity: 0; }

  .scena-tekst {
    position: relative; z-index: var(--z-tekst);
    display: flex; flex-direction: column; align-items: flex-start;
    width: min(900px, 100%);
  }

  /* tytuł: GALA 44/52, ZŁOTYCH i OKAPÓW 148/140 (Aboreto ma same wersaliki) */
  .tytul { font-family: var(--f-tytul); font-weight: 400; color: var(--zloto); }
  /* słowa wysuwają się spod linii: przycinamy tylko od dołu, żeby nie ściąć kreski nad Ó */
  .tytul-linia { display: block; clip-path: inset(-.5em -.5em 0 -.5em); }
  .tytul-slowo { display: inline-block; }
  .tytul-linia-0 {
    padding: 0 0 10px 4px;
    font-size: clamp(24px, 3.0556vw, 44px); line-height: 1.1818; letter-spacing: .01em;
    color: var(--kreda);
  }
  .tytul-linia-1, .tytul-linia-2 { font-size: clamp(50px, min(10.2778vw, max(80px, (100svh - 652px) / 1.885)), 148px); line-height: .946; letter-spacing: -.01em; }
  .tytul-linia-2 { padding-left: .3784em; }

  .termin { padding-top: 36px; font: 600 18px/26px var(--f-tekst); color: var(--zloto-jasne); }
  .lead { display: flex; flex-direction: column; gap: 4px; width: min(460px, 100%); padding-top: 18px; }
  .lead p { font: 400 20px/31px var(--f-tekst); color: var(--popiol); text-wrap: pretty; }
  .lead .lead-mocny { font-weight: 500; color: var(--kreda); }
  .scena .akcje { padding-top: 40px; }
  .koniec-glosowania { padding-top: 40px; font: 400 clamp(22px, 2.2vw, 30px)/1.25 var(--f-tytul); letter-spacing: .01em; color: var(--zloto-jasne); text-wrap: balance; }

  /* ── afisz ──────────────────────────────────────────────────────────── */
  .afisz {
    display: flex; align-items: center;
    height: var(--afisz-h); overflow: hidden; overflow: clip;
    background: var(--glebia);
    box-shadow: inset 0 1px 0 var(--stal), inset 0 -1px 0 var(--stal);
  }
  .afisz-tor { display: flex; align-items: center; gap: 44px; width: max-content; padding-right: 44px; animation: przewijanie 60s linear infinite; }
  .afisz:hover .afisz-tor { animation-play-state: paused; }
  .afisz-haslo { font: 400 38px/44px var(--f-tytul); letter-spacing: .02em; white-space: nowrap; color: #4E473E; }
  .afisz-haslo:nth-of-type(even) { color: var(--kreda); }
  .afisz-znak { width: 30px; height: 23px; flex: none; color: #B8862F; }
  @keyframes przewijanie { to { transform: translateX(-50%); } }

  /* ── duży przycisk: przejdź do głosowania (na scenie, zamiast „Oddaj głos”) ── */
  .przycisk-duzy {
    display: inline-flex; align-items: center; justify-content: center; gap: 26px;
    height: 116px; padding: 0 58px 0 66px;
    border-radius: 3px;
    background: var(--folia);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(90, 58, 10, .35), 0 0 0 1px rgba(154, 107, 23, .6), 0 40px 90px -30px rgba(226, 176, 74, .75);
    color: var(--atrament);
    font: 400 36px/40px var(--f-tytul); letter-spacing: .02em; white-space: nowrap;
    transition: filter .25s, transform .15s, box-shadow .3s;
  }
  .przycisk-duzy svg { width: 34px; height: 34px; flex: none; transition: transform .4s var(--ease-wyjscie); }
  .przycisk-duzy:active { transform: translateY(2px); }

  /* ── zasady ─────────────────────────────────────────────────────────── */
  .zasady { display: flex; gap: 80px; padding: 150px var(--margines); }
  .zasady-etykieta { flex: none; width: 260px; padding-top: 10px; font: 400 24px/30px var(--f-tytul); letter-spacing: .02em; color: var(--zloto); }
  .zasady-tresc { display: flex; flex-direction: column; gap: 26px; width: min(780px, 100%); }
  .zasady-tekst { font: 500 clamp(24px, 2.6389vw, 38px)/1.3158 var(--f-tekst); letter-spacing: -.012em; color: var(--kreda); text-wrap: pretty; }
  .zasady-dopisek { width: min(560px, 100%); font: 400 21px/33px var(--f-tekst); color: var(--popiol); text-wrap: pretty; }

  /* ═══ GŁOSOWANIE ═══════════════════════════════════════════════════════ */
  .kat { display: flex; flex-direction: column; }
  .kat-naglowek {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: calc(var(--naglowek-h) + 64px) var(--margines) 0;
    background: radial-gradient(38% 58% at 28% 58%, rgba(226, 176, 74, .13) 0%, rgba(226, 176, 74, 0) 72%);
  }
  .kat-numer { display: flex; align-items: baseline; gap: 4px; font-family: var(--f-tytul); }
  .kat-numer-nr { font-size: 64px; line-height: 64px; color: var(--zloto); }
  .kat-numer-z { font-size: 30px; line-height: 34px; color: #6F675C; }
  .kat-nazwa {
    width: min(var(--tresc), 100%); padding-top: 26px;
    font: 400 clamp(38px, 6.3889vw, 92px)/1.0652 var(--f-tytul); letter-spacing: -.005em;
    color: var(--zloto); text-wrap: balance;
  }
  .kat-opis { width: min(540px, 100%); padding-top: 34px; font: 400 19px/30px var(--f-tekst); color: #A89E8E; text-wrap: pretty; }

  .kat-zamknieta .kat-naglowek { background: none; }
  .kat-zamknieta .kat-numer-nr, .kat-zamknieta .kat-nazwa { color: #8F8678; }
  .kat-zamknieta .kat-opis { color: #7F766A; }

  /* ── pytanie i szukajka ─────────────────────────────────────────────── */
  .wybor-osoby { display: block; }
  .pytanie-wiersz {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px;
    padding: 88px var(--margines) 36px;
  }
  .pytanie { font: 400 30px/36px var(--f-tytul); letter-spacing: .01em; color: var(--kreda); }
  .szukaj {
    display: flex; align-items: center; gap: 12px;
    width: min(360px, 100%); padding-bottom: 12px;
    box-shadow: inset 0 -1px 0 var(--krawedz);
    transition: box-shadow .2s;
  }
  .szukaj:focus-within { box-shadow: inset 0 -2px 0 var(--zloto); }
  .szukaj svg { width: 20px; height: 20px; flex: none; color: var(--szary-2); transition: color .2s; }
  .szukaj:focus-within svg { color: var(--zloto); }
  .szukaj input {
    flex: 1; min-width: 0; height: 22px; padding: 0;
    border: 0; background: transparent; outline: none;
    font: 400 17px/22px var(--f-tekst); color: var(--kreda);
  }
  .szukaj input::placeholder { color: var(--szary-2); opacity: 1; }
  .szukaj input::-webkit-search-cancel-button { filter: invert(1) sepia(1) saturate(2) hue-rotate(5deg); }

  /* ── nominowani: portret 276×345 + mosiężna tabliczka ───────────────── */
  .nominowani {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 32px;
    padding: 0 var(--margines);
  }
  .nom { position: relative; transition: opacity .4s; }
  .nom-radio { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; margin: 0; }
  .nom-karta { display: flex; flex-direction: column; gap: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .nom-rama {
    position: relative; display: block; overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #1C1915;
    box-shadow: inset 0 0 0 1px var(--stal);
    transition: box-shadow .5s var(--ease-wyjscie);
  }
  .nom-foto {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(1) sepia(.42) contrast(1.06) brightness(.8);
    transition: filter .6s var(--ease-wyjscie), scale .8s var(--ease-wyjscie);
  }
  .nom-rama::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(14, 12, 9, .55) 100%);
  }
  .nom-monogram { display: grid; place-items: center; height: 100%; font: 400 64px/1 var(--f-tytul); color: var(--zloto-ciemne); }
  .nom-reflektor {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(75% 55% at 50% -10%, rgba(255, 236, 190, .38) 0%, rgba(255, 236, 190, 0) 70%);
    opacity: 0; transition: opacity .6s var(--ease-wyjscie);
  }
  .nom-medal {
    position: absolute; right: 12px; top: 12px; z-index: 2;
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--folia);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .6);
    color: var(--atrament);
    opacity: 0; scale: .6;
    transition: opacity .3s, scale .45s cubic-bezier(.34, 1.56, .64, 1);
  }
  .nom-medal svg { width: 18px; height: 18px; }
  .nom-tabliczka {
    display: flex; justify-content: center;
    padding: 12px 12px 11px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, rgba(0, 0, 0, 0) 1px 3px), linear-gradient(180deg, #2E2923 0%, #1C1915 100%);
    box-shadow: inset 0 0 0 1px var(--krawedz);
  }
  .nom-imie {
    font: 400 18px/24px var(--f-tytul); letter-spacing: .02em; color: var(--popiol);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .3s;
  }

  @media (hover: hover) and (pointer: fine) {
    .nom-karta:hover .nom-rama { box-shadow: inset 0 0 0 1px var(--zloto-ciemne); }
    .nom-karta:hover .nom-foto { filter: grayscale(1) sepia(.3) contrast(1.08) brightness(.95); scale: 1.025; }
    .nom-karta:hover .nom-imie { color: var(--kreda); }
  }

  /* wybrana osoba: złoty pierścień, reflektor z góry, medalion, tabliczka ze złotej folii */
  .nom-radio:checked + .nom-karta .nom-rama { box-shadow: 0 0 0 2px var(--zloto), 0 0 0 6px rgba(226, 176, 74, .18), 0 34px 70px -26px rgba(226, 176, 74, .75); }
  .nom-radio:checked + .nom-karta .nom-foto { filter: saturate(1.05) contrast(1.03); scale: 1; }
  .nom-radio:checked + .nom-karta .nom-reflektor { opacity: 1; }
  .nom-radio:checked + .nom-karta .nom-medal { opacity: 1; scale: 1; }
  .nom-radio:checked + .nom-karta .nom-tabliczka { background: var(--folia); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
  .nom-radio:checked + .nom-karta .nom-imie { color: var(--atrament); }
  /* reszta przygasa do połowy */
  .nominowani:has(.nom-radio:checked) .nom:has(.nom-radio:not(:checked)) { opacity: .5; }
  .nominowani:has(.nom-radio:checked) .nom:has(.nom-radio:not(:checked)):hover { opacity: .8; }
  .nom-radio:focus-visible + .nom-karta .nom-rama { outline: 2px solid var(--zloto-jasne); outline-offset: 4px; }

  .brak-wynikow { padding: 0 var(--margines) 24px; color: var(--popiol); }

  /* ── za co? rozwija się dopiero po wyborze osoby ────────────────────── */
  .uzasadnienie { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-wyjscie); }
  .uzasadnienie-wnetrze {
    min-height: 0; overflow: hidden;
    display: flex; flex-direction: column; gap: 18px;
    padding: 0 var(--margines);
    visibility: hidden; transition: visibility 0s .6s;
  }
  .wybor.wybrano .uzasadnienie { grid-template-rows: 1fr; }
  .wybor.wybrano .uzasadnienie-wnetrze { visibility: visible; transition: visibility 0s; }
  .uzas-pytanie { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 72px; font: 400 26px/32px var(--f-tytul); letter-spacing: .01em; color: var(--kreda); }
  .opcja { font: 500 16px/20px var(--f-tekst); letter-spacing: 0; color: var(--szary-2); }
  .uzasadnienie textarea {
    display: block; width: min(760px, 100%); min-height: 54px; resize: none;
    padding: 8px 0 12px; border: 0; border-radius: 0;
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--krawedz);
    font: 400 22px/34px var(--f-tekst); color: var(--kreda);
    field-sizing: content;
    transition: box-shadow .2s;
  }
  .uzasadnienie textarea::placeholder { color: var(--szary-2); opacity: 1; }
  .uzasadnienie textarea:not(:placeholder-shown) { box-shadow: inset 0 -1px 0 var(--zloto); }
  .uzasadnienie textarea:focus { outline: none; box-shadow: inset 0 -2px 0 var(--zloto); }
  .uzas-meta {
    display: flex; justify-content: space-between; gap: 16px; width: min(760px, 100%);
    margin-top: -8px;
    font: 400 14px/20px var(--f-tekst); color: var(--szary-2);
  }
  .licznik { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .licznik.blisko { color: var(--zloto); }

  /* ── pasek decyzji ──────────────────────────────────────────────────── */
  .pasek {
    position: relative; z-index: var(--z-pasek);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: min(var(--tresc), calc(100% - 2 * var(--margines)));
    margin: 64px auto 96px;
    padding: 14px 14px 14px 28px;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0) 0 2px, rgba(255, 255, 255, .025) 2px 3px), linear-gradient(180deg, #2A2520 0%, #1C1915 100%);
    box-shadow: inset 0 1px 0 rgba(226, 176, 74, .45), inset 0 0 0 1px var(--stal), 0 30px 60px -24px rgba(0, 0, 0, .95);
  }
  .pasek-wybor { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .pasek-etykieta { font: 600 14px/18px var(--f-tekst); color: var(--szary-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pasek-imie { font: 400 28px/34px var(--f-tytul); letter-spacing: .01em; color: var(--szary-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wybor.wybrano .pasek-imie { color: var(--zloto-jasne); }
  .pasek .przycisk-zloty { flex: none; }
  /* błąd zapisu wyskakuje tuż nad paskiem, więc widać go niezależnie od przewinięcia */
  .blad {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
    padding: 12px 18px;
    background: #2A1812;
    box-shadow: inset 0 0 0 1px #6B2F1D, 0 18px 36px -18px rgba(0, 0, 0, .9);
    font: 600 15px/21px var(--f-tekst); color: #F2A383;
  }

  /* ── potwierdzenie: okap nad środkiem, złota tabliczka z imieniem ───── */
  .kat.po-glosie .kat-naglowek { display: none; }
  .potwierdzenie {
    position: relative; overflow: hidden; overflow: clip;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: calc(var(--naglowek-h) + 300px) var(--margines) 110px;
    background: radial-gradient(80% 60% at 50% 20%, rgba(58, 44, 28, .9) 0%, rgba(22, 19, 15, 0) 65%);
  }
  .potwierdzenie:focus { outline: none; }
  .potw-okap {
    position: absolute; left: 50%; top: var(--potw-okap-top); translate: -50% 0;
    width: var(--potw-okap-w); height: auto; max-width: none;
    pointer-events: none;
  }
  .potw-tytul, .potw-tekst, .potw-tabliczka, .potw-final, .potw-dopisek, .potwierdzenie .akcje { position: relative; }
  .potw-tytul { font: 400 clamp(40px, 6.3889vw, 92px)/1.0652 var(--f-tytul); letter-spacing: -.005em; color: var(--zloto); text-wrap: balance; }
  .potw-tekst { padding: 34px 0 20px; font: 400 19px/28px var(--f-tekst); color: var(--popiol); text-wrap: balance; }
  .potw-tabliczka {
    display: inline-flex; justify-content: center;
    padding: 16px 48px 15px;
    background: var(--folia);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(90, 58, 10, .35), 0 26px 50px -18px rgba(226, 176, 74, .7);
  }
  .potw-imie { font: 400 38px/44px var(--f-tytul); letter-spacing: .01em; color: var(--atrament); }
  /* po ostatnim głosie: podziękowanie jako główny tekst końca */
  .potw-final { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(900px, 100%); padding-top: 56px; font: 400 32px/40px var(--f-tytul); letter-spacing: .01em; color: var(--kreda); text-wrap: balance; }
  .potw-final-dzieki { font-size: 76px; line-height: 1; letter-spacing: -.005em; color: var(--zloto); }
  .potw-dopisek { width: min(640px, 100%); padding-top: 34px; font: 400 23px/34px var(--f-tekst); color: var(--popiol); text-wrap: balance; }
  .potwierdzenie .akcje { justify-content: center; padding-top: 40px; }
  .potw-nastepna { position: relative; padding-top: 18px; font: 400 15px/22px var(--f-tekst); color: var(--szary-1); text-wrap: balance; }

  /* ── kategoria zapieczętowana: wyłączony klawisz na stalowym panelu ── */
  .panel-wyl {
    display: flex; align-items: center; gap: 44px;
    width: min(var(--tresc), calc(100% - 2 * var(--margines)));
    margin: 88px auto 120px;
    padding: 40px 48px;
    border-radius: 18px;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0) 0 2px, rgba(255, 255, 255, .028) 2px 3px), linear-gradient(180deg, #312B25 0%, #231F1A 62%, #1B1814 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 -2px 8px rgba(0, 0, 0, .6), 0 50px 90px -40px rgba(0, 0, 0, .95);
  }
  .klawisz-wyl { display: flex; flex-direction: column; align-items: center; gap: 18px; flex: none; }
  .klawisz-wyl-dioda { width: 56px; height: 5px; border-radius: 3px; background: #15120F; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .8); }
  .klawisz-wyl-przycisk {
    display: grid; place-items: center;
    width: 104px; height: 104px; border-radius: 50%;
    background: radial-gradient(circle at 50% 28%, #4A433A 0%, #2B2621 45%, #1C1915 82%);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .55), 0 0 0 7px var(--stal), inset 0 2px 1px rgba(255, 255, 255, .14), inset 0 -4px 8px rgba(0, 0, 0, .45), 0 14px 26px -8px rgba(0, 0, 0, .75);
    color: #7A7165;
  }
  .klawisz-wyl-przycisk svg { width: 42px; height: 42px; }
  .panel-wyl-tresc { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; }
  .panel-wyl-tytul { font: 400 30px/36px var(--f-tytul); letter-spacing: .01em; color: var(--kreda); }
  .panel-wyl-tekst { width: min(560px, 100%); font: 400 18px/28px var(--f-tekst); color: var(--popiol); }
  .panel-wyl .akcje { padding-top: 16px; gap: 16px 32px; }
  .panel-wyl .przycisk-zloty { height: 56px; padding: 0 26px 0 30px; gap: 14px; font-size: 16px; }
  .panel-wyl .przycisk-zloty svg { width: 19px; height: 19px; }

  /* ── 404 ────────────────────────────────────────────────────────────── */
  .blad-strona {
    position: relative; overflow: hidden; overflow: clip;
    min-height: 100svh;
    padding: calc(var(--naglowek-h) + 120px) var(--margines) 150px;
  }
  .blad-okap { position: absolute; left: calc(50% + 100px); top: -40px; width: 540px; height: auto; max-width: none; pointer-events: none; }
  .blad-tresc { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
  .blad-kod { font: 600 16px/22px var(--f-tekst); color: var(--zloto-jasne); }
  .blad-tytul { width: min(700px, 100%); padding-top: 30px; font: 400 clamp(38px, 5vw, 72px)/1.1111 var(--f-tytul); letter-spacing: -.005em; color: var(--kreda); text-wrap: balance; }
  .blad-opis { width: min(500px, 100%); padding-top: 30px; font: 400 19px/30px var(--f-tekst); color: var(--popiol); }
  .blad-tresc .przycisk-stal { margin-top: 40px; height: 56px; padding: 0 28px; }

  /* ── lot karty do okapu (elementy tworzy JS) ────────────────────────── */
  .lot-okap {
    position: fixed; left: 50%; top: var(--potw-okap-top); z-index: var(--z-lot);
    width: var(--potw-okap-w); height: auto; max-width: none;
    translate: -50% 0;
    pointer-events: none;
  }
  .lot-karta .nom-rama { box-shadow: 0 0 0 2px var(--zloto), 0 0 0 6px rgba(226, 176, 74, .18), 0 34px 70px -26px rgba(226, 176, 74, .75); }
  .lot-karta .nom-foto { filter: saturate(1.05) contrast(1.03); }
  .lot-karta .nom-reflektor { opacity: 1; }
  .lot-karta .nom-medal { opacity: 1; scale: 1; }
  .lot-karta .nom-tabliczka { background: var(--folia); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
  .lot-karta .nom-imie { color: var(--atrament); }
  .lot-karta { position: fixed; z-index: calc(var(--z-lot) - 1); margin: 0; pointer-events: none; transform-origin: 50% 0; }
  .lot-para {
    position: fixed; left: 0; top: 0; z-index: calc(var(--z-lot) - 1); pointer-events: none;
    width: 54px; height: 54px; border-radius: 50%;
    background: radial-gradient(circle closest-side, rgba(247, 236, 214, .3), rgba(247, 236, 214, .1) 55%, transparent);
    filter: blur(7px);
  }

  /* ── panel wyników (organizator) ────────────────────────────────────── */
  .panel { display: flex; flex-direction: column; gap: 28px; padding: calc(var(--naglowek-h) + 40px) var(--margines) 96px; }
  #wyniki { display: flex; flex-direction: column; gap: 28px; }
  .panel-glowa { display: flex; flex-direction: column; gap: 10px; }
  .panel-kicker { font: 600 15px/20px var(--f-tekst); color: var(--zloto-jasne); }
  .panel-tytul { font: 400 clamp(34px, 4.6vw, 60px)/1.05 var(--f-tytul); color: var(--zloto); }
  .panel-live { font: 500 14px/20px var(--f-tekst); color: var(--popiol); text-align: right; }
  .panel-staty { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
  .stat {
    display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 16px; border-radius: 2px;
    background: linear-gradient(180deg, #2E2923 0%, #1C1915 100%);
    box-shadow: inset 0 0 0 1px var(--krawedz), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .stat-liczba { font: 400 44px/1 var(--f-tytul); color: var(--zloto-jasne); font-variant-numeric: tabular-nums; }
  .stat-liczba.stat-czas { font-size: 28px; line-height: 44px; }
  .stat-opis { font: 400 14px/18px var(--f-tekst); color: var(--szary-1); }
  .panel-odswiezono { margin-top: -14px; font: 400 13px/18px var(--f-tekst); color: var(--szary-2); }

  .panel-tabela-ramka { overflow-x: auto; box-shadow: inset 0 0 0 1px var(--stal); }
  .panel-tabela { width: 100%; min-width: 560px; border-collapse: collapse; font: 400 15.5px/1.35 var(--f-tekst); }
  .panel-tabela th, .panel-tabela td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--stal); vertical-align: top; }
  .panel-tabela thead th { font: 600 13px/18px var(--f-tekst); color: var(--szary-2); background: var(--glebia); }
  .panel-tabela tbody th { font-weight: 500; }
  .panel-tabela tbody th a { color: var(--kreda); }
  .panel-tabela tbody th a:hover { color: var(--zloto-jasne); }
  .panel-tabela tbody tr:last-child > * { border-bottom: 0; }
  .panel-tabela .liczba { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .znacznik { display: inline-block; padding: 2px 7px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--krawedz); font: 600 12px/16px var(--f-tekst); color: var(--popiol); vertical-align: 1px; }
  .znacznik.remis { color: var(--zloto-jasne); box-shadow: inset 0 0 0 1px var(--zloto-ciemne); }
  .pusto { color: var(--szary-2); }

  .panel-kategorie { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); align-items: start; }
  .panel-kat {
    display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 22px 24px; scroll-margin-top: 24px;
    background: linear-gradient(180deg, #221E19 0%, #1A1713 100%); box-shadow: inset 0 0 0 1px var(--stal);
  }
  .panel-kat-glowa { display: flex; flex-direction: column; gap: 6px; }
  .panel-kat-nr { font: 400 15px/18px var(--f-tytul); color: #6F675C; }
  .panel-kat-nazwa { font: 400 26px/1.15 var(--f-tytul); color: var(--zloto); text-wrap: balance; }
  .panel-kat-meta { font: 400 14px/20px var(--f-tekst); color: var(--szary-1); }
  .ranking { display: flex; flex-direction: column; gap: 12px; }
  .ranking-poz { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "m o w" "m p p"; gap: 6px 10px; align-items: baseline; }
  .ranking-miejsce { grid-area: m; font: 400 20px/1 var(--f-tytul); color: var(--popiol); }
  .ranking-osoba { grid-area: o; font: 600 16px/22px var(--f-tekst); color: var(--kreda); overflow-wrap: anywhere; }
  .ranking-wynik { grid-area: w; font: 600 15px/22px var(--f-tekst); color: var(--kreda); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ranking-proc { font-weight: 400; color: var(--szary-1); }
  .ranking-pasek { grid-area: p; height: 6px; border-radius: 3px; background: var(--stal); overflow: hidden; }
  .ranking-pasek > span { display: block; height: 100%; border-radius: 3px; background: var(--stal-jasna); transition: width .6s var(--ease-wyjscie); }
  .pierwsze .ranking-miejsce { color: var(--zloto); }
  .pierwsze .ranking-osoba { color: var(--zloto-jasne); }
  .pierwsze .ranking-pasek > span { background: var(--folia); }
  .bez-glosow { font: 400 13.5px/20px var(--f-tekst); color: var(--szary-2); }
  .bez-glosow span { color: var(--szary-1); font-weight: 600; }
  .uzasadnienia { border-top: 1px solid var(--stal); padding-top: 12px; }
  .uzasadnienia summary { cursor: pointer; min-height: 32px; font: 600 15px/22px var(--f-tekst); color: var(--zloto-jasne); }
  .uzasadnienia ul { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; }
  .uzasadnienia li { display: grid; gap: 2px; }
  .uz-dla { font: 600 13px/18px var(--f-tekst); color: var(--szary-1); }
  .uzasadnienia q { font: 400 16px/24px var(--f-tekst); color: var(--kreda); overflow-wrap: anywhere; }
  .uz-kiedy { font: 400 12px/16px var(--f-tekst); color: var(--szary-2); }

  /* ═══ TABLET ═══════════════════════════════════════════════════════════ */
  @media (max-width: 64rem) {
    .nominowani { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
    .zasady { gap: 40px; }
    .zasady-etykieta { width: 160px; }
    .blad-strona { padding-top: 330px; }
    .blad-okap { left: 50%; translate: -50% 0; width: 360px; }
  }

  /* ═══ WĄSKI KADR: okap wisi u góry na środku, tekst schodzi na dół ═════
     ten sam próg co w okap.js (szerokość/wysokość < 1.1) */
  @media (max-width: 48rem), (max-aspect-ratio: 11/10) {
    .scena { --okap-x: 50%; --okap-y: 30%; min-height: 100svh; justify-content: flex-end; padding-top: 96px; padding-bottom: 40px; }
    .okap-zastepczy { width: 70vw; }
    /* komin okapu chowa się w ciemnym „suficie”, żeby nie wchodził pod nazwę gali */
    .naglowek::before {
      content: ""; position: absolute; inset: 0 0 auto; z-index: -1; pointer-events: none;
      height: calc(var(--naglowek-h) + 64px);
      background: linear-gradient(180deg, rgba(22, 19, 15, .96) 0%, rgba(22, 19, 15, .8) 42%, rgba(22, 19, 15, 0) 100%);
    }
  }

  /* bardzo niski ekran telefonu (np. iPhone SE w Safari): akapit wstępu ustępuje miejsca okapowi nad tytułem */
  @media (max-width: 48rem) and (max-height: 650px) {
    .scena .lead { display: none; }
  }

  @media (max-width: 48rem) and (min-height: 840px), (max-aspect-ratio: 11/10) and (min-height: 840px) {
    .scena { min-height: calc(100svh - var(--afisz-h)); }
  }

  /* ═══ TELEFON ══════════════════════════════════════════════════════════ */
  @media (max-width: 48rem) {
    :root { --naglowek-h: 64px; --potw-okap-w: 330px; --potw-okap-top: -24px; --afisz-h: 72px; }

    .naglowek { padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: 18px; }
    .marka { gap: 10px; }
    .marka-znak { width: 28px; height: 22px; }
    .marka-slowo { font-size: 14px; line-height: 18px; }
    .wstecz { gap: 8px; font-size: 15px; }
    .wstecz-pelny { display: none; }

    .tytul-linia-0 { padding-bottom: 6px; font-size: 22px; line-height: 26px; }
    .tytul-linia-1, .tytul-linia-2 { font-size: clamp(40px, 17vw, 72px); }
    .termin { padding-top: 26px; font-size: 16px; line-height: 23px; }
    .lead { padding-top: 12px; }
    .lead p { font-size: 16px; line-height: 25px; }
    .scena .akcje { align-self: stretch; padding-top: 28px; }

    .afisz-tor { gap: 26px; padding-right: 26px; }
    .afisz-haslo { font-size: 24px; line-height: 28px; }
    .afisz-znak { width: 22px; height: 17px; }

    /* napis w jednej linii: szerokość treści (100vw - 2 × 8,33vw marginesu) minus 74 px na odstępy i strzałkę,
       podzielona przez 13,9 em długości napisu */
    .przycisk-duzy { width: 100%; height: 84px; gap: 14px; padding: 0 18px; font-size: clamp(13px, calc((83.333vw - 74px) / 13.9), 26px); }
    .przycisk-duzy svg { width: 24px; height: 24px; }

    .zasady { flex-direction: column; gap: 18px; padding-top: 72px; padding-bottom: 96px; }
    .zasady-etykieta { width: auto; padding-top: 0; font-size: 20px; line-height: 26px; }
    .zasady-tekst { font-size: 24px; line-height: 32px; }
    .zasady-dopisek { font-size: 17px; line-height: 27px; }

    .stopka { flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px var(--margines) max(32px, env(safe-area-inset-bottom)); font-size: 13px; line-height: 19px; }

    /* głosowanie */
    .kat-naglowek { padding-top: calc(var(--naglowek-h) + 40px); background: radial-gradient(80% 50% at 30% 60%, rgba(226, 176, 74, .12) 0%, rgba(226, 176, 74, 0) 72%); }
    .kat-numer-nr { font-size: 44px; line-height: 44px; }
    .kat-numer-z { font-size: 22px; line-height: 26px; }
    .kat-nazwa { padding-top: 18px; font-size: clamp(28px, 9vw, 46px); line-height: 1.12; }
    .kat-opis { padding-top: 20px; font-size: 16px; line-height: 25px; }
    .pytanie-wiersz { gap: 18px; padding-top: 48px; padding-bottom: 24px; }
    .pytanie { font-size: 22px; line-height: 28px; }
    .szukaj { width: 100%; }
    .nominowani { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
    .nom-karta { gap: 8px; }
    .nom-tabliczka { padding: 9px 8px 8px; }
    .nom-imie { font-size: 14px; line-height: 20px; }
    .nom-medal { right: 8px; top: 8px; width: 28px; height: 28px; }
    .nom-medal svg { width: 15px; height: 15px; }
    .uzas-pytanie { margin-top: 44px; font-size: 20px; line-height: 26px; }
    .opcja { font-size: 14px; }
    .uzasadnienie textarea { min-height: 48px; font-size: 18px; line-height: 28px; }
    .uzas-meta { font-size: 12px; line-height: 18px; }
    .uzas-meta span:first-child { display: none; }
    .uzas-meta { justify-content: flex-end; }
    .pasek { margin: 36px auto 48px; padding: 10px 10px 10px 16px; }
    .wybor.wybrano .pasek { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); }
    /* przewijanie do pola (np. po dotknięciu) zostawia miejsce na przyklejony pasek */
    html:has(.wybor .nom-radio:checked) { scroll-padding-bottom: 104px; }
    .pasek-etykieta { font-size: 12px; line-height: 16px; }
    .pasek-imie { font-size: 20px; line-height: 26px; }
    .pasek .przycisk-zloty { height: 50px; gap: 10px; padding: 0 16px 0 18px; font-size: 15px; }
    .pasek .przycisk-zloty svg { width: 17px; height: 17px; }

    .potwierdzenie { padding-top: 250px; padding-bottom: 72px; }
    .potw-tytul { font-size: clamp(32px, 10.4vw, 46px); line-height: 1.1; }
    .potw-tekst { padding-top: 22px; padding-bottom: 16px; font-size: 16px; line-height: 24px; }
    .potw-tabliczka { padding: 12px 30px 11px; }
    .potw-imie { font-size: 28px; line-height: 34px; }
    .potw-final { gap: 10px; padding-top: 36px; font-size: 21px; line-height: 28px; }
    .potw-final-dzieki { font-size: clamp(34px, 11vw, 46px); }
    .potw-dopisek { padding-top: 24px; font-size: 18px; line-height: 27px; }
    .potwierdzenie .akcje { flex-direction: column; gap: 12px; padding-top: 28px; }

    .panel-wyl { flex-direction: column; align-items: flex-start; gap: 24px; margin: 44px auto 72px; padding: 28px 22px; border-radius: 14px; }
    .klawisz-wyl-przycisk { width: 76px; height: 76px; }
    .klawisz-wyl-przycisk svg { width: 32px; height: 32px; }
    .panel-wyl-tytul { font-size: 22px; line-height: 28px; }
    .panel-wyl-tekst { font-size: 16px; line-height: 25px; }
    .panel-wyl .przycisk-zloty { height: auto; min-height: 52px; padding: 12px 18px; white-space: normal; text-align: left; }

    .blad-strona { padding-top: 260px; padding-bottom: 72px; }
    .blad-okap { width: 300px; top: -24px; }
    .blad-opis { font-size: 16px; line-height: 25px; }
  }
}

/* ═══ RUCH ════════════════════════════════════════════════════════════════ */
@layer ruch {
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--ease-wyjscie); }

  /* wejście sceny: słowa wysuwają się spod linii */
  .tytul-slowo { animation: spod-linii 1.3s var(--ease-wyjscie) both; }
  .tytul-linia-1 .tytul-slowo { animation-delay: .1s; }
  .tytul-linia-2 .tytul-slowo { animation-delay: .2s; }
  .termin, .lead, .scena .akcje { animation: pojawienie 1s var(--ease-wyjscie) both; }
  .termin { animation-delay: .4s; }
  .lead { animation-delay: .5s; }
  .scena .akcje { animation-delay: .62s; }
  @keyframes spod-linii { from { transform: translateY(104%); } }
  @keyframes pojawienie { from { opacity: 0; transform: translateY(14px); } }
  @keyframes opuszczenie { from { opacity: 0; transform: translateY(-60px); } }

  .kat-naglowek > * { animation: pojawienie .9s var(--ease-wyjscie) both; }
  .kat-naglowek > :nth-child(2) { animation-delay: .06s; }
  .kat-naglowek > :nth-child(3) { animation-delay: .14s; }
  .nom { animation: pojawienie .8s var(--ease-wyjscie) both; animation-delay: calc(.18s + var(--i) * 55ms); }

  .potwierdzenie:not([hidden]) > * { animation: pojawienie .9s var(--ease-wyjscie) both; }
  .potwierdzenie:not([hidden]) > :nth-child(3) { animation-delay: .1s; }
  .potwierdzenie:not([hidden]) > :nth-child(4) { animation-delay: .18s; }
  .potwierdzenie:not([hidden]) > :nth-child(5) { animation-delay: .26s; }
  .potwierdzenie:not([hidden]) > :nth-child(6) { animation-delay: .34s; }
  .potwierdzenie:not([hidden]) > :nth-child(7) { animation-delay: .42s; }
  .potwierdzenie:not([hidden]) > .potw-okap { animation: opuszczenie 1.1s var(--ease-wyjscie) both; }
  /* po locie karty okap już wisi na miejscu - bez ponownego wjazdu */
  .potwierdzenie.z-lotu > .potw-okap { animation: none; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
      animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
    }
  }
}
