/* P4 „Paszport” – profil gracza WebiGames jako paszport z pieczątkami gier.
   Fonty: Familjen Grotesk 700 (nagłówki, liczby) + IBM Plex Mono 400 (pola, MRZ, etykiety).
   Akcent: atrament pieczątek #f472b6. Gradienty: 1 (cień grzbietu). Cienie: 1 (książka). Promienie >= 16 px: 0. */

@font-face { font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/familjen-grotesk-latin-ext-700-normal.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: 'Familjen Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/familjen-grotesk-latin-700-normal.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; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-ext-400-normal.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: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-400-normal.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; }

.p4 {
  --p4-tusz: #f472b6;
  --p4-tusz-ciemny: #3a1430;
  --p4-fiolet: #8b5cf6;
  --p4-fiolet-j: #c4b5fd;
  --p4-papier: #120e24;
  --p4-okladka: #2a1257;
  --p4-tekst: #f3f0ff;
  --p4-szary: #b6aed6;
  --p4-linia: rgba(196, 181, 253, 0.24);
  --p4-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --p4-gro: 'Familjen Grotesk', 'Arial Narrow', system-ui, sans-serif;
  container-type: inline-size;
  max-width: 1260px;
  margin: 0 auto;
  padding: 20px clamp(12px, 3vw, 40px) calc(40px + var(--sab));
  font: 400 14px/1.55 var(--p4-mono);
  color: var(--p4-tekst);
  font-synthesis: none;
}
.p4 *, .p4 *::before, .p4 *::after { box-sizing: border-box; }
:where(.p4) :where(h1, h2, h3, p, dl, dd, ul, ol, figure) { margin: 0; }
:where(.p4) :where(ul, ol) { padding: 0; list-style: none; }
.p4 a { color: var(--p4-fiolet-j); text-underline-offset: 3px; }
.p4 :focus-visible { outline: 2px solid var(--p4-tusz); outline-offset: 3px; }
.p4-num { font-variant-numeric: tabular-nums; }
.p4-gro { font-family: var(--p4-gro); font-weight: 700; }
.p4-dia { width: 0.95em; height: 0.95em; vertical-align: -0.1em; flex: none; }

/* ---------- pasek nad paszportem ---------- */
.p4-glowa { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-bottom: 18px; }
.p4-zakladki { display: flex; gap: 4px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.p4-zakladki::-webkit-scrollbar { display: none; }
.p4-zakladki a {
  display: inline-flex; align-items: center; flex: none; min-height: 44px; padding: 0 14px; white-space: nowrap; scroll-snap-align: start;
  color: var(--p4-szary); text-decoration: none; border-bottom: 2px solid transparent;
}
.p4-zakladki a:hover { color: var(--p4-tekst); }
.p4-zakladki a[aria-current] { color: var(--p4-tekst); border-bottom-color: var(--p4-tusz); }
.p4-akcje { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.p4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  font: inherit; color: var(--p4-tekst); background: transparent; border: 1px solid var(--p4-linia); border-radius: 6px;
  cursor: pointer; text-decoration: none;
}
.p4-btn:hover { border-color: var(--p4-fiolet-j); }
.p4-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.p4-btn--tusz { border-color: var(--p4-tusz); color: #fff; background: var(--p4-tusz-ciemny); }

/* przełącznik */
.p4-przel { gap: 10px; padding: 0 14px 0 10px; }
.p4-przel-tor { position: relative; width: 38px; height: 22px; border: 1px solid var(--p4-fiolet-j); border-radius: 11px; flex: none; }
.p4-przel-tor::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--p4-szary); transition: transform 0.2s ease;
}
.p4-przel[aria-checked='true'] .p4-przel-tor { border-color: var(--p4-tusz); background: var(--p4-tusz-ciemny); }
.p4-przel[aria-checked='true'] .p4-przel-tor::after { transform: translateX(16px); background: var(--p4-tusz); }

/* podpis rozkładówki */
.p4-podpis { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 8px; color: var(--p4-szary); font-size: 12px; }
.p4-podpis:first-of-type { margin-top: 0; }

/* ---------- książka ---------- */
.p4-ksiazka {
  background: var(--p4-okladka); border-radius: 6px; padding: 7px;
  box-shadow: 0 28px 50px -30px rgba(0, 0, 0, 0.9);
}
.p4-rozkladowka { display: grid; grid-template-columns: minmax(0, 1fr); }
.p4-strona {
  position: relative; isolation: isolate; min-width: 0;
  container-type: inline-size;
  padding: 26px clamp(16px, 4cqw, 34px) 44px;
  background: var(--p4-papier) url(../assets/giloszuj.jpg) center / 720px auto;
}
.p4-strona::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(13, 9, 28, 0.9); }
.p4-strona--dane::before { background: rgba(13, 9, 28, 0.6); }
/* perforacja między stronami na telefonie */
.p4-strona + .p4-strona { border-top: 2px dashed rgba(196, 181, 253, 0.4); }
.p4-nr { position: absolute; bottom: 14px; right: 18px; font-size: 11px; color: var(--p4-szary); }
.p4-strona:nth-child(odd) .p4-nr { right: auto; left: 18px; }

@container (min-width: 940px) {
  .p4-rozkladowka { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .p4-strona + .p4-strona { border-top: 0; border-left: 2px dashed rgba(196, 181, 253, 0.35); }
  .p4-strona:first-child::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
  }
}

/* nagłówki stron */
.p4-gora { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; color: var(--p4-szary); font-size: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--p4-linia); margin-bottom: 20px; }
.p4-gora b { font-weight: 400; color: var(--p4-tekst); }
.p4-h2 { font: 700 clamp(24px, 5cqw, 32px)/1.05 var(--p4-gro); letter-spacing: -0.01em; }
.p4-h3 { font: 700 18px/1.2 var(--p4-gro); }
.p4-et { display: block; font-size: 11.5px; color: var(--p4-szary); }
.p4-lead { color: var(--p4-szary); margin-top: 6px; }
.p4-lead b { color: var(--p4-tekst); font-weight: 400; }

/* ---------- strona danych ---------- */
.p4-strona--dane { display: flex; flex-direction: column; }
.p4-dane { flex: 1 1 auto; display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; grid-template-areas: 'foto nick' 'pola pola' 'dekl dekl' 'mrz mrz'; gap: 0 16px; }
.p4-foto { grid-area: foto; position: relative; align-self: start; }
.p4-foto img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 0; border-radius: 3px; border: 1px solid rgba(196, 181, 253, 0.5); background: rgba(196, 181, 253, 0.16); }
.p4-foto-zmien {
  position: absolute; right: 4px; bottom: 4px; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--p4-tusz); background: rgba(13, 9, 28, 0.85); color: var(--p4-tekst); cursor: pointer;
}
.p4-foto-zmien svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
/* płaska nakładka pod danymi: gilosz zostaje na marginesach, dane są czytelne */
.p4-nick, .p4-pola, .p4-dekl { background: rgba(13, 9, 28, 0.8); }
.p4-nick { grid-area: nick; align-self: end; position: relative; min-width: 0; padding: 12px 14px; }
.p4-h1 { font: 700 clamp(30px, 9cqw, 62px)/0.95 var(--p4-gro); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.p4-nick .p4-h1 { margin-top: 4px; }
.p4-pola { grid-area: pola; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-content: start; margin-top: 14px; padding: 4px 14px 10px; }
.p4-pole { padding: 8px 0; border-bottom: 1px solid var(--p4-linia); min-width: 0; }
.p4-pole dt, .p4-wpis dt { font-size: 11.5px; color: var(--p4-fiolet-j); }
.p4-pole dd { font: 700 21px/1.15 var(--p4-gro); font-variant-numeric: tabular-nums; margin-top: 2px; }
.p4-pole small, .p4-wpis small { display: block; font: 400 12px/1.45 var(--p4-mono); color: var(--p4-szary); margin-top: 3px; }
.p4-pole--szer { grid-column: 1 / -1; }
.p4-cien-foto { display: none; position: absolute; right: 8px; bottom: 0; width: 92px; height: 92px; object-fit: cover; opacity: 0.2; filter: grayscale(1) contrast(1.2); pointer-events: none; }
@container (min-width: 480px) {
  .p4-dane { grid-template-columns: 150px minmax(0, 1fr); grid-template-areas: 'foto nick' 'foto pola' 'dekl dekl' 'mrz mrz'; gap: 0 20px; }
  .p4-nick { padding-right: 110px; }
  .p4-pola { margin-top: 0; }
  .p4-cien-foto { display: block; }
}
.p4-dekl { grid-area: dekl; align-self: start; margin-top: 16px; padding: 12px 14px 6px; }
.p4-dekl ul { margin-top: 4px; }
.p4-dekl li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dotted var(--p4-linia); font-size: 13px; }
.p4-dekl li:last-child { border-bottom: 0; }
.p4-dekl li span:first-child { font: 700 15px/1.3 var(--p4-gro); }
.p4-dekl li span:last-child { color: var(--p4-szary); text-align: right; }
.p4-mrz {
  grid-area: mrz; margin-top: 16px; padding: 12px 0 2px; border-top: 1px solid var(--p4-linia);
  font-family: var(--p4-mono); font-size: min(15px, calc(100cqw / 36)); line-height: 1.6; letter-spacing: 0.04em;
  color: #e9e4ff; white-space: pre; overflow: hidden; font-variant-numeric: tabular-nums;
}
.p4-mrz span { display: block; }

/* ---------- prawa strona: wpisy jak w dokumencie ---------- */
.p4-naglowek { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.p4-nagroda { width: clamp(118px, 30cqw, 156px); transform: rotate(-8deg); margin: -6px -4px -10px 0; pointer-events: none; animation: p4-stempel 0.5s 0.3s cubic-bezier(.2, .9, .3, 1.3) both; }
.p4-nagroda--kontrola { transform: rotate(9deg); animation-name: p4-stempel2; }
.p4-nagroda svg { display: block; width: 100%; height: auto; }
@keyframes p4-stempel { from { opacity: 0; transform: rotate(-8deg) scale(1.5); } }
@keyframes p4-stempel2 { from { opacity: 0; transform: rotate(9deg) scale(1.5); } }
.p4-wpisy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; border-top: 1px solid var(--p4-linia); }
.p4-wpis { padding: 17px 0 18px; border-bottom: 1px solid var(--p4-linia); min-width: 0; }
.p4-wpis--szer { grid-column: 1 / -1; }
.p4-wpis dd { font: 700 28px/1.1 var(--p4-gro); font-variant-numeric: tabular-nums; margin-top: 4px; }
.p4-wpis-duzy { display: block; font-size: clamp(34px, 9cqw, 48px); line-height: 1; }
.p4-wpis-duzy small, .p4 small.p4-inl { display: inline; font: 400 14px var(--p4-mono); color: var(--p4-szary); }
.p4-dia-w { display: inline-flex; align-items: center; gap: 8px; }
.p4 small.p4-tajne { display: flex; align-items: center; gap: 6px; color: var(--p4-tusz); }
.p4-tajne svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.p4-wpis--urz dd > span { display: block; font-size: 22px; }
.p4-wpis--urz dd small { font-size: 12.5px; }
.p4 small.p4-wpisal { margin-top: 10px; padding-top: 6px; width: max-content; max-width: 100%; border-top: 1px dotted var(--p4-szary); font-size: 11px; }
.p4-ranking { margin-top: 4px; }
.p4-ranking li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px dotted var(--p4-linia); font: 400 13.5px var(--p4-mono); font-variant-numeric: tabular-nums; }
.p4-ranking li:last-child { border-bottom: 0; }
.p4-ranking li span:first-child { color: var(--p4-szary); }
.p4-ranking li span:nth-child(2) { font: 700 16px/1.3 var(--p4-gro); }
.p4-ranking li.p4-ja { color: var(--p4-tusz); }

/* cienka linijka postępu */
.p4-linijka { position: relative; height: 12px; margin: 12px 0 2px; border-bottom: 1px solid rgba(196, 181, 253, 0.55); }
.p4-linijka b { position: absolute; left: 0; bottom: -1px; height: 3px; width: 91%; background: var(--p4-tusz); }
.p4-linijka svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.p4-mini .p4-linijka { height: 14px; border: 1px solid var(--p4-linia); }
.p4-mini .p4-linijka b { top: 3px; bottom: 3px; left: 3px; height: auto; width: calc(91% - 6px); }

.p4-sekcja { margin-top: 26px; }
.p4-sekcja > .p4-h3 { margin-bottom: 8px; }
.p4-xp-opis { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--p4-szary); }
.p4-xp-opis b { color: var(--p4-tekst); font-weight: 400; }
.p4-ciag { font-size: 12px; color: var(--p4-szary); padding-bottom: 10px; border-bottom: 1px solid var(--p4-linia); margin-bottom: 6px; }

/* ---------- pieczątki ---------- */
.p4-top { margin: 18px 0 6px; counter-reset: top; }
.p4-top li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dotted var(--p4-linia); }
.p4-top li::before { counter-increment: top; content: '0' counter(top); color: var(--p4-szary); font-size: 12px; }
.p4-top b { font: 700 19px/1.2 var(--p4-gro); }
.p4-top i { font-style: normal; font-variant-numeric: tabular-nums; color: var(--p4-tusz); }
.p4-link { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; }

.p4-pieczatki { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(30%, 116px), 1fr)); gap: 6px 10px; margin-top: 14px; }
.p4-pieczatki li { display: grid; place-items: center; padding: 4px; }
.p4-pieczatki svg { display: block; width: 100%; max-width: 132px; height: auto; transform: rotate(var(--r, 0deg)) translateY(var(--y, 0px)); opacity: 0.94; }
.p4-pieczatki .p4-rect { max-width: 150px; }
.p4-piecz text { font-family: var(--p4-mono); }
.p4-piecz .p4-pg { font-family: var(--p4-gro); font-weight: 700; }
.p4-objasnienie { margin-top: 16px; font-size: 12px; color: var(--p4-szary); }

/* ---------- wizy ---------- */
.p4-wiza {
  position: relative; margin-top: 16px; padding: 18px 18px 20px; border: 1px solid var(--p4-tusz);
  background: rgba(244, 114, 182, 0.07);
}
.p4-wiza-tytul { font: 700 clamp(26px, 6cqw, 36px)/1.05 var(--p4-gro); margin: 6px 0 14px; padding-right: 96px; }
.p4-wiza dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.p4-wiza dt { font-size: 11.5px; color: var(--p4-fiolet-j); }
.p4-wiza dd { display: flex; align-items: center; gap: 5px; }
.p4-wiza .p4-szer { grid-column: 1 / -1; }
.p4-wiza-piecz { position: absolute; top: 12px; right: 12px; width: 96px; transform: rotate(14deg); color: var(--p4-tusz); }
.p4-stale { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 10px; }
.p4-stale li { padding: 7px 10px; border: 1px solid var(--p4-linia); border-radius: 3px; font-size: 12.5px; }
.p4-stale li b { display: block; font: 700 15px/1.2 var(--p4-gro); color: var(--p4-tekst); }
.p4-stale li span { color: var(--p4-szary); }
.p4-wniosek { margin-top: 22px; padding: 14px 16px; border: 1px dashed var(--p4-linia); }
.p4-wniosek .p4-linijka b { width: 66%; background: var(--p4-fiolet); }

.p4-rejestr { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.p4-rejestr th { text-align: left; font-weight: 400; font-size: 11.5px; color: var(--p4-fiolet-j); padding: 0 8px 8px 0; border-bottom: 1px solid var(--p4-linia); }
.p4-rejestr td { padding: 9px 8px 9px 0; border-bottom: 1px dotted var(--p4-linia); vertical-align: top; }
.p4-rejestr td:first-child { white-space: nowrap; color: var(--p4-szary); font-variant-numeric: tabular-nums; }
.p4-rejestr td:last-child, .p4-rejestr th:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.p4-rejestr b { display: block; font: 700 15px/1.25 var(--p4-gro); }
.p4-rejestr small { color: var(--p4-szary); font-size: 12px; }
.p4-rejestr .p4-kw { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }

/* ---------- stopka ---------- */
.p4-stopka { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 26px; font-size: 12px; color: var(--p4-szary); }
.p4-stopka nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.p4-stopka a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- profil publiczny ---------- */
.p4-podglad { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 10px 10px 10px 16px; margin-bottom: 20px; border: 1px solid var(--p4-tusz); border-radius: 6px; background: var(--p4-tusz-ciemny); }
.p4-podglad p { display: flex; align-items: center; gap: 10px; }
.p4-podglad p svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--p4-tusz); stroke-width: 1.6; }
.p4-podglad div { display: flex; flex-wrap: wrap; gap: 8px; }

.p4-zamkniety { display: none; }
.p4[data-prywatny] .p4-jawne { display: none; }
.p4[data-prywatny] .p4-zamkniety { display: block; }
.p4-okladka {
  max-width: 440px; margin: 10px auto 0; padding: 44px 28px 36px; text-align: center;
  aspect-ratio: 5 / 7; display: flex; flex-direction: column; justify-content: center;
  background: var(--p4-okladka); border-radius: 6px; border: 1px solid rgba(196, 181, 253, 0.3);
  color: #e8deff;
}
.p4-okladka-herb { width: 112px; height: 112px; margin: 0 auto 18px; display: block; color: #d9c8ff; }
.p4-okladka-napis { font-size: 12.5px; color: #d9c8ff; }
.p4-okladka .p4-h1 { margin: 22px 0 6px; font-size: clamp(36px, 10vw, 54px); color: #fff; }
.p4-okladka-poz { font: 700 20px/1.2 var(--p4-gro); color: #fff; }
.p4-okladka-info { margin-top: 26px; padding-top: 18px; border-top: 1px dashed rgba(217, 200, 255, 0.4); font-size: 13px; color: #e2d7ff; }

/* ---------- dostosuj: biuro paszportowe ---------- */
.p4-biuro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@container (min-width: 900px) {
  .p4-biuro { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .p4-boczny { position: sticky; top: 20px; }
}
.p4-wniosek-glowa { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 20px; padding-bottom: 14px; border-bottom: 1px solid var(--p4-linia); }
.p4-saldo { text-align: right; }
.p4-saldo b { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font: 700 28px/1.1 var(--p4-gro); font-variant-numeric: tabular-nums; }
.p4-formularz .p4-strona { padding-bottom: 30px; }
.p4-rubr { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.p4-rubr legend { padding: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.p4-rubr legend .p4-h3 { font-size: 19px; }
.p4-rubr legend .p4-lit { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--p4-tusz); color: var(--p4-tusz); font-size: 12px; }
.p4-nowosc { font-size: 11.5px; color: var(--p4-papier); background: var(--p4-tusz); padding: 1px 6px; }
.p4-opcje { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.p4-opcja { position: relative; display: grid; align-content: start; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 10px; align-items: start; min-height: 64px; padding: 11px 12px; border: 1px solid var(--p4-linia); border-radius: 3px; cursor: pointer; }
.p4-opcja input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.p4-kratka { width: 20px; height: 20px; border: 1px solid var(--p4-fiolet-j); display: grid; place-items: center; margin-top: 1px; }
.p4-kratka svg { width: 16px; height: 16px; stroke: var(--p4-tusz); stroke-width: 2.4; fill: none; opacity: 0; stroke-linecap: round; }
.p4-opcja:has(input:checked) { border-color: var(--p4-tusz); background: rgba(244, 114, 182, 0.08); }
.p4-opcja:has(input:checked) .p4-kratka { border-color: var(--p4-tusz); }
.p4-opcja:has(input:checked) .p4-kratka svg { opacity: 1; }
.p4-opcja:has(input:focus-visible) { outline: 2px solid var(--p4-tusz); outline-offset: 2px; }
.p4-opcja-nazwa { font: 700 15px/1.2 var(--p4-gro); display: flex; align-items: center; gap: 6px; }
.p4-opcja-cena { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; font-size: 14px; font-variant-numeric: tabular-nums; }
.p4-opcja-cena em { flex-basis: 100%; font-style: normal; color: var(--p4-szary); font-size: 11.5px; }
.p4-opcja--obraz { grid-template-columns: 22px minmax(0, 1fr); }
.p4-opcja--obraz img { grid-column: 1 / -1; width: 100%; height: 56px; object-fit: cover; border-radius: 2px; margin-bottom: 4px; }
.p4-probka { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 2px solid currentColor; }
.p4-znak { width: 16px; height: 16px; flex: none; }
.p4-wniosek-glowa + .p4-lead { margin-top: 14px; }
.p4-pusto { margin: 12px 0 18px; padding: 12px 14px; border: 1px dashed var(--p4-linia); color: var(--p4-szary); font-size: 12.5px; }

/* podgląd na żywo */
.p4-mini { position: relative; overflow: hidden; border-radius: 6px; border: 1px solid var(--p4-linia); background: var(--p4-papier); }
.p4-mini-baner { height: 96px; background: var(--p4-okladka) center / cover no-repeat; }
.p4-mini[data-baner='stadium'] .p4-mini-baner { background-image: url(../assets/stadion.jpg); }
.p4-mini[data-baner='casino'] .p4-mini-baner { background-image: url(../assets/kasyno.jpg); }
.p4-mini[data-baner='arcade'] .p4-mini-baner { background-image: url(../assets/arcade.jpg); }
.p4-mini-cialo { position: relative; isolation: isolate; padding: 0 18px 18px; }
.p4-mini-cialo::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--p4-mini-tlo, transparent) center / cover; opacity: 0.3; }
.p4-mini[data-tlo='minimal'] { background-color: #101014; }
.p4-mini[data-tlo='neon'] { background-color: #1d0b2c; border-color: #f0abfc; }
.p4-mini[data-tlo='stadium'] { --p4-mini-tlo: url(../assets/stadion.jpg); }
.p4-mini[data-tlo='webicasino'] { --p4-mini-tlo: url(../assets/kasyno.jpg); }
.p4-mini[data-tlo='gold'] { background-color: #241a06; border-color: #fbbf24; }
.p4-mini[data-tlo='galaxy'] { background-color: #0a0a2a; }
.p4-mini-glowa { display: flex; align-items: end; gap: 14px; margin-top: -36px; }
.p4-mini-av { width: 84px; height: 84px; border-radius: 6px; border: 3px solid var(--p4-papier); object-fit: cover; flex: none; }
.p4-mini[data-ramka='neon'] .p4-mini-av { border-color: #22d3ee; }
.p4-mini[data-ramka='gold'] .p4-mini-av { border-color: #fbbf24; border-style: double; border-width: 5px; }
.p4-mini[data-ramka='fire'] .p4-mini-av { border-color: #fb923c; }
.p4-mini[data-efekt='glow'] .p4-mini-av { filter: drop-shadow(0 0 10px rgba(196, 181, 253, 0.9)); }
.p4-mini[data-efekt='pulse'] .p4-mini-av { animation: p4-puls 1.8s ease-in-out infinite; }
.p4-mini[data-efekt='sparks'] .p4-mini-av { filter: drop-shadow(0 0 6px #fb923c) drop-shadow(0 0 2px #fde68a); }
.p4-mini[data-efekt='gold'] .p4-mini-av { filter: drop-shadow(0 0 8px #fbbf24); }
.p4-mini[data-efekt='diamond'] .p4-mini-av { filter: drop-shadow(0 0 8px #22d3ee); }
@keyframes p4-puls { 50% { transform: scale(1.05); } }
.p4-mini-nick { display: flex; align-items: center; gap: 6px; font: 700 28px/1 var(--p4-gro); padding-bottom: 6px; }
.p4-mini-nick .p4-znak { width: 20px; height: 20px; display: none; }
.p4-mini[data-odznaka='star'] .p4-o-star, .p4-mini[data-odznaka='crown'] .p4-o-crown,
.p4-mini[data-odznaka='diamond'] .p4-o-diamond, .p4-mini[data-odznaka='fire'] .p4-o-fire { display: block; }
.p4-mini[data-nick='ice'] .p4-mini-nick span { color: #a5f3fc; }
.p4-mini[data-nick='neon'] .p4-mini-nick span { color: #f5d0fe; text-shadow: 0 0 10px #e879f9; }
.p4-mini[data-nick='shimmer'] .p4-mini-nick span { color: #ede9fe; text-shadow: 0 0 1px #fff, 0 0 12px rgba(237, 233, 254, 0.6); }
.p4-mini[data-nick='fire'] .p4-mini-nick span { color: #fdba74; text-shadow: 0 0 8px #ea580c; }
.p4-mini[data-nick='gold'] .p4-mini-nick span { color: #fcd34d; }
.p4-mini-poz { color: var(--p4-szary); font-size: 12px; }
.p4-mini .p4-linijka b { background: var(--p4-fiolet); }
.p4-mini[data-pasek='neon'] .p4-linijka b { background: #22d3ee; }
.p4-mini[data-pasek='diamond'] .p4-linijka b { background: #a5f3fc; }
.p4-mini[data-pasek='gold'] .p4-linijka b { background: #fbbf24; }
.p4-mini-gablota { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.p4-mini-gablota div { min-height: 64px; padding: 6px; border: 1px dashed var(--p4-linia); font-size: 11px; color: var(--p4-szary); display: grid; place-items: center; text-align: center; }
.p4-mini-gablota div.p4-pelna { border-style: solid; border-color: var(--p4-tusz); color: var(--p4-tekst); }
.p4-mini-gablota div.p4-zablok { border-style: dashed; }
.p4-rachunek { margin-top: 14px; padding: 14px 16px; border: 1px dashed var(--p4-tusz); border-radius: 6px; }
.p4-rachunek ul { margin: 8px 0; font-size: 12.5px; }
.p4-rachunek li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.p4-rachunek li span:last-child { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.p4-suma { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 8px; border-top: 1px solid var(--p4-linia); }
.p4-suma b { display: inline-flex; align-items: center; gap: 5px; font: 700 24px/1 var(--p4-gro); font-variant-numeric: tabular-nums; }
.p4-rachunek .p4-akcje { margin-top: 12px; }
.p4-rachunek .p4-btn--tusz { flex: 1 1 auto; }
.p4-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.p4-komunikat { margin-top: 8px; font-size: 12px; color: var(--p4-szary); min-height: 1.5em; }

@media (max-width: 1023px) {
  .p4-glowa { margin-bottom: 14px; }
}
@media (max-width: 600px) {
  .p4-akcje .p4-btn { flex: 1 1 auto; }
  .p4-zakladki { width: 100%; mask-image: linear-gradient(90deg, #000 80%, transparent); }
  .p4-zakladki a { padding: 0 10px; }
  .p4-akcje { width: 100%; }
  .p4-akcje .p4-btn { font-size: 13px; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .p4 *, .p4 *::before, .p4 *::after { transition: none !important; animation: none !important; }
}

/* dopiski: rubryka niejawna, układ biura na telefonie */
.p4-mini-wrap .p4-podpis { margin-top: 0; }
@container (max-width: 899px) {
  .p4-boczny { display: contents; }
  .p4-mini-wrap { order: -1; position: sticky; top: calc(64px + var(--sat)); z-index: 5; padding: 6px 0 8px; background: #0a0d18; }
  .p4-formularz { order: 1; }
  .p4-rachunek { order: 2; }
  .p4-mini-baner { height: 54px; }
  .p4-mini-glowa { margin-top: -26px; }
  .p4-mini-av { width: 60px; height: 60px; }
  .p4-mini-nick { font-size: 22px; }
  .p4-mini-gablota div { min-height: 40px; }
  .p4-mini-cialo { padding: 0 14px 12px; }
  .p4-mini .p4-linijka { margin: 8px 0 4px; }
}
@media (min-width: 1024px) { .p4-mini-wrap { top: 20px; } }

@media (max-width: 600px) {
  .p4-saldo { text-align: left; }
  .p4-saldo b { justify-content: flex-start; }
}
@container (min-width: 520px) {
  .p4-dekl ul { columns: 2; column-gap: 28px; }
  .p4-dekl li { break-inside: avoid; }
  .p4-dekl li:nth-last-child(2) { border-bottom: 0; }
}
@container (max-width: 440px) { .p4-strona--dane .p4-gora span:last-child { display: none; } }
