/* Praeteritus: strona zapowiedzi.
   Układ: jeden żywy kadr na cały ekran (do premiery: kobieta z kamienia w kraterze pod rozdartym niebem; po
   wyjściu z kamienia: dolina ze sceny 7), kamienny napis, zapowiedź w oknie po kliknięciu, wezwanie do wieści
   i zbiórki; pod spodem „W co się gra” i stopka. Kamień pęka razem z postępem gry i zbiórki (assets/js/postep.js).
   Jedna, nocna paleta świata gry: bez jasnego motywu (color-scheme: dark). */

/* Własny krój gry: Praeteritus Inskrypcja (wariant Display), ten sam co w grze i na planszy końcowej zapowiedzi. */
@font-face {
  font-family: "Praeteritus Inskrypcja";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/praeteritus-inskrypcja-display.woff2") format("woff2");
}
@font-face {
  font-family: "Marcellus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/marcellus-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;
}
@font-face {
  font-family: "Marcellus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/marcellus-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: "Alegreya";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alegreya-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;
}
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alegreya-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: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alegreya-latin-400-italic.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: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alegreya-latin-ext-400-italic.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: "Alegreya";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/alegreya-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: "Alegreya";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/alegreya-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;
}

:root {
  color-scheme: dark;
  --night: #0e0a1d;      /* granat nocy pod chmurami */
  --dusk: #1a1233;       /* tło paneli */
  --ether: #8a5ad6;      /* fiolet mgły (Eter) */
  --ink: #ede8f8;        /* tekst */
  --mute: #b9aed6;       /* tekst drugorzędny */
  --mute-jasny: #d6cdea; /* tekst drugorzędny nad żywą sceną, która jaśnieje z postępem */
  --gold: #e9c47c;       /* złoto światła i interfejsu */
  --silver: #d8e7ff;     /* srebrne światło oczyszczenia */
  --azure: #63dfe9;      /* lazur oczyszczonej trawy: fokus */
  --paper-1: #17102c;    /* dalsza warstwa wycinanki */
  --paper-2: #0b0717;    /* bliższa warstwa wycinanki */
  --shade: rgba(5, 3, 12, 0.72);

  --font-display: "Praeteritus Inskrypcja", "Marcellus", "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Alegreya", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step-0: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --step-1: clamp(1.3rem, 1.15rem + 0.8vw, 1.85rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.5vw, 2.6rem);
  --step-4: clamp(3rem, 1.6rem + 6vw, 6.5rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 0.2em; }
a:hover { color: var(--silver); }
:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; border-radius: 2px; box-shadow: 0 0 0 6px var(--night); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--gold); color: var(--night); padding: 0.6rem 1rem; border-radius: 4px;
  font-family: var(--font-ui); font-size: var(--step--1); text-decoration: none;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Brakujące dane do uzupełnienia przez Adama: widoczne w podglądzie. */
.ph {
  font-family: var(--font-ui); font-size: 0.85em; color: var(--gold);
  border: 1px dashed currentColor; border-radius: 3px; padding: 0 0.3em; white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 1.4rem; border-radius: 999px; border: 1px solid var(--gold);
  text-decoration: none; cursor: pointer; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn--solid { background: var(--gold); color: var(--night); }
.btn--solid:hover { background: var(--silver); border-color: var(--silver); color: var(--night); box-shadow: 0 0 24px rgba(216, 231, 255, 0.35); }
.btn--ghost { background: rgba(14, 10, 29, 0.45); color: var(--gold); }
.btn--ghost:hover { background: rgba(233, 196, 124, 0.14); color: var(--silver); }

.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem;
  padding-block: calc(1rem + env(safe-area-inset-top, 0px)) 1rem;
  padding-inline: var(--gutter);
  font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase;
}
.topbar a, .topbar button { background: rgba(14, 10, 29, 0.82); color: var(--ink); border-radius: 999px; }
.topbar a { text-decoration: none; padding: 0.35rem 0.85rem; }
.topbar a:hover, .topbar button:hover { color: var(--gold); }
/* Pauza ruchu tła: ikona pauzy, po wciśnięciu ikona odtwarzania. */
.topbar__ruch {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0;
  border: 1px solid rgba(233, 196, 124, 0.4); cursor: pointer;
}
.topbar__ruch svg { width: 0.85rem; height: 0.85rem; fill: currentColor; }
.topbar__ruch .ikona-graj, .topbar__ruch[aria-pressed="true"] .ikona-pauza { display: none; }
.topbar__ruch[aria-pressed="true"] .ikona-graj { display: inline; }
/* Dźwięk: domyślnie wyłączony (głośnik przekreślony), po wciśnięciu fale. */
.topbar__dzwiek {
  display: inline-flex; align-items: center; gap: 0.4rem; height: 2.1rem; padding: 0 0.8rem 0 0.6rem;
  border: 1px solid rgba(233, 196, 124, 0.4); cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.topbar__dzwiek svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar__dzwiek .glosnik { fill: currentColor; stroke: none; }
.topbar__dzwiek .fale, .topbar__dzwiek[aria-pressed="true"] .cisza { display: none; }
.topbar__dzwiek[aria-pressed="true"] .fale { display: inline; }
.topbar__dzwiek[aria-pressed="true"] { border-color: var(--silver); color: var(--silver); }
@media (max-width: 40rem) {
  /* Telefon: lżejszy pasek, sam głośnik (podpis zostaje dla czytników). */
  .topbar { font-size: 0.72rem; gap: 0.45rem; }
  .topbar__dzwiek { width: 2.1rem; padding: 0; justify-content: center; }
  .topbar__etykieta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- żywy świat: kadr główny ----------
   Do premiery: kobieta z kamienia w kraterze, srebrne światło z dziury w chmurach, rysy rosną z postępem
   (WebGL w swiat.js). Po wyjściu z kamienia: dolina ze sceny 7 (scena--dolina). --p (0..1) to postęp z postep.js.
   Układ: na stojącym i małym ekranie jedna kolumna (napis, film, miejsce na posąg, postęp; wezwanie pod spodem);
   na szerokim ekranie napis u góry, posąg w środku, wezwanie w lewym dolnym rogu, postęp w prawym. */
.swiat {
  --p: 0;
  /* Skala warstw doliny: 1 piksel obrazu bazowego 1536x1024 zapowiedzi (tylko scena--dolina). */
  --k: min(calc(46svh / 709), calc(max(70vw, 460px) / 1005));
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--night);
}
@media (orientation: portrait) {
  .swiat { --k: min(calc(34svh / 709), calc(max(70vw, 460px) / 1005)); }
}

.scena { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #120c26; }
.scena__tlo, .scena__gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.scena__tlo { object-fit: cover; object-position: 50% 30%; max-width: none; }
.scena picture { display: contents; }
/* Bez WebGL: niebo otwiera się zwykłym przenikaniem obrazów. */
.scena__tlo--otwarte { opacity: 0; transition: opacity 3s ease 0.6s; }
.otwarte .scena__tlo--otwarte { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .scena__tlo--otwarte { transition: none; } }
.scena__gl { opacity: 0; transition: opacity 0.8s ease; }
.gl .scena__gl { opacity: 1; }
.gl .scena__tlo { visibility: hidden; transition: visibility 0s 0.9s; }

/* Przyciemnienie pod treścią: czytelność napisów bez gaszenia sceny; dół przechodzi w noc pod kadrem. */
.scena__cien {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(9, 5, 20, 0.45), transparent 18%, transparent 72%, rgba(9, 5, 20, 0.55) 92%, var(--night));
}

.swiat__tresc {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
/* Jedna kolumna: pierwszy ekran jest o 9rem niższy niż okno, żeby nagłówek wezwania i jedyny przycisk zapisu
   weszły jeszcze na pierwszy ekran (pod sceną, nad nocą). */
.swiat__ekran {
  position: relative; width: 100%;
  min-height: calc(100vh - 9rem); min-height: calc(100svh - 9rem);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(3.6rem + env(safe-area-inset-top, 0px)) var(--gutter) clamp(0.8rem, 2.5svh, 1.6rem);
}
.swiat__ekran > :not(.scena) { position: relative; z-index: 1; }
.swiat__gora { display: flex; flex-direction: column; align-items: center; width: 100%; }
/* Miejsce na posąg w promieniu: swiat.js stawia go tutaj, stopami przy dolnej krawędzi. */
.scena-miejsce { flex: 1 0 auto; width: 100%; min-height: clamp(10rem, 38svh, 36rem); }
/* Niski telefon (np. 375x667): posąg trochę mniejszy, żeby przycisk zapisu nie był ucięty na dole ekranu. */
@media (orientation: portrait) and (max-height: 44rem) {
  .scena-miejsce { min-height: clamp(9rem, 31svh, 36rem); }
}
.swiat__postep { display: grid; justify-items: center; gap: 0.3rem; }

/* ---------- kamienny napis ---------- */
.tytul { position: relative; isolation: isolate; width: min(90vw, 60rem, 70svh); margin: 0; line-height: 0; }
/* Za napisem jest najjaśniejsze miejsce kadru (dziura w chmurach, słońce): tylko lekki cień, żeby nie gasić słońca
   ciemną plamą; czytelność liter trzyma ich własny cień w shaderze napisu. */
.tytul::before {
  content: ""; position: absolute; inset: -12% 2%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(9, 5, 20, 0.26), rgba(9, 5, 20, 0.12) 70%, transparent);
}
.tytul__obraz { position: relative; display: block; aspect-ratio: 2400 / 323; }
.tytul__obraz img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.tytul__czysty { opacity: var(--p); }
.tytul__gl {
  position: absolute; left: -8%; top: -30%; width: 116%; height: 160%;
  opacity: 0; transition: opacity 0.6s ease;
}
.gl-tytul .tytul__gl { opacity: 1; }
/* Obraz znika dopiero, gdy płótno już się pojawiło (bez mrugnięcia napisu). */
.gl-tytul .tytul__obraz img { opacity: 0; transition: opacity 0s 0.6s; }

/* Jedno zdanie pod napisem mówi, jaka to gra; tajemnica zostaje w historii, nie w gatunku. */
.gatunek {
  position: relative; isolation: isolate;
  margin: 0.55rem 0 0; max-width: 52rem;
  font-family: var(--font-display); font-size: clamp(1rem, 0.6rem + 0.75vw, 1.35rem); line-height: 1.3;
  color: var(--ink); text-wrap: balance; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95), 0 0 24px rgba(9, 5, 20, 0.8);
}
/* Srebrne światło schodzi zza zdania: wąski, miękki cień tuż pod literami (bez ciemnego pasa przez słońce). */
.gatunek::before {
  content: ""; position: absolute; inset: -0.45rem -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(9, 5, 20, 0.5), rgba(9, 5, 20, 0.3) 70%, transparent);
}

/* Zapowiedź na pierwszym ekranie: mały przycisk pod zdaniem, film otwiera się w oknie (site.js). */
.zapowiedz {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 0.85rem;
  padding: 0.45rem 1rem 0.45rem 0.45rem; border-radius: 999px; cursor: pointer;
  background: rgba(14, 10, 29, 0.78); color: var(--ink); border: 1px solid rgba(233, 196, 124, 0.55);
  font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.zapowiedz:hover { border-color: var(--silver); color: var(--silver); box-shadow: 0 0 24px rgba(216, 231, 255, 0.25); }
.zapowiedz__ikona {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--gold); color: var(--night);
}
.zapowiedz__ikona svg { width: 0.85rem; height: 0.85rem; margin-left: 0.12rem; }
.swiat__gora .film__status { margin-top: 0.4rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95); }

/* ---------- postęp: kamień pęka ---------- */
.postep { position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.35rem 0.7rem; font-family: var(--font-ui); font-size: var(--step--1); color: var(--ink); }
.postep__pasek {
  position: relative; width: 7.5rem; height: 3px; border-radius: 3px; overflow: visible;
  background: linear-gradient(90deg, rgba(138, 90, 214, 0.75), rgba(90, 50, 160, 0.75));
}
.postep__pasek::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); border-radius: inherit;
  background: linear-gradient(90deg, var(--silver), #f4f8ff);
}
.postep__pasek::after {
  content: ""; position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: var(--silver); box-shadow: 0 0 10px 3px rgba(216, 231, 255, 0.65);
}
.scena--dolina ~ * .postep__pasek::before, [data-scena="dolina"] .postep__pasek::before { background: linear-gradient(90deg, var(--silver), var(--gold)); }
[data-scena="dolina"] .postep__pasek::after { background: var(--gold); box-shadow: 0 0 10px 3px rgba(233, 196, 124, 0.6); }
.postep__tekst { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95); }
.postep__tekst b { color: var(--silver); font-weight: 600; }
[data-scena="dolina"] .postep__tekst b { color: var(--gold); }
.postep__pytanie {
  position: relative;
  width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid rgba(233, 196, 124, 0.6);
  background: rgba(14, 10, 29, 0.6); color: var(--gold); font: 600 0.85rem var(--font-ui); cursor: pointer; padding: 0;
}
/* Pole dotyku ok. 44 px (kciuk), choć kółko zostaje małe. */
.postep__pytanie::after { content: ""; position: absolute; inset: -0.5rem; border-radius: 50%; }
.postep__pytanie:hover, .postep__pytanie[aria-expanded="true"] { background: rgba(233, 196, 124, 0.18); }
.postep__info {
  position: absolute; bottom: calc(100% + 0.6rem); left: 50%; transform: translateX(-50%); z-index: 5;
  width: min(24rem, 86vw); padding: 0.8rem 1rem; border-radius: 8px; text-align: left;
  background: rgba(14, 10, 29, 0.95); border: 1px solid rgba(233, 196, 124, 0.35); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  font-family: var(--font-ui); font-size: 0.85rem; line-height: 1.5; color: var(--ink);
}
.postep__info[hidden] { display: none; }
/* Co rusza pasek, wprost pod nim (nie tylko pod „?”), i ostatni krok prac: to nie pasek wczytywania strony. */
.postep__wyjasnienie {
  margin: 0; font-family: var(--font-ui);
  font-size: 0.82rem; color: var(--ink); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95); max-width: 30rem;
}
.postep__ostatnio {
  margin: 0; font-family: var(--font-ui);
  font-size: 0.78rem; color: var(--mute-jasny); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95); max-width: 30rem;
}
.postep__ostatnio:empty { display: none; }
.swiat__postep { position: relative; isolation: isolate; }
.swiat__postep::before {
  content: ""; position: absolute; inset: -0.8rem -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(9, 5, 20, 0.7), rgba(9, 5, 20, 0.45) 65%, transparent);
}

/* ---------- wezwanie: wieści i zbiórka ---------- */
.wezwanie {
  position: relative; z-index: 1; isolation: isolate; width: 100%;
  display: grid; justify-items: center; gap: 0.55rem; max-width: 48rem;
  padding: clamp(1.4rem, 4vw, 2.2rem) var(--gutter) clamp(2rem, 6vw, 3rem);
}
.wezwanie__tytul { font-size: var(--step-1); color: var(--ink); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85); }
/* Jedna kolumna: nagłówek i przycisk najpierw (mieszczą się na pierwszym ekranie), zdanie o zapisie pod nimi. */
.wezwanie__tytul { order: -2; }
.wezwanie__akcje { order: -1; }
.wezwanie__lead { color: var(--mute-jasny); font-size: var(--step-0); line-height: 1.45; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9); }
.wezwanie__akcje { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 0.3rem; }
.wezwanie__drobne { font-family: var(--font-ui); font-size: 0.72rem; line-height: 1.5; color: var(--mute-jasny); max-width: 48rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
.signup__status { font-family: var(--font-ui); font-size: var(--step--1); color: var(--gold); }
.film__status { font-family: var(--font-ui); font-size: var(--step--1); color: var(--gold); }
/* Puste komunikaty nie zajmują miejsca, ale zostają w drzewie dostępności, żeby czytniki je ogłosiły. */
.film__status:empty, .signup__status:empty {
  position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%);
}

/* Zewnętrzny link „Wesprzyj produkcję gry” (Buy Me a Coffee): zwykły tekst w złocie strony, bez przycisku, obrazka i skryptu obcego
   serwisu, więc nic nie wychodzi z przeglądarki przed kliknięciem. Pod zapisem na wieści jest cichszy niż on. */
.kawa { display: inline-flex; align-items: center; gap: 0.35em; padding-block: 0.4rem; color: var(--gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.kawa:hover { color: var(--silver); }
.kawa svg { width: 0.95em; height: 0.95em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wezwanie__kawa {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.4rem; font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
}

/* ---------- szeroki ekran: posąg w środku, wezwanie po lewej, postęp po prawej ---------- */
@media (min-aspect-ratio: 5/4) and (min-width: 56rem) and (min-height: 34rem) {
  .swiat__tresc {
    display: grid; min-height: 100vh; min-height: 100svh; align-items: end;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 28vw) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "gora gora gora" ". miejsce ." "wez miejsce post";
    padding: calc(3.4rem + env(safe-area-inset-top, 0px)) var(--gutter) clamp(1rem, 3svh, 2rem);
  }
  .swiat__ekran { display: contents; }
  .swiat__gora { grid-area: gora; align-self: start; }
  .scena-miejsce { grid-area: miejsce; min-height: 0; height: 100%; }
  .swiat__postep { grid-area: post; justify-self: end; justify-items: end; text-align: right; max-width: 26rem; align-self: end; }
  .postep { justify-content: flex-end; }
  .postep__info { left: auto; right: 0; transform: none; bottom: calc(100% + 0.6rem); }
  .wezwanie {
    grid-area: wez; justify-self: start; justify-items: start; text-align: left;
    max-width: 30rem; padding: 0; gap: 0.5rem;
  }
  .wezwanie__akcje, .wezwanie__kawa { justify-content: flex-start; }
  .wezwanie__tytul, .wezwanie__akcje { order: 0; }
  .wezwanie::before, .swiat__postep::before {
    content: ""; position: absolute; inset: -1.6rem -2.4rem; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(9, 5, 20, 0.72), rgba(9, 5, 20, 0.5) 60%, transparent);
  }
  .scena__cien {
    background:
      linear-gradient(to bottom, rgba(9, 5, 20, 0.45), transparent 20%, transparent 70%, rgba(9, 5, 20, 0.45)),
      radial-gradient(ellipse 34% 40% at 0% 100%, rgba(9, 5, 20, 0.55), transparent),
      radial-gradient(ellipse 30% 30% at 100% 100%, rgba(9, 5, 20, 0.5), transparent);
  }
}
@media (min-aspect-ratio: 5/4) and (min-width: 56rem) and (min-height: 34rem) and (max-height: 50rem) {
  .tytul { width: min(90vw, 52rem, 62svh); }
}

/* Niskie okno (telefon trzymany poziomo): wszystko w kolumnie, strona się przewija. */
@media (orientation: landscape) and (max-height: 31.25rem) {
  .swiat__ekran { padding-top: calc(3.4rem + env(safe-area-inset-top, 0px)); }
  .tytul { width: min(70vw, 34rem); }
  .scena-miejsce { min-height: 12.5rem; }
}
@media (max-width: 40rem) {
  .wezwanie__akcje .btn { width: 100%; justify-content: center; }
  /* Pasek w osobnym wierszu, tekst i „?” zawsze razem: wiersz nie skacze, gdy zmienia się liczba. */
  .postep { display: grid; grid-template-columns: auto auto; justify-content: center; }
  .postep__pasek { grid-column: 1 / -1; justify-self: center; }
}

/* ---------- dolina (po wyjściu z kamienia): warstwy postaci nad tłem ---------- */
.scena--dolina .scena__tlo { object-position: 63% 58%; }
/* Bez WebGL: oczyszczona dolina wyłania się kołem od światła (swiat.js ustawia --p i --r). */
.scena__tlo--czysta {
  opacity: min(1, calc(var(--p) * 20));
  -webkit-mask-image: radial-gradient(circle at 63.3% 43.3%, #000 calc(var(--r, 0px) - 3rem), transparent calc(var(--r, 0px) + 3rem));
  mask-image: radial-gradient(circle at 63.3% 43.3%, #000 calc(var(--r, 0px) - 3rem), transparent calc(var(--r, 0px) + 3rem));
}
.scena__lewa, .scena__prawa { position: absolute; bottom: 0; will-change: transform; }
.scena__lewa { left: 0; width: calc(1005 * var(--k)); aspect-ratio: 1005 / 709; }
.scena__prawa { right: 0; width: min(calc(756 * var(--k)), 46vw); aspect-ratio: 756 / 441; }
.scena__lewa img, .scena__prawa img {
  position: absolute; max-width: none; height: auto;
  /* Oczyszczony świat rozjaśnia też pierwszy plan i odbiera mu fiolet. */
  filter: brightness(calc(0.9 + 0.35 * var(--p))) saturate(calc(1 - 0.25 * var(--p))) hue-rotate(calc(-28deg * var(--p)));
}
.w-klif { left: 0; top: 39.07%; width: 95.22%; }
.w-ludzie { left: 1.69%; top: 0.14%; width: 41.29%; }
.w-kobieta { left: 42.69%; top: 4.65%; width: 18.31%; }
.w-glazy { left: 0; top: 52.75%; width: 100%; }
.w-lis { left: 61.38%; top: 38.32%; width: 16.14%; }
.w-trzciny { left: 0; top: 0; width: 100%; }

/* ---------- film: plakat w pasie „W co się gra” i okno z odtwarzaczem ---------- */
.film { margin: 0; width: 100%; }
.film__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 10px; background: var(--night);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(233, 196, 124, 0.35);
}
.film__frame img, .film__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border: 0; object-fit: cover; }
.film__frame img { filter: brightness(0.78) saturate(1.05); transition: filter 0.3s; }
.film__play {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.8rem;
  background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; padding: 1rem;
}
.film__frame:hover img { filter: brightness(0.9) saturate(1.1); }
.film__icon {
  width: clamp(3.2rem, 6vw, 4.6rem); height: clamp(3.2rem, 6vw, 4.6rem); border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: var(--night);
  box-shadow: 0 0 0 10px rgba(233, 196, 124, 0.18), 0 0 40px rgba(233, 196, 124, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
/* Ramka filmu przycina wszystko, co wystaje: obwódka fokusu musi być w środku. */
.film__play:focus-visible { outline-offset: -7px; border-radius: 10px; box-shadow: none; }
.film__play:hover .film__icon, .film__play:focus-visible .film__icon { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(233, 196, 124, 0.22), 0 0 56px rgba(233, 196, 124, 0.55); }
.film__icon svg { width: 38%; height: 38%; margin-left: 8%; }
.film__label {
  font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.film__note {
  margin-top: 0.6rem; font-family: var(--font-ui); font-size: 0.75rem; line-height: 1.45; color: var(--mute);
}
.film__note a { color: var(--gold); }
.film .film__status { margin-top: 0.5rem; }

.kino {
  width: min(92vw, 70rem); max-width: none; padding: 0; border: 1px solid rgba(233, 196, 124, 0.35); border-radius: 12px;
  background: var(--night); color: var(--ink); box-shadow: 0 30px 120px rgba(0, 0, 0, 0.8);
}
.kino::backdrop { background: rgba(5, 3, 12, 0.86); }
.kino__pasek { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.6rem 0.6rem 1rem; }
.kino__tytul { font-size: var(--step-0); color: var(--gold); }
.kino__zamknij {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer;
  background: rgba(233, 196, 124, 0.12); border: 1px solid rgba(233, 196, 124, 0.45); color: var(--ink);
}
.kino__zamknij:hover { color: var(--gold); }
.kino__zamknij svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.kino__ramka { position: relative; aspect-ratio: 16 / 9; background: #000; }
.kino__ramka iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kino__zgoda {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 1rem; text-align: center;
}
.kino__zgoda .kino__nota { max-width: 34rem; padding: 0; font-size: var(--step--1); }
.kino__start {
  padding: 0.8rem 1.4rem;
  font-family: var(--font-ui); font-size: var(--step-0); color: var(--gold); background: transparent;
  border: 1px solid currentColor; border-radius: 999px; cursor: pointer;
}
.kino__start:hover, .kino__start:focus-visible { color: #fff; }
.kino__nota { padding: 0.6rem 1rem 0.8rem; font-family: var(--font-ui); font-size: 0.75rem; color: var(--mute); }

/* Okno zapisu na wieści: ten sam granat i złota ramka co okno filmu, jedna wąska kolumna. */
.zapis {
  width: min(92vw, 30rem); max-width: none; padding: 0; border: 1px solid rgba(233, 196, 124, 0.35); border-radius: 12px;
  background: var(--night); color: var(--ink); box-shadow: 0 30px 120px rgba(0, 0, 0, 0.8);
}
.zapis::backdrop { background: rgba(5, 3, 12, 0.86); }
.zapis__pasek { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0.6rem 0 1.2rem; }
.zapis__tytul { font-size: var(--step-0); color: var(--gold); }
.zapis__form, .zapis__gotowe { display: grid; gap: 0.8rem; padding: 0.6rem 1.2rem 1.3rem; font-family: var(--font-ui); }
.zapis__wstep { color: var(--mute); font-size: var(--step--1); line-height: 1.5; }
.zapis__etykieta { font-size: var(--step--1); font-weight: 600; margin-bottom: -0.4rem; }
.zapis__pole {
  width: 100%; padding: 0.7rem 0.8rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(233, 196, 124, 0.45); border-radius: 8px;
}
.zapis__pole:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.zapis__pole[aria-invalid="true"] { border-color: #f0a080; }
.zapis__zgoda { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; font-size: var(--step--1); line-height: 1.45; cursor: pointer; }
.zapis__zgoda input { width: 1.15rem; height: 1.15rem; margin: 0.12rem 0 0; accent-color: var(--gold); }
/* Pułapka na boty: pole poza ekranem, niewidoczne i pomijane przez czytniki ekranu. */
.zapis__ul { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.zapis__wyslij { justify-self: start; }
.zapis__wyslij[disabled] { opacity: 0.6; cursor: progress; }
.zapis__status { font-size: var(--step--1); color: var(--gold); }
.zapis__status:empty { display: none; }
.zapis__drobne { font-size: 0.72rem; line-height: 1.5; color: var(--mute); }
.zapis__drobne a { color: var(--gold); }
.zapis__gotowe { padding-top: 0.2rem; line-height: 1.5; }
.zapis__gotowe:focus { outline: none; }
.zapis__gotowe-tytul { font-size: var(--step-0); color: var(--gold); }

/* Duże monitory: trochę większy tekst, żeby treść nie ginęła w kadrze. */
@media (min-width: 112rem) and (min-height: 75rem) {
  html { font-size: 112.5%; }
}

/* ---------- w co się gra: kadr z zapowiedzi i trzy czynności gracza pod kadrem ---------- */
.wco {
  padding: clamp(2.2rem, 6vw, 3.6rem) var(--gutter);
  background: linear-gradient(180deg, var(--night), var(--dusk) 55%, var(--night));
  border-top: 1px solid rgba(233, 196, 124, 0.18);
  text-align: center;
}
.wco__tytul { font-size: var(--step-1); color: var(--gold); }
.wco__uklad {
  display: grid; gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center; justify-items: center;
  max-width: 64rem; margin: clamp(1.2rem, 3vw, 2rem) auto 0;
}
.wco__lista {
  list-style: none; margin: 0; padding: 0; width: 100%;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem clamp(1.5rem, 4vw, 3.5rem);
}
.wco__lista li { flex: 1 1 14rem; max-width: 19rem; min-width: 0; display: grid; justify-items: center; gap: 0.6rem; }
.wco__lista svg {
  width: 2.4rem; height: 2.4rem; color: var(--gold);
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.wco__lista svg .pelne { fill: currentColor; }
.wco__lista svg .slabe { opacity: 0.7; }
.wco__lista p { margin: 0; line-height: 1.45; color: var(--mute); }
.wco__lista b { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--step-0); color: var(--ink); }
/* Pod nagłówkiem: od razu wiadomo, do jakiej gry to podobne. */
.wco__duch {
  margin: 0.45rem auto 0; max-width: 40rem;
  font-family: var(--font-display); font-size: var(--step-0); color: var(--mute-jasny);
}
/* Drugi przycisk zapisu: po filmie i trzech czynnościach, żeby nie wracać na górę. */
.wco__zapis { display: grid; justify-items: center; gap: 0.5rem; margin-top: clamp(1.6rem, 4vw, 2.6rem); }
/* Szeroki ekran: kadr z zapowiedzi po lewej, trzy czynności jedna pod drugą po prawej. */
@media (min-width: 56rem) {
  .wco__uklad { grid-template-columns: minmax(0, 34rem) minmax(0, 1fr); text-align: left; }
  .wco__lista { flex-direction: column; align-items: flex-start; }
  .wco__lista li { max-width: none; flex: none; gap: 0.2rem 0.9rem; grid-template-columns: auto 1fr; justify-items: start; align-items: start; column-gap: 0.9rem; }
}

/* ---------- kto robi tę grę: krótka osobista notka autora i link wsparcia ---------- */
.autor {
  max-width: 40rem; margin-inline: auto; padding: clamp(2rem, 6vw, 3.2rem) var(--gutter) clamp(2.4rem, 6vw, 3.6rem);
  display: grid; gap: 0.8rem; text-align: center;
}
.autor__tytul { font-size: var(--step-1); color: var(--gold); }
.autor p { margin: 0; line-height: 1.6; color: var(--mute); }
.autor__kawa { margin-top: 0.2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 1.6rem; }
.autor__podpis { font-family: var(--font-display); font-size: var(--step-0); color: var(--ink) !important; }

/* ---------- stopka ---------- */
.footer {
  position: relative; background: var(--paper-2); color: var(--mute);
  padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); padding-inline: var(--gutter);
  font-family: var(--font-ui); font-size: 0.85rem; line-height: 1.6;
}
.footer__inner { max-width: 64rem; margin-inline: auto; display: grid; gap: 0.9rem; }
.footer__ai { color: var(--ink); max-width: 46rem; }
/* Podpis autora zawsze w osobnej, całej linii. */
.footer__autor { display: block; white-space: nowrap; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer nav a { color: var(--gold); }
.footer__kawa { margin: 0; display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.footer__kawa .kawa { padding-block: 0.2rem; }

/* ---------- strony z dokumentami ---------- */
.doc { max-width: 46rem; margin-inline: auto; padding-inline: var(--gutter); padding-block: 6rem 4rem; }
.doc h1 { font-size: var(--step-2); color: var(--gold); margin-bottom: 0.4rem; }
.doc h2 { font-size: var(--step-1); color: var(--silver); margin-top: 2.4rem; margin-bottom: 0.8rem; }
.doc h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; margin-top: 1.4rem; margin-bottom: 0.5rem; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 0.8rem; }
.doc ul, .doc ol { padding-left: 1.3rem; display: grid; gap: 0.4rem; margin: 0.6rem 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid rgba(185, 174, 214, 0.25); }
.doc .table-wrap { overflow-x: auto; margin: 1rem 0; }
.doc__draft {
  font-family: var(--font-ui); font-size: var(--step--1); color: var(--night); background: var(--gold);
  border-radius: 6px; padding: 0.8rem 1rem; margin: 1.2rem 0 2rem;
}
.doc__meta { color: var(--mute); font-family: var(--font-ui); font-size: var(--step--1); }
.doc__back { font-family: var(--font-ui); font-size: var(--step--1); }
