/* Kurs KPP SOLIOC — ekran dotykowy 86" (projekt 1920x1080, 1 rem = 10 px przy 1920x1080).
   Wzór skalowania jak Medusa: html{font-size:min(.5208vw,.9259vh)}. Cały interfejs w rem. */

@import url("styl/styl.css"); /* wspólny pakiet stylu SOLIOC Ratownictwo (tokeny, komponenty, fonty), kopiowany do dist/styl/ przez build.mjs */
/* Ten plik zawiera tylko UKŁAD: kolory, kroje, promienie i cienie pochodzą z pakietu (var(--sl-*) oraz nazwy robocze z zgodnosc-nazw.css). */
@import url("styl/styl.css"); /* wspólny pakiet stylu SOLIOC Ratownictwo (tokeny, komponenty, fonty), kopiowany do dist/styl/ przez build.mjs */
/* Ten plik zawiera tylko UKŁAD: kolory, kroje, promienie i cienie pochodzą z pakietu (var(--sl-*) oraz nazwy robocze z zgodnosc-nazw.css). */
:root {
  --sl-px: 0.1rem; /* 1 „piksel Atlasu” = 0,1 rem (1 rem = 10 px na TV 1080p): promienie i cienie skalują się razem z pismem */
  --sl-px: 0.1rem; /* 1 „piksel Atlasu” = 0,1 rem (1 rem = 10 px na TV 1080p): promienie i cienie skalują się razem z pismem */
  --teoria: var(--sl-cichy);
  --symulacja: var(--sl-tekst);
}

html {
  font-size: min(0.5208vw, 0.9259vh);
  background: var(--tlo);
  touch-action: pan-x pan-y; /* bez zoomu szczypnięciem (dłoń na ekranie) */
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(60rem 40rem at 8% -8%, var(--sl-poswiata), transparent 70%), var(--tlo);
  color: var(--tekst);
  font-family: var(--font-tekst);
  font-size: 3.2rem;
  line-height: 1.3;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#app { width: 100%; height: 100%; }
button { font: inherit; color: inherit; margin: 0; cursor: pointer; border-radius: var(--r-maly); text-align: left; }
a { color: inherit; }
:focus-visible { outline: 0.4rem solid var(--sygnal); outline-offset: 0.2rem; }

/* ---------- ramka ekranu ---------- */
.ekran {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  padding: 3.2rem 6rem 2.6rem;
}

/* ---------- nagłówek ---------- */
.gora { display: flex; align-items: center; justify-content: space-between; flex: none; }
.marka { display: flex; align-items: center; gap: 2.8rem; min-width: 0; }
.marka > div { border-left: 0.1rem solid var(--linia); padding-left: 2.8rem; padding-block: 0.4rem; }
.znak-maly { height: 3.6rem; width: auto; flex: none; display: block; margin-right: 2rem; }
.znak { height: 6.4rem; width: auto; flex: none; display: block; }
.kicker { font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.08em; color: var(--przygaszony); text-transform: uppercase; }
.tytul-dnia { font-family: var(--font-nag); font-weight: 600; font-size: 4.4rem; line-height: 1.05; letter-spacing: -0.02em; margin-top: 0.4rem; }
.prawa { display: flex; align-items: center; gap: 3.2rem; flex: none; }
.zegar { font-family: var(--font-nag); font-weight: 700; font-size: 5.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.etykieta-zegar { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.etykieta-zegar span { font-family: var(--font-mono); font-size: 2.4rem; letter-spacing: 0.08em; color: var(--przygaszony); }
.pelny {
  width: 8rem; height: 8rem; display: grid; place-items: center;
  background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: 50%; padding: 0;
  transition: transform 120ms var(--wyjscie), background-color 120ms var(--wyjscie);
}
.pelny svg { width: 3.6rem; height: 3.6rem; }
.pelny:active { transform: scale(0.94); background: var(--panel-cichy); }

/* ---------- część środkowa ---------- */
.srodek { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 4.8rem; }
.etykieta { font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.08em; color: var(--przygaszony); text-transform: uppercase; }

.plan { display: flex; flex-direction: column; gap: 1.2rem; min-height: 0; }
.lista {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.8rem;
  overflow-y: auto; touch-action: pan-y; scrollbar-width: none; padding-bottom: 1.2rem;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
}
.lista::-webkit-scrollbar { display: none; }
.lista.na-koncu { mask-image: none; }
.dalej { flex: none; min-height: 8rem; display: flex; align-items: center; justify-content: center; background: var(--panel); color: var(--tekst); border: 0.1rem solid var(--obrys); border-radius: var(--r-pigulka); font-family: var(--font-nag); font-weight: 600; font-size: 3rem; text-align: center; transition: transform 120ms var(--wyjscie); }
.dalej:active { transform: scale(0.98); }
.akcja .brak-a { font-family: var(--font-tekst); font-size: 2.4rem; line-height: 1.1; }

.wiersz {
  flex: none; min-height: 8.6rem; display: flex; align-items: center; gap: 2.2rem; padding: 0.8rem 2.2rem;
  background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-karta);
  transition: transform 120ms var(--wyjscie), background-color 160ms var(--wyjscie), border-color 160ms var(--wyjscie), opacity 160ms var(--wyjscie);
}
.wiersz:active { transform: scale(0.985); }
.wiersz .godz { font-family: var(--font-nag); font-weight: 600; font-size: 3.2rem; width: 10rem; flex: none; font-variant-numeric: tabular-nums; }
.wiersz .rodzaj {
  font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.4rem 0.8rem; border: 0.2rem solid currentColor; border-radius: var(--r-pigulka); width: 19rem; text-align: center; flex: none;
}
.wiersz .nazwa { flex: 1; font-size: 3.2rem; font-weight: 500; line-height: 1.12; min-width: 0; }
.wiersz.minione { opacity: 1; background: var(--panel-cichy); color: var(--cichy); }
.wiersz.wybrany { border-color: var(--akcent); background: var(--akcent-jasny); opacity: 1; box-shadow: inset 0 0 0 0.2rem var(--akcent), var(--cien-karty); }

.przerwa {
  flex: none; display: flex; align-items: center; gap: 2.2rem; min-height: 3.6rem; padding: 0 2.2rem;
  font-family: var(--font-mono); font-size: 2.4rem; letter-spacing: 0.06em; color: var(--przygaszony);
}
.przerwa::before, .przerwa::after { content: ""; height: 0.2rem; background: var(--linia); flex: 1; }
.przerwa::before { flex: 0 0 4rem; }

.k-teoria { color: var(--teoria); }
.k-cwiczenia { color: var(--akcent); }
.k-symulacja { color: var(--symulacja); }
.k-sprawdzian { color: var(--cichy); }
.k-egzamin { color: var(--tekst); }

/* ---------- panel „teraz” ---------- */
.teraz { background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-karta); box-shadow: var(--cien-karty); display: flex; flex-direction: column; padding: 3rem 4rem 2.8rem; gap: 1.8rem; min-height: 0; }
.teraz-tresc { display: flex; flex-direction: column; gap: 1.2rem; flex: 1; min-height: 0; animation: wejscie 240ms var(--wyjscie); }
.znacznik { display: flex; align-items: center; gap: 1.8rem; font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.07em; color: var(--akcent); text-transform: uppercase; }
.kropka { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--akcent); animation: puls 1.4s ease-in-out infinite; flex: none; }
.teraz h1 { margin: 0; font-family: var(--font-nag); font-weight: 600; font-size: 5.6rem; line-height: 1; letter-spacing: -0.02em; }
.cel { margin: 0; font-size: 3.4rem; line-height: 1.32; color: var(--cichy); max-width: none; }
.meta { font-family: var(--font-mono); font-size: 2.4rem; letter-spacing: 0.1em; color: var(--przygaszony); text-transform: uppercase; }

.akcje { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem; margin-top: auto; }
.akcja {
  min-height: 11rem; display: flex; flex-direction: column; justify-content: space-between; padding: 1.6rem 2.2rem;
  border: 0.2rem solid transparent; border-radius: var(--r-karta); color: var(--sl-na-sygnale); box-shadow: var(--cien-pigulki);
  transition: transform 120ms var(--wyjscie), filter 120ms var(--wyjscie);
}
.akcja .nr { font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.08em; }
.akcja .nazwa-a { font-family: var(--font-nag); font-weight: 700; font-size: 3.6rem; line-height: 1.05; }
.akcja:active:not([aria-disabled="true"]) { transform: scale(0.97); filter: brightness(0.9); }
.a-wiedza { background: var(--panel); color: var(--tekst); border-color: var(--obrys); box-shadow: var(--cien-karty); }
.a-cwiczenia { background: var(--sygnal); }
.a-symulacja { background: var(--panel); color: var(--sygnal); box-shadow: inset 0 0 0 0.2rem var(--sygnal); }
.akcja[aria-disabled="true"] { background: transparent; color: var(--przygaszony); border: 0.2rem dashed var(--linia); box-shadow: none; cursor: default; }
.akcja[aria-disabled="true"] .nazwa-a { font-weight: 600; }

.nawigacja { margin-top: auto; display: grid; grid-template-columns: 17rem minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.4rem; }
.nawig.temat-dalej { font-size: 3rem; }
.nawig.tematy { min-height: 8rem; font-size: 3.2rem; }
.akcje + .nawigacja { margin-top: 0; }
.nawig {
  min-height: 8.6rem; display: flex; align-items: center; justify-content: center; gap: 1.8rem; padding: 0 2.4rem;
  font-family: var(--font-nag); font-weight: 600; font-size: 3.2rem; text-align: center;
  background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-pigulka); color: var(--tekst);
  transition: transform 120ms var(--wyjscie), background-color 120ms var(--wyjscie), color 120ms var(--wyjscie);
}
.nawig svg { width: 3rem; height: 3rem; flex: none; }
.nawig.glowny { background: var(--sygnal); border-color: var(--sygnal); color: var(--sl-na-sygnale); box-shadow: var(--cien-pigulki); }
.nawig:active:not([aria-disabled="true"]) { transform: scale(0.97); }
.nawig[aria-disabled="true"] { opacity: 0.35; cursor: default; }

/* ---------- pasek 9 dni ---------- */
.pasek { flex: none; display: flex; flex-direction: column; gap: 1rem; }
.pasek-gora { display: flex; justify-content: space-between; align-items: baseline; gap: 3rem; }
.stopka-info { display: flex; gap: 3.2rem; font-family: var(--font-mono); font-size: 2.4rem; letter-spacing: 0.08em; color: var(--przygaszony); }
.stopka-info a { text-decoration: none; border-bottom: 0.1rem solid var(--linia); }
.dni { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0.8rem; }
.dni.tematy-pasek { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.6rem; }
.tematy-pasek .dzien { min-height: 8rem; align-items: center; padding: 0.6rem 0.4rem; }
.tematy-pasek .dzien .n { font-size: 3.4rem; }
.nr-cz { font-family: var(--font-nag); font-weight: 700; font-size: 3.2rem; width: 5rem; flex: none; font-variant-numeric: tabular-nums; }

/* ---------- lista tematów (ekran startowy) ---------- */
.tematy-siatka { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 1.2rem; }
.temat-kafel { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 0.6rem; padding: 1.4rem 2rem; min-height: 9rem; background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-karta); box-shadow: var(--cien-karty); color: var(--tekst); transition: transform 120ms var(--wyjscie), background-color 160ms var(--wyjscie); }
.temat-kafel:active { transform: scale(0.98); }
.temat-nr { font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.08em; color: var(--akcent); text-transform: uppercase; }
.temat-nazwa { font-family: var(--font-nag); font-weight: 600; font-size: 3rem; line-height: 1.08; overflow-wrap: break-word; }
.temat-kafel.ostatni { border-color: var(--akcent); background: var(--akcent-jasny); box-shadow: inset 0 0 0 0.2rem var(--akcent), var(--cien-karty); }
.temat-ostatni { position: absolute; top: 1.2rem; right: 1.6rem; font-family: var(--font-mono); font-size: 2.4rem; color: var(--akcent); }
.temat-kafel.egzamin { background: var(--panel); color: var(--tekst); border: 0.2rem solid var(--tekst); box-shadow: var(--cien-karty); }
.temat-kafel.egzamin .temat-nr { color: var(--tekst); }
.nawigacja.trzy { grid-template-columns: 17rem minmax(0, 1.3fr) minmax(0, 1fr); }
.dzien {
  min-height: 9.6rem; display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; padding: 1rem 1.4rem;
  background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-maly); color: var(--cichy);
  transition: transform 120ms var(--wyjscie), background-color 160ms var(--wyjscie);
}
.dzien:active { transform: scale(0.97); }
.dzien .n { font-family: var(--font-nag); font-weight: 700; font-size: 3.2rem; line-height: 1; }
.dzien .t { font-size: 2.4rem; line-height: 1.12; }
.dzien.byl { background: var(--panel-cichy); color: var(--przygaszony); border-color: var(--panel-cichy); }
.dzien.jest { background: var(--sygnal); color: var(--sl-na-sygnale); border-color: var(--sygnal); box-shadow: var(--cien-pigulki); }

/* ---------- ekrany tymczasowe (zadania T2–T6 dostarczą własne) ---------- */
.zaslepka { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 3rem; padding: 6rem; }
.zaslepka h1 { margin: 0; font-family: var(--font-nag); font-size: 6.4rem; }
.zaslepka p { margin: 0; font-size: 3.4rem; color: var(--cichy); max-width: 100rem; }

/* ---------- „Teraz ćwiczą” (T4) ---------- */
[hidden] { display: none !important; }
.cw { gap: 2.6rem; }
.cw-tytul { display: flex; align-items: center; gap: 2.8rem; min-width: 0; }
.cw-znacznik { background: var(--sygnal); border-radius: var(--r-pigulka); box-shadow: var(--cien-pigulki); color: var(--sl-na-sygnale); font-family: var(--font-nag); font-weight: 700; font-size: 3.4rem; line-height: 1; padding: 1.2rem 2.4rem; text-transform: uppercase; flex: none; }
/* tytuł zawija się na 2 linie (bez wielokropka); cw-dopasuj w cwiczenia.js zmniejsza pismo, gdyby i 2 linie nie starczyły */
.cw-tytul h1 { margin: 0; font-family: var(--font-nag); font-weight: 600; font-size: 4.6rem; line-height: 1.04; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
.cw-zegar {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; min-height: 10.4rem; padding: 1rem 2.6rem;
  background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-karta);
  transition: transform 120ms var(--wyjscie), background-color 160ms var(--wyjscie);
}
.cw-zegar:active { transform: scale(0.97); background: var(--panel-cichy); }
.cw-zegar > span { font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.07em; color: var(--przygaszony); text-transform: uppercase; }
.cw-czas { font-family: var(--font-nag); font-weight: 700; font-size: 6.4rem; line-height: 1; font-variant-numeric: tabular-nums; transition: color 160ms var(--wyjscie); }
.cw-zegar.koniec .cw-czas { color: var(--sygnal); }
.cw-plan { min-width: 24rem; }

.cw-srodek { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 3.6rem; }
.cw-petla { background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-karta); box-shadow: var(--cien-karty); display: grid; grid-template-columns: minmax(0, 1fr) 48rem; overflow: hidden; min-height: 0; }
.cw-scena { position: relative; display: grid; place-items: center; min-height: 0; background: radial-gradient(70% 70% at 50% 55%, var(--tlo) 0%, var(--panel) 75%); }
.cw-svg { width: 100%; height: 100%; display: block; padding: 4.6rem 1rem 1.6rem; }
.cw-nad { position: absolute; left: 3rem; top: 2.4rem; }
.cw-stop { position: absolute; left: 50%; bottom: 2.4rem; transform: translateX(-50%); background: var(--tekst); color: var(--sl-na-sygnale); border-radius: var(--r-pigulka); font-family: var(--font-nag); font-weight: 600; font-size: 2.6rem; padding: 1rem 2.4rem; white-space: nowrap; }
.cw-brak { display: flex; flex-direction: column; gap: 1.6rem; align-items: center; text-align: center; padding: 4rem; color: var(--cichy); }
.cw-brak b { font-family: var(--font-nag); font-size: 4.8rem; }
.cw-brak span { font-size: 3.2rem; }

.cw-kroki { border-left: 0.1rem solid var(--linia); padding: 2rem; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; scrollbar-width: none; min-height: 0; touch-action: pan-y; }
.cw-kroki::-webkit-scrollbar { display: none; }
.cw-krok {
  flex: 1 1 0; min-height: 8rem; display: flex; align-items: center; gap: 1.4rem; padding: 0.8rem 1.4rem;
  background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-maly); color: var(--tekst);
  transition: background-color 160ms var(--wyjscie), color 160ms var(--wyjscie), border-color 160ms var(--wyjscie), transform 120ms var(--wyjscie);
}
.cw-krok:active { transform: scale(0.985); }
.cw-nr { font-family: var(--font-nag); font-weight: 700; font-size: 3.6rem; width: 4rem; flex: none; }
.cw-et { font-size: 3.6rem; line-height: 1.12; font-weight: 500; min-width: 0; }
.cw-krok.minione { color: var(--przygaszony); }
.cw-krok.aktywny { background: var(--sygnal); border-color: var(--sygnal); color: var(--sl-na-sygnale); box-shadow: var(--cien-pigulki); }

.cw-prawa { display: flex; flex-direction: column; gap: 2rem; min-height: 0; }
.cw-parametry { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 1.4rem; flex: none; }
.cw-parametry.dwa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cw-parametry.jeden { grid-template-columns: minmax(0, 1fr); } /* T5/A: pierwszy kafelek (tempo) szerszy, żeby „100–120/min” mieściło się w jednej linii */
.cw-param { position: relative; background: var(--panel); color: var(--tekst); border: 0.1rem solid var(--obrys); box-shadow: var(--cien-karty); border-radius: var(--r-karta); padding: 1.8rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
/* gwiazdka w rogu kafelka (nie zjada szerokości wartości); na czarnym tle biały krążek z gwiazdką w kolorze akcentu */
.cw-param .kpp-gwiazdka { position: absolute; top: 1rem; right: 1rem; margin: 0; padding: 0.3rem; box-sizing: border-box; background: transparent; border-radius: 50%; color: var(--akcent); }
.cw-jedn { font-size: 0.5em; font-weight: 600; margin-left: 0.15em; }
.cw-pe { padding-right: 3.2rem; font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.07em; text-transform: uppercase; }
/* wartości jak w makiecie: ok. 50 px przy 1920×1080 (dopasuj w cwiczenia.js zmniejsza tylko gdy się nie mieści) */
.cw-wartosc { font-family: var(--font-nag); font-weight: 700; font-size: 5rem; line-height: 1.05; overflow-wrap: anywhere; }
.cw-wartosc.brak { color: var(--sl-cichy-2); }
.cw-wartosc.krotka { white-space: nowrap; overflow-wrap: normal; font-size: 5rem; letter-spacing: -0.01em; } /* krótka wartość („100–120/min”) w jednej linii */
.cw-wartosc.srednia { font-size: 3.4rem; line-height: 1.12; font-weight: 600; overflow-wrap: normal; } /* wartość słowna (np. „5 oddechów ratowniczych”) w dwóch liniach */
.cw-param.szeroki { grid-column: span 2; }
.cw-wartosc.dluga { font-size: 2.8rem; line-height: 1.2; font-weight: 600; } /* długie wartości (np. progi START) nie wychodzą poza kafelek */
.cw-po { font-size: 2.4rem; line-height: 1.2; }
.cw-bledy { background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-karta); box-shadow: var(--cien-karty); padding: 2.4rem 2.6rem; display: flex; flex-direction: column; gap: 1.4rem; flex: 1; min-height: 0; overflow: hidden; }
.cw-bledy ul { margin: 0; padding-left: 2.8rem; display: flex; flex-direction: column; gap: 1.4rem; font-size: 3.6rem; line-height: 1.2; }
/* Task 8: pętla z czterema kafelkami (BLS dorosły: + czas oceny oddechu) — siatka 2×2 i zwarty panel błędów, żeby wszystkie błędy się mieściły */
.cw-parametry.cztery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cw-parametry.cztery .cw-param { padding: 1.1rem 1.5rem 1rem; gap: 0.3rem; }
.cw-parametry.cztery .cw-wartosc.krotka { font-size: 4.4rem; }
.cw-parametry.cztery + .cw-bledy { padding: 1.4rem 2.6rem; gap: 0.8rem; }
.cw-parametry.cztery + .cw-bledy ul { gap: 0.8rem; }
.cw-stacje { margin-top: auto; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 1.2rem; flex: none; }
.cw-st { background: var(--panel); border: 0.1rem solid var(--obrys); border-radius: var(--r-maly); padding: 1.2rem 1.4rem; min-width: 0; transition: background-color 200ms var(--wyjscie), color 200ms var(--wyjscie), opacity 200ms var(--wyjscie); }
.cw-st-k { display: block; height: 3rem; white-space: nowrap; overflow: hidden; line-height: 1.3; font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.04em; color: var(--przygaszony); text-transform: uppercase; }
.cw-st-p { font-size: 3.2rem; font-weight: 600; line-height: 1.15; margin-top: 0.4rem; white-space: nowrap; }
.cw-st.byla { opacity: 0.55; }
.cw-st.teraz { background: var(--sygnal); border-color: var(--sygnal); color: var(--sl-na-sygnale); }
.cw-st.teraz .cw-st-k { color: var(--sl-na-sygnale); }
.cw-stopka { flex: none; display: flex; justify-content: space-between; align-items: baseline; gap: 3rem; font-family: var(--font-mono); font-size: 2.4rem; letter-spacing: 0.04em; color: var(--przygaszony); }
.cw-stopka a { text-decoration: none; border-bottom: 0.1rem solid var(--linia); }
/* jedna stopka z gwiazdką — czytelna z 6 m */
.cw-stopka .gwiazdka-stopka, .w-stopka-gw { font-family: var(--font-nag); font-weight: 600; font-size: 3rem; line-height: 1.1; letter-spacing: 0; color: var(--akcent); }

.cw-ustaw { position: fixed; inset: 0; z-index: 10; background: var(--sl-tlo-szklo); display: grid; place-items: center; animation: wejscie 200ms var(--wyjscie); }
.cw-u-karta { background: var(--sl-karta); border: 0.1rem solid var(--obrys); border-radius: var(--r-karta); box-shadow: var(--cien-karty); padding: 4rem 5rem; display: flex; flex-direction: column; gap: 3rem; width: 108rem; }
.cw-u-karta .etykieta { margin: 0; }
.cw-u-wiersz { display: grid; grid-template-columns: minmax(0, 1fr) 12rem 10rem 12rem; align-items: center; gap: 2rem; }
.cw-u-nazwa { font-family: var(--font-nag); font-weight: 700; font-size: 4rem; display: flex; flex-direction: column; }
.cw-u-nazwa small { font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; color: var(--przygaszony); letter-spacing: 0.08em; }
.cw-u-btn { width: 12rem; height: 12rem; border: 0.1rem solid var(--obrys); border-radius: 50%; background: var(--panel); color: var(--tekst); box-shadow: var(--cien-karty); font-family: var(--font-nag); font-weight: 700; font-size: 7rem; line-height: 1; text-align: center; transition: transform 120ms var(--wyjscie), opacity 120ms var(--wyjscie); }
.cw-u-btn:active:not([aria-disabled="true"]) { transform: scale(0.94); }
.cw-u-btn[aria-disabled="true"] { opacity: 0.25; cursor: default; }
.cw-u-wart { font-family: var(--font-nag); font-weight: 700; font-size: 8rem; text-align: center; font-variant-numeric: tabular-nums; }
.cw-u-akcje { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }

@keyframes wejscie { from { opacity: 0; transform: translateY(1.2rem); } to { opacity: 1; transform: none; } }
@keyframes puls { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }
@media (prefers-reduced-motion: reduce) {
  .teraz-tresc { animation: none; }
  .kropka { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* =====================================================================================================
   TELEFON (Piotr 02.11: „dopasuj do telefonu kurs KPP”). Dotyczy szerokości <= 820 px oraz telefonu w poziomie
   (wysokość <= 500 px bez hovera). Rozmiary TV (1920x1080) zostają bez zmian: wszystko poniżej jest w zapytaniach
   medialnych. Zasady: pismo >= 16 px, cele dotyku >= 44 px, bez poziomego przewijania strony, odstęp boczny
   16 px (+ safe-area), strona przewija się naturalnie (nie ma już ramki 100vh z ukrytym przepełnieniem).
   Widoki wiedza/symulacja/wartosci wstrzykują własny <style> PO tym pliku, więc reguły ich dotyczące mają
   przedrostek „html body” (wyższa swoboda niż pojedyncza klasa w ich arkuszu).
   ===================================================================================================== */
@media (max-width: 1200px), (max-height: 500px) and (hover: none) {
  :root {
    --pl: max(16px, env(safe-area-inset-left));
    --pr: max(16px, env(safe-area-inset-right));
    --pd: calc(16px + env(safe-area-inset-bottom));
  }
  html { font-size: 5.4px; touch-action: manipulation; background: var(--tlo); }
  :root { --sl-px: 1px; } /* telefon i tablet: wymiary Atlasu w px */
  .marka > div { padding-left: 12px; }
  body {
    width: auto; height: auto; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-y: auto;
    font-size: 16px; line-height: 1.4; user-select: auto; -webkit-user-select: auto; -webkit-touch-callout: none;
  }
  button, a, [role="button"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
  #app { height: auto; min-height: 100vh; min-height: 100dvh; }
  .etykieta, .kicker, .meta, .znacznik { font-size: 16px; letter-spacing: 0.04em; }

  .ekran {
    height: auto; min-height: 100vh; min-height: 100dvh; gap: 12px;
    padding: max(12px, env(safe-area-inset-top)) var(--pr) var(--pd) var(--pl);
  }
  .ekran > * { flex: none; min-width: 0; }

  /* nagłówek: znak + tytuł, bez długiego kickera; pełny ekran tylko tam, gdzie przeglądarka go ma (roadmapa.js) */
  .gora { flex-wrap: wrap; gap: 8px 12px; align-items: center; }
  .marka { gap: 12px; flex: 1 1 220px; }
  .znak { height: 30px; }
  /* runda 2 (Piotr 04.11): podpis pod logo także na telefonie — wiersz pod znakiem, krótki tekst (DOM bez zmian) */
  .gora .marka { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; }
  .gora .marka > div { display: contents; }
  .gora .kicker { display: block; grid-row: 2; grid-column: 1 / -1; line-height: 1.2; margin: 0; white-space: nowrap; letter-spacing: 0; }
  .gora .kicker .k-marka { display: none; } /* logo już mówi, kim jesteśmy — pod znakiem zostaje nazwa materiału */
  .gora .tytul-dnia { grid-row: 1; grid-column: 2; }
  .gora { align-items: flex-start; } /* przycisk pełnego ekranu w wysokości pierwszego rzędu, podpis pod znakiem może iść pod nim */
  .znak-maly, .w-logo { display: none; }
  .tytul-dnia { font-size: 20px; line-height: 1.15; margin: 0; }
  .prawa { gap: 8px; flex: none; }
  .pelny { width: 44px; height: 44px; }
  .pelny svg { width: 20px; height: 20px; }
  .nawig.tematy { min-height: 44px; font-size: 16px; padding: 0 14px; border-width: 2px; }

  /* ---------- lista tematów ---------- */
  .tematy-siatka { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 8px; }
  .temat-kafel { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 56px; padding: 8px 14px; }
  .temat-nr { font-size: 16px; letter-spacing: 0.04em; flex: none; min-width: 70px; }
  .temat-nazwa { font-size: 18px; line-height: 1.15; flex: 1; min-width: 0; }
  .temat-ostatni { position: static; font-size: 16px; flex: none; }
  .temat-kafel.ostatni { box-shadow: inset calc(5 * var(--sl-px)) 0 0 var(--sl-sygnal); }

  /* ---------- ekran tematu: Teraz (wybrana część) na górze, akcje pełnej szerokości, części jedna pod drugą,
     „Wstecz / Następna część / Następny temat” przyklejone na dole (z odstępem safe-area) ---------- */
  .srodek, .teraz, .teraz-tresc { display: contents; }
  .teraz-tresc .znacznik, .teraz-tresc h1, .teraz-tresc .cel, .teraz-tresc .meta { order: 1; }
  .teraz-tresc .akcje { order: 2; }
  .plan { order: 3; overflow: visible; min-height: 0; }
  .pasek { order: 4; }
  .teraz h1 { font-size: 26px; line-height: 1.1; }
  .cel { font-size: 17px; line-height: 1.4; max-width: none; }
  .znacznik { gap: 8px; }
  .kropka { width: 10px; height: 10px; }
  .akcje { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 0; }
  .akcja { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 56px; padding: 6px 16px; }
  .akcja .nr { font-size: 16px; letter-spacing: 0.04em; }
  .akcja .nazwa-a { font-size: 20px; flex: 1; }
  .akcja .brak-a, .akcje .akcja .brak-a { font-size: 16px; line-height: 1.2; text-align: right; }
  .nawigacja, .nawigacja.trzy {
    order: 2; position: static; margin: 0; padding: 0;
    display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
    background: none; border: 0; box-shadow: none;
  }
  .nawig { min-height: 52px; padding: 0 10px; gap: 6px; font-size: 16px; line-height: 1.15; border-width: 2px; }
  .nawig.temat-dalej, .nawig.tematy { font-size: 16px; }
  .nawig svg { width: 16px; height: 16px; }
  .nawigacja .nawig:first-child { padding: 0 12px; }

  .plan { gap: 8px; }
  .lista { flex: none; overflow: visible; mask-image: none; padding: 0; gap: 8px; }
  .dalej { display: none !important; }
  .wiersz {
    display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; column-gap: 10px; row-gap: 2px;
    min-height: 56px; padding: 10px 14px;
  }
  .nr-cz { grid-row: 1 / 3; width: auto; font-size: 18px; line-height: 1.3; }
  .wiersz .rodzaj { grid-column: 2; justify-self: start; width: auto; font-size: 16px; padding: 1px 6px; letter-spacing: 0.02em; border-width: 1px; }
  .wiersz .nazwa { grid-column: 2; font-size: 17px; line-height: 1.25; }
  .wiersz.wybrany { box-shadow: inset calc(5 * var(--sl-px)) 0 0 var(--sl-sygnal); }

  /* pasek tematów: siatka zamiast 17 kafelków w jednym rzędzie */
  .pasek-gora { flex-direction: column; align-items: flex-start; gap: 4px; }
  .stopka-info { flex-wrap: wrap; gap: 0 20px; font-size: 16px; letter-spacing: 0.02em; }
  .stopka-info a { display: inline-flex; align-items: center; min-height: 44px; border-bottom-width: 1px; }
  .dni.tematy-pasek { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .tematy-pasek .dzien { min-height: 44px; padding: 4px; }
  .tematy-pasek .dzien .n { font-size: 18px; }
  .dzien { min-height: 44px; }

  /* ---------- „Teraz ćwiczą”: pętla na górze (pełna szerokość), kroki pod nią, parametry 2×2, błędy ---------- */
  .ekran.cw { gap: 12px; }
  .cw .gora { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .cw .prawa { align-self: flex-start; }
  .cw-plan { min-width: 0; }
  .cw-tytul { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cw-znacznik { font-size: 16px; padding: 4px 10px; letter-spacing: 0.02em; }
  .cw-tytul h1 { font-size: 24px; line-height: 1.1; text-wrap: balance; }
  .cw-srodek { display: flex; flex-direction: column; gap: 12px; flex: none; }
  .cw-petla { display: flex; flex-direction: column; gap: 12px; border: 0; background: none; overflow: visible; }
  .cw-scena { display: block; position: sticky; top: env(safe-area-inset-top); z-index: 4; border: 1px solid var(--linia); box-shadow: var(--sl-cien-karty); }
  .cw-svg { width: 100%; height: auto; max-height: 42dvh; padding: 30px 0 6px; }
  .cw-nad { left: var(--pl); top: 6px; font-size: 16px; }
  .cw-stop { font-size: 16px; padding: 6px 14px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); bottom: 8px; }
  .cw-brak { padding: 24px 16px; }
  .cw-brak b { font-size: 24px; }
  .cw-brak span { font-size: 17px; }
  .cw-kroki { border-left: 0; padding: 0; gap: 8px; overflow: visible; }
  .cw-krok { flex: none; min-height: 56px; padding: 8px 12px; gap: 10px; }
  .cw-nr { font-size: 18px; width: 24px; }
  .cw-et { font-size: 17px; line-height: 1.25; }
  .cw-prawa { gap: 12px; flex: none; }
  .cw-parametry, .cw-parametry.dwa, .cw-parametry.cztery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cw-parametry.jeden { grid-template-columns: minmax(0, 1fr); }
  .cw-parametry:not(.dwa):not(.cztery):not(.jeden) .cw-param:first-child { grid-column: 1 / -1; }
  .cw-param, .cw-parametry.cztery .cw-param { padding: 10px 12px; gap: 4px; }
  .cw-param.szeroki { grid-column: 1 / -1; }
  .cw-pe { font-size: 16px; letter-spacing: 0.02em; padding-right: 26px; }
  .cw-param .kpp-gwiazdka { top: 8px; right: 8px; }
  .cw-wartosc, .cw-wartosc.krotka, .cw-parametry.cztery .cw-wartosc.krotka { font-size: 28px; line-height: 1.1; }
  .cw-wartosc.srednia { font-size: 20px; line-height: 1.2; }
  .cw-wartosc.dluga { font-size: 17px; line-height: 1.3; }
  .cw-jedn { font-size: 16px; }
  .cw-po { font-size: 16px; }
  .cw-bledy, .cw-parametry.cztery + .cw-bledy { padding: 12px 14px; gap: 8px; overflow: visible; flex: none; }
  .cw-bledy ul, .cw-parametry.cztery + .cw-bledy ul { font-size: 17px; line-height: 1.3; padding-left: 20px; gap: 8px; }
  .cw-stopka { flex-direction: column; align-items: flex-start; gap: 0; font-size: 16px; letter-spacing: 0.02em; }
  .cw-stopka a { display: inline-flex; align-items: center; min-height: 44px; border-bottom-width: 1px; }
  .cw-stopka .gwiazdka-stopka, .w-stopka-gw { font-size: 16px; }

  /* ---------- wiedza ---------- */
  html body .w-widok { display: block; height: auto; min-height: 100vh; min-height: 100dvh; }
  html body .w-nav {
    flex-direction: row; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 8px var(--pr) 8px var(--pl);
    scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; -webkit-overflow-scrolling: touch;
  }
  html body .w-nav::-webkit-scrollbar { display: none; }
  html body .w-nav h2 { display: none; }
  html body .w-nav { margin: 0; border-radius: 0; border-width: 0 0 1px; box-shadow: none; background: var(--sl-karta); }
  html body .w-nav button { flex: none; min-height: 44px; padding: 0 12px; font-size: 16px; line-height: 1.2; white-space: nowrap; gap: 8px; }
  html body .w-nav button small { font-size: 16px; min-width: 0; }
  html body .w-nav .w-powrot { order: -2; border: 1px solid var(--obrys); }
  html body .w-nav button[aria-current="true"] { order: -1; white-space: normal; text-align: left; line-height: 1.15; padding-block: 6px; max-width: calc(100vw - var(--pl) - var(--pr) - 160px); } /* N4: aktywny chip zawija się, nie jest ucinany */
  html body .w-glowny { display: flex; flex-direction: column; min-height: 0; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  html body .w-ekran { overflow: visible; padding: 16px var(--pr) 16px var(--pl); gap: 16px; }
  html body .w-sciezka { font-size: 16px; letter-spacing: 0.02em; }
  html body .w-naglowek h1 { font-size: 26px; line-height: 1.1; max-width: none; }
  html body .w-do-zatw { font-size: 16px; padding: 2px 10px; border-width: 2px; }
  html body .w-tresc { flex: none; gap: 16px; }
  html body .w-punkty { gap: 12px; }
  html body .w-punkty li, html body .w-karta .w-punkty li, html body .w-kol-2 .w-punkty li, html body .w-kol-3 .w-punkty li, html body .w-kol-4 .w-punkty li {
    font-size: 17px; line-height: 1.4; padding-left: 22px; max-width: none;
  }
  html body .w-punkty li::before, html body .w-karta .w-punkty li::before { width: 8px; height: 8px; top: 7px; }
  html body .w-kolumny { display: flex; flex-direction: column; gap: 12px; flex: none; }
  html body .w-karta { padding: 14px 16px; gap: 10px; overflow: visible; border-top-width: 5px; }
  html body .w-karta h2 { font-size: 20px; }
  html body .w-duza { font-size: 30px; }
  html body .w-uwaga { font-size: 17px; padding: 10px 14px; border-left-width: 5px; }
  html body .w-tytul p { font-size: 20px; max-width: none; margin-bottom: 10px; }
  html body .w-podpis { font-size: 16px; }
  html body .w-odp p { font-size: 19px; border-left-width: 5px; padding-left: 14px; max-width: none; }
  html body .w-tresc > .w-przycisk, html body .w-ekran .w-odslon { min-height: 52px; width: 100%; padding: 0 16px; font-size: 17px; }

  /* schemat algorytmu: czytelne pismo (szerokość ustawia telefon.js), przewijany poziomo w ramce, pionowo — razem ze stroną */
  html body .w-alg, html body .w-alg-bok { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-height: 0; flex: none; }
  html body .w-alg > .w-svg { flex: none; width: 100%; height: auto; max-height: none; }
  html body .w-alg:has(> .w-svg[data-przewija]) { overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; border: 1px solid var(--obrys); border-radius: var(--r-karta); }
  html body .tel-schemat-przelacznik { align-self: flex-start; min-height: 44px; padding: 0 14px; border: 1px solid var(--sl-obrys); border-radius: var(--sl-r-pigulka); background: var(--sl-karta); color: var(--sl-tekst); font: 600 16px var(--sl-font-nag); touch-action: manipulation; }
  html body .tel-schemat-przelacznik:active { background: var(--sl-cichy-tlo); }
  html body .w-krok { outline: none; }
  html body .w-opisy { min-height: 0; }
  html body .w-opis { padding: 10px 14px; border-left-width: 5px; }
  html body .w-opis b { font-size: 18px; }
  html body .w-opis p { font-size: 17px; line-height: 1.35; }

  /* pasek ‹ Notatki › : przyklejony do dołu ekranu z odstępem safe-area; kropki i źródło płyną pod treścią */
  html body .w-pasek { display: block; padding: 0 var(--pr) calc(84px + env(safe-area-inset-bottom)) var(--pl); border-top: 0; background: none; } /* stopka nad przyciskami ‹ Notatki › */
  html body .w-postep { gap: 6px; }
  html body .w-stopki { flex-direction: column; gap: 0; align-items: flex-start; }
  html body .w-postep span, html body .w-stopka { font-size: 16px; letter-spacing: 0.02em; }
  html body .w-postep .w-stopka-gw { font-size: 16px; }
  html body .w-kropki i { height: 6px; }
  html body .w-pasek .w-przycisk {
    --bw: calc(100vw - var(--pl) - var(--pr) - 16px);
    position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; height: 52px; min-height: 0; margin: 0;
    padding: 0; border: 1px solid var(--sl-obrys); border-radius: var(--sl-r-pigulka); font-size: 28px; line-height: 1; min-width: 0; align-self: auto; box-shadow: var(--sl-cien-karty);
    display: flex; align-items: center; justify-content: center;
  }
  html body .w-pasek [data-poprzedni] { left: var(--pl); width: calc(var(--bw) * 0.22); }
  html body .w-pasek [data-notatki] { left: calc(var(--pl) + var(--bw) * 0.22 + 8px); width: calc(var(--bw) * 0.44); font-size: 17px; background: var(--sl-karta); color: var(--sl-tekst); }
  html body .w-pasek [data-notatki][aria-pressed="true"] { background: var(--sl-tlo); color: var(--sl-tekst); }
  html body .w-pasek [data-nastepny] { left: calc(var(--pl) + var(--bw) * 0.66 + 16px); width: calc(var(--bw) * 0.34); }
  html body .w-pasek .w-ostatni { white-space: nowrap; font-size: 17px; letter-spacing: 0; } /* „Do części” w jednym wierszu, nie zawija się i nie zakrywa stopki */
  html body .w-notatki {
    position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 19; max-height: 50dvh; border-radius: var(--sl-r-karta); overflow-y: auto;
    padding: 14px var(--pr) 16px var(--pl); overscroll-behavior: contain; touch-action: pan-y;
  }
  html body .w-notatki h3 { font-size: 16px; letter-spacing: 0.06em; }
  html body .w-notatki p { font-size: 17px; line-height: 1.4; }

  /* ---------- ilustracje (figury SVG): tekst nad figurą, figura na pełną szerokość; szerokość z pismem >= 16 px ustawia
     telefon.js (dopasujFigury), figura przewija się poziomo w ramce, strona nie ---------- */
  html body .w-z-il, html body .w-z-il.w-z-il-szeroka { display: flex; flex-direction: column; gap: 16px; flex: none; }
  html body .w-z-tekst { overflow: visible; gap: 12px; flex: none; }
  html body .w-z-tekst .w-punkty li, html body .w-z-tekst .w-karta .w-punkty li, html body .w-z-tekst .w-kol-2 .w-punkty li,
  html body .w-z-tekst .w-kol-3 .w-punkty li, html body .w-z-tekst .w-kol-4 .w-punkty li { font-size: 17px; }
  html body .w-z-tekst .w-karta { padding: 14px 16px; gap: 10px; }
  html body .w-z-tekst .w-karta h2 { font-size: 20px; }
  html body .w-z-tekst .w-uwaga { font-size: 17px; padding: 10px 14px; }
  html body .w-il-pole, html body .w-il-pole.w-il-2, html body .w-il-pole.w-il-3 { display: flex; flex-direction: column; gap: 12px; flex: none; }
  html body .il { flex: none; display: block; min-width: 0; }
  html body .il:has(> .il-svg[data-przewija]) { overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; border: 1px solid var(--obrys); border-radius: var(--r-karta); }
  html body .il-svg { width: 100%; height: auto; max-height: none; }
  html body .w-uklad-ilustracja { gap: 12px; }
  html body .w-uklad-ilustracja .w-podpis { font-size: 16px; }

  /* ---------- symulacje: ramka na cały ekran, pasek z „Wróć” na górze ---------- */
  html body .sym { height: 100vh; height: 100dvh; }
  html body .sym-pasek { flex-wrap: wrap; gap: 6px 10px; padding: max(6px, env(safe-area-inset-top)) var(--pr) 6px var(--pl); min-height: 56px; border-bottom-width: 1px; }
  html body .sym-wroc { min-height: 44px; padding: 0 14px 0 8px; gap: 6px; font-size: 16px; border-width: 2px; }
  html body .sym-wroc svg { width: 16px; height: 16px; }
  html body .sym-tytul { gap: 0; }
  html body .sym-pasek .kicker { display: none; }
  html body .sym-tytul h1 { font-size: 18px; line-height: 1.2; }
  html body .sym-warianty { order: 5; width: 100%; gap: 6px; }
  html body .sym-wariant { flex: 1; min-height: 44px; padding: 0 12px; font-size: 16px; border-width: 2px; }
  html body .sym-plakietka { max-width: 100%; padding: 2px 8px; font-size: 16px; letter-spacing: 0.02em; }
  /* telefon w poziomie: niższy pasek, więcej miejsca dla symulatora (ramka dostaje resztę ekranu) */
  @media (orientation: landscape) { html body .sym-pasek { min-height: 0; padding-top: max(2px, env(safe-area-inset-top)); padding-bottom: 2px; } }
  /* symulatory sprzętu są zrobione pod szeroki ekran: w pionie krótka wskazówka nad ramką */
  @media (orientation: portrait) { html body .sym-wskazowka { display: block; flex: none; padding: 8px var(--pr) 8px var(--pl); font-size: 16px; line-height: 1.3; background: var(--panel); border-bottom: 1px solid var(--linia); } }
  html body .sym-komunikat { padding: 24px var(--pr) 24px var(--pl); gap: 14px; }
  html body .sym-komunikat h2 { font-size: 24px; }
  html body .sym-komunikat p { font-size: 17px; max-width: none; }
  html body .sym-komunikat .sym-przyciski { flex-wrap: wrap; gap: 8px; }
  html body .sym-komunikat.lekki { inset: auto 16px 16px 16px; max-width: none; padding: 14px 16px; }
  html body .sym-komunikat.lekki h2 { font-size: 20px; }
  html body .sym-komunikat.lekki p { font-size: 16px; }

  /* ---------- #/wartosci: czytelna lista ---------- */
  html body .kw { height: auto; overflow: visible; font-size: 17px; line-height: 1.45; padding: 0 var(--pr) var(--pd) var(--pl); touch-action: auto; }
  html body .kw-gora { position: static; padding: max(12px, env(safe-area-inset-top)) 0 12px; }
  html body .kw-tytul { font-size: 24px; }
  html body .kw-licznik { font-size: 16px; }
  html body .kw-pasek { gap: 8px; }
  html body .kw-btn { flex: 1 1 auto; min-height: 44px; min-width: 44px; padding: 0 14px; font-size: 16px; border-width: 2px; }
  html body .kw-skoki { gap: 6px; }
  html body .kw-skok { min-height: 44px; min-width: 44px; padding: 0 8px; font-size: 16px; }
  html body .kw-temat { margin-top: 28px; }
  html body .kw-temat h2 { font-size: 20px; }
  html body .kw-godz { font-size: 16px; }
  html body .kw-wiersz { grid-template-columns: 52px minmax(0, 1fr); gap: 8px 10px; padding: 12px 12px; margin-bottom: 8px; border-left-width: 5px; }
  html body .kw-wiersz > :not(label) { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
  html body .kw-wiersz > label { grid-column: 1; grid-row: 1 / span 4; align-self: start; }
  html body .kw-pominiety { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
  html body .kw-pominiety > div { grid-column: 1; }
  html body .kw-odhacz { min-height: 44px; min-width: 44px; }
  html body .kw-odhacz input { width: 28px; height: 28px; margin: 0; }
  html body .kw-et { font-size: 17px; }
  html body .kw-id, html body .kw-kot, html body .kw-status, html body .kw-rek, html body .kw-stopka { font-size: 16px; }
  html body .kw-tekst { font-size: 20px; }
  html body .kw-stopka { margin-top: 32px; }
  html body .kw-stopka a { display: inline-flex; align-items: center; min-height: 44px; }

  .zaslepka { padding: 24px var(--pr) 24px var(--pl); gap: 16px; }
  .zaslepka h1 { font-size: 26px; }
  .zaslepka p { font-size: 17px; }
}

/* telefon w poziomie: „Teraz ćwiczą” w dwóch kolumnach — pętla przyklejona po lewej, kroki, parametry i błędy przewijane po prawej
   (pętla na pełną szerokość miałaby w poziomie 390 px wysokości za mało) */
@media (max-height: 500px) and (hover: none) and (min-aspect-ratio: 1/1) {
  .cw-srodek { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; row-gap: 12px; align-items: start; }
  .cw-petla, .cw-prawa { display: contents; }
  .cw-scena { grid-column: 1; grid-row: 1 / span 3; top: max(8px, env(safe-area-inset-top)); }
  .cw-kroki, .cw-parametry, .cw-bledy { grid-column: 2; }
  .cw-svg { max-height: calc(100dvh - 24px); }
}

/* telefon w poziomie albo szerszy układ w zakresie ≤ 820 px: dwie kolumny listy tematów, trzy przyciski akcji w rzędzie */
@media ((max-width: 1200px) and (min-width: 560px)) or ((max-height: 500px) and (hover: none)) {
  .tematy-siatka { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .akcje { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .akcja { flex-direction: column; align-items: flex-start; justify-content: center; }
  .akcja .brak-a { text-align: left; }
  .dni.tematy-pasek { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  html body .kw-btn { flex: 0 1 auto; }
}

/* =====================================================================================================
   TABLET (Piotr 03.11: „popraw wyświetlanie na telefonie i tablecie”). 700–1200 px: ten sam układ co telefon, pismo i cele
   +15% (>= 18 px), siatka tematów 3 kolumny, treść do 1100 px szerokości. Generowane z bloku TELEFON.
   ===================================================================================================== */
@media (min-width: 700px) and (max-width: 1200px) {
  :root {
    --pl: max(16px, env(safe-area-inset-left));
    --pr: max(16px, env(safe-area-inset-right));
    --pd: calc(16px + env(safe-area-inset-bottom));
  }
  html { font-size: 7px; touch-action: manipulation; background: var(--tlo); }
  :root { --sl-px: 1px; } /* telefon i tablet: wymiary Atlasu w px */
  .marka > div { padding-left: 12px; }
  body {
    width: auto; height: auto; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-y: auto;
    font-size: 19px; line-height: 1.4; user-select: auto; -webkit-user-select: auto; -webkit-touch-callout: none;
  }
  button, a, [role="button"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
  #app { height: auto; min-height: 100vh; min-height: 100dvh; }
  .etykieta, .kicker, .meta, .znacznik { font-size: 19px; letter-spacing: 0.04em; }

  .ekran {
    height: auto; min-height: 100vh; min-height: 100dvh; gap: 12px;
    padding: max(12px, env(safe-area-inset-top)) var(--pr) var(--pd) var(--pl);
  }
  .ekran > * { flex: none; min-width: 0; }

  /* nagłówek: znak + tytuł, bez długiego kickera; pełny ekran tylko tam, gdzie przeglądarka go ma (roadmapa.js) */
  .gora { flex-wrap: wrap; gap: 8px 12px; align-items: center; }
  .marka { gap: 12px; flex: 1 1 220px; }
  .znak { height: 40px; }
  /* runda 2 (Piotr 04.11): podpis pod logo także na telefonie — wiersz pod znakiem, krótki tekst (DOM bez zmian) */
  .gora .marka { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; }
  .gora .marka > div { display: contents; }
  .gora .kicker { display: block; grid-row: 2; grid-column: 1 / -1; line-height: 1.2; margin: 0; white-space: nowrap; letter-spacing: 0; }
  .gora .kicker .k-marka { display: none; } /* logo już mówi, kim jesteśmy — pod znakiem zostaje nazwa materiału */
  .gora .tytul-dnia { grid-row: 1; grid-column: 2; }
  .gora { align-items: flex-start; } /* przycisk pełnego ekranu w wysokości pierwszego rzędu, podpis pod znakiem może iść pod nim */
  .znak-maly, .w-logo { display: none; }
  .tytul-dnia { font-size: 23px; line-height: 1.15; margin: 0; }
  .prawa { gap: 8px; flex: none; }
  .pelny { width: 44px; height: 44px; }
  .pelny svg { width: 20px; height: 20px; }
  .nawig.tematy { min-height: 51px; font-size: 19px; padding: 0 14px; border-width: 2px; }

  /* ---------- lista tematów ---------- */
  .tematy-siatka { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 8px; }
  .temat-kafel { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 65px; padding: 8px 14px; }
  .temat-nr { font-size: 19px; letter-spacing: 0.04em; flex: none; min-width: 81px; }
  .temat-nazwa { font-size: 21px; line-height: 1.15; flex: 1; min-width: 0; }
  .temat-ostatni { position: static; font-size: 19px; flex: none; }
  .temat-kafel.ostatni { box-shadow: inset calc(5 * var(--sl-px)) 0 0 var(--sl-sygnal); }

  /* ---------- ekran tematu: Teraz (wybrana część) na górze, akcje pełnej szerokości, części jedna pod drugą,
     „Wstecz / Następna część / Następny temat” przyklejone na dole (z odstępem safe-area) ---------- */
  .srodek, .teraz, .teraz-tresc { display: contents; }
  .teraz-tresc .znacznik, .teraz-tresc h1, .teraz-tresc .cel, .teraz-tresc .meta { order: 1; }
  .teraz-tresc .akcje { order: 2; }
  .plan { order: 3; overflow: visible; min-height: 0; }
  .pasek { order: 4; }
  .teraz h1 { font-size: 30px; line-height: 1.1; }
  .cel { font-size: 20px; line-height: 1.4; max-width: none; }
  .znacznik { gap: 8px; }
  .kropka { width: 10px; height: 10px; }
  .akcje { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 0; }
  .akcja { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 65px; padding: 6px 16px; }
  .akcja .nr { font-size: 19px; letter-spacing: 0.04em; }
  .akcja .nazwa-a { font-size: 23px; flex: 1; }
  .akcja .brak-a, .akcje .akcja .brak-a { font-size: 19px; line-height: 1.2; text-align: right; }
  .nawigacja, .nawigacja.trzy {
    order: 2; position: static; margin: 0; padding: 0;
    display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
    background: none; border: 0; box-shadow: none;
  }
  .nawig { min-height: 60px; padding: 0 10px; gap: 6px; font-size: 19px; line-height: 1.15; border-width: 2px; }
  .nawig.temat-dalej, .nawig.tematy { font-size: 19px; }
  .nawig svg { width: 16px; height: 16px; }
  .nawigacja .nawig:first-child { padding: 0 12px; }

  .plan { gap: 8px; }
  .lista { flex: none; overflow: visible; mask-image: none; padding: 0; gap: 8px; }
  .dalej { display: none !important; }
  .wiersz {
    display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; column-gap: 10px; row-gap: 2px;
    min-height: 65px; padding: 10px 14px;
  }
  .nr-cz { grid-row: 1 / 3; width: auto; font-size: 21px; line-height: 1.3; }
  .wiersz .rodzaj { grid-column: 2; justify-self: start; width: auto; font-size: 19px; padding: 1px 6px; letter-spacing: 0.02em; border-width: 1px; }
  .wiersz .nazwa { grid-column: 2; font-size: 20px; line-height: 1.25; }
  .wiersz.wybrany { box-shadow: inset calc(5 * var(--sl-px)) 0 0 var(--sl-sygnal); }

  /* pasek tematów: siatka zamiast 17 kafelków w jednym rzędzie */
  .pasek-gora { flex-direction: column; align-items: flex-start; gap: 4px; }
  .stopka-info { flex-wrap: wrap; gap: 0 20px; font-size: 19px; letter-spacing: 0.02em; }
  .stopka-info a { display: inline-flex; align-items: center; min-height: 51px; border-bottom-width: 1px; }
  .dni.tematy-pasek { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .tematy-pasek .dzien { min-height: 51px; padding: 4px; }
  .tematy-pasek .dzien .n { font-size: 21px; }
  .dzien { min-height: 51px; }

  /* ---------- „Teraz ćwiczą”: pętla na górze (pełna szerokość), kroki pod nią, parametry 2×2, błędy ---------- */
  .ekran.cw { gap: 12px; }
  .cw .gora { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .cw .prawa { align-self: flex-start; }
  .cw-plan { min-width: 0; }
  .cw-tytul { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cw-znacznik { font-size: 19px; padding: 4px 10px; letter-spacing: 0.02em; }
  .cw-tytul h1 { font-size: 28px; line-height: 1.1; text-wrap: balance; }
  .cw-srodek { display: flex; flex-direction: column; gap: 12px; flex: none; }
  .cw-petla { display: flex; flex-direction: column; gap: 12px; border: 0; background: none; overflow: visible; }
  .cw-scena { display: block; position: sticky; top: env(safe-area-inset-top); z-index: 4; border: 1px solid var(--linia); box-shadow: var(--sl-cien-karty); }
  .cw-svg { width: 100%; height: auto; max-height: 42dvh; padding: 30px 0 6px; }
  .cw-nad { left: var(--pl); top: 6px; font-size: 19px; }
  .cw-stop { font-size: 19px; padding: 6px 14px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); bottom: 8px; }
  .cw-brak { padding: 24px 16px; }
  .cw-brak b { font-size: 28px; }
  .cw-brak span { font-size: 20px; }
  .cw-kroki { border-left: 0; padding: 0; gap: 8px; overflow: visible; }
  .cw-krok { flex: none; min-height: 65px; padding: 8px 12px; gap: 10px; }
  .cw-nr { font-size: 21px; width: 24px; }
  .cw-et { font-size: 20px; line-height: 1.25; }
  .cw-prawa { gap: 12px; flex: none; }
  .cw-parametry, .cw-parametry.dwa, .cw-parametry.cztery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cw-parametry.jeden { grid-template-columns: minmax(0, 1fr); }
  .cw-parametry:not(.dwa):not(.cztery):not(.jeden) .cw-param:first-child { grid-column: 1 / -1; }
  .cw-param, .cw-parametry.cztery .cw-param { padding: 10px 12px; gap: 4px; }
  .cw-param.szeroki { grid-column: 1 / -1; }
  .cw-pe { font-size: 19px; letter-spacing: 0.02em; padding-right: 26px; }
  .cw-param .kpp-gwiazdka { top: 8px; right: 8px; }
  .cw-wartosc, .cw-wartosc.krotka, .cw-parametry.cztery .cw-wartosc.krotka { font-size: 33px; line-height: 1.1; }
  .cw-wartosc.srednia { font-size: 23px; line-height: 1.2; }
  .cw-wartosc.dluga { font-size: 20px; line-height: 1.3; }
  .cw-jedn { font-size: 19px; }
  .cw-po { font-size: 19px; }
  .cw-bledy, .cw-parametry.cztery + .cw-bledy { padding: 12px 14px; gap: 8px; overflow: visible; flex: none; }
  .cw-bledy ul, .cw-parametry.cztery + .cw-bledy ul { font-size: 20px; line-height: 1.3; padding-left: 20px; gap: 8px; }
  .cw-stopka { flex-direction: column; align-items: flex-start; gap: 0; font-size: 19px; letter-spacing: 0.02em; }
  .cw-stopka a { display: inline-flex; align-items: center; min-height: 51px; border-bottom-width: 1px; }
  .cw-stopka .gwiazdka-stopka, .w-stopka-gw { font-size: 19px; }

  /* ---------- wiedza ---------- */
  html body .w-widok { display: block; height: auto; min-height: 100vh; min-height: 100dvh; }
  html body .w-nav {
    flex-direction: row; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 8px var(--pr) 8px var(--pl);
    scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; -webkit-overflow-scrolling: touch;
  }
  html body .w-nav::-webkit-scrollbar { display: none; }
  html body .w-nav h2 { display: none; }
  html body .w-nav { margin: 0; border-radius: 0; border-width: 0 0 1px; box-shadow: none; background: var(--sl-karta); }
  html body .w-nav button { flex: none; min-height: 51px; padding: 0 12px; font-size: 19px; line-height: 1.2; white-space: nowrap; gap: 8px; }
  html body .w-nav button small { font-size: 19px; min-width: 0; }
  html body .w-nav .w-powrot { order: -2; border: 1px solid var(--obrys); }
  html body .w-nav button[aria-current="true"] { order: -1; white-space: normal; text-align: left; line-height: 1.15; padding-block: 6px; max-width: calc(100vw - var(--pl) - var(--pr) - 160px); } /* N4: aktywny chip zawija się, nie jest ucinany */
  html body .w-glowny { display: flex; flex-direction: column; min-height: 0; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  html body .w-ekran { overflow: visible; padding: 16px var(--pr) 16px var(--pl); gap: 16px; }
  html body .w-sciezka { font-size: 19px; letter-spacing: 0.02em; }
  html body .w-naglowek h1 { font-size: 30px; line-height: 1.1; max-width: none; }
  html body .w-do-zatw { font-size: 19px; padding: 2px 10px; border-width: 2px; }
  html body .w-tresc { flex: none; gap: 16px; }
  html body .w-punkty { gap: 12px; }
  html body .w-punkty li, html body .w-karta .w-punkty li, html body .w-kol-2 .w-punkty li, html body .w-kol-3 .w-punkty li, html body .w-kol-4 .w-punkty li {
    font-size: 20px; line-height: 1.4; padding-left: 22px; max-width: none;
  }
  html body .w-punkty li::before, html body .w-karta .w-punkty li::before { width: 8px; height: 8px; top: 7px; }
  html body .w-kolumny { display: flex; flex-direction: column; gap: 12px; flex: none; }
  html body .w-karta { padding: 14px 16px; gap: 10px; overflow: visible; border-top-width: 5px; }
  html body .w-karta h2 { font-size: 23px; }
  html body .w-duza { font-size: 35px; }
  html body .w-uwaga { font-size: 20px; padding: 10px 14px; border-left-width: 5px; }
  html body .w-tytul p { font-size: 23px; max-width: none; margin-bottom: 10px; }
  html body .w-podpis { font-size: 19px; }
  html body .w-odp p { font-size: 22px; border-left-width: 5px; padding-left: 14px; max-width: none; }
  html body .w-tresc > .w-przycisk, html body .w-ekran .w-odslon { min-height: 60px; width: 100%; padding: 0 16px; font-size: 20px; }

  /* schemat algorytmu: czytelne pismo (szerokość ustawia telefon.js), przewijany poziomo w ramce, pionowo — razem ze stroną */
  html body .w-alg, html body .w-alg-bok { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-height: 0; flex: none; }
  html body .w-alg > .w-svg { flex: none; width: 100%; height: auto; max-height: none; }
  html body .w-alg:has(> .w-svg[data-przewija]) { overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; border: 1px solid var(--obrys); border-radius: var(--r-karta); }
  html body .tel-schemat-przelacznik { align-self: flex-start; min-height: 51px; padding: 0 14px; border: 1px solid var(--sl-obrys); border-radius: var(--sl-r-pigulka); background: var(--sl-karta); color: var(--sl-tekst); font: 600 16px var(--sl-font-nag); touch-action: manipulation; }
  html body .tel-schemat-przelacznik:active { background: var(--sl-cichy-tlo); }
  html body .w-krok { outline: none; }
  html body .w-opisy { min-height: 0; }
  html body .w-opis { padding: 10px 14px; border-left-width: 5px; }
  html body .w-opis b { font-size: 21px; }
  html body .w-opis p { font-size: 20px; line-height: 1.35; }

  /* pasek ‹ Notatki › : przyklejony do dołu ekranu z odstępem safe-area; kropki i źródło płyną pod treścią */
  html body .w-pasek { display: block; padding: 0 var(--pr) calc(84px + env(safe-area-inset-bottom)) var(--pl); border-top: 0; background: none; } /* stopka nad przyciskami ‹ Notatki › */
  html body .w-postep { gap: 6px; }
  html body .w-stopki { flex-direction: column; gap: 0; align-items: flex-start; }
  html body .w-postep span, html body .w-stopka { font-size: 19px; letter-spacing: 0.02em; }
  html body .w-postep .w-stopka-gw { font-size: 19px; }
  html body .w-kropki i { height: 6px; }
  html body .w-pasek .w-przycisk {
    --bw: calc(100vw - var(--pl) - var(--pr) - 16px);
    position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; height: 52px; min-height: 0; margin: 0;
    padding: 0; border: 1px solid var(--sl-obrys); border-radius: var(--sl-r-pigulka); font-size: 33px; line-height: 1; min-width: 0; align-self: auto; box-shadow: var(--sl-cien-karty);
    display: flex; align-items: center; justify-content: center;
  }
  html body .w-pasek [data-poprzedni] { left: var(--pl); width: calc(var(--bw) * 0.22); }
  html body .w-pasek [data-notatki] { left: calc(var(--pl) + var(--bw) * 0.22 + 8px); width: calc(var(--bw) * 0.44); font-size: 20px; background: var(--sl-karta); color: var(--sl-tekst); }
  html body .w-pasek [data-notatki][aria-pressed="true"] { background: var(--sl-tlo); color: var(--sl-tekst); }
  html body .w-pasek [data-nastepny] { left: calc(var(--pl) + var(--bw) * 0.66 + 16px); width: calc(var(--bw) * 0.34); }
  html body .w-pasek .w-ostatni { white-space: nowrap; font-size: 20px; letter-spacing: 0; } /* „Do części” w jednym wierszu, nie zawija się i nie zakrywa stopki */
  html body .w-notatki {
    position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 19; max-height: 50dvh; border-radius: var(--sl-r-karta); overflow-y: auto;
    padding: 14px var(--pr) 16px var(--pl); overscroll-behavior: contain; touch-action: pan-y;
  }
  html body .w-notatki h3 { font-size: 19px; letter-spacing: 0.06em; }
  html body .w-notatki p { font-size: 20px; line-height: 1.4; }

  /* ---------- ilustracje (figury SVG): tekst nad figurą, figura na pełną szerokość; szerokość z pismem >= 16 px ustawia
     telefon.js (dopasujFigury), figura przewija się poziomo w ramce, strona nie ---------- */
  html body .w-z-il, html body .w-z-il.w-z-il-szeroka { display: flex; flex-direction: column; gap: 16px; flex: none; }
  html body .w-z-tekst { overflow: visible; gap: 12px; flex: none; }
  html body .w-z-tekst .w-punkty li, html body .w-z-tekst .w-karta .w-punkty li, html body .w-z-tekst .w-kol-2 .w-punkty li,
  html body .w-z-tekst .w-kol-3 .w-punkty li, html body .w-z-tekst .w-kol-4 .w-punkty li { font-size: 20px; }
  html body .w-z-tekst .w-karta { padding: 14px 16px; gap: 10px; }
  html body .w-z-tekst .w-karta h2 { font-size: 23px; }
  html body .w-z-tekst .w-uwaga { font-size: 20px; padding: 10px 14px; }
  html body .w-il-pole, html body .w-il-pole.w-il-2, html body .w-il-pole.w-il-3 { display: flex; flex-direction: column; gap: 12px; flex: none; }
  html body .il { flex: none; display: block; min-width: 0; }
  html body .il:has(> .il-svg[data-przewija]) { overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; border: 1px solid var(--obrys); border-radius: var(--r-karta); }
  html body .il-svg { width: 100%; height: auto; max-height: none; }
  html body .w-uklad-ilustracja { gap: 12px; }
  html body .w-uklad-ilustracja .w-podpis { font-size: 19px; }

  /* ---------- symulacje: ramka na cały ekran, pasek z „Wróć” na górze ---------- */
  html body .sym { height: 100vh; height: 100dvh; }
  html body .sym-pasek { flex-wrap: wrap; gap: 6px 10px; padding: max(6px, env(safe-area-inset-top)) var(--pr) 6px var(--pl); min-height: 65px; border-bottom-width: 1px; }
  html body .sym-wroc { min-height: 51px; padding: 0 14px 0 8px; gap: 6px; font-size: 19px; border-width: 2px; }
  html body .sym-wroc svg { width: 16px; height: 16px; }
  html body .sym-tytul { gap: 0; }
  html body .sym-pasek .kicker { display: none; }
  html body .sym-tytul h1 { font-size: 21px; line-height: 1.2; }
  html body .sym-warianty { order: 5; width: 100%; gap: 6px; }
  html body .sym-wariant { flex: 1; min-height: 51px; padding: 0 12px; font-size: 19px; border-width: 2px; }
  html body .sym-plakietka { max-width: 100%; padding: 2px 8px; font-size: 19px; letter-spacing: 0.02em; }
  /* telefon w poziomie: niższy pasek, więcej miejsca dla symulatora (ramka dostaje resztę ekranu) */
  @media (orientation: landscape) { html body .sym-pasek { min-height: 0; padding-top: max(2px, env(safe-area-inset-top)); padding-bottom: 2px; } }
  /* symulatory sprzętu są zrobione pod szeroki ekran: w pionie krótka wskazówka nad ramką */
  @media (orientation: portrait) { html body .sym-wskazowka { display: block; flex: none; padding: 8px var(--pr) 8px var(--pl); font-size: 19px; line-height: 1.3; background: var(--panel); border-bottom: 1px solid var(--linia); } }
  html body .sym-komunikat { padding: 24px var(--pr) 24px var(--pl); gap: 14px; }
  html body .sym-komunikat h2 { font-size: 28px; }
  html body .sym-komunikat p { font-size: 20px; max-width: none; }
  html body .sym-komunikat .sym-przyciski { flex-wrap: wrap; gap: 8px; }
  html body .sym-komunikat.lekki { inset: auto 16px 16px 16px; max-width: none; padding: 14px 16px; }
  html body .sym-komunikat.lekki h2 { font-size: 23px; }
  html body .sym-komunikat.lekki p { font-size: 19px; }

  /* ---------- #/wartosci: czytelna lista ---------- */
  html body .kw { height: auto; overflow: visible; font-size: 20px; line-height: 1.45; padding: 0 var(--pr) var(--pd) var(--pl); touch-action: auto; }
  html body .kw-gora { position: static; padding: max(12px, env(safe-area-inset-top)) 0 12px; }
  html body .kw-tytul { font-size: 28px; }
  html body .kw-licznik { font-size: 19px; }
  html body .kw-pasek { gap: 8px; }
  html body .kw-btn { flex: 1 1 auto; min-height: 51px; min-width: 51px; padding: 0 14px; font-size: 19px; border-width: 2px; }
  html body .kw-skoki { gap: 6px; }
  html body .kw-skok { min-height: 51px; min-width: 51px; padding: 0 8px; font-size: 19px; }
  html body .kw-temat { margin-top: 28px; }
  html body .kw-temat h2 { font-size: 23px; }
  html body .kw-godz { font-size: 19px; }
  html body .kw-wiersz { grid-template-columns: 52px minmax(0, 1fr); gap: 8px 10px; padding: 12px 12px; margin-bottom: 8px; border-left-width: 5px; }
  html body .kw-wiersz > :not(label) { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
  html body .kw-wiersz > label { grid-column: 1; grid-row: 1 / span 4; align-self: start; }
  html body .kw-pominiety { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
  html body .kw-pominiety > div { grid-column: 1; }
  html body .kw-odhacz { min-height: 51px; min-width: 51px; }
  html body .kw-odhacz input { width: 28px; height: 28px; margin: 0; }
  html body .kw-et { font-size: 20px; }
  html body .kw-id, html body .kw-kot, html body .kw-status, html body .kw-rek, html body .kw-stopka { font-size: 19px; }
  html body .kw-tekst { font-size: 23px; }
  html body .kw-stopka { margin-top: 32px; }
  html body .kw-stopka a { display: inline-flex; align-items: center; min-height: 51px; }

  .zaslepka { padding: 24px var(--pr) 24px var(--pl); gap: 16px; }
  .zaslepka h1 { font-size: 30px; }
  .zaslepka p { font-size: 20px; }

  .tematy-siatka { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html body .w-ekran, .ekran { max-width: 1100px; margin-inline: auto; width: 100%; }
}

@media (min-width: 700px) and (max-width: 1200px) {
  html body .tel-schemat-przelacznik { font-size: 18px; min-height: 48px; }
}

/* ---------- procedura RSI: oznaczenie „wersja robocza” (do czasu recenzji anestezjologa) ---------- */
.robocza { margin: 0; align-self: flex-start; padding: 1rem 2.4rem; border: 0.2rem solid var(--akcent); border-radius: var(--sl-r-pigulka); background: var(--sl-akcent-jasny); color: var(--sl-sygnal-2); font-family: var(--font-nag); font-weight: 600; font-size: 2.8rem; line-height: 1.2; }
.robocza-stopka { color: var(--sl-sygnal-2); font-weight: 500; }
@media (max-width: 1200px), (max-height: 500px) and (hover: none) {
  html body .robocza { font-size: 16px; padding: 8px 14px; border-radius: var(--sl-r-karta); border-width: 2px; }
  html body .robocza-stopka { font-size: 16px; }
}
@media (min-width: 700px) and (max-width: 1200px) {
  html body .robocza { font-size: 19px; }
  html body .robocza-stopka { font-size: 19px; }
}

/* ---------- runda 2 (krytyk 04.11): ikony kafli, szara stopka „wersja robocza”, przełącznik trybu instruktora ---------- */
.temat-ikona { width: 9rem; height: 9rem; flex: none; color: var(--akcent); align-self: flex-start; margin: 0.2rem 0; }
.robocza-stopka { font-family: var(--sl-font-tekst); font-weight: 400; letter-spacing: 0; color: var(--sl-cichy); font-size: 2.2rem; }
.tryb-instruktora { border: 0.1rem solid var(--obrys); background: transparent; color: var(--sl-cichy); border-radius: var(--sl-r-pigulka); padding: 0.2rem 1.6rem; font: 400 2rem var(--sl-font-tekst); min-height: 4.4rem; }
.tryb-instruktora[aria-pressed="true"] { background: var(--sl-ekran-ciemny); color: var(--sl-na-sygnale); }
.stopka-info { align-items: center; flex-wrap: wrap; }
@media (max-width: 1200px), (max-height: 500px) and (hover: none) {
  html body .temat-ikona { width: 32px; height: 32px; align-self: center; margin: 0; }
  html body .robocza-stopka { font-size: 16px; }
  html body .tryb-instruktora { font-size: 16px; min-height: 44px; padding: 4px 16px; }
}
@media (min-width: 700px) and (max-width: 1200px) {
  html body .robocza-stopka { font-size: 19px; }
  html body .tryb-instruktora { font-size: 19px; }
}
