/* ============================================================
   Typer Mundial 2026 — Komponenty + ekran logowania
   ============================================================ */

/* ---------- Pasek 3 gospodarzy (czerwień/zieleń/błękit) ---------- */
.host-stripe {
  display: flex;
  height: 5px;
  width: 100%;
  border-radius: var(--r-pill);
  overflow: hidden;
}
.host-stripe i { flex: 1; display: block; }
.host-stripe .can { background: var(--can-red); }
.host-stripe .mex { background: var(--mex-green); }
.host-stripe .usa { background: var(--usa-blue); }

/* ---------- Brand / nagłówek ---------- */
.brand {
  text-align: center;
  margin-top: 8vh;
}
.brand .kicker {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 10px;
  padding-left: 0.42em;
}
.brand h1 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.86;
  font-size: clamp(52px, 18vw, 92px);
  letter-spacing: 0.01em;
  color: var(--paper);
  text-shadow: 0 2px 0 rgba(0,0,0,0.3);
}
.brand h1 .year {
  display: block;
  color: transparent;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(64px, 24vw, 128px);
}
.brand .tagline {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}
.brand-ver {
  display: inline-block; margin-top: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--gold); background: rgba(242,193,78,0.12);
  border: 1px solid var(--line-gold); padding: 3px 9px; border-radius: 999px;
}

/* Oficjalne logo MŚ 2026 (trofeum) */
.logo-mundial {
  height: 200px;
  width: auto;
  margin: 0 auto 8px;
  mix-blend-mode: screen;  /* czerń tła PNG znika na ciemnym tle aplikacji */
  filter: drop-shadow(0 14px 44px rgba(242, 193, 78, 0.38));
  animation: float 5.5s ease-in-out infinite;
}
.logo-mundial.sm { height: 150px; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) { .logo-mundial { animation: none; } }

/* ---------- Karta logowania ---------- */
.auth-card {
  margin-top: 36px;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.auth-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 24px;
  margin-bottom: 4px;
}
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

/* ---------- Przyciski ---------- */
.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.985); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1A1405;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { box-shadow: 0 12px 46px rgba(242,193,78,0.28); }

.btn-ghost {
  background: var(--ink-4);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { background: #2A2A3A; border-color: var(--line-gold); }

.btn-google {
  background: #fff;
  color: #1f1f1f;
}
.btn-google:hover { background: #f1f1f1; }

/* ---------- Separator ---------- */
.sep {
  display: flex; align-items: center; gap: 12px;
  color: var(--faint); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 18px 0;
}
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Pola ---------- */
.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px;
}
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: var(--faint); }
.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242,193,78,0.18);
}

/* ---------- Komunikaty ---------- */
.msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  display: none;
}
.msg.show { display: block; }
.msg.err { background: rgba(228,0,43,0.12); border: 1px solid rgba(228,0,43,0.4); color: #ff9aa9; }
.msg.ok  { background: rgba(0,135,90,0.12); border: 1px solid rgba(0,135,90,0.4); color: #7fe0bd; }

/* ---------- Stan zalogowany (stub) ---------- */
.welcome {
  margin-top: 10vh;
  text-align: center;
}
.welcome h2 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(30px, 9vw, 44px); line-height: 1;
}
.welcome .who { color: var(--gold); margin-top: 6px; font-size: 18px; }
.uid-box {
  margin: 24px auto;
  background: var(--ink-3);
  border: 1px dashed var(--line-gold);
  border-radius: var(--r);
  padding: 16px;
  text-align: left;
}
.uid-box .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.uid-box code {
  display: block; margin-top: 6px; font-size: 13px; color: var(--gold-soft);
  word-break: break-all; font-family: ui-monospace, 'SFMono-Regular', monospace;
}

.footnote { text-align: center; color: var(--faint); font-size: 12px; margin-top: 28px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.25); border-top-color: #1A1405;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   APLIKACJA — shell, nawigacja, karty meczów
   ============================================================ */

.loader-screen {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
}
.spinner-gold {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(242,193,78,0.2); border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

.app { min-height: 100dvh; padding-bottom: 86px; }

/* — Topbar — */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,10,17,0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: var(--max); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
}
.tb-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: 0.02em; }
.tb-brand b { color: var(--gold); }
.tb-logo { height: 26px; width: auto; mix-blend-mode: screen; }
.tb-logout {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--ink-3); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 18px;
}
.tb-logout:hover { border-color: var(--line-gold); }
.banner {
  max-width: var(--max); margin: 0 auto; padding: 8px 18px;
  background: rgba(242,193,78,0.12); color: var(--gold-soft);
  font-size: 13px; text-align: center; border-top: 1px solid var(--line-gold);
}

.content { max-width: var(--max); margin-inline: auto; padding: 18px; }

/* — Filtry — */
.filters {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  margin-bottom: 16px; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: 0 0 auto; padding: 9px 16px; border-radius: var(--r-pill);
  background: var(--ink-3); border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 14px;
  transition: all 0.15s ease;
}
.filters button.active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1A1405; border-color: transparent;
}

/* — przełącznik „Sortuj po grupach" (toggle switch) — */
.group-toggle { display: flex; align-items: center; gap: 10px; margin: -4px 0 16px; }
.switch {
  flex: 0 0 auto; width: 44px; height: 26px; border-radius: var(--r-pill);
  background: var(--ink-4); border: 1px solid var(--line-strong); padding: 2px;
  position: relative; cursor: pointer; transition: background .18s ease, border-color .18s ease;
}
.switch .switch-thumb {
  display: block; width: 20px; height: 20px; border-radius: 50%;
  background: var(--muted); transition: transform .18s ease, background .18s ease;
}
.switch.on { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); border-color: transparent; }
.switch.on .switch-thumb { transform: translateX(18px); background: #1A1405; }
/* ring wyniesiony 3px poza switch, na ciemnym tle strony — widoczny też gdy switch jest złoty (ON) */
.switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.group-toggle-label { color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.gt-hint {
  color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(242,193,78,0.12); border: 1px solid var(--line-gold);
  border-radius: var(--r-pill); padding: 1px 7px; margin-left: 2px;
}

.empty { text-align: center; color: var(--muted); padding: 40px 10px; line-height: 1.6; }

/* — Karta meczu — */
.match-card {
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; margin-bottom: 12px;
  animation: rise 0.4s ease both;
}
.mc-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold);
  background: rgba(242,193,78,0.1); border: 1px solid var(--line-gold);
  padding: 3px 9px; border-radius: var(--r-pill);
}
.mc-time { font-size: 12.5px; color: var(--muted); text-transform: capitalize; }

.mc-teams {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
}
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.team .code {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink-4); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.04em;
  color: var(--text);
}
.team .tname { font-size: 12px; color: var(--muted); line-height: 1.2; max-width: 92px; }

.mc-mid { min-width: 92px; display: flex; justify-content: center; }
.score-final {
  font-family: var(--font-display); font-size: 30px; color: var(--gold);
  letter-spacing: 0.02em;
}
.score-inputs { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 22px; color: var(--muted); }
.score-inputs input {
  width: 44px; height: 50px; text-align: center;
  background: var(--ink); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm); color: var(--text);
  font-family: var(--font-display); font-size: 24px;
  -moz-appearance: textfield;
}
.score-inputs input::-webkit-outer-spin-button,
.score-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-inputs input:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,193,78,0.18);
}
.score-locked { font-family: var(--font-display); font-size: 22px; }
.score-locked .mypick { color: var(--gold); }
.score-locked .nopick { color: var(--faint); }

.mc-bottom { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.mc-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cd { font-size: 12.5px; color: var(--muted); }
.cd b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.cd.closed { color: var(--faint); }
.cd.done { color: var(--win); }
.btn-save {
  padding: 9px 16px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1A1405; font-weight: 700; font-size: 13.5px; white-space: nowrap;
  transition: transform 0.12s ease;
}
.btn-save:active { transform: scale(0.96); }
.btn-save:disabled { opacity: 0.7; }

/* — Wkrótce / placeholders — */
.soon { text-align: center; padding: 60px 20px; color: var(--muted); }
.soon h3 { font-family: var(--font-display); font-size: 26px; color: var(--text); margin-bottom: 10px; text-transform: uppercase; }

/* — Admin — */
.admin-h { font-family: var(--font-display); font-size: 24px; text-transform: uppercase; margin-bottom: 14px; }
.admin-card {
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; margin-bottom: 14px;
}
.admin-card h4 { font-size: 16px; margin-bottom: 6px; }
/* nagłówek karty admina = przełącznik zwijania (stan w localStorage) */
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; user-select: none; }
.admin-card-head .acc-caret { color: var(--muted); font-size: 13px; font-weight: 700; flex: 0 0 auto; transition: color .15s ease; }
.admin-card-head:hover .acc-caret { color: var(--gold); }
.admin-card.collapsed > :not(.admin-card-head) { display: none !important; }
.admin-card.collapsed .admin-card-head { margin-bottom: 0; }
/* pasek sortowania listy graczy w panelu admina */
.pa-sort { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pa-sort-lbl { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.pa-sort-btn {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pa-sort-btn:hover { border-color: var(--line-strong); color: var(--text); }
.pa-sort-btn.active { background: rgba(242,193,78,0.12); border-color: var(--line-gold); color: var(--gold); }
.admin-desc { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.admin-msg { margin-top: 12px; font-size: 13.5px; color: var(--gold-soft); }
.admin-stat { margin-top: 10px; font-size: 13px; color: var(--muted); }
.admin-stat b { color: var(--gold); }

/* — Bottom nav — */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; max-width: var(--max); margin-inline: auto;
  background: rgba(17,17,28,0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--faint); font-size: 11px; font-weight: 600; padding: 6px 0;
  transition: color 0.15s ease;
}
.bottom-nav button span { font-size: 20px; filter: grayscale(1) opacity(0.7); transition: filter 0.15s ease; }
.bottom-nav button.active { color: var(--gold); }
.bottom-nav button.active span { filter: none; }

/* siatka meczów (mobile: 1 kolumna) */
.match-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.match-grid .match-card { margin-bottom: 0; }

/* nawigacja w topbarze — ukryta na telefonie */
.tb-nav { display: none; }

/* ============================================================
   DESKTOP / WEB (≥ 760px)
   ============================================================ */
@media (min-width: 760px) {
  /* górna nawigacja zamiast dolnej */
  .tb-nav {
    display: flex; gap: 4px; margin-left: auto; margin-right: 14px;
  }
  .tb-nav button {
    padding: 9px 18px; border-radius: var(--r-pill);
    color: var(--muted); font-weight: 600; font-size: 14.5px;
    transition: all 0.15s ease;
  }
  .tb-nav button:hover { color: var(--text); background: var(--ink-3); }
  .tb-nav button.active {
    color: #1A1405;
    background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  }

  .bottom-nav { display: none; }
  .app { padding-bottom: 32px; }

  .topbar-in { max-width: 1120px; padding: 14px 28px; }
  .tb-brand { font-size: 16px; }
  .tb-logo { height: 30px; }
  .banner { max-width: 1120px; }
  .content { max-width: 1120px; padding: 30px 28px; }

  /* mecze w kolumnach */
  .match-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
  }
  .match-card { padding: 18px 20px; }

  /* logowanie wyśrodkowane pionowo, trochę większe */
  .shell { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 560px; }
  .brand { margin-top: 0; }
  .brand h1 { font-size: 84px; }
  .brand h1 .year { font-size: 120px; }

  /* filtry wyśrodkowane */
  .filters { justify-content: center; }

  .soon { padding: 90px 20px; }
}

/* duży desktop: 3 kolumny meczów na sztywno */
@media (min-width: 1140px) {
  .match-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RANKING
   ============================================================ */
.rank-table {
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.rank-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 50px 60px;
  align-items: center; padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.rank-row:last-child { border-bottom: none; }
.rank-row.head {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); background: var(--ink-2);
}
.rank-row.head .rk-ex, .rank-row.head .rk-pts { text-align: center; }
.rk-pos { font-family: var(--font-display); font-size: 18px; color: var(--muted); }
.rank-row:nth-child(2) .rk-pos { color: var(--gold); }
.rk-name { display: flex; align-items: center; gap: 10px; font-size: 15px; min-width: 0; }
/* awatar w wierszu rankingu (zdjęcie lub inicjały) */
.rk-av {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: grid; place-items: center;
  background: var(--ink-4); border: 1px solid var(--line-strong);
  color: var(--gold-soft); font-size: 11px; font-weight: 700;
}
.rk-text { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rk-ex { text-align: center; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.rk-pts { text-align: center; font-family: var(--font-display); font-size: 22px; color: var(--gold); }
.rank-row.me { background: rgba(242,193,78,0.08); }
.rank-row.me .rk-name b::after { content: " (Ty)"; color: var(--muted); font-weight: 400; font-size: 12px; }
.rank-row.dq { opacity: 0.5; }
.dq-tag {
  font-size: 9px; font-style: normal; font-weight: 700; letter-spacing: 0.08em;
  background: rgba(228,0,43,0.18); color: #ff9aa9; padding: 2px 6px; border-radius: 6px;
  white-space: nowrap;
}
/* znacznik nieoddanych typów w rankingu — lvl1 (1 typ) żółto, lvl2 (2 typy) czerwono */
.miss-tag {
  font-size: 9px; font-style: normal; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 6px; white-space: nowrap;
}
.miss-tag.lvl1 { background: rgba(242,193,78,0.16); color: var(--gold-soft); }
.miss-tag.lvl2 { background: rgba(228,0,43,0.16); color: #ffb3bd; }
/* dopisek w linijce pod nazwą gracza dla wyeliminowanych */
.rk-elim { color: #ff9aa9; }
.rank-note { margin-top: 14px; font-size: 12.5px; color: var(--faint); text-align: center; line-height: 1.5; }

/* ============================================================
   ADMIN — lista wyników
   ============================================================ */
.res-list { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.res-row {
  display: grid; grid-template-columns: 42px 1fr auto 44px 10px 44px auto;
  align-items: center; gap: 8px;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 10px;
}
.res-no { font-family: var(--font-display); font-size: 14px; color: var(--muted); }
.res-teams { font-size: 13px; }
.res-teams b { color: var(--text); }
.res-teams i { color: var(--faint); font-style: normal; margin: 0 2px; }
.res-status { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.res-status.finished { background: var(--win); }
.res-in {
  width: 44px; height: 38px; text-align: center;
  background: var(--ink); border: 1px solid var(--line-strong);
  border-radius: 8px; color: var(--text);
  font-family: var(--font-display); font-size: 18px;
  -moz-appearance: textfield;
}
.res-in::-webkit-outer-spin-button, .res-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.res-in:focus { outline: none; border-color: var(--gold); }
.res-colon { color: var(--muted); }
.res-btn {
  padding: 8px 12px; border-radius: var(--r-pill);
  background: var(--gold); color: #1A1405; font-weight: 700; font-size: 12.5px;
  white-space: nowrap;
}
.res-btn:disabled { opacity: 0.6; }
.res-actions { display: flex; align-items: center; gap: 6px; }
.res-undo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink-4); border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 16px;
}
.res-undo:hover { border-color: var(--live); color: #ff9aa9; }

/* wersja w topbarze */
.ver {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--gold); background: rgba(242,193,78,0.12);
  border: 1px solid var(--line-gold); padding: 2px 6px; border-radius: 6px;
  margin-left: 4px;
}

/* kolory punktów na rozliczonym meczu */
.cd.pts-3 { color: var(--win) !important; }
.cd.pts-3 b { color: var(--win); }
.cd.pts-1 { color: var(--gold) !important; }
.cd.pts-1 b { color: var(--gold-soft); }
.cd.pts-0 { color: var(--live) !important; }
.cd.pts-0 b { color: #ff9aa9; }

/* etykiety w panelu admina */
.admin-lbl { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }

/* ============================================================
   TYPY SPECJALNE (karta gracza)
   ============================================================ */
.special-card {
  background: linear-gradient(160deg, rgba(242,193,78,0.10), var(--ink-3) 60%);
  border: 1px solid var(--line-gold); border-radius: var(--r);
  padding: 16px 18px; margin-bottom: 18px;
}
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-head h4 { font-size: 16px; }
.sp-cd { font-size: 12.5px; color: var(--muted); }
.sp-cd b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.sp-cd.closed { color: var(--faint); }
.sp-desc { font-size: 13px; color: var(--muted); margin: 8px 0 14px; line-height: 1.5; }
.sp-form { display: flex; flex-direction: column; }
.sp-form label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 8px 0 6px; }
.sp-form .btn { margin-top: 14px; }
.sp-msg { margin-top: 10px; font-size: 13px; color: var(--gold-soft); }
.sp-msg.ok { color: var(--win); }

/* podsumowanie (zwinięte) */
.sp-summary { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sp-line { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.sp-line span { color: var(--muted); min-width: 110px; }
.sp-line b { color: var(--gold); }
.sp-edit-btn {
  align-self: flex-start; margin-top: 8px;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--ink-4); border: 1px solid var(--line-gold);
  color: var(--gold-soft); font-weight: 600; font-size: 13.5px;
  transition: all 0.15s ease;
}
.sp-edit-btn:hover { background: rgba(242,193,78,0.14); }
.sp-form-actions { display: flex; gap: 10px; margin-top: 14px; }
.sp-form-actions .btn { margin-top: 0; flex: 1; }

@media (min-width: 760px) {
  .special-card { max-width: 560px; }
  .sp-form .input { max-width: 360px; }
}

/* ============================================================
   TYPY GRACZY (reveal)
   ============================================================ */
.reveal-list {
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.reveal-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.reveal-row:last-child { border-bottom: none; }
.reveal-row.me { background: rgba(242,193,78,0.08); }
.rv-name { font-size: 15px; }
.reveal-row.me .rv-name::after { content: " (Ty)"; color: var(--muted); font-size: 12px; }
.rv-pick { font-family: var(--font-display); font-size: 20px; color: var(--text); letter-spacing: 0.02em; }
.rv-pts { font-size: 13px; font-weight: 700; min-width: 52px; text-align: right; }
.rv-pts.pts-3 { color: var(--win); }
.rv-pts.pts-1 { color: var(--gold); }
.rv-pts.pts-0 { color: var(--live); }

/* bloki typów (3 ostatnie mecze) */
.reveal-block { margin-bottom: 18px; }
.reveal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-gold);
}
.reveal-match { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.reveal-match b { color: var(--text); }
.reveal-sc { font-family: var(--font-display); font-size: 20px; color: var(--gold); }
.reveal-sc.pending { color: var(--faint); font-size: 14px; font-family: inherit; }

/* sekcje kolejek (zwijane) w zakładce Typy */
.reveal-v2-list { display: flex; flex-direction: column; gap: 12px; }
.reveal-section-head {
  width: 100%; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 13px 15px;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text); font-size: 15px;
  transition: border-color .15s;
}
.reveal-section-head:hover, .reveal-section-head.open { border-color: var(--line-gold); }
.rs-title { flex: 1; }
.rs-count {
  font-family: var(--font-body); font-weight: 700; font-size: 11px;
  background: var(--ink-4); color: var(--muted);
  border-radius: 999px; padding: 2px 9px;
}
/* obecna runda — zielony znacznik "na żywo" */
.rs-now {
  font-family: var(--font-body); font-weight: 700; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--win);
  white-space: nowrap;
}
/* runda historyczna — wyszarzona (ożywa po najechaniu, nadal klikalna) */
.reveal-section-head.historic { opacity: 0.5; }
.reveal-section-head.historic:hover { opacity: 1; }
.reveal-section-body { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 2px; }

/* — Zestawienie typów specjalnych (dół zakładki „Typy") — */
.sp-summary { margin-top: 30px; }
.sp-summary-banner {
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1A1405; border-radius: 14px;
  padding: 12px 16px; font-weight: 800; font-size: 15px; letter-spacing: .02em;
  box-shadow: 0 8px 24px rgba(242, 193, 78, 0.18);
}
/* ikony SVG (puchar = mistrz, but = król strzelców) — kolor z currentColor */
.ic { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.14em; }
.sp-summary-banner .sp-ico { width: 19px; height: 19px; }   /* puchar na bannerze (ciemny na złotym tle) */
.sp-sr-champ .ic, .sp-sr-scorer .ic { width: 15px; height: 15px; color: var(--gold); }
.sp-summary-sub { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 9px 2px 12px; }
.sp-summary-list { display: flex; flex-direction: column; gap: 8px; }
.sp-summary-row {
  display: grid; grid-template-columns: 1fr; gap: 5px 14px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
}
.sp-summary-row.me { border-color: var(--line-gold); background: rgba(242, 193, 78, 0.06); }
.sp-sr-name { font-weight: 800; color: var(--text); }
.sp-sr-champ, .sp-sr-scorer { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-sr-champ b, .sp-sr-scorer b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 560px) {
  .sp-summary-row { grid-template-columns: minmax(90px, 0.85fr) minmax(0, 1.4fr) minmax(0, 1.2fr); align-items: center; gap: 14px; }
}

/* klikalny nagłówek meczu (rozwijanie typów) */
.reveal-v2-list .reveal-block { margin-bottom: 0; }
.rv-toggle {
  width: 100%; cursor: pointer; text-align: left; margin-bottom: 0;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
.rv-toggle:hover { border-color: var(--line-gold); }
.rv-toggle.open { border-color: var(--line-gold); background: var(--ink-3); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.rv-caret { color: var(--muted); font-size: 13px; flex: 0 0 auto; }
.rv-pts.pts-pending { color: var(--faint); font-weight: 600; }

/* ============================================================
   BANNER (admin)
   ============================================================ */
.inv-toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; }
.inv-toggle input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ============================================================
   SEKCJE MECZÓW (kolejki / rundy)
   ============================================================ */
.match-section { margin-bottom: 22px; }
.section-title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: 17px; letter-spacing: 0.04em; color: var(--gold-soft);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-gold);
  display: flex; align-items: center; gap: 8px;
}
.section-title::before { content: "▸"; color: var(--gold); }
@media (min-width: 760px) {
  .section-title { font-size: 19px; }
}

/* ============================================================
   ADMIN — edycja drużyn pucharowych + zaliczenie strzelca
   ============================================================ */
.team-edit-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.team-edit-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 10px; flex-wrap: wrap;
}
.te-no { font-family: var(--font-display); font-size: 14px; color: var(--muted); flex: 0 0 auto; }
.te-fields { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.te-name { flex: 1; min-width: 90px; height: 38px; padding: 6px 10px; }
.te-code { width: 56px; height: 38px; text-align: center; text-transform: uppercase; padding: 6px; }
.te-v { color: var(--faint); }

.scorer-list { display: flex; flex-direction: column; gap: 6px; }
.scorer-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 14px; cursor: pointer;
}
.scorer-row input { width: 20px; height: 20px; accent-color: var(--win); flex: 0 0 auto; }
.sc-name { font-weight: 600; font-size: 14px; flex: 0 0 auto; min-width: 90px; }
.sc-pick { color: var(--gold-soft); font-size: 14px; }

/* ============================================================
   SIATKA MECZÓW — responsywne kolumny + kompaktowe karty
   (override; źródłowa kolejność reguł ma znaczenie)
   ============================================================ */
.match-grid { gap: 10px; }
@media (min-width: 500px)  { .match-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px)  { .match-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .match-grid { grid-template-columns: repeat(4, 1fr); } .content { max-width: 1280px; } }

/* kompaktowa karta meczu (telefon i desktop) */
.match-card { padding: 12px 13px; }
.mc-top { margin-bottom: 10px; }
.badge { font-size: 10px; padding: 2px 7px; }
.mc-time { font-size: 11.5px; }
.team .code { width: 40px; height: 40px; font-size: 13px; }
.team .tname { font-size: 11px; max-width: 80px; }
.mc-mid { min-width: 78px; }
.score-inputs input { width: 38px; height: 44px; font-size: 21px; }
.score-final { font-size: 26px; }
.mc-bottom { margin-top: 10px; padding-top: 9px; }
.mc-actions { flex-wrap: wrap; gap: 8px; }
.cd { font-size: 11.5px; }
.btn-save { padding: 8px 13px; font-size: 12.5px; }

/* ============================================================
   USUWANIE GRACZY / PRÓŚB
   ============================================================ */
.inv-del {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--ink-4); border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 13px; flex: 0 0 auto;
}
.inv-del:hover { border-color: var(--live); color: #ff9aa9; }

.players-admin { display: flex; flex-direction: column; gap: 8px; }
.pa-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 14px;
}
.pa-row.paid { border-color: rgba(46,204,113,0.35); }
.pa-name { font-weight: 600; font-size: 14px; flex: 1; }
.pa-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pa-dq { background: rgba(228,0,43,0.18); color: #ff9aa9; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.pa-you { color: var(--gold); font-size: 11px; }

/* przełącznik wpisowego (admin) — pigułka, zielona gdy zapłacone */
.pa-paid {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 5px 10px; border-radius: 999px; cursor: pointer; user-select: none;
  background: var(--ink-4); border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 11.5px; font-weight: 700; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.pa-paid input { width: 15px; height: 15px; accent-color: var(--win); flex: 0 0 auto; margin: 0; cursor: pointer; }
.pa-paid:hover { border-color: var(--win); }
.pa-paid.on { background: rgba(46,204,113,0.14); border-color: rgba(46,204,113,0.5); color: #8ce6b0; }

/* ============================================================
   AVATAR + MODAL PROFILU
   ============================================================ */
.tb-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #1A1405; font-family: var(--font-display); font-size: 15px;
  border: 1px solid var(--gold-deep);
}
.tb-avatar:hover { box-shadow: var(--shadow-gold); }
/* zdjęcie profilowe wypełniające okrągły awatar (topbar, profil, ranking) */
.av-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   CZAT LIGI — bąbelki, awatary, timestamp HH:MM:SS, wiadomości systemowe
   ============================================================ */
.chat-view {
  display: flex; flex-direction: column;
  /* wysokość = ekran minus topbar + nawigacja dolna + paddingi (mobile-first) */
  height: calc(100dvh - 196px); min-height: 340px;
}
.chat-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 12px;
  padding: 4px 2px 8px; scroll-behavior: smooth;
}
.chat-item { display: flex; flex-direction: column; }

/* — wiadomość gracza — */
/* touch-action: pion = natywny scroll, poziom (swipe-reply) obsługuje JS — okno nie „ucieka" */
.chat-msg { display: flex; gap: 9px; align-items: flex-end; max-width: 88%; touch-action: pan-y; }
.chat-msg.mine { flex-direction: row-reverse; align-self: flex-end; }
.chat-av {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--ink-4); color: var(--gold); border: 1px solid var(--line-strong);
}
.chat-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chat-msg.mine .chat-body { align-items: flex-end; }
.chat-meta { display: flex; align-items: baseline; gap: 7px; padding: 0 3px; }
.chat-msg.mine .chat-meta { flex-direction: row-reverse; }
.chat-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.chat-time { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.chat-bubble {
  background: var(--ink-3); border: 1px solid var(--line);
  color: var(--text); font-size: 14.5px; line-height: 1.45;
  padding: 9px 13px; border-radius: 14px 14px 14px 4px;
  word-break: break-word; white-space: pre-wrap;
}
.chat-msg.mine .chat-bubble {
  background: rgba(242,193,78,0.13); border-color: var(--line-gold);
  color: var(--paper); border-radius: 14px 14px 4px 14px;
}

/* — wiadomość systemowa (rozliczenia, ogłoszenia admina) — */
.chat-sys {
  align-self: center; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(242,193,78,0.08); border: 1px solid var(--line-gold);
  border-radius: var(--r-pill); padding: 6px 14px; max-width: 92%;
  font-size: 12.5px; color: var(--gold-soft); text-align: center;
}
.chat-sys-ic { color: var(--gold); flex: 0 0 auto; }
.chat-sys-text { font-weight: 600; }
.chat-sys-time { color: var(--faint); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* — pasek wpisywania — */
.chat-bar { display: flex; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-input { flex: 1; margin: 0; }
.chat-send {
  flex: 0 0 auto; padding: 0 20px; border-radius: var(--r-sm); font-weight: 700;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: var(--ink);
  box-shadow: var(--shadow-gold); transition: filter 0.15s ease, opacity 0.15s ease;
}
.chat-send:hover { filter: brightness(1.05); }
.chat-send:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }

/* desktop: brak dolnej nawigacji → więcej miejsca na czat */
@media (min-width: 720px) {
  .chat-view { height: calc(100dvh - 168px); }
}

/* — linia nieodczytanych (gdzie skończyłeś czytać) — */
.chat-unread {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 2px;
  color: var(--gold); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
}
.chat-unread::before, .chat-unread::after { content: ""; flex: 1; height: 1px; background: var(--line-gold); }

/* — reakcje: chipy z licznikiem pod bąbelkiem — */
.chat-reacts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chat-msg.mine .chat-reacts { justify-content: flex-end; }
.react-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--ink-4); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 2px 8px 2px 5px; font-size: 12px; font-weight: 700; color: var(--muted);
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.react-chip:hover { border-color: var(--line-strong); }
.react-chip.on { background: rgba(242,193,78,0.13); border-color: var(--line-gold); color: var(--gold-soft); }
.react-ic { width: 16px; height: 16px; display: block; }

/* — przycisk „zareaguj" + wysuwany picker 5 ikon iOS — */
.chat-react-wrap { position: relative; align-self: center; flex: 0 0 auto; }
.react-add {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: var(--faint); border: 1px solid transparent;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.react-add:hover { color: var(--gold); background: var(--ink-3); border-color: var(--line); }
.react-picker {
  position: absolute; bottom: calc(100% + 6px); z-index: 20;
  display: flex; gap: 2px; padding: 5px;
  background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  box-shadow: var(--shadow);
}
.chat-msg:not(.mine) .react-picker { left: 0; }   /* nie wychodź poza ekran */
.chat-msg.mine .react-picker { right: 0; }
.react-opt { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: background .12s ease; }
.react-opt img { width: 26px; height: 26px; display: block; transition: transform .12s ease; }
.react-opt:hover img { transform: scale(1.25); }
.react-opt.on { background: rgba(242,193,78,0.16); }

/* dwa małe przyciski akcji (odpowiedz + reakcja) w pionie obok wiadomości */
.chat-react-wrap { display: flex; flex-direction: column; gap: 2px; }

/* — @-wzmianki w treści wiadomości — */
.chat-mention { color: var(--gold); font-weight: 700; }
.chat-mention.me { background: rgba(242,193,78,0.18); border-radius: 5px; padding: 0 3px; }

/* — cytat odpowiedzi w wiadomości (jak Messenger/WhatsApp) — */
.chat-reply-quote {
  display: flex; flex-direction: column; gap: 1px; cursor: pointer;
  border-left: 3px solid var(--line-gold); background: rgba(255,255,255,0.04);
  border-radius: 6px; padding: 4px 9px; margin-bottom: 4px; max-width: 100%;
}
.chat-msg.mine .chat-reply-quote { border-left-color: var(--gold); }
.crq-name { font-size: 11.5px; font-weight: 700; color: var(--gold-soft); }
.crq-text { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }

/* podświetlenie bąbelka po kliknięciu „idź do oryginału" */
.chat-msg.flash .chat-bubble { animation: chatFlash 1.2s ease; }
@keyframes chatFlash { 0%, 100% { background: var(--ink-3); } 30% { background: rgba(242,193,78,0.28); } }

/* — pasek tworzenia: cytat odpowiedzi + podpowiedzi @ + pole — */
.chat-compose { position: relative; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-compose .chat-bar { padding-top: 0; border-top: 0; }  /* border/padding są teraz na .chat-compose */
.chat-replybar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  background: var(--ink-3); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--r-sm); padding: 6px 8px 6px 10px; font-size: 12.5px;
}
.crb-ic { color: var(--gold); flex: 0 0 auto; font-weight: 700; }
.crb-txt { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crb-txt b { color: var(--text); }
.crb-x { flex: 0 0 auto; color: var(--faint); width: 22px; height: 22px; border-radius: 50%; }
.crb-x:hover { color: var(--text); background: var(--ink-4); }

/* lista podpowiedzi @ — overlay nad polem wpisywania */
.mention-pop {
  position: absolute; bottom: calc(100% - 4px); left: 0; right: 0; z-index: 25;
  background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  box-shadow: var(--shadow); padding: 4px; max-height: 220px; overflow-y: auto;
}
.mention-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 7px 9px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600;
}
.mention-opt:hover { background: var(--ink-4); }
.chat-av.sm { width: 26px; height: 26px; flex: 0 0 26px; font-size: 11px; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px;
}
.modal-box {
  width: 100%; max-width: 360px;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: 26px 22px; text-align: center; box-shadow: var(--shadow);
  animation: rise 0.3s ease both;
}
.pf-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #1A1405; font-family: var(--font-display); font-size: 28px;
  box-shadow: var(--shadow-gold);
}
/* przyciski zdjęcia profilowego (modal profilu) */
.pf-photo-actions { display: flex; gap: 8px; justify-content: center; align-items: center; margin-bottom: 6px; }
/* input plikowy NIE jest display:none (na Androidzie label nie otwierał wtedy wyboru pliku) —
   nakładamy go przezroczyście na cały przycisk, więc tap trafia bezpośrednio w input */
.pf-file-input { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pf-file-input:disabled { cursor: default; }
.pf-photo-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px;
  padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer; font-size: 13px; font-weight: 600;
  background: var(--ink-4); border: 1px solid var(--line-strong); color: var(--text);
}
.pf-photo-btn:hover { border-color: var(--line-gold); }
.pf-photo-btn.disabled { opacity: 0.6; pointer-events: none; }
.pf-photo-remove { font-size: 13px; color: var(--live); background: none; border: none; cursor: pointer; padding: 7px 6px; }
.pf-photo-remove:hover { color: #ff9aa9; }
.pf-photo-hint { font-size: 11.5px; color: var(--faint); margin-bottom: 16px; line-height: 1.5; }
.pf-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 22px; margin-bottom: 18px; }

/* podgląd profilu innego gracza (z rankingu) */
.vp-box { max-width: 420px; position: relative; }
.vp-x, .lightbox-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink-3); border: 1px solid var(--line-strong); color: var(--text);
  font-size: 15px; line-height: 1; cursor: pointer; z-index: 2;
}
.vp-x:hover { border-color: var(--line-gold); }
.pf-avatar.clickable { cursor: zoom-in; }
.pf-avatar.clickable:hover { box-shadow: 0 0 0 3px var(--line-gold), var(--shadow-gold); }
.vp-rank { font-size: 13.5px; color: var(--muted); margin: -8px 0 16px; }
.vp-rank b { color: var(--gold); }
.vp-stats { margin-bottom: 16px; }
/* typy specjalne w profilu gracza (po deadline) — między statystykami a rozliczonymi typami */
.vp-special { text-align: left; margin: 0 0 16px; padding: 12px 14px; background: var(--ink-2); border: 1px solid var(--line-gold); border-radius: 12px; }
.vp-special-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.vp-sp-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; }
.vp-sp-row .ic { width: 16px; height: 16px; color: var(--gold); flex: 0 0 auto; }
.vp-sp-row .vp-sp-label { color: var(--muted); font-size: 12.5px; flex: 0 0 auto; min-width: 104px; }
.vp-sp-row b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.vp-list-head { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.vp-list { max-height: 46vh; overflow-y: auto; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.vp-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.015);
}
/* delikatna poświata zależna od wyniku typu (zielony / złoty / czerwony) */
.vp-row.pts-3 { background: rgba(0,135,90,0.07);   box-shadow: 0 0 14px rgba(0,135,90,0.20); }
.vp-row.pts-1 { background: rgba(242,193,78,0.07); box-shadow: 0 0 14px rgba(242,193,78,0.18); }
.vp-row.pts-0 { background: rgba(228,0,43,0.07);   box-shadow: 0 0 14px rgba(228,0,43,0.18); }
.vp-match { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vp-match b { font-size: 13.5px; }
.vp-match small { font-size: 10.5px; color: var(--faint); }
.vp-pick { font-family: var(--font-display); font-size: 17px; color: var(--gold); }
.vp-res { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.vp-pts { font-size: 13px; font-weight: 700; min-width: 34px; text-align: right; }
.vp-row.pts-3 .vp-pts { color: var(--win); }
.vp-row.pts-1 .vp-pts { color: var(--gold-soft); }
.vp-row.pts-0 .vp-pts { color: #ff9aa9; }
.vp-pts.pending { color: var(--faint); font-weight: 600; }

/* lightbox powiększonego zdjęcia */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lightbox-img {
  width: min(88vw, 440px); height: auto; max-height: 86vh; border-radius: var(--r); cursor: zoom-out;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6); border: 1px solid var(--line-strong);
}

/* klikalne wiersze rankingu (otwierają profil gracza) */
.rank-row:not(.head) { cursor: pointer; }
.rank-row:not(.head):hover { background: rgba(242,193,78,0.06); }
.modal-box .admin-lbl { text-align: left; }
.pf-logout {
  margin-top: 18px; color: var(--live); font-size: 13.5px; font-weight: 600;
  background: none; border: none;
}
.pf-logout:hover { color: #ff9aa9; }

/* ============================================================
   EDYCJA GODZIN MECZÓW
   ============================================================ */
.time-list { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.time-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 10px;
}
.time-teams { font-size: 13px; flex: 0 0 auto; }
.time-teams b { color: var(--text); }
.time-teams i { color: var(--faint); font-style: normal; }
.time-in { flex: 1; min-width: 180px; height: 40px; padding: 6px 10px; color-scheme: dark; }

/* ============================================================
   FLAGI DRUŻYN
   ============================================================ */
.flag {
  width: 46px; height: 34px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--line-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.match-card .flag { width: 42px; height: 31px; }

/* ranking — rozbicie pod nazwą */
.rk-text { flex-direction: column; align-items: flex-start; gap: 1px; }
.rk-line { display: flex; align-items: center; gap: 8px; }
.rk-sub { font-size: 11px; color: var(--muted); }
/* typ specjalny gracza w rankingu (po deadline): kraj na mistrza + król strzelców */
/* typ specjalny w rankingu: poziomo w jednej linii (kraj + strzelec obok siebie), kurczliwe.
   Kolor szary (jak podlinia „bonus/nieoddane") — celowo NIE złoty, żeby nie konkurował z punktami. */
.rk-special { display: flex; align-items: center; gap: 12px; margin-top: 3px; font-size: 11px; color: var(--muted); font-weight: 600; min-width: 0; max-width: 100%; }
.rk-special > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; }
.rk-special > span > span { overflow: hidden; text-overflow: ellipsis; }
.rk-special .ic { width: 12px; height: 12px; flex: 0 0 auto; }
.rank-row.me .rk-line b::after { content: " (Ty)"; color: var(--muted); font-weight: 400; font-size: 12px; }

/* statystyki w profilu (B3) */
.pf-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 18px;
}
.pf-stats > div {
  background: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 4px; text-align: center;
}
.pf-stats b { display: block; font-family: var(--font-display); font-size: 22px; color: var(--gold); }
.pf-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pf-bonus { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.pf-bonus b { color: var(--gold-soft); }
.pf-bonus.dq { color: #ff9aa9; }

/* ============================================================
   REGULAMIN (markdown)
   ============================================================ */
.markdown-body { font-size: 15px; line-height: 1.65; color: var(--text); overflow-wrap: break-word; }
.markdown-body h1 { font-family: var(--font-display); font-weight: 400; font-size: 26px; text-transform: uppercase; margin: 4px 0 6px; }
.markdown-body h2 { font-family: var(--font-display); font-weight: 400; font-size: 20px; text-transform: uppercase; color: var(--gold-soft); margin: 26px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.markdown-body h3 { font-size: 16px; color: var(--gold); margin: 18px 0 8px; }
.markdown-body p { margin: 0 0 12px; color: var(--text); }
.markdown-body ul, .markdown-body ol { margin: 0 0 14px; padding-left: 22px; }
.markdown-body li { margin-bottom: 6px; }
.markdown-body strong { color: var(--gold-soft); }
.markdown-body hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.markdown-body blockquote {
  border-left: 3px solid var(--line-gold); margin: 0 0 14px; padding: 8px 14px;
  background: rgba(242,193,78,0.06); color: var(--muted); border-radius: 0 8px 8px 0;
}
.markdown-body table { width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; overflow-wrap: break-word; word-break: break-word; }
.markdown-body th { background: var(--ink-3); color: var(--gold-soft); font-weight: 700; }
.markdown-body em { color: var(--muted); }
/* blok kodu (np. dane do przelewu) - zawijaj zamiast rozpychać kontener na mobile */
.markdown-body pre {
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px; margin: 0 0 14px;
  font-size: 12.5px; line-height: 1.55; color: var(--gold-soft);
  white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; overflow-x: auto;
}
.markdown-body pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; }
.markdown-body code { background: var(--ink-3); padding: 2px 6px; border-radius: 5px; font-size: 13px; color: var(--gold-soft); overflow-wrap: anywhere; }
@media (min-width: 760px) { .markdown-body { max-width: 720px; } }

/* ---------- Przycisk "Regulamin" (ekran logowania / prośby o dostęp) ---------- */
.btn-rules {
  margin-top: 14px;
  background: rgba(242, 193, 78, 0.08);
  border: 1px solid var(--line-gold);
  color: var(--gold-soft);
  font-size: 15px;
}
.btn-rules svg { color: var(--gold); }
.btn-rules:hover {
  background: rgba(242, 193, 78, 0.16);
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(242, 193, 78, 0.14);
}

/* ---------- Popup regulaminu ---------- */
.rules-modal {
  max-width: 600px; text-align: left;
  padding: 18px 18px 22px;
  display: flex; flex-direction: column;
  max-height: 86vh; overflow: hidden;
}
.rules-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.rules-modal-title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: 22px; color: var(--gold-soft); margin: 0;
}
.rules-modal-x {
  background: none; border: none; color: var(--muted);
  font-size: 18px; line-height: 1; padding: 6px; cursor: pointer;
}
.rules-modal-x:hover { color: var(--text); }
.rules-modal-body {
  overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-width: 0;
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px;
}

/* ============================================================
   AKCEPTACJA REGULAMINU (brama gracza)
   ============================================================ */
.rules-gate { padding-bottom: 30px; }
.rules-scroll {
  max-height: 52vh; overflow-y: auto; text-align: left;
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; margin-top: 16px;
}
.pa-rules { font-size: 11px; font-weight: 700; }
.pa-rules.ok { color: var(--win); }
.pa-rules.no { color: #ff9aa9; }

/* ============================================================
   ANIMACJA INTRO (logo przy wejściu do gry)
   ============================================================ */
.intro-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background:
    radial-gradient(700px 500px at 50% 40%, rgba(242,193,78,0.14), transparent 60%),
    var(--ink);
  animation: introBg 1.4s ease forwards;
}
.intro-logo {
  width: 180px; height: auto; mix-blend-mode: screen;
  filter: drop-shadow(0 14px 50px rgba(242,193,78,0.5));
  animation: introZoom 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes introBg { 0% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes introZoom {
  0%   { opacity: 0; transform: scale(0.55) rotate(-4deg); }
  28%  { opacity: 1; transform: scale(1) rotate(0deg); }
  68%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 90;
  max-width: 90%; padding: 13px 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  background: var(--ink-4); border: 1px solid var(--line-strong); color: var(--text);
}
.toast.ok  { border-color: var(--win); color: #7fe0bd; background: #11201a; }
.toast.err { border-color: var(--live); color: #ff9aa9; background: #211215; }
@media (min-width: 760px) { .toast { bottom: 28px; } }

/* ============================================================
   ONBOARDING
   ============================================================ */
.onb-wizard { max-width: 440px; }
.onb-step { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.onb-h { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 24px; margin: 14px 0 8px; }
.onb-p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.onb-p b { color: var(--gold-soft); }

/* mockupy wycinków panelu */
.onb-mock {
  width: 100%; background: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--r); padding: 16px; margin-bottom: 4px;
  display: flex; flex-direction: column; gap: 12px;
}
.onb-mock-center { align-items: center; }
.omc-match { display: flex; align-items: center; justify-content: space-between; }
.omc-code {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink-4); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-size: 15px;
}
.omc-score { font-family: var(--font-display); font-size: 28px; color: var(--gold); }
.omc-cta {
  align-self: center; background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1A1405; font-weight: 700; font-size: 13px; padding: 8px 18px; border-radius: var(--r-pill);
}
.omc-cd {
  font-family: var(--font-display); font-size: 26px; color: var(--gold-soft);
  background: var(--ink-3); border: 1px solid var(--line-gold);
  padding: 10px 22px; border-radius: var(--r-pill); letter-spacing: 0.04em;
}
.oms-line { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.oms-line b { color: var(--gold); font-family: var(--font-display); font-size: 18px; }

/* stopka kreatora */
.onb-footer { margin-top: 18px; }
.onb-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 16px; }
.onb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: all 0.2s ease; }
.onb-dot.on { background: var(--gold); width: 22px; border-radius: var(--r-pill); }
.onb-nav { display: flex; gap: 10px; }
.onb-nav .btn { flex: 1; margin-top: 0; }
.onb-final { display: flex; flex-direction: column; gap: 10px; }
.onb-final .btn { margin-top: 0; }
.onb-skip {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: var(--faint); font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
.onb-skip:hover { color: var(--muted); }

/* ============================================================
   HERO — najbliższy mecz
   ============================================================ */
.hero-match {
  background: linear-gradient(150deg, rgba(242,193,78,0.16), var(--ink-3) 70%);
  border: 1px solid var(--line-gold); border-radius: var(--r-lg);
  padding: 16px 18px; margin-bottom: 18px;
  box-shadow: var(--shadow-gold);
}
.hero-match.urgent {
  border-color: var(--live);
  animation: heroPulse 1.6s ease-in-out infinite;
}
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(228,0,43,0.0); }
  50% { box-shadow: 0 0 0 4px rgba(228,0,43,0.18); }
}
.hero-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 14px; }
.hero-soon { color: #ff9aa9; margin-left: 6px; }
.hero-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.hero-team { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.hero-team .flag { width: 54px; height: 40px; }
.hero-team .tname { font-size: 13px; color: var(--text); }
.hero-mid { min-width: 96px; display: flex; justify-content: center; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 13px; color: var(--muted); }
.hero-foot .hero-cd b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.hero-match.urgent .hero-cd b { color: #ff9aa9; }
.hero-save { margin-top: 14px; }

/* ============================================================
   PULA NAGRÓD
   ============================================================ */
.pula-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(150deg, rgba(242,193,78,0.16), var(--ink-3) 75%);
  border: 1px solid var(--line-gold); border-radius: var(--r);
  padding: 14px 18px; margin-bottom: 16px;
}
.pula-left { display: flex; flex-direction: column; }
.pula-amt { font-family: var(--font-display); font-size: 30px; color: var(--gold); line-height: 1; }
.pula-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pula-tiers { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-soft); text-align: right; }
.rank-row.prize { box-shadow: inset 3px 0 0 var(--gold); }
.rk-prize { color: var(--gold-soft); }

/* ============================================================
   DASHBOARD ADMINA
   ============================================================ */
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.dash-grid > div { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 4px; text-align: center; }
.dash-grid b { display: block; font-family: var(--font-display); font-size: 22px; color: var(--gold); }
.dash-grid span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.dash-missing { border-top: 1px solid var(--line); padding-top: 12px; }
.dash-missing-h { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.dash-missing-list { font-size: 14px; color: #ff9aa9; line-height: 1.5; }
.dash-missing-ok { font-size: 14px; color: var(--win); }

/* ============================================================
   WŁASNE OKNO POTWIERDZENIA
   ============================================================ */
.confirm-box { max-width: 360px; }
.confirm-msg { font-size: 15px; line-height: 1.55; margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; margin-top: 0; }

/* Pop-up baner powitalny (lokalny) */
.welcome-popup { max-width: 390px; }
.wp-title { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.02em; color: var(--gold); margin-bottom: 14px; }
.wp-body { text-align: left; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.wp-body p { margin-bottom: 12px; white-space: pre-line; }
.wp-body p:last-child { margin-bottom: 0; }
.wp-body b { color: var(--gold-soft); }
.wp-dont { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; margin: 18px 0 16px; }
.wp-dont input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.wp-close { margin-top: 0; }
.wp-close:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.wp-close:disabled:hover { box-shadow: none; }
.wp-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.wp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: background 0.2s ease; }
.wp-dot.on { background: var(--gold); }

/* Pop-up "brak typu" (auto, wg missedCount) — eskalacja: żółty info → czerwony alert */
.missed-warn { max-width: 380px; }
.missed-warn .mw-icon { margin: 2px auto 12px; display: block; }
.mw-title { font-family: var(--font-display); font-size: 25px; letter-spacing: 0.02em; margin-bottom: 12px; }
.mw-body { text-align: left; font-size: 14.5px; line-height: 1.62; color: var(--text); margin-bottom: 22px; }
.mw-body b { color: var(--gold-soft); }
/* level 1 — spokojny złoty ton (jak reszta apki) */
.missed-warn.mw-warn { border-color: var(--line-gold); }
.missed-warn.mw-warn .mw-icon { color: var(--gold); }
.missed-warn.mw-warn .mw-title { color: var(--gold); }
/* level 2 — czerwony alert: ramka, poświata, akcenty na czerwono */
.missed-warn.mw-danger {
  border-color: rgba(228, 0, 43, 0.55);
  box-shadow: 0 10px 44px rgba(228, 0, 43, 0.28);
}
.missed-warn.mw-danger .mw-icon { color: var(--live); }
.missed-warn.mw-danger .mw-title { color: #ff6b7e; }
.missed-warn.mw-danger .mw-body b { color: #ffb3bd; }

/* Generator pop-upów (panel admina) */
.pg-screen { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; margin-bottom: 10px; }
.pg-screen-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pg-screen-no { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--gold-soft); text-transform: uppercase; }
.pg-del { color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 6px; background: none; border: none; }
.pg-del:hover { color: var(--live); background: rgba(228,0,43,0.1); }
.pg-body { width: 100%; resize: vertical; font-family: inherit; line-height: 1.5; }
.pg-actions { display: flex; gap: 10px; margin-top: 16px; }
.pg-actions .btn { flex: 1; margin-top: 0; }
.pg-status { margin-top: 12px; font-size: 13px; color: var(--muted); }
.pg-status b { color: var(--gold-soft); }

/* ============================================================
   SKELETONY + animacje list
   ============================================================ */
.skel-block { display: flex; flex-direction: column; gap: 10px; }
.skel { background: linear-gradient(90deg, var(--ink-3) 25%, var(--ink-4) 37%, var(--ink-3) 63%); background-size: 400% 100%; border-radius: var(--r-sm); animation: shimmer 1.4s ease infinite; }
.skel-head { height: 28px; width: 60%; }
.skel-row { height: 48px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .hero-match.urgent { animation: none; } }

.rank-row, .reveal-row { animation: rise 0.35s ease both; }

/* ============================================================
   PROŚBY O DOSTĘP (admin)
   ============================================================ */
.req-card { border-color: var(--line-gold); }
.req-badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--live); color: #fff; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; margin-left: 6px;
}
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px;
}
.req-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req-info b { font-size: 14px; }
.req-info span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.req-ok {
  padding: 8px 14px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1A1405; font-weight: 700; font-size: 12.5px; white-space: nowrap;
}

/* link resetu hasła */
.auth-reset {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
.auth-reset:hover { color: var(--gold-soft); }

/* ---------- v1.65: Ewolucja miejsc (wykres SVG) ---------- */
.rank-subtabs { display: flex; gap: 8px; margin: 0 0 14px; }
.rst-btn {
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: none; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.rst-btn:hover { color: var(--paper); }
.rst-btn.active {
  color: var(--gold); background: rgba(242,193,78,0.10); border-color: var(--line-gold);
}
.evo-wrap { display: flex; flex-direction: column; gap: 10px; }
.evo-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.evo-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.evo-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.evo-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--paper);
  font-size: 12.5px; cursor: pointer;
}
.evo-chip b { color: var(--muted); font-weight: 400; margin-left: 2px; }
.evo-chip:hover b { color: var(--paper); }
.evo-pick { position: relative; max-width: 340px; }
.evo-search { width: 100%; }
.evo-pick-list {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow);
}
.evo-pick-opt {
  display: block; width: 100%; text-align: left; padding: 9px 14px; font-size: 14px;
  background: none; border: none; color: var(--paper); cursor: pointer;
}
.evo-pick-opt:hover { background: rgba(255,255,255,0.06); }
.evo-pick-opt.on { color: var(--gold); }
.evo-pick-none { padding: 9px 14px; font-size: 13px; color: var(--muted); margin: 0; }
.evo-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: 14px;
}
.evo-svg { display: block; cursor: crosshair; touch-action: pan-x; }
.evo-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.evo-line.ghost { stroke: rgba(255,255,255,0.10); stroke-width: 1.25; }
.evo-line.accent { stroke-width: 2.75; filter: drop-shadow(0 0 5px rgba(0,0,0,0.45)); }
.evo-grid { stroke: rgba(255,255,255,0.06); }
.evo-ylab { fill: rgba(255,255,255,0.55); font-size: 10px; text-anchor: end; }
.evo-xlab { fill: rgba(255,255,255,0.42); font-size: 10px; text-anchor: middle; }
.evo-focusline { stroke: rgba(255,255,255,0.28); stroke-dasharray: 3 3; }
.evo-info {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px;
}
.evo-info-h { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--gold); }
.evo-info-row {
  margin: 3px 0; font-size: 13.5px; color: var(--paper);
  display: flex; align-items: center; gap: 8px;
}
.evo-info-row b { margin-left: auto; font-weight: 600; color: var(--muted); }

/* ---------- v1.65: karta Robot (admin) ---------- */
.robot-badge {
  margin-left: 10px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px; vertical-align: middle;
}
.robot-badge.on { color: #7ee2a0; background: rgba(110,220,150,0.12); border: 1px solid rgba(110,220,150,0.35); }
.robot-badge.off { color: var(--muted); background: rgba(255,255,255,0.05); border: 1px solid var(--line); }

/* ---------- v1.71: dziennik robota (admin) ---------- */
.robot-log { margin-top: 14px; }
.robot-log-h { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.robot-log-list {
  max-height: 220px; overflow-y: auto;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px;
}
.robot-log-row { margin: 4px 0; font-size: 12.5px; display: flex; gap: 10px; align-items: baseline; }
.rl-when { color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.rl-msg { color: var(--paper); }
