/* Cache bust: 1795783255 */
/* v11: przystanki. Szyna pokazuje kadry (jeden gest = jeden kadr), biezacy zapalony, kazdy klikalny.
   Lampa nastepnego kadru zapala sie jak sodowa latarnia, kiedy kadr jest przeczytany: tam jedzie nastepny gest. */

/* ---------- szyna kadrow ---------- */
.rail.st-rail li { right: 0; }
/* pole klikniecia: cala wysokosc miedzy kreskami (bez dziur) i szerokie w lewo, kreska zostaje cienka */
.rail.st-rail button {
  --hit: max(16px, calc(var(--rail-h) / var(--sn, 25)));
  right: -14px; top: calc(var(--hit) / -2); height: var(--hit); min-width: 52px; justify-content: flex-start; gap: 9px;
}
@media (min-width: 761px) { .rail.st-rail { --rail-h: 58vh; } }
.rail.st-rail button i { width: 5px; margin-right: 11px; background: var(--cyjan-3); transition: width .22s var(--ease-out), background-color .22s ease, opacity .22s ease; }
.rail.st-rail li.ch0 button i { width: 9px; background: var(--cyjan-2); }
.rail.st-rail li.done button i { background: var(--sygnal); opacity: .75; }
.rail.st-rail li.cur button i { width: 16px; background: var(--kosc); opacity: 1; }
.rail.st-rail button span { color: var(--kosc-3); }
@media (hover: hover) and (pointer: fine) {
  .rail.st-rail:hover li button span { opacity: 0; }
  .rail.st-rail:hover li.ch0 button span { opacity: .8; translate: 0 0; }
  .rail.st-rail:has(button:hover) li.ch0 button:not(:hover) span { opacity: .28; }
  .rail.st-rail li button:hover span { opacity: 1; translate: 0 0; color: var(--kosc); }
  .rail.st-rail button:hover i { width: 16px; background: var(--kosc); }
}
.rail.st-rail button:focus-visible i { width: 16px; background: var(--cyjan); }

/* ---------- lampa nastepnego kadru ---------- */
.st-lamp {
  position: absolute; right: -4px; top: calc(var(--nx, 0) * 100%); width: 9px; height: 9px; margin-top: -4.5px;
  pointer-events: none; opacity: 0; transition: opacity .18s ease-out;
}
.st-lamp i {
  position: absolute; inset: 0; border-radius: 50%; background: var(--sod);
  box-shadow: 0 0 0 3px rgba(255, 165, 31, .14), 0 0 16px 3px var(--sod-glow);
}
.st-lamp span {
  position: absolute; right: 22px; top: 50%; translate: 6px -50%; white-space: nowrap;
  font: 500 12px/1 var(--mono); color: var(--kosc); text-shadow: 0 1px 10px rgba(5, 9, 21, .95), 0 0 2px rgba(5, 9, 21, .9);
  opacity: 0; transition: opacity .3s ease-out, translate .4s var(--ease-out);
}
.st-lamp .sl-m { display: none; }
.st-hint .st-lamp { opacity: 1; transition: opacity .6s var(--ease-out); }
.st-hint .st-lamp i { animation: st-sodium 2.4s cubic-bezier(.4, 0, .2, 1) infinite; }
.st-hint .st-lamp span { opacity: 1; translate: 0 -50%; transition: opacity .5s var(--ease-out) .2s, translate .6s var(--ease-out) .2s; }
/* lampa sodowa rozgrzewa sie: najpierw ciemna czerwien, potem pelny bursztyn */
@keyframes st-sodium {
  0% { opacity: .25; transform: scale(.7); filter: saturate(1.6) hue-rotate(-14deg); }
  30% { opacity: 1; transform: scale(1); filter: none; }
  70% { opacity: 1; transform: scale(1); }
  100% { opacity: .25; transform: scale(.7); filter: saturate(1.6) hue-rotate(-14deg); }
}
/* w trakcie przejazdu lampa gasnie od razu: gest zostal przyjety */
.st-moving .st-lamp { opacity: 0; transition: opacity .12s ease-out; }

/* ---------- naglowek: numer kadru, rozdzial, kadry rozdzialu ---------- */
.where .wp { display: inline-flex; gap: 4px; align-items: center; margin-left: -4px; }
.where .wp i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--cyjan-2); }
.where .wp i.d { background: var(--sygnal); border-color: var(--sygnal); }
.where .wp i.c { background: var(--kosc); border-color: var(--kosc); }
.st-idle .where-t::after { opacity: 1; translate: 0 0; animation: where-tug 1.8s cubic-bezier(.55, 0, .25, 1) infinite; }
/* pierwsze kadry: ta sama podpowiedz w naglowku, zanim ktos nauczy sie rytmu (potem zostaje lampa na szynie) */
.st-learn .where-t::after { opacity: 1; translate: 0 0; animation: where-tug 1.8s cubic-bezier(.55, 0, .25, 1) infinite; }
.st-moving .where-t::after { opacity: 0; animation: none; transition: opacity .12s ease-out; }

/* ---------- v2: tag przy kropce w kolorze kontroli (te same kolory co bramy w swiecie, world.js GATE_COL) ---------- */
#hud[data-gate="tls"] .hud-txt { border-left-color: #52E3B4; color: #C9F7E8; }
#hud[data-gate="sesja"] .hud-txt { border-left-color: #62B2FF; color: #D3E8FF; }
#hud[data-gate="csrf"] .hud-txt { border-left-color: #B497FF; color: #E6DDFF; }
#hud[data-gate="limit"] .hud-txt { border-left-color: #FF86CF; color: #FFDDF1; }
#hud[data-gate="brak"] .hud-txt { border-left: 2px dashed #FF4A4A; color: #FFD0D0; }

/* ---------- szybkie przewijanie: dwa grotki i "szybko" przy naglowku, tylko gdy tryb trwa ---------- */
.where-t .wff {
  /* stoi w miejscu "przewiń dalej" (ten napis w szybkim trybie jest ukryty) */
  position: absolute; right: 0; top: 50%; translate: -6px -50%;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 500 12px/1 var(--mono); color: var(--sygnal); opacity: 0; pointer-events: none;
  transition: opacity .18s ease-out, translate .25s var(--ease-out);
}
.where-t .wff b { display: inline-flex; gap: 1px; }
.where-t .wff b i { width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; rotate: 45deg; opacity: .45; }
.st-ff .where-t .wff { opacity: 1; translate: 0 -50%; }
.st-ff .where-t .wff b i { animation: st-ff 0.6s linear infinite; }
.st-ff .where-t .wff b i + i { animation-delay: .15s; }
.st-ff .where-t::after { opacity: 0 !important; animation: none !important; }
@keyframes st-ff { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }
/* szybki tryb: kreska biezacego kadru na szynie tez jest bursztynowa */
.st-ff .rail.st-rail li.cur button i { background: var(--sygnal); }

/* ---------- telefon: szyna jest tylko wskaznikiem, lampa bez napisu ---------- */
@media (max-width: 760px) {
  .rail.st-rail button i { margin-right: 4px; width: 4px; }
  .rail.st-rail li.ch0 button i { width: 7px; }
  .rail.st-rail li.cur button i { width: 11px; }
  .st-lamp { right: -4px; }
  .st-lamp span { display: none !important; }
  /* naglowek stoi przy prawej krawedzi: "szybko" pod nim, nie za ekranem */
  .where-t .wff { left: auto; right: 0; top: calc(100% + 8px); translate: 0 -4px; font-size: 11px; }
  .st-ff .where-t .wff { translate: 0 0; }
}
@media (pointer: coarse) {
  .st-lamp .sl-d { display: none; }
  .st-lamp .sl-m { display: inline; }
  .where-t::after { content: "przesuń dalej"; }
}

@media (prefers-reduced-motion: reduce) {
  .st-hint .st-lamp i, .st-idle .where-t::after, .st-learn .where-t::after, .st-ff .where-t .wff b i { animation: none; }
}

/* ---------- konferencje: koniec montazu pokazuje wszystkie przystanki jako pasek ---------- */
.conf-strip { display: none; }
.gl .cap.conf-strip { display: block; bottom: 5.5vh; }
.conf-strip ul {
  list-style: none; margin: 0 auto; padding: 12px 18px; width: max-content; max-width: 100%;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px;
  background: rgba(10, 17, 34, .78); box-shadow: inset 0 0 0 1px rgba(99, 210, 238, .22); border-radius: 3px;
}
.conf-strip li { display: flex; align-items: center; gap: 10px; font: 500 13px/1.2 var(--mono); color: var(--kosc-2); white-space: nowrap; }
.conf-strip img { width: 34px; height: 34px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(228, 232, 240, .3); }
@media (max-width: 760px) {
  .gl .cap.conf-strip { bottom: 4svh; }
  .conf-strip ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 12px 10px; width: auto; }
  .conf-strip li { flex-direction: column; gap: 6px; font-size: 10.5px; text-align: center; white-space: normal; }
  .conf-strip img { width: 32px; height: 32px; }
}

/* tryb statyczny (bez WebGL): naglowek metody nad krokami, jak w bazie */
html:not(.gl) #metoda .m-intro { grid-column: 1 / -1; }

/* odometr: Overpass jest szeroki, numer nigdy nie zawija sie na dwie linie */
.gl .odo-n { white-space: nowrap; }
/* poziomy ekran: numer mniejszy i z pelna wysokoscia linii, wiec GET /api/users/1002/export stoi nad cyframi, nie pod nimi */
@media (min-width: 761px) { .gl .odo-n { font-size: min(30vw, 40vh); line-height: 1; margin-top: .1em; } }
@media (max-width: 760px) { .gl .odo-n { font-size: 33vw; } }
