/* Makieta pokoju webinarowego — wygląd wspólny (barwy i czcionki Akademii Klubu Zero). */
:root[data-marka="klub"] {   /* Klub Zero: czerń + błękit #4A9EFF (karta marki) */
  --bg: #0A0A0A; --bg-2: #0F0F10; --card: #141414; --card-2: #1A1A1B; --line: #262626; --line-2: #333336;
  --ink: #FAFAFA; --ink-2: #B5B8BD; --ink-3: #8A8A8A;
  --amber: #4A9EFF; --amber-hi: #85BEFF; --amber-wash: #0C1726; --on-amber: #04101F; --szklo: rgba(10,20,34,.92);
}
:root {
  --bg: #0E1116; --bg-2: #12161D; --card: #151A21; --card-2: #1A202A;
  --line: #242C36; --line-2: #313B49;
  --ink: #E8E6E1; --ink-2: #A6AEBB; --ink-3: #798392;
  --amber: #F0A63C; --amber-hi: #FFBE68; --amber-wash: #1E1A12; --on-amber: #0E1116;
  --rust: #C4553D; --live: #E5484D; --ok: #3FB950; --szklo: rgba(30,26,18,.92);
  --r: 12px;
  --f-tytul: "Space Grotesk", Arial, sans-serif;
  --f-tekst: Inter, "Helvetica Neue", Arial, sans-serif;
  --f-liczby: "JetBrains Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-tekst); }
button { font: inherit; color: inherit; cursor: pointer; }
.ukryte { display: none !important; }

/* przyciski */
.btn { border: 1px solid var(--line-2); background: var(--card-2); border-radius: 10px; padding: 10px 14px; font-weight: 500; }
a.btn { color: var(--ink); text-decoration: none; display: inline-block; }   /* link w kształcie przycisku (np. „Pobierz” na czacie): bez niebieskiego koloru przeglądarki (6.11) */
.btn:hover { border-color: var(--ink-3); }
.btn-gl { background: var(--amber); color: var(--on-amber); border-color: var(--amber); font-weight: 600; }
.btn-gl:hover { background: var(--amber-hi); }
.btn-live { background: var(--live); border-color: var(--live); color: #fff; font-weight: 600; }
.wl { border-color: var(--amber); background: var(--amber-wash); color: var(--amber-hi); }

/* znaczek NA ŻYWO / NAGRANY */
.znak { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--f-tekst); letter-spacing: .06em;
        padding: 6px 9px; border-radius: 6px; background: var(--live); color: #fff; text-transform: uppercase; }
.znak::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: puls 1.4s infinite; }
.znak.nagrany { background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.znak.nagrany::before { background: var(--ink-3); animation: none; }
@keyframes puls { 50% { opacity: .3; } }
.liczby { font-family: var(--f-liczby); }

/* SCENA — to, co widzi widz (składane w przeglądarce, droga A) */
.scena { position: relative; aspect-ratio: 16 / 9; background: #07090C; border-radius: var(--r); overflow: hidden; container-type: inline-size; }
.scena .uklad { position: absolute; inset: 0; display: grid; gap: .6cqw; padding: .6cqw; }
.kafel { position: relative; border-radius: .8cqw; overflow: hidden; background: #1b2230; display: grid; place-items: center; }
.kafel .twarz { width: 26cqw; max-width: 60%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
                font: 700 7cqw/1 var(--f-tytul); color: #fff; }
.kafel.mowi { outline: .3cqw solid var(--amber); outline-offset: -.3cqw; }
.kafel .podpis { position: absolute; left: .8cqw; bottom: .8cqw; font: 600 1.4cqw/1 var(--f-tekst);
                 background: rgba(0,0,0,.6); padding: .5cqw .8cqw; border-radius: .5cqw; }
.ekran { background: #0d1117 url("../sfu/wykres-test.jpg") center / contain no-repeat; }
/* układy */
.u-1 { grid-template-columns: 1fr; }
.u-2 { grid-template-columns: 1fr 1fr; align-content: center; } .u-2 .kafel { aspect-ratio: 16/9; }
.u-3 { grid-template-columns: 1fr 1fr 1fr; align-content: center; } .u-3 .kafel { aspect-ratio: 9/12; }
.u-ekran { grid-template-columns: 1fr; }
.u-ekran-kamery { grid-template-columns: 1fr 17cqw; grid-template-rows: repeat(3, 1fr); }
.u-ekran-kamery .ekran { grid-row: 1 / -1; }
.u-ekran-kamery .kafel .twarz { width: 9cqw; font-size: 3cqw; }
.u-ekran-kamery .kafel .podpis { font-size: 1.1cqw; }
/* nakładki sceny */
.pasek-tv { position: absolute; left: 3cqw; bottom: 4cqw; display: flex; align-items: stretch; transform: translateX(-120%);
            transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.pasek-tv.wl { transform: none; }
.pasek-tv .k1 { background: var(--amber); color: var(--on-amber); font: 700 2.2cqw/1 var(--f-tytul); padding: 1.1cqw 1.6cqw; }
.pasek-tv .k2 { background: rgba(14,17,22,.92); font: 500 1.6cqw/1 var(--f-tekst); padding: 1.1cqw 1.6cqw; display: flex; align-items: center; }
.logo-tv { position: absolute; left: 2.2cqw; top: 2.2cqw; z-index: 2; font: 700 1.6cqw/1 var(--f-tytul); letter-spacing: .04em;
           background: rgba(0,0,0,.45); padding: .8cqw 1.1cqw; border-radius: .6cqw; }
.logo-tv b { color: var(--amber); }
.plansza { position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
           background: radial-gradient(circle at 50% 40%, #1d2531, #07090C); font: 700 5cqw/1.1 var(--f-tytul); }
.plansza small { display: block; font: 500 1.8cqw/1.4 var(--f-tekst); color: var(--ink-2); margin-top: 1.5cqw; }
.pytanie-tv { position: absolute; left: 3cqw; right: 3cqw; bottom: 4cqw; background: rgba(14,17,22,.94); border-left: .6cqw solid var(--amber);
              padding: 1.6cqw 2cqw; border-radius: .6cqw; font: 600 2.2cqw/1.3 var(--f-tytul); }
.pytanie-tv small { display: block; font: 500 1.3cqw/1 var(--f-tekst); color: var(--amber-hi); margin-bottom: .8cqw; letter-spacing: .05em; text-transform: uppercase; }
.reakcje { position: absolute; right: 4cqw; bottom: 0; width: 8cqw; height: 100%; pointer-events: none; overflow: hidden; }
.reakcja { position: absolute; bottom: -4cqw; font-size: 3cqw; animation: leci 2.6s ease-out forwards; }
@keyframes leci { to { transform: translateY(-38cqw); opacity: 0; } }

/* OFERTA (CTA) — trzy formy: karta na scenie, baner wjeżdżający, pasek na telefonie */
.oferta { position: absolute; left: 50%; bottom: 3cqw; width: min(92%, 62cqw); transform: translate(-50%, 140%);
          transition: transform .6s cubic-bezier(.16,1,.3,1), opacity .4s; opacity: 0; z-index: 5;
          background: linear-gradient(160deg, var(--szklo), rgba(14,17,22,.94));
          border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-radius: 1.4cqw; padding: 2cqw 2.2cqw;
          box-shadow: 0 2cqw 6cqw rgba(0,0,0,.55), 0 0 0 1px color-mix(in srgb, var(--amber-hi) 8%, transparent) inset, 0 0 5cqw color-mix(in srgb, var(--amber) 18%, transparent);
          backdrop-filter: blur(10px); display: grid; grid-template-columns: 1fr auto; gap: 1.2cqw 2.4cqw; align-items: center; }
.oferta.wl { transform: translate(-50%, 0); opacity: 1; }
.oferta .metka { grid-column: 1 / -1; font: 600 1.15cqw/1 var(--f-tekst); letter-spacing: .14em; text-transform: uppercase; color: var(--amber-hi); }
.oferta h3 { margin: 0; font: 700 2.6cqw/1.15 var(--f-tytul); }
.oferta ul { margin: .8cqw 0 0; padding: 0; list-style: none; display: grid; gap: .45cqw; font-size: 1.35cqw; color: var(--ink-2); }
.oferta li::before { content: "✓"; color: var(--amber); font-weight: 700; margin-right: .7cqw; }
.oferta .cena { font: 700 2.4cqw/1 var(--f-tytul); text-align: right; }
.oferta .cena .cena-glowna { display: block; font-size: 3cqw; color: var(--amber-hi); }
.oferta .cena .cena-reszta { display: block; font: 600 1.35cqw/1.3 var(--f-tekst); color: var(--ink-2); margin-top: .4cqw; }
.oferta .cena small { display: block; font: 500 1.1cqw/1.3 var(--f-tekst); color: var(--ink-3); margin-top: .5cqw; }
.kup { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
       background: linear-gradient(180deg, var(--amber-hi), var(--amber)); color: var(--on-amber); border: 0;
       border-radius: 999px; font: 700 1.7cqw/1 var(--f-tytul); padding: 1.3cqw 2.6cqw; margin-top: 1cqw; white-space: nowrap;
       box-shadow: 0 .6cqw 2cqw color-mix(in srgb, var(--amber) 35%, transparent); text-decoration: none; }
.kup::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%);
              background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); animation: polysk 3.2s 1s infinite; }
@keyframes polysk { 30%, 100% { transform: translateX(120%); } }
.kup.puls { animation: puls-kup 1.2s 3; }
@keyframes puls-kup { 50% { transform: scale(1.06); box-shadow: 0 0 0 1.2cqw transparent, 0 .6cqw 3cqw color-mix(in srgb, var(--amber) 60%, transparent); } }
.oferta .zamknij { position: absolute; top: .8cqw; right: 1cqw; background: none; border: 0; color: var(--ink-3); font-size: 1.6cqw; }
.oferta .drugi { grid-column: 1 / -1; font-size: 1.2cqw; color: var(--ink-3); }
.oferta .drugi a { color: var(--ink-2); }
/* baner wjeżdżający z lewej (krótkie przypomnienie) */
.baner-oferta { position: absolute; left: 0; top: 14cqw; display: flex; align-items: center; gap: 1.6cqw; z-index: 4;
                background: linear-gradient(90deg, var(--amber), var(--amber-hi)); color: var(--on-amber);
                padding: 1.4cqw 1.6cqw 1.4cqw 2.4cqw; border-radius: 0 1cqw 1cqw 0; transform: translateX(-105%);
                transition: transform .55s cubic-bezier(.16,1,.3,1); box-shadow: 0 1.5cqw 4cqw rgba(0,0,0,.45);
                font: 700 2cqw/1.1 var(--f-tytul); }
.baner-oferta.wl { transform: none; }
.strumien a:not(.kup, .btn), .wiad a:not(.kup, .btn), .wiadomosc a:not(.kup, .btn) { color: var(--amber-hi); text-decoration: underline; }   /* link na czacie czytelny na ciemnym tle (Rafał 5.11); przyciski kart produktów zostają ciemnym napisem na pomarańczowym (Rafał 6.11) */
.baner-oferta .kup { background: #0E1116; color: var(--amber-hi); margin: 0; box-shadow: none; font-size: 1.5cqw; }
/* rozmycie sceny pod ofertą (opcja) */
.scena.rozmyj .uklad { filter: blur(6px) brightness(.6); transition: filter .4s; }

/* rysowanie po ekranie */
canvas.rysunek { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; transform: translateZ(0); }   /* własna warstwa: Safari na iPadzie nie odświeżał rysunku nad obrazem */
.scena.rysuje canvas.rysunek { pointer-events: auto; cursor: crosshair; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }   /* iPad: bez tego palec przewija stronę i Safari przerywa kreskę */
/* dotyk (iPad, telefon) — na końcu arkusza, żeby wygrał z wcześniejszymi regułami */
@media (pointer: coarse) {
  .kolor { width: 38px; height: 38px; }
  .btn { padding: 12px 16px; }
  .uklad-btn { min-width: 96px; padding: 12px; }
}
.kolor { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); padding: 0; }
.kolor.akt { border-color: #fff; box-shadow: 0 0 0 2px var(--amber); }

/* wstawki w czacie: karta produktu i plik */
.msg-produkt { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; margin-top: 4px;
               background: linear-gradient(160deg, var(--szklo), var(--card-2)); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); border-radius: 12px; padding: 10px; }
.msg-produkt .ik { width: 40px; height: 40px; border-radius: 10px; background: var(--amber-wash); display: grid; place-items: center; font-size: 20px; }
.msg-produkt .op b { display: block; font: 600 14px/1.25 var(--f-tytul); } .msg-produkt .op small { color: var(--ink-3); font-size: 12px; }
.msg-produkt .pr { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; } .msg-produkt em { font: 700 13px/1 var(--f-tytul); font-style: normal; color: var(--amber-hi); }
.kup.mini { font-size: 12.5px; padding: 8px 12px; margin: 0; box-shadow: none; }
/* drugi przycisk oferty (np. „Same e-booki”): obrys zamiast pełnego tła, żeby główny „Dołączam” został pierwszym wyborem (Rafał 6.11) */
.przyciski-oferty { display: inline-flex; flex-wrap: wrap; gap: .6em; align-items: center; justify-content: flex-end; }
.kup.kup-drugi { background: transparent; color: var(--amber-hi); box-shadow: inset 0 0 0 2px var(--amber); }
.kup.kup-drugi::after { display: none; }
.baner-oferta .kup.kup-drugi { background: transparent; color: #0E1116; box-shadow: inset 0 0 0 2px #0E1116; }
.msg-plik { margin-top: 4px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.msg-plik img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; }
.msg-plik .btn.mini { padding: 6px 10px; font-size: 12.5px; margin-left: auto; text-decoration: none; }
.wstawki { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.chip { background: var(--card-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 10px; font-size: 12.5px; color: var(--ink-2); }
.chip:hover { border-color: var(--amber); color: var(--ink); }

/* biblioteka: slajdy i film na scenie */
.slajd { position: relative; border-radius: .8cqw; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 0 8cqw;
         background: radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--amber) 18%, transparent), transparent 50%), linear-gradient(160deg, #141922, #0b0e13); }
.scena .uklad.u-slajd { padding: 0; } .u-slajd .slajd-plik { border-radius: 0; }   /* slajd 16:9 wypełnia całą scenę, narożnik okienka = narożnik slajdu */
.slajd-plik { padding: 0; background: #000; align-items: center; } .slajd-plik img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slajd .sl-marka { position: absolute; left: 4cqw; top: 3.5cqw; font: 700 1.4cqw/1 var(--f-tytul); letter-spacing: .08em; color: var(--ink-2); }
.slajd .sl-marka b { color: var(--amber); }
.slajd .sl-t { font: 700 5cqw/1.1 var(--f-tytul); max-width: 70%; }
.slajd .sl-p { font: 500 2.1cqw/1.4 var(--f-tekst); color: var(--ink-2); margin-top: 2cqw; max-width: 70%; }
.slajd .sl-nr { position: absolute; left: 4cqw; top: 3.5cqw; font: 600 1.3cqw/1 var(--f-liczby); color: var(--ink-3); }
.pip { position: absolute; right: 0; top: 0; width: 18cqw;   /* w samym narożniku obrazu (Rafał 5.11): na dole zasłaniał przepisy o ratach na slajdach */  aspect-ratio: 4/3; border-radius: 0 0 0 1cqw; overflow: hidden;
       background: #1b2230; display: grid; place-items: center; border: .25cqw solid var(--amber); box-shadow: 0 1cqw 3cqw rgba(0,0,0,.5); }
.pip .twarz { width: 9cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 700 4cqw/1 var(--f-tytul); color: #fff; }
.warstwa, .warstwa-film { position: absolute; inset: 0; }
.warstwa-film { background: #000; } .warstwa-film[hidden] { display: none; }
.warstwa-film video { width: 100%; height: 100%; object-fit: contain; display: block; }
.miniatura { width: 120px; aspect-ratio: 16/9; border-radius: 8px; border: 1px solid var(--line-2); background: linear-gradient(160deg, #141922, #0b0e13);
             padding: 8px; text-align: left; font: 600 10.5px/1.25 var(--f-tytul); color: var(--ink-2); flex: none; }
.miniatura.akt { border-color: var(--amber); color: var(--ink); }
.miniatura.obrazek { padding: 0; overflow: hidden; } .miniatura.obrazek img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pasek-slajdow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }


/* zdjęcia prowadzących na kafelkach i w rogu slajdu */
.kafel.foto { background: #1b2230 center 12% / cover no-repeat; }
.kafel.foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.55)); }
.kafel.foto .podpis { z-index: 1; }
.pip { background: #1b2230 center 12% / cover no-repeat; }
.znak-zero { width: 1em; height: 1em; vertical-align: -.12em; color: var(--amber); }
.logo-tv .znak-zero { width: 1.1em; height: 1.1em; }

/* POCZEKALNIA: film reklamowy w tle + odliczanie + twarze */
.warstwa-pocz { position: absolute; inset: 0; background: #000; }
.warstwa-pocz[hidden] { display: none; }
.warstwa-pocz video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* film poziomy: na cały obraz, odliczanie w belce na dole (nie zasłania napisów filmu) */
.pocz { position: absolute; inset: 0; display: grid; align-items: end; padding: 2.6cqw 3.4cqw;
        background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 16%, transparent 34%); }
.pocz-srodek { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "metka metka" "czas twarze"; align-items: end; column-gap: 3cqw; }
.pocz-metka { grid-area: metka; justify-self: start; font: 600 max(1.25cqw, 9px)/1 var(--f-tekst); letter-spacing: .16em; text-transform: uppercase; color: var(--amber-hi); margin-bottom: max(1cqw, 6px); }
.pocz-czas { grid-area: czas; display: flex; align-items: baseline; gap: 1.4cqw; }
.pocz-czas small { font: 500 max(1.7cqw, 11px)/1 var(--f-tekst); color: var(--ink-2); }
.pocz-czas b { font: 700 5.4cqw/.95 var(--f-liczby); letter-spacing: -.02em; text-shadow: 0 0 3cqw color-mix(in srgb, var(--amber) 40%, transparent); }
.pocz-twarze { grid-area: twarze; justify-self: end; display: flex; align-items: center; }
.pocz-twarze span { width: max(4.4cqw, 22px); height: max(4.4cqw, 22px); border-radius: 50%; background: center 22% / cover; border: .3cqw solid var(--bg); margin-right: -1cqw; box-shadow: 0 0 0 .2cqw var(--amber); }
.pocz-twarze em { font: 500 max(1.5cqw, 10px)/1 var(--f-tekst); font-style: normal; color: var(--ink-2); margin-left: 2.2cqw; }
/* film pionowy: „telefon” po prawej z poświatą marki, wielkie odliczanie po lewej */
.pocz-pion .warstwa-pocz { background: radial-gradient(60% 80% at 78% 50%, color-mix(in srgb, var(--amber) 22%, transparent), transparent 70%), #050608; }
.pocz-pion .warstwa-pocz video { position: absolute; right: 9cqw; top: 50%; width: auto; height: 84%; aspect-ratio: 9/16; border-radius: 2cqw;
  transform: translateY(-50%) perspective(90cqw) rotateY(-12deg); border: .25cqw solid color-mix(in srgb, var(--amber) 55%, transparent);
  box-shadow: 0 0 6cqw color-mix(in srgb, var(--amber) 35%, transparent), 0 3cqw 6cqw rgba(0,0,0,.6); }
.pocz-pion .pocz { align-items: center; padding: 4cqw 5cqw; background: none; }
.pocz-pion .pocz-srodek { display: block; max-width: 52%; }
.pocz-pion .pocz-metka { margin-bottom: 1.6cqw; }
.pocz-pion .pocz-czas { display: block; }
.pocz-pion .pocz-czas small { display: block; font-size: max(2cqw, 11px); margin-bottom: .8cqw; }
.pocz-pion .pocz-czas b { font-size: 10cqw; }
.pocz-pion .pocz-twarze { margin-top: 2.4cqw; }
.pocz-pion .pocz-twarze span { width: max(5.2cqw, 24px); height: max(5.2cqw, 24px); }

/* ŻYWY OBRAZ (pokój na serwerze): kamera w kafelku, ekran w całości; pod spodem zostaje zdjęcie, gdy obrazu brak */
.warstwa-uklad, .warstwa-nakladki { position: absolute; inset: 0; }
.kafel video, .pip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.kafel.ekran.zywy { background: #000; }
.kafel.ekran.zywy::before { content: "Ładuję obraz ekranu…"; position: absolute; inset: 0; display: grid; place-items: center; color: #8A93A0; font-size: 1.6cqw; }   /* widać do pierwszej klatki, potem zasłania ją obraz */
.kafel.ekran.zywy video { object-fit: contain; }
.u-3 .kafel.zywy video { object-position: center 30%; }
/* kto mówi: świecąca obwódka (przy kamerze i przy zdjęciu) */
.kafel[data-kto]::before, .pip[data-kto]::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 .3cqw transparent; transition: box-shadow .25s; }
.kafel.glos::before, .pip.glos::before { box-shadow: inset 0 0 0 .35cqw var(--ok), inset 0 0 3cqw color-mix(in srgb, var(--ok) 35%, transparent); }
.kafel.foto:not(.zywy).glos { animation: oddech 1.2s ease-in-out infinite; }
@keyframes oddech { 50% { filter: brightness(1.12); } }
