/* Ekrany przed pokazem i po nim: informacja o trybunie, odliczanie z finałem ostatnich 10 sekund,
   oczekiwanie na sygnał z pulpitu, scena końcowa i komunikaty. Ruch tylko transform i opacity;
   przy „ogranicz ruch” znika ruch, zostaje treść. */

/* ---------- Twoja trybuna (z linku albo z wyboru) ---------- */
.chip { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); background: rgba(5, 10, 31, 0.45); }
.chip-dot { width: 12px; height: 12px; flex: none; background: var(--stand); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.chip-text { display: grid; min-width: 0; line-height: 1.25; }
.chip-text small { font: 800 11px/1.25 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chip-text strong { font-size: 15px; }
.chip-change {
  margin-left: auto; min-height: 38px; padding: 0 12px; border: 0; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6);
  background: none; color: #fff; font: 800 12px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
}

/* ---------- Odliczanie ---------- */
.stage { display: grid; justify-items: center; gap: 8px; padding: 10px 0 4px; text-align: center; }
.count-box { position: relative; display: grid; place-items: center; }
/* Licznik w kolumnach: liczba, pod nią jednostka (min, sek…) w języku kibica; całość na środku. */
.count { display: flex; justify-content: center; align-items: flex-start; margin: 0 auto; font-family: var(--display); font-size: clamp(88px, 31vw, 156px); line-height: 0.95; }
.count.is-long { font-size: clamp(64px, 22vw, 120px); }
.count.is-xlong { font-size: clamp(56px, 19vw, 104px); }
.count .col { display: grid; justify-items: center; }
.count .num { display: flex; }
.count .dig { display: inline-block; width: 0.45em; text-align: center; }
.count .sep { display: inline-block; width: 0.2em; text-align: center; opacity: 0.55; }
.count .unit { margin-top: 8px; font: 800 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.wait.is-final .count .unit { display: none; }
.count-caption { font-size: 15px; color: var(--muted); }
.stage-hint { max-width: 30ch; font-size: 15px; color: var(--fg-2); }
.ring {
  position: absolute; left: 50%; top: 50%; width: min(78vw, 360px); aspect-ratio: 1; margin: calc(min(78vw, 360px) / -2) 0 0 calc(min(78vw, 360px) / -2);
  border: 3px solid var(--red); border-radius: 50%; opacity: 0; pointer-events: none;
}
.ticks { display: none; gap: 6px; }
.ticks i { width: 14px; height: 14px; background: #fff; transition: opacity 300ms ease-out, transform 300ms var(--reveal); }
.ticks i:nth-child(even) { background: var(--red); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5); }
.ticks i.is-out { opacity: 0.16; transform: scale(0.6); }

.saved { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.saved::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #3ccf7a; }
.saved.is-warn { color: #ffd2d8; }
.saved.is-warn::before { background: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status { display: grid; gap: 4px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }

/* Finał: ostatnie 10 sekund — czerwony ekran i sama liczba, która co sekundę wlatuje z bliska
   i rośnie (waitviews.beat); tło błyska, w ostatnich 3 s na biało. Powiększona liczba nie
   może przewijać strony — finał przycina wszystko, co wystaje. */
.wait.is-final { justify-content: center; overflow: clip; background: linear-gradient(170deg, #14030a 0%, #4d0614 42%, #8f0519 100%); }
.wait.is-final > :not(.stage):not(.emblem):not(.flash) { display: none; }
.flash {
  position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #ff4560 0%, rgba(228, 7, 40, 0) 70%);
}
.wait.is-last .flash { background: radial-gradient(circle at 50% 45%, #fff 0%, rgba(255, 255, 255, 0) 62%); }
.wait.is-final .count { will-change: transform, opacity; }
.wait.is-last .count { text-shadow: 0 0 40px rgba(255, 255, 255, 0.55); }
.wait.is-final .stage { flex: 1; align-content: center; gap: 18px; }
.wait.is-final .count { font-size: min(60vw, 46vh); }
.wait.is-final .count-caption { display: none; }
.wait.is-final .ticks { display: flex; }
.wait.is-final .stage-label::before { background: #fff; }
.wait.is-last .ring { border-color: #fff; border-width: 5px; }

/* ---------- Czekamy na sygnał z pulpitu ---------- */
.hold { text-align: center; }
.hold .chip { text-align: left; }
.hold .saved, .hold .stage-hint { align-self: center; max-width: 34ch; }
.hold .saved { text-align: left; }
.radar { position: relative; display: grid; place-items: center; width: 190px; height: 190px; margin: 14px auto 0; }
.radar span {
  position: absolute; inset: 0; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 50%; opacity: 0;
  animation: radar 2.4s var(--reveal) infinite;
}
.radar span:nth-child(2) { animation-delay: 0.8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; border-color: var(--red); }
.radar-crest { position: relative; width: 56px; height: 90px; }
@keyframes radar {
  from { opacity: 0.95; transform: scale(0.3); }
  to { opacity: 0; transform: scale(1); }
}

/* ---------- Pokaz i koniec (hasło klubu: intro.css) ---------- */
.play { justify-content: flex-end; align-items: center; background: none; }
.remaining { color: #fff; font-size: 13px; mix-blend-mode: difference; opacity: 0.7; }
.end { justify-content: center; align-items: center; gap: 22px; text-align: center; }

/* ---------- Komunikaty (wczytywanie, zakończenie, odwołanie) ---------- */
.message { justify-content: center; gap: 16px; }
.message-crest { width: 40px; height: 64px; }
.message .tri { width: 96px; margin: 0; }

/* ---------- Wejście ekranu: treść wjeżdża schodkowo ---------- */
.is-entering [data-a] { animation: rise 600ms var(--reveal) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes grow {
  from { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .is-entering [data-a], .radar span { animation: none; }
  .radar span:first-child { opacity: 0.5; transform: scale(0.8); }
  .tap, .ticks i { transition: none; }
}
