/* Statystyki odbioru i miernik dźwięku u widza (v104) oraz układ strony
   głównej na komputerze (v105), viewer-console.js. Własne klasy vx-: arkusz
   Tailwinda jest od v102 skompilowany i nowych klas z makiety w nim nie ma.
   Paski i nakładki są ciemne, niezależnie od motywu strony. */

/* ---------- miernik dźwięku w pigułce formatu ---------- */
.vx-meter { display: inline-flex; align-items: flex-end; gap: 6px; height: 24px; flex: 0 0 auto; }
.vx-bar { display: block; width: 4px; border-radius: 1px 1px 0 0; background: rgba(6, 182, 212, .28); transition: background-color 80ms linear; }
.vx-bar.vx-on { background: #06b6d4; }
.vx-audio-pill.vx-unknown .vx-bar { background: rgba(148, 163, 184, .3); }
.vx-tag { padding: 1px 6px; border-radius: 4px; background: rgba(148, 163, 184, .2); color: #e2e8f0; font: 600 11px/16px Inter, sans-serif; letter-spacing: 0; white-space: nowrap; }
.vx-tag[hidden] { display: none; }
.vx-tag-warn { background: rgba(245, 158, 11, .22); color: #fde68a; }

/* ---------- ikonki pomocy i dymek ---------- */
.vx-help { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; flex: 0 0 15px; margin-left: 5px; padding: 0; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: #94a3b8; opacity: .85; font: 700 9px/1 Inter, sans-serif; letter-spacing: 0; text-transform: none; cursor: help; vertical-align: middle; transition: opacity .12s, color .12s; }
.vx-help:hover, .vx-help:focus-visible, .vx-help[aria-expanded="true"] { opacity: 1; color: #67e8f9; outline: none; }
.vx-help:focus-visible { box-shadow: 0 0 0 2px #06b6d4; }
.vx-pop { position: fixed; z-index: 2147483000; max-width: min(320px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 10px; background: #0f172a; color: #e2e8f0; border: 1px solid #334155; box-shadow: 0 12px 32px rgba(2, 6, 23, .45); font: 400 13px/1.5 Inter, sans-serif; text-align: left; white-space: normal; letter-spacing: 0; text-transform: none; }
.vx-pop[hidden] { display: none; }
.vx-pop strong { display: block; margin-bottom: 3px; color: #fff; font-weight: 700; }

/* ---------- układ na komputerze: czysty ekran ---------- */
body.vx-pc .vx-status-overlay, body.vx-pc .vx-audio-layer { display: none !important; }
.vx-screen-controls { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 4; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; pointer-events: none; }
.vx-screen-controls > * { pointer-events: auto; }
/* Głośność rozwinięta, poziomo. Suwak z scene.js ma pionowe style wpisane
   w element i znika po zjechaniu myszą, stąd !important. */
body.vx-pc .vx-volume { display: flex !important; align-items: center; gap: 10px; padding: 3px 14px 3px 3px; border-radius: 9999px; background: rgba(15, 23, 42, .72); border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.vx-pc .vx-volume > div { position: static !important; transform: none !important; opacity: 1 !important; pointer-events: auto !important; flex-direction: row !important; align-items: center !important; gap: 10px !important; padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; transition: none !important; }
body.vx-pc .vx-volume input[type="range"] { writing-mode: horizontal-tb !important; direction: ltr !important; -webkit-appearance: auto !important; appearance: auto !important; width: 112px !important; height: 20px !important; }
body.vx-pc .vx-volume > div > span { min-width: 36px; text-align: right; }

/* ---------- szybkie reakcje tuż pod ekranem, w jednej linii ---------- */
body.vx-pc .vx-reactions-label { display: none !important; }
/* Wąskie okno: przy zawinięciu udostępnienie i zgłoszenie przy prawej krawędzi. */
body.vx-pc .vx-reactions > :last-child { margin-left: auto; }

/* ---------- trzeci ciemny pasek: stan transmisji i statystyki ---------- */
.vx-strip { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 14px; border-radius: 12px; background: rgba(15, 23, 42, .9); border: 1px solid rgba(255, 255, 255, .15); color: #fff; }
.vx-strip-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vx-strip-group > * { flex-shrink: 0; white-space: nowrap; }
.vx-panel { margin: 2px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); color: #e2e8f0; font: 400 12px/18px Inter, sans-serif; letter-spacing: 0; text-align: left; }
.vx-panel[hidden] { display: none; }
.vx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.vx-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.vx-mini { padding: 3px 10px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #e2e8f0; font: 600 11px/16px Inter, sans-serif; cursor: pointer; transition: background-color .12s, color .12s; }
.vx-mini:hover { background: #fff; color: #0f172a; }
.vx-mini:focus-visible { outline: 2px solid #06b6d4; outline-offset: 2px; }
.vx-verdict { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: #fff; font: 600 13px/18px Inter, sans-serif; }
.vx-verdict-icon { font-size: 18px; color: #94a3b8; }
.vx-verdict-text { min-width: 0; }
.vx-verdict-good .vx-verdict-icon { color: #34d399; }
.vx-verdict-warn .vx-verdict-icon { color: #fbbf24; }
.vx-verdict-bad .vx-verdict-icon { color: #f87171; }
/* Dwie równe kolumny (Obraz; Dźwięk i Połączenie), odstęp 84 px (3 x 28). */
.vx-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 84px; row-gap: 8px; }
.vx-section + .vx-section { margin-top: 8px; }
.vx-sub { margin: 0 0 2px; color: #94a3b8; font: 700 10px/14px Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
/* Wartości wyrównane do lewej, w jednej linii pionowej w obu kolumnach. */
.vx-list { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1px 12px; margin: 0; }
.vx-list dt { display: flex; align-items: center; color: #cbd5e1; white-space: nowrap; }
.vx-list dd { display: flex; align-items: center; justify-content: flex-start; gap: 4px; margin: 0; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-list dd .material-symbols-outlined { font-size: 14px; }
.vx-list dd .material-symbols-outlined[hidden] { display: none; }
.vx-value { overflow: hidden; text-overflow: ellipsis; }
.vx-list dd.vx-warn .material-symbols-outlined { color: #fbbf24; }
.vx-list dd.vx-bad .material-symbols-outlined { color: #f87171; }
.vx-foot { margin: 10px 0 0; color: #94a3b8; font-size: 11px; line-height: 15px; }

/* ---------- czat i kolejka obok obrazu, od szerokości makiety (1280 px, v106) ---------- */
/* Czat ma wysokość samego obrazu (ustawianą z JS), a pod nim, na wysokości
   reakcji i paska stanu, staje przeniesiony moduł „Kolejka emisyjna”. */
@media (min-width: 1280px) {
  /* Bez stretch: wysokość wiersza siatki liczy się z lewej kolumny (obraz,
     reakcje, pasek stanu), a nie z wyższej, przeniesionej „Kolejki”. */
  body.vx-pc #stream-grid { align-items: start; }
  body.vx-pc .vx-chat-aside { display: flex; flex-direction: column; gap: 16px; }
  body.vx-pc .vx-chat-aside #live-chat { position: static; flex: 0 0 auto; }
  body.vx-pc .vx-kolejka-slot { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px !important; }
  body.vx-pc .vx-kolejka-slot > :not([hidden]) ~ :not([hidden]) { margin-top: 16px !important; }
}

/* Tylko komputer: na telefonie (także obróconym poziomo) bez zmian. */
@media (max-width: 767px), (pointer: coarse) and (max-height: 540px) {
  .vx-strip, .vx-screen-controls { display: none !important; }
}

/* ---------- strona główna na telefonie: gęstszy układ (v178) ---------- */
/* Mniej pustego miejsca i o stopień mniejsze czcionki do 767 px. Zmieniają się
   tylko odstępy, wypełnienia i rozmiary tekstu, treść zostaje ta sama. Reguły
   z !important, bo nadpisują klasy Tailwinda, styl „ls-mobile-home” ze strony
   i style wstawiane przez scene.js. Selektory po budowie strony (id sekcji,
   klasy), nie po tekście: dziewięć wersji językowych ma tę samą budowę; id
   sekcji są dwa zestawy (polski: #kolejka, #nadaj-qr, #jak-to-dziala;
   pozostałe: #queue, #broadcast-qr, #workflow), stąd :is(). */
@media (max-width: 767px) {
  /* Skala czcionek: każdy stopień o ok. 1-2 px w dół, najmniejszy 11 px. */
  body.text-body-md { font-size: 13px !important; line-height: 19px !important; }
  body .text-body-lg { font-size: 14px !important; line-height: 20px !important; }
  body .text-body-md { font-size: 13px !important; line-height: 19px !important; }
  body .text-body-sm { font-size: 12px !important; line-height: 17px !important; }
  body .text-xs { font-size: 11.5px !important; line-height: 15px !important; }
  body .text-sm { font-size: 13px !important; line-height: 18px !important; }
  body .text-base { font-size: 14px !important; line-height: 20px !important; }
  body .text-label-md { font-size: 12px !important; line-height: 16px !important; }
  body .text-label-sm { font-size: 11px !important; line-height: 14px !important; letter-spacing: .03em !important; }
  body .text-code-metric { font-size: 11.5px !important; line-height: 15px !important; }
  body .text-title-md { font-size: 14.5px !important; line-height: 19px !important; }
  body .text-headline-sm { font-size: 15px !important; line-height: 20px !important; }
  body .text-headline-md { font-size: 18px !important; line-height: 23px !important; }
  main h1.text-headline-lg { font-size: 21px !important; line-height: 26px !important; }
  main h2.text-headline-lg { font-size: 19px !important; line-height: 24px !important; }
  main p.text-body-lg { font-size: 14px !important; line-height: 20px !important; }
  main h3.text-headline-sm { font-size: 15px !important; line-height: 20px !important; }
  /* Pola formularzy bez zmniejszania (iPhone powiększa stronę przy polu
     z czcionką poniżej 16 px; mniejszej niż dotąd nie dokładamy). */
  main input:not([type="range"]), main textarea, #live-chat input, #live-chat textarea { font-size: 14px !important; }

  /* Pasek stanu pod nagłówkiem (nagłówek: niżej, tylko do 639 px). */
  body > div.md\:hidden { padding-top: 5px !important; padding-bottom: 5px !important; }

  /* Odstępy między sekcjami i krawędzie strony. */
  body > main { padding-top: 12px !important; padding-bottom: 12px !important; }
  body > main > :not([hidden]) ~ :not([hidden]) { margin-top: 14px !important; }
  body > footer { margin-top: 0 !important; }

  /* Nagłówek transmisji, obraz, karta nadawcy, czat, reakcje. */
  #hero-stream > :not([hidden]) ~ :not([hidden]) { margin-top: 10px !important; }
  #hero-stream > div:first-child { gap: 10px !important; padding-bottom: 10px !important; }
  #hero-stream > div:first-child .mb-1 { margin-bottom: 2px !important; }
  #hero-stream h1 { margin-bottom: 2px; }
  .ls-hero-qr a { padding-top: 9px !important; padding-bottom: 9px !important; font-size: 14px !important; }
  #stream-grid { gap: 10px !important; }
  #stream-column > :not([hidden]) ~ :not([hidden]) { margin-top: 10px !important; }

  /* Karta nadawcy: w pierwszym rzędzie awatar z nazwą i oceną, w drugim czas
     transmisji z paskiem postępu i przycisk. Dotąd czas stał w wąskim bloku
     o stałej szerokości i przy powiększonym tekście w telefonie przycisk
     wychodził poza kartę; teraz blok czasu ustępuje miejsca i się zawija. */
  #stream-column > .rounded-xl:not(.aspect-video) {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    gap: 8px 10px !important; padding: 10px 12px !important;
  }
  #stream-column > .rounded-xl:not(.aspect-video) > div:first-child { grid-column: 1 / -1; min-width: 0; gap: 10px !important; }
  #stream-column > .rounded-xl:not(.aspect-video) > div:first-child > div:last-child { min-width: 0; }
  #stream-column > .rounded-xl:not(.aspect-video) > div:first-child > div:last-child > div:first-child { flex-wrap: wrap; row-gap: 2px !important; }
  #stream-column > .rounded-xl:not(.aspect-video) > div:last-child { display: contents !important; }
  #stream-column > .rounded-xl:not(.aspect-video) > div:last-child > div:first-child {
    grid-column: 1; grid-row: 2; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; text-align: left !important;
  }
  #stream-column > .rounded-xl:not(.aspect-video) > div:last-child > div:first-child > div:last-child {
    flex: 1 1 100%; width: auto !important; margin: 2px 0 0 !important;
  }
  #stream-column > .rounded-xl:not(.aspect-video) > div:last-child > a {
    grid-column: 2; grid-row: 2; padding: 7px 10px !important; gap: 6px !important; font-size: 12px !important; line-height: 15px !important;
  }
  #stream-column > .rounded-xl:not(.aspect-video) > div:last-child > a .material-symbols-outlined { font-size: 16px !important; }
  #ls-hero-avatar { width: 40px !important; height: 40px !important; }
  #ls-hero-name { overflow-wrap: break-word; }

  /* Pasek odznaki pod kartą nadawcy (scene.js). */
  main #ls-metrics-bar { padding: 6px 8px !important; gap: 6px !important; }
  main #ls-metrics-bar > div { padding: 4px 9px !important; }

  /* Czat: nagłówek i pasek trybu ciaśniej (wysokość okna bez zmian). */
  #live-chat > div:first-child { padding-top: 4px !important; }
  #live-chat > div:first-child button, #live-chat > div:first-child a { padding-top: 6px !important; padding-bottom: 8px !important; }

  /* Reakcje: etykieta, przyciski i „Udostępnij” w jednym zawijanym rzędzie. */
  #hero-stream > div:last-child { padding: 10px 12px !important; gap: 6px !important; justify-content: flex-start !important; }
  #hero-stream > div:last-child > div { display: contents !important; }
  #hero-stream > div:last-child button { padding: 4px 8px !important; gap: 5px !important; }
  #hero-stream > div:last-child button img { width: 18px !important; height: 18px !important; }
  #hero-stream > div:last-child > div > span:first-child { margin-right: 2px !important; }

  /* Kolejka: plakietka czasu obok tytułu, nie pod nim. */
  :is(#kolejka, #queue) { gap: 14px !important; margin-top: 14px !important; }
  :is(#kolejka-card, #queue-card), #ranking { padding: 14px !important; }
  :is(#kolejka-card, #queue-card) > :not([hidden]) ~ :not([hidden]), #ranking > :not([hidden]) ~ :not([hidden]) { margin-top: 10px !important; }
  :is(#kolejka-card, #queue-card) .ls-sm-stack {
    flex-direction: row !important; align-items: center !important; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px !important; margin-bottom: 6px !important;
  }
  :is(#kolejka-card, #queue-card) p.mb-4 { margin-bottom: 8px !important; }
  :is(#kolejka-card, #queue-card) .space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 6px !important; }
  :is(#kolejka-card, #queue-card) .space-y-3 > div { padding: 8px 10px !important; }
  :is(#kolejka-card, #queue-card) .pt-3 { padding-top: 10px !important; }
  :is(#kolejka-card, #queue-card) .pt-3 > a { padding-top: 9px !important; padding-bottom: 9px !important; }

  /* Ranking: nagłówek na całą szerokość, wybór miesiąca pod nim; niższe wiersze. */
  #ranking > div:first-child > div:first-child { flex-wrap: wrap; gap: 6px 10px; margin-bottom: 6px !important; }
  #ranking > div:first-child > div:first-child > div { flex: 1 1 220px; min-width: 0; }
  #ranking > div:first-child > div:first-child > label { flex: 0 0 auto; }
  #ranking > div:first-child > p { margin-bottom: 6px !important; }
  #ranking .ls-rank-table th { padding-top: 6px !important; padding-bottom: 6px !important; }
  #ranking .ls-rank-table td { padding-top: 6px !important; padding-bottom: 6px !important; }
  #ranking > div:last-child { padding: 10px 12px !important; gap: 6px !important; }

  /* „Chcesz nadać swoją transmisję?” */
  :is(#nadaj-qr, #broadcast-qr) { padding: 16px 14px !important; }
  :is(#nadaj-qr, #broadcast-qr) > .mb-8 { margin-bottom: 12px !important; }
  :is(#nadaj-qr, #broadcast-qr) > .mb-8 > div:first-child { margin-bottom: 8px !important; }
  :is(#nadaj-qr, #broadcast-qr) > .grid { gap: 12px !important; }
  :is(#nadaj-qr, #broadcast-qr) .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px !important; }
  :is(#nadaj-qr, #broadcast-qr) .ls-sm-only > :not([hidden]) ~ :not([hidden]) { margin-top: 8px !important; }
  :is(#nadaj-qr, #broadcast-qr) .ls-sm-only > a { padding-top: 10px !important; padding-bottom: 10px !important; }
  :is(#nadaj-qr, #broadcast-qr) ol > :not([hidden]) ~ :not([hidden]) { margin-top: 3px !important; }
  :is(#nadaj-qr, #broadcast-qr) .pt-2 { padding-top: 0 !important; gap: 8px !important; }
  :is(#nadaj-qr, #broadcast-qr) .p-3\.5 { padding: 9px 12px !important; }
  :is(#nadaj-qr, #broadcast-qr) .p-3\.5 > div:first-child { margin-bottom: 2px !important; }

  /* Sekcje z kartą: konto, „Dlaczego to działa”, bezpieczeństwo. */
  main > section.p-6 { padding: 16px 14px !important; }
  main > section.p-6 > .grid { gap: 14px !important; }
  main > section .space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 10px !important; }
  main > section .lg\:col-span-6.p-6 { padding: 14px !important; }
  main > section .lg\:col-span-6.p-6 > div:first-child { margin-bottom: 14px !important; }
  main > section .lg\:col-span-6.p-6 .pb-3 { padding-bottom: 8px !important; }
  main > section > .max-w-3xl.mb-8 { margin-bottom: 12px !important; }
  main > section.p-6 > p.mb-8 { margin-bottom: 12px !important; }
  main > section.p-6 > .grid.gap-6 { gap: 10px !important; }
  main > section .space-y-2.pt-2 { padding-top: 0 !important; }
  main > section .space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 4px !important; }
  .ls-card-row, .ls-tile { padding: 12px !important; }
  .ls-card-row { row-gap: 6px !important; column-gap: 10px !important; }
  .ls-card-row > div:first-child { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0 !important; }
  .ls-card-row .material-symbols-outlined { font-size: 20px !important; line-height: 1 !important; }
  .ls-tile > div:first-child { width: 32px !important; height: 32px !important; }
  .ls-tile > p { margin-top: 6px !important; }
  .ls-card-row > div:last-child > p { margin-top: 0 !important; }

  /* „Jak to działa”: ikona obok tytułu zamiast nad nim. */
  :is(#jak-to-dziala, #workflow) > :not([hidden]) ~ :not([hidden]) { margin-top: 12px !important; }
  :is(#jak-to-dziala, #workflow) > .grid { gap: 10px !important; }
  :is(#jak-to-dziala, #workflow) > .grid > div { padding: 12px !important; }
  :is(#jak-to-dziala, #workflow) > .grid > div > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
  :is(#jak-to-dziala, #workflow) > .grid > div > div:first-child > div:first-child { width: 32px !important; height: 32px !important; margin: 0 !important; }
  :is(#jak-to-dziala, #workflow) > .grid > div > div:first-child > div:first-child .material-symbols-outlined { font-size: 20px !important; }
  :is(#jak-to-dziala, #workflow) > .grid > div > div:first-child > h3 { margin: 0 !important; }
  :is(#jak-to-dziala, #workflow) > .grid > div > div:first-child > :not(div):not(h3) { grid-column: 1 / -1; margin-top: 6px; }
  :is(#jak-to-dziala, #workflow) > .grid > div > .mt-4 { margin-top: 8px !important; }

  /* FAQ i plakietki. */
  #faq > :not([hidden]) ~ :not([hidden]) { margin-top: 12px !important; }
  #faq .space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 8px !important; }
  #faq details { padding: 10px 12px !important; }
  #faq details > p { margin-top: 8px !important; padding-top: 8px !important; }
  .ls-badges { gap: 8px !important; }
  .ls-badges > div { padding: 10px 12px !important; }

  /* Stopka: mniejsze odstępy, linki prawne w dwóch kolumnach. */
  footer > div:first-child { padding-top: 22px !important; padding-bottom: 18px !important; gap: 18px !important; }
  footer > div:first-child > div > h4 { margin-bottom: 8px !important; font-size: 13px !important; line-height: 18px !important; }
  footer > div:first-child > .space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 10px !important; }
  footer ul.space-y-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  footer ul.space-y-2 > li { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
  footer ul.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0 !important; }
  footer > div:last-child > div { padding-top: 12px !important; padding-bottom: 12px !important; gap: 8px !important; }
}
/* Nagłówek niższy tylko na telefonie w pionie: od 640 px pod logo stoi
   podpis „FUTURE OF WEBCASTING” i 54 px by go ucięło. */
@media (max-width: 639px) {
  header > div { height: 54px !important; }
}
