/* Príbehy – rad krúžkov a prehliadač na celú obrazovku (sablona/pribehy.js, docs/pribehy.md). Farby a písmo berie z premenných styl.css. */

/* ---------- rad krúžkov ---------- */
.pb { margin: 18px 0 0; }
.pb-rad { display: flex; gap: 6px; margin: 0 -8px; padding: 6px 8px 4px; list-style: none; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pb-rad::-webkit-scrollbar { display: none; }
.pb-rad li { flex: none; scroll-snap-align: start; }
.pb-kruh { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; padding: 2px 0; color: var(--ui); text-decoration: none;
  font-size: .8rem; font-weight: 600; line-height: 1.22; text-align: center; -webkit-tap-highlight-color: transparent; }
.pb-kruh:hover { color: var(--accent-2); }
.pb-obr { display: block; width: 76px; height: 76px; padding: 3px; border: 2.5px solid var(--accent); border-radius: 50%; transition: transform .18s ease; }
.pb-obr img, .pb-obr b { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.pb-obr b { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font: 600 1.7rem/1 var(--serif); }
.pb-kruh:hover .pb-obr, .pb-kruh:focus-visible .pb-obr { transform: scale(1.05); }
.pb-kruh:focus-visible { outline: none; }
.pb-kruh:focus-visible .pb-obr { outline: 3px solid rgba(var(--accent-rgb), .4); outline-offset: 2px; }
.pb-kruh.pb-videny .pb-obr { border-color: var(--line-2); }
.pb-meno { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .pb-rad { margin: 0 -16px; padding: 6px 12px 4px; }   /* rad sa posúva od okraja po okraj obrazovky */
  .pb-kruh { width: 84px; font-size: .75rem; }   /* 12 px: aj dlhé slovo mena (výmyselníčka) sa zmestí do riadka */
  .pb-obr { width: 70px; height: 70px; }
}

/* ---------- prehliadač ---------- */
html.pb-otvorene { overflow: hidden; }
.pb-okno { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; background: #0d0d0d;
  touch-action: none; overscroll-behavior: contain; -webkit-user-select: none; user-select: none; }
.pb-okno[hidden] { display: none; }
.pb-karta { position: relative; width: 100%; height: 100%; overflow: hidden; background: #1a1a1a; color: #fff; }
.pb-bg { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(28px) brightness(.62) saturate(1.1); }
.pb-foto { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: 50% 32%; }
.pb-vysoka .pb-foto { object-fit: cover; object-position: 50% 50%; }
.pb-tien { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, 0) 150px); }

.pb-pruhy { position: absolute; z-index: 4; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; gap: 4px; }
.pb-pruhy span { flex: 1 1 0; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .36); overflow: hidden; }
.pb-pruhy i { display: block; width: 0; height: 100%; border-radius: 3px; background: #fff; }
.pb-pruhy .pb-bol i { width: 100%; }
.pb-pruhy .pb-akt i { animation: pb-beh var(--pb-cas, 6s) linear forwards; }
.pb-stop .pb-pruhy .pb-akt i { animation-play-state: paused; }
@keyframes pb-beh { from { width: 0; } to { width: 100%; } }

.pb-hl { position: absolute; z-index: 4; top: calc(22px + env(safe-area-inset-top, 0px)); left: 12px; right: 8px; display: flex; align-items: center; gap: 4px;
  pointer-events: none; transition: opacity .2s ease; }
.pb-hl > * { pointer-events: auto; }
.pb-kto { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; padding: 4px 8px 4px 0; color: #fff; text-decoration: none;
  font-weight: 700; font-size: .98rem; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.pb-kto:hover { color: #fff; text-decoration: underline; }
.pb-av { flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.pb-km { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-t { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: #fff;
  cursor: pointer; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.pb-t:hover { background: rgba(255, 255, 255, .16); }
.pb-okno :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.pb-z { position: absolute; z-index: 2; top: 0; bottom: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pb-zl { left: 0; width: 32%; }
.pb-zr { right: 0; width: 68%; }
.pb-z:focus-visible { outline: none; }

.pb-podpis { position: absolute; z-index: 3; right: 12px; top: calc(76px + env(safe-area-inset-top, 0px)); max-width: 60%; padding: 3px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .5); color: #fff; font-size: .74rem; font-weight: 600; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  pointer-events: none; }
/* tmavý prechod je súčasťou bloku s textom: siaha vždy 96 px nad prvý riadok, nech je text akokoľvek dlhý */
.pb-text { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 96px 20px calc(22px + env(safe-area-inset-bottom, 0px)); pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .92) 0, rgba(0, 0, 0, .8) calc(100% - 120px), rgba(0, 0, 0, 0) 100%); transition: opacity .2s ease; }
.pb-stitok { margin: 0 0 8px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .86); }
.pb-nazov { margin: 0; color: #fff; font: 600 1.62rem/1.16 var(--serif); letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.pb-pod { margin: 10px 0 0; color: rgba(255, 255, 255, .92); font-size: 1rem; line-height: 1.45;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.pb-pod::first-letter { text-transform: uppercase; }
.pb-citat { font: italic 1.06rem/1.45 var(--serif); }
.pb-prel { margin: 4px 0 0; font-size: .74rem; color: rgba(255, 255, 255, .7); }
.pb-akcie { display: flex; margin: 18px 0 0; }
.pb-akcie .pb-cta { flex: 1 1 auto; min-height: 50px; pointer-events: auto; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7); }
.pb-drzi .pb-hl, .pb-drzi .pb-text, .pb-drzi .pb-podpis { opacity: 0; }   /* pri podržaní ostane iba fotka */

.pb-s { display: none; }
@media (min-width: 720px) and (min-height: 480px) {
  .pb-okno { background: rgba(13, 13, 13, .94); }
  .pb-karta { width: auto; height: min(92vh, 880px); aspect-ratio: 9 / 16; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
  .pb-s { display: grid; place-items: center; flex: none; width: 48px; height: 48px; margin: 0 18px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
  .pb-s:hover { background: rgba(255, 255, 255, .28); }
  .pb-s:disabled { opacity: .3; cursor: default; }
  .pb-sl { order: -1; }
  .pb-sl svg { transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) {
  .pb-obr, .pb-hl, .pb-text { transition: none; }
}
@media print { .pb-okno { display: none !important; } }
