/* Układ aplikacji: telefon najpierw, tablet i PC jako rozszerzenia (docs/PLAN.md, rozdz. 7). */

.muted { color: var(--text-muted); }
.plain { margin: 0; padding-left: 1.1em; }
.plain li + li { margin-top: var(--space-1); }

/* Tablica LED */
.led {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-s);
  background: #0E1511;
  color: var(--led);
  font: 800 var(--step-0)/1.3 var(--font-led);
  letter-spacing: 0.06em;
  text-shadow: 0 0 6px rgba(255, 178, 26, 0.55);
  white-space: nowrap;
}

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--quiet { color: var(--text); border-color: var(--line); }
.btn--quiet:hover { background: var(--surface-stripe); }

.notice {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--led);
  background: var(--surface);
}

/* Start */
.start { max-width: 640px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6); }
.start__head { margin-bottom: var(--space-5); }
.start__head h1 { font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem); margin: var(--space-3) 0 var(--space-2); }
.start__head p { margin: 0; }
.slots { list-style: none; margin: 0 0 var(--space-4); padding: 0; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; }
.slot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.slot__body { display: flex; flex-direction: column; flex: 1 1 140px; min-width: 0; }
.slot__title { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); }
.slot__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.import { cursor: pointer; }

/* Pasek z tytułem */
.bar { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.bar__title { margin: 0; font-size: var(--step-2); }

/* Wybór klubu */
.pick { max-width: 720px; margin: 0 auto; padding-bottom: var(--space-6); }
.pick__hint { padding: 0 var(--space-4); margin: var(--space-3) 0; font-size: var(--step--1); }
.seg { display: flex; margin: 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg__btn {
  flex: 1;
  min-height: var(--tap);
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  cursor: pointer;
}
.seg__btn[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
.club-list { list-style: none; margin: 0; padding: 0; }
.club-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 60px;
  padding: var(--space-2) var(--space-4);
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.club-row:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.club-row__name { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.15; }
.club-row__meta { display: flex; align-items: center; gap: var(--space-2); flex: none; }
.tag {
  padding: 1px 6px;
  border-radius: var(--radius-s);
  background: #0E1511;
  color: var(--led);
  font: 700 var(--step--1)/1.4 var(--font-display);
}
.strength { font-size: var(--step--1); color: var(--text-muted); min-width: 72px; text-align: right; }
.strength[data-level="Faworyt"] { color: var(--accent); font-weight: 600; }

/* Główny ekran */
.hub { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.hub__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  padding-top: max(var(--space-3), env(safe-area-inset-top));
  position: sticky; top: 0; z-index: 20; /* nagłówek stoi w miejscu; jego wysokość w --hub-top (app.js) */
  background: var(--murawa);
  background-image: repeating-linear-gradient(90deg, transparent 0 48px, rgba(255, 255, 255, 0.05) 48px 96px);
  color: var(--kreda);
}
.hub__club { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hub__club .muted { color: color-mix(in srgb, var(--kreda) 75%, transparent); font-size: var(--step--1); }
.hub__name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub__date { font-size: var(--step--1); }
.hub__main { padding: var(--space-4); padding-bottom: calc(var(--nav-h) + var(--space-5)); max-width: 960px; width: 100%; }

.panel { padding: var(--space-4); margin-bottom: var(--space-4); background: var(--surface); border-radius: var(--radius-m); }
.panel p { margin: 0 0 var(--space-2); }
.panel__lead { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); line-height: 1.15; }

/* Nawigacja: dolny pasek na telefonie */
.nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: grid;
  grid-auto-flow: column; /* wszystkie zakładki w jednym rzędzie (7 z zakładką Klub) */
  grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.nav__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: 600 11px/1.1 var(--font-body);
  text-align: center;
  cursor: pointer;
}
.nav__btn .ico { width: 24px; height: 24px; }
@media (max-width: 420px) { .nav__btn { font-size: 10px; letter-spacing: -0.01em; } .nav__btn .ico { width: 22px; height: 22px; } }
.nav__btn[aria-current="page"] { color: var(--accent); }
.nav__btn[data-tab="mecz"] .ico {
  width: 40px;
  height: 40px;
  padding: 7px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 0 4px var(--surface);
}

/* Tablet i telefon poziomo */
@media (min-width: 600px) {
  .hub__main { padding: var(--space-5); padding-bottom: calc(var(--nav-h) + var(--space-5)); }
  .nav__btn { font-size: 12px; }
}

/* PC: boczny pasek nawigacji */
@media (min-width: 1024px) {
  .hub { grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; }
  .hub__head { grid-column: 1 / -1; }
  .nav {
    position: sticky;
    inset: auto;
    top: var(--hub-top, 0px); /* pod nagłówkiem; po inset, bo inset: auto kasował top */
    max-height: calc(100dvh - var(--hub-top, 0px));
    overflow-y: auto;
    height: auto;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-3);
    background: none;
    border-top: 0;
    border-right: 1px solid var(--line);
    min-height: calc(100dvh - var(--hub-top, 64px));
  }
  .nav__btn {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-3);
    min-height: var(--tap);
    padding: 0 var(--space-3);
    border-radius: var(--radius-s);
    font: 600 var(--step-0)/1 var(--font-body);
  }
  .nav__btn:hover { background: var(--surface-stripe); }
  .nav__btn[aria-current="page"] { background: var(--surface); color: var(--accent); }
  .nav__btn[data-tab="mecz"] .ico { width: 24px; height: 24px; padding: 0; margin: 0; background: none; color: inherit; box-shadow: none; }
  .hub__main { padding: var(--space-5) var(--space-6); }
}

/* ---------- Upływ dni: przycisk Dalej / Zagraj mecz ---------- */
.nav { grid-template-columns: repeat(6, 1fr); }
.nav__btn { position: relative; }
.nav__btn[data-tab="mecz"] .ico { all: unset; }
.go-wrap {
  position: fixed; z-index: 11; left: 0; right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-top: 1px solid var(--line);
}
.go {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: 52px; padding: 6px var(--space-4);
  border: 0; border-radius: var(--radius-s); cursor: pointer;
  background: var(--accent); color: var(--accent-text);
}
.go__label { font: 700 var(--step-1)/1.1 var(--font-display); }
.go__sub { font-size: var(--step--1); opacity: .85; }
.go--play { background: #0E1511; color: var(--led); box-shadow: 0 0 0 2px var(--led) inset; }
.go--play .go__label { font-family: var(--font-led); font-weight: 800; letter-spacing: .04em; }
.go--decide { background: var(--kartka-zolta); color: #14211A; }
.go--stop { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.hub__main { padding-bottom: calc(var(--nav-h) + 96px); }

.badge {
  position: absolute; top: 6px; left: 50%; margin-left: 6px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--kartka-czerwona); color: #fff; font: 700 11px/18px var(--font-body);
}

.ticker {
  position: fixed; z-index: 11; left: 0; right: 0;
  bottom: calc(var(--nav-h) + 70px + env(safe-area-inset-bottom));
  padding: 0 var(--space-4); text-align: center;
  font-size: var(--step--1); color: var(--text-muted); pointer-events: none;
}

/* ---------- Poczta ---------- */
.mail-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.mail-head h2 { margin: 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: var(--space-2); margin-bottom: var(--space-2); scrollbar-width: none; }
.chip {
  flex: none; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font: 600 var(--step--1)/1 var(--font-body); cursor: pointer; white-space: nowrap;
}
.chip b { margin-left: 4px; color: var(--kartka-czerwona); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip[aria-pressed="true"] b { color: var(--led); }
/* ================= Poczta (src/app.js, renderMail) =================
   Lista: avatar kategorii w jej kolorze, nadawca i data, temat (do 2 linii), zajawka treści.
   Czytanie: kategoria, temat w kroju nagłówkowym, „Od” i „Nadano” (dzień tygodnia i data), treść w akapitach.
   PC: lista i wiadomość obok siebie; telefon: lista albo wiadomość. */
.mailx { --mc: #4A5A52; }
.mail-head h2 small { margin-left: 8px; font: 400 var(--step--1)/1 var(--font-body); }
.mail-row, .mail-view { --mc: #4A5A52; }
[data-cat="board"] { --mc: #6B4FB0; } [data-cat="staff"] { --mc: #2D6A8F; } [data-cat="players"] { --mc: #2E8A4E; } [data-cat="transfers"] { --mc: #C98A12; }
[data-cat="competitions"] { --mc: #1E5AA8; } [data-cat="national"] { --mc: #D62839; } [data-cat="media"] { --mc: #8A5A00; } [data-cat="club"] { --mc: #4A5A52; }
.mail-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.mail-list > li + li { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.mail-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 12px; width: 100%; padding: 12px 14px 12px 12px;
  border: 0; border-left: 3px solid transparent; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.mail-row:hover { background: color-mix(in srgb, var(--mc) 7%, transparent); }
.mail-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.mail-row--unread { border-left-color: var(--mc); background: color-mix(in srgb, var(--mc) 5%, transparent); }
.mail-row.is-open { background: color-mix(in srgb, var(--mc) 14%, var(--surface)); border-left-color: var(--mc); }
.mail-row__av { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--mc) 20%, var(--surface)); color: color-mix(in srgb, var(--mc) 75%, var(--text)); font: 700 13px/1 var(--font-display); letter-spacing: .04em; }
.mail-row__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mail-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mail-row__from { min-width: 0; font-size: var(--step--1); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row--unread .mail-row__from { color: var(--text); font-weight: 600; }
.mail-row__date { flex: none; font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-row--unread .mail-row__date { color: color-mix(in srgb, var(--mc) 70%, var(--text)); font-weight: 600; }
.mail-row__subj { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 600 var(--step-0)/1.25 var(--font-display); letter-spacing: .01em; overflow-wrap: anywhere; }
.mail-row--unread .mail-row__subj { font-weight: 700; }
.mail-row__snip { font-size: 12.5px; line-height: 1.35; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; font: 700 10.5px/1.6 var(--font-body); letter-spacing: .02em; vertical-align: 2px; color: #fff; background: var(--kartka-czerwona); }
.mail-tag--imp { color: #1C1404; background: var(--led); }
.mail-empty { padding: var(--space-4); color: var(--text-muted); }
.mail-pick { margin: 0; padding: var(--space-6) var(--space-4); text-align: center; color: var(--text-muted); border: 1px dashed var(--line); border-radius: var(--radius-m); }
.mail-view { padding: var(--space-4) var(--space-5) var(--space-5); background: var(--surface); border-radius: var(--radius-m); border-top: 4px solid var(--mc); }
.mail-back { margin-bottom: var(--space-3); }
.mail-view__nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-3); }
.mail-view__nav .mail-back { margin-bottom: 0; }
.mail-view__head { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.mail-view__head .mail-row__av { width: 46px; height: 46px; font-size: 15px; }
.mail-view__cat { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.mail-cat { font: 700 12px/1 var(--font-display); letter-spacing: .06em; color: color-mix(in srgb, var(--mc) 75%, var(--text)); }
.mail-view h2 { margin: 0 0 8px; font: 700 var(--step-2)/1.15 var(--font-display); overflow-wrap: anywhere; }
.mail-view__from { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; font-size: var(--step--1); color: var(--text-muted); }
.mail-view__from b { color: var(--text); font-weight: 600; }
.mail-view__body { max-width: 68ch; margin-top: var(--space-4); font-size: 1.02rem; line-height: 1.65; overflow-wrap: anywhere; hyphens: auto; }
.mail-view__body p { margin: 0 0 .9em; }
.mail-view__body ul { margin: 0 0 .9em; padding-left: 1.2em; }
.mail-view__body li { margin: .2em 0; }
.mail-decide { margin-top: var(--space-4); padding: 12px 14px 14px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--led) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--led) 45%, var(--line)); }
.mail-decide h3 { margin: 0 0 8px; font: 700 var(--step-0)/1.1 var(--font-display); }
.mail-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.mail-chosen { margin: var(--space-3) 0 0; padding: 8px 12px; border-radius: var(--radius-s); background: color-mix(in srgb, #2E8A4E 12%, transparent); font-size: var(--step--1); }
.mail-view__foot { margin: var(--space-4) 0 0; }
.mailx__panes { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.mailx:not(.is-reading) .mailx__read { display: none; }
.mailx.is-reading .mail-list, .mailx.is-reading .chips, .mailx.is-reading .mailx__hint { display: none; }
.mailx__hint { margin-top: calc(var(--hub-top, 0px) + var(--space-3)); }
@media (min-width: 1100px) {
  .hub__main:has(.mailx) { max-width: 1840px; }
  .mailx__panes { grid-template-columns: minmax(420px, 1fr) minmax(0, 1.35fr); align-items: start; } /* lista szersza, podgląd węższy */
  .mailx .mail-list { height: calc(100dvh - var(--hub-top, 0px) - var(--mail-off, 190px)); overflow: auto; position: sticky; top: calc(var(--hub-top, 0px) + var(--space-3)); }
  .mailx:not(.is-reading) .mailx__read { display: block; }
  .mailx.is-reading .mail-list, .mailx.is-reading .chips, .mailx.is-reading .mailx__hint { display: revert; }
  .mailx.is-reading .mail-list { display: block; }
  .mailx .chips { display: flex; }
  .mail-back { display: none; }
  .mail-view__nav:not(:has(.btn:not(.mail-back))) { display: none; }
  .mailx .mail-view { position: sticky; top: calc(var(--hub-top, 0px) + var(--space-3)); }
}

@media (min-width: 1024px) {
  .go-wrap { position: static; padding: 0; background: none; border: 0; margin-left: var(--space-4); }
  .go { min-height: 48px; min-width: 220px; }
  .go--play { box-shadow: 0 0 0 2px var(--led) inset; }
  .hub__main { padding-bottom: var(--space-6); }
  .ticker { bottom: var(--space-4); left: 220px; }
  .badge { position: static; margin-left: auto; }
}

/* ---------- Kadra ---------- */
.sq { background: var(--surface); border-radius: var(--radius-m); overflow: hidden; }
.sq__row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
  width: 100%; min-height: 56px; padding: 6px var(--space-3); border: 0; background: none; text-align: left; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.sq__row:nth-child(even) { background: var(--surface-stripe); }
.sq__row:hover:not(.sq__head) { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.sq__row .w { display: none; }
.sq__head { min-height: 36px; cursor: default; font-size: var(--step--1); color: var(--text-muted); font-weight: 600; }
.sq__name { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.sq__name > span { display: flex; flex-direction: column; min-width: 0; }
.sq__name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq__name small { font-size: var(--step--1); color: var(--text-muted); }
.sq__ovr { display: flex; flex-direction: column; align-items: flex-end; }
.sq__ovr b { font: 700 var(--step-1)/1 var(--font-display); }
.pos { display: inline-grid; place-items: center; min-height: 26px; padding: 0 4px; border-radius: var(--radius-s); font: 700 12px/1 var(--font-display); color: #fff; white-space: nowrap; }
.pos[data-g="GK"] { background: var(--gk); } .pos[data-g="DEF"] { background: #2D6A8F; }
.pos[data-g="MID"] { background: var(--murawa); } .pos[data-g="ATT"] { background: #A8323E; }
.stars { color: var(--led); font-size: 11px; letter-spacing: 1px; }
.stars__off { color: var(--line); }
.mdot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.mdot[data-m="hi"] { background: #2E8A4E; } .mdot[data-m="mid"] { background: #9FB0A5; } .mdot[data-m="lo"] { background: var(--kartka-czerwona); }

/* Profil zawodnika */
.pp { display: flex; gap: var(--space-4); align-items: flex-start; margin: var(--space-4) 0; }
.pp__ovr { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pp__ovr .led { font-size: var(--step-3); padding: 6px 12px; }
.pp__name { margin: 0 0 var(--space-1); font-size: var(--step-3); }
.pp p { margin: 0 0 2px; font-size: var(--step--1); }
.pp__cols h3 { margin: var(--space-4) 0 var(--space-2); }
.attrs { list-style: none; margin: 0; padding: 0; }
.attrs li { display: grid; grid-template-columns: 1fr 90px 28px; align-items: center; gap: var(--space-2); padding: 5px 0; border-bottom: 1px solid var(--line); font-size: var(--step--1); }
.attrs b { text-align: right; font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.abar { height: 6px; border-radius: 3px; background: var(--surface-stripe); overflow: hidden; }
.abar i { display: block; height: 100%; }
[data-b="top"] { color: #1E7A43; } .abar i[data-b="top"] { background: #1E7A43; }
[data-b="good"] { color: #2E8A4E; } .abar i[data-b="good"] { background: #4CA36B; }
[data-b="mid"] { color: var(--text); } .abar i[data-b="mid"] { background: #9FB0A5; }
[data-b="low"] { color: var(--kartka-czerwona); } .abar i[data-b="low"] { background: var(--kartka-czerwona); }

@media (min-width: 760px) {
  .sq__row { grid-template-columns: 56px minmax(0, 1fr) 50px 52px 110px 120px 80px; }
  .sq__row .w { display: block; }
  .sq__name small { display: none; }
  .pp__cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
}

/* Listy etykieta-wartość (profil, studio) */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; gap: var(--space-3); align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.plain-list .k { flex: none; min-width: 84px; color: var(--text-muted); font-size: var(--step--1); }
.hub__main, .hub__head { min-width: 0; }
.hub__club { overflow: hidden; }

/* ---------- Skład i taktyka ---------- */
.subtabs { display: flex; gap: 2px; margin-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.subtabs button { flex: 1; min-height: 44px; border: 0; background: none; font: 700 var(--step-0)/1 var(--font-display); color: var(--text-muted); border-bottom: 3px solid transparent; cursor: pointer; }
.subtabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tac {
  display: grid; gap: var(--space-4); margin-bottom: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "form" "pitch" "strength" "lists" "detail";
}
.tac > *, .tac__aside > * { min-width: 0; }
.tac__form { grid-area: form; }
.tac__pitch { grid-area: pitch; display: flex; flex-direction: column; gap: var(--space-2); }
.tac__lists { grid-area: lists; }
.tac__aside { display: contents; }
.tac__strength { grid-area: strength; }
.tac__strength h3 { margin: 0 0 var(--space-2); }
.tac__form .hint { margin: 0; }
.chips--wrap { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
/* Telefon: formacje w jednym rzędzie nad boiskiem, przewijane palcem */
@media (max-width: 759px) {
  .chips--wrap { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--space-2); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .chips--wrap .chip { flex: none; scroll-snap-align: start; }
}
.tac__msg { min-height: 2.9em; margin: 0; font-size: var(--step--1); color: var(--text-muted); text-align: center; text-wrap: balance; }
.tac__msg.is-msg { color: var(--text); font-weight: 600; }
.pitch2 {
  position: relative; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 68 / 100; border-radius: var(--radius-m);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23F3F6F1' stroke-opacity='.8' stroke-width='.45'%3E%3Crect x='3' y='2.5' width='62' height='95'/%3E%3Cline x1='3' y1='50' x2='65' y2='50'/%3E%3Ccircle cx='34' cy='50' r='8.5'/%3E%3Crect x='14' y='2.5' width='40' height='16'/%3E%3Crect x='25' y='2.5' width='18' height='5.5'/%3E%3Crect x='14' y='81.5' width='40' height='16'/%3E%3Crect x='25' y='92' width='18' height='5.5'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat,
    repeating-linear-gradient(180deg, var(--murawa) 0 8.33%, var(--murawa-jasna) 8.33% 16.66%);
}
.slot-btn {
  position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 64px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--kreda);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.slot-btn__dot {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--home, #F3F6F1); color: #14211A; font: 700 14px/1 var(--font-display);
  border: 3px solid #2E8A4E; box-shadow: 0 2px 4px rgba(0,0,0,.35);
}
.slot-btn--gk .slot-btn__dot { background: var(--gk-kit); color: var(--gk-kit-text); }
.slot-btn--mid .slot-btn__dot { border-color: var(--kartka-zolta); }
.slot-btn--bad .slot-btn__dot { border-color: var(--kartka-czerwona); }
.slot-btn--empty .slot-btn__dot { background: transparent; color: var(--kreda); border: 2px dashed var(--kreda); }
.slot-btn.is-sel .slot-btn__dot { outline: 3px solid var(--led); outline-offset: 2px; }
.slot-btn:focus-visible { outline: 0; }
.slot-btn:focus-visible .slot-btn__dot { outline: 3px solid var(--focus); outline-offset: 2px; }
.slot-btn__name { max-width: 64px; padding: 0 3px; border-radius: 3px; background: rgba(14,21,17,.6); font: 600 11px/1.3 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-btn__c { position: absolute; top: -4px; right: 10px; width: 16px; height: 16px; border-radius: 50%; background: var(--led); color: #14211A; font: 800 10px/16px var(--font-display); }
.tac__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
/* Opis formacji i przycisk „Instrukcje indywidualne” nad boiskiem */
.tac__hintrow { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; } /* przycisk pod opisem, nad boiskiem */
.tac__hintrow .hint { margin: 0; }
@media (min-width: 1100px) {
  /* PC: opis formacji w jednej linii (pełny tekst w podpowiedzi), przycisk w drugiej, boisko trochę niżej */
  .tac__hintrow { min-width: 0; margin-bottom: 10px; gap: 14px; }
  .tac__hintrow > .btn { align-self: center; } /* przycisk na środku nad boiskiem */
  .tac__hintrow .hint { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Menu „Poproś asystenta”: sposób ustawienia składu (AUTO_MODES w src/engine/lineup.js) */
.tac__auto { position: relative; }
.tac__auto > summary { list-style: none; cursor: pointer; }
.tac__auto > summary::-webkit-details-marker { display: none; }
.tac__auto > summary::after { content: ''; display: inline-block; margin-left: 8px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.tac__auto[open] > summary::after { transform: translateY(-2px) rotate(180deg); }
.tac__auto-menu {
  /* position: fixed, miejsce liczy app.js (toggle): lewa kolumna PC ma własne przewijanie i ucinałaby menu absolutne */
  position: fixed; z-index: 70; width: min(300px, calc(100vw - 32px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  display: grid; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 10px 28px rgb(0 0 0 / .28);
}
.tac__auto-menu button { display: grid; gap: 2px; padding: 8px 10px; border: 0; border-radius: var(--radius-s); background: none; color: var(--text); text-align: left; cursor: pointer; min-height: 44px; }
.tac__auto-menu button:hover, .tac__auto-menu button:focus-visible { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tac__auto-menu b { font-size: 14px; }
.tac__auto-menu small { font-size: 12px; color: var(--text-muted); }
/* „Analizy meczów” (src/ui/postMatchView.js): liczba analiz i kropka, gdy problem wraca w 3 z 5 ostatnich meczów */
.tac__ma { display: inline-flex; align-items: center; gap: 6px; }
.tac__ma-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--surface-stripe); font: 700 12px/1 var(--font-display); }
.tac__ma-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--kartka-czerwona); }
.tac h3 .muted { font: 400 var(--step--1) var(--font-body); }
.notice--err { border-left-color: var(--kartka-czerwona); }
.zones { list-style: none; margin: 0; padding: 0; }
.zones li { display: grid; grid-template-columns: 80px 1fr 40px; gap: var(--space-2); align-items: center; padding: 4px 0; font-size: var(--step--1); }
.zones b { text-align: right; font: 700 var(--step-0)/1 var(--font-display); }

/* Listy: Na boisku, Ławka, Poza kadrą meczową */
.tp-sec + .tp-sec { margin-top: var(--space-4); }
.tp-sec h3 { margin: 0 0 var(--space-2); }
.tp-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; }
.tp-row { position: relative; display: flex; align-items: stretch; }
.tp-row:nth-child(even) { background: var(--surface-stripe); }
.tp-row.is-sel { background: color-mix(in srgb, var(--led) 24%, var(--surface)); box-shadow: inset 4px 0 0 var(--led); }
.tp-row.is-off { opacity: .6; }
.tp-row__main {
  flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: var(--space-2); align-items: center;
  min-height: 48px; padding: 0 var(--space-3) 0 0; border: 0; background: none; text-align: left; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.tp-row__main:focus-visible { outline-offset: -3px; }
.tp-handle { display: flex; align-items: center; gap: 4px; align-self: stretch; padding-left: 4px; touch-action: none; cursor: grab; }
.tp-handle .pos { min-width: 44px; }
.tp-grip {
  width: 14px; height: 22px; flex: none; color: var(--text-muted); opacity: .75;
  background: radial-gradient(circle, currentColor 1.3px, transparent 1.7px) center / 7px 7px;
}
.tp-handle--none { cursor: default; }
.tp-handle--none .tp-grip { visibility: hidden; }
.tp-row__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tp-row__name small { display: block; font-weight: 400; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; }
.tp-off { color: var(--bad-text); }
.tp-fit { color: var(--text-muted); }
.tp-fit[data-fit="mid"] { color: var(--warn-text); }
.tp-fit[data-fit="bad"] { color: var(--bad-text); }
.tp-c { margin-left: 4px; padding: 0 4px; border-radius: 3px; background: var(--led); color: #14211A; font: 800 11px/16px var(--font-display); text-decoration: none; vertical-align: 1px; }
.tp-row__main b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.tp-row__main b { min-width: 2.2em; text-align: right; }
.tp-cond { display: flex; align-items: center; gap: 5px; }
/* Kondycja w % obok paska (PC; telefon bez zmian) */
.tp-pct { display: none; min-width: 34px; text-align: right; font: 600 12px/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--text-muted); }
.tp-pct[data-b="mid"] { color: var(--warn-text); }
.tp-pct[data-b="low"] { color: var(--bad-text); }
@media (min-width: 1100px) { .tp-pct { display: inline; } }
/* Morale strzałką (PC): 5 zielona w górę, 4 jasnozielona ukośnie w górę, 3 szara w bok, 2 pomarańczowa ukośnie w dół, 1 czerwona w dół */
.tp-marr { display: none; width: 16px; height: 16px; flex: none; }
.tp-marr[data-l="5"] { color: #13843F; }
.tp-marr[data-l="4"] { color: #3FA35F; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tp-marr[data-l="5"] { color: #2FB463; }
  :root:not([data-theme="light"]) .tp-marr[data-l="4"] { color: #7FC98F; }
}
:root[data-theme="dark"] .tp-marr[data-l="5"] { color: #2FB463; }
:root[data-theme="dark"] .tp-marr[data-l="4"] { color: #7FC98F; }
.tp-marr[data-l="3"] { color: var(--text-muted); }
.tp-marr[data-l="2"] { color: #F08A24; }
.tp-marr[data-l="1"] { color: var(--kartka-czerwona); }
@media (min-width: 1100px) {
  .tp-cond .tp-marr { display: block; }
  .tp-cond .mdot { display: none; }
}
.tp-fresh { position: relative; width: 5px; height: 22px; border-radius: 2px; background: color-mix(in srgb, var(--text-muted) 30%, transparent); overflow: hidden; }
.tp-fresh::after { content: ""; position: absolute; inset: auto 0 0 0; height: var(--f); background: #4CA36B; }
.tp-fresh[data-b="mid"]::after { background: var(--kartka-zolta); }
.tp-fresh[data-b="low"]::after { background: var(--kartka-czerwona); }
.tp-row--empty .tp-row__name { color: var(--text-muted); font-weight: 400; font-style: italic; }
.tp-row__x, .tp-row__i { flex: none; width: 44px; border: 0; border-left: 1px solid var(--line); background: none; font: 700 20px/1 var(--font-display); color: var(--text-muted); cursor: pointer; }
.tp-row__x--none { cursor: default; }
.tp-row__i { width: 40px; font: italic 700 15px/1 Georgia, 'Times New Roman', serif; }
.tp-row__i[aria-expanded="true"] { background: var(--accent); color: var(--accent-text); }
.tp-row__x:hover, .tp-row__i:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tp-add .tp-row__main { grid-template-columns: 66px minmax(0, 1fr); color: var(--text-muted); }
.tp-add { background: none !important; box-shadow: inset 0 0 0 1px var(--line); border-radius: 0 0 var(--radius-m) var(--radius-m); }
.tp-add__plus { justify-self: center; font: 700 22px/1 var(--font-display); }
.tp-add .tp-row__name { font-weight: 600; }
.tp-dropnote { display: none; margin: 0 0 var(--space-2); padding: var(--space-3); border: 2px dashed var(--line); border-radius: var(--radius-m); text-align: center; font-size: var(--step--1); color: var(--text-muted); }

/* Przeciąganie */
body.is-tdragging, body.is-tdragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.tac.is-dragging .is-nodrop { opacity: .4; }
.tac.is-dragging .tp-row.is-src, .tac.is-dragging .slot-btn.is-src { opacity: .45; }
.tac.is-dragging .slot-btn.is-cand .slot-btn__dot { outline: 2px dashed rgba(243, 246, 241, .85); outline-offset: 3px; }
.tac .slot-btn.is-over .slot-btn__dot { outline: 3px solid var(--led); outline-offset: 3px; transform: scale(1.15); }
.tac .slot-btn.is-over.is-bad .slot-btn__dot { outline-color: var(--kartka-czerwona); transform: none; }
.tp-row.is-over { background: color-mix(in srgb, var(--led) 22%, var(--surface)); box-shadow: inset 0 0 0 2px var(--led); }
.tp-row.is-over.is-bad { background: color-mix(in srgb, var(--kartka-czerwona) 14%, var(--surface)); box-shadow: inset 0 0 0 2px var(--kartka-czerwona); }
.tac.is-dragging .tp-add.is-cand { box-shadow: inset 0 0 0 2px var(--led); color: var(--text); }
.tac.is-dragging .tp-out.is-cand .tp-dropnote { display: block; border-color: var(--led); color: var(--text); }
.tp-out.is-over .tp-dropnote { background: color-mix(in srgb, var(--led) 22%, var(--surface)); border-style: solid; }
.tdrag {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  display: grid; grid-template-columns: auto minmax(0, auto); column-gap: var(--space-2); align-items: center;
  max-width: 260px; padding: 6px 12px 6px 6px; border: 2px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--text); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); font-weight: 600;
}
.tdrag.is-ok { border-color: var(--led); }
.tdrag.is-bad { border-color: var(--kartka-czerwona); }
.tdrag__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tdrag__why { grid-column: 1 / -1; margin-top: 4px; font-weight: 400; font-size: var(--step--1); color: var(--bad-text); }
.tdrag__why:empty { display: none; }
.tdrag--anim { animation: tdrag-in 120ms ease-out; }
@keyframes tdrag-in { from { opacity: 0; scale: .9; } }

/* Panel atrybutów zawodnika */
.tdet { grid-area: detail; position: static; width: auto; max-width: none; height: auto; margin: 0; padding: 0; border: 0; border-radius: var(--radius-m); background: var(--surface); color: var(--text); }
.tdet__in { padding: var(--space-4); }
.tdet__head { display: grid; grid-template-columns: auto auto 1fr; gap: var(--space-2) var(--space-3); align-items: center; }
.tdet__head .pos { min-height: 30px; padding: 0 8px; font-size: 14px; }
.tdet__head .tdet__x { justify-self: end; }
.tdet__ovr { font-size: var(--step-1); padding: 6px 10px; }
.tdet__title { grid-column: 1 / -1; }
.tdet__title h3 { margin: 0; font-size: var(--step-2); }
.tdet__title p { margin: 2px 0 0; font-size: var(--step--1); color: var(--text-muted); }
.tdet__x { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-s); background: none; color: var(--text); font: 700 24px/1 var(--font-display); cursor: pointer; }
.tdet__x:hover { background: var(--surface-stripe); }
.tdet__facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2) var(--space-3); margin: var(--space-3) 0 0; padding: var(--space-3) 0; border-block: 1px solid var(--line); }
.tdet__facts > div:nth-child(-n + 2) { grid-column: 1 / -1; display: flex; gap: var(--space-2); align-items: baseline; }
.tdet__facts dt { font-size: var(--step--1); color: var(--text-muted); }
.tdet__facts dd { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.tdet__facts dd .abar { flex: 1; min-width: 24px; max-width: 60px; }
.tdet__facts .is-bad dd { color: var(--bad-text); }
.tdet__groups h4 { margin: var(--space-3) 0 var(--space-1); font: 700 var(--step-0)/1.1 var(--font-display); break-after: avoid; }
.tdet__groups .attrs { break-inside: avoid; }
.tdet__groups .attrs li { grid-template-columns: minmax(0, 1fr) 72px 24px; padding: 3px 0; }
.tdet:modal {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 88dvh; overflow: auto; overscroll-behavior: contain;
  border-radius: 14px 14px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .35); padding-bottom: env(safe-area-inset-bottom);
}
.tdet::backdrop { background: rgba(14, 21, 17, .62); }
.tdet-empty { display: none; }
/* Ciemny motyw: jaśniejsze zielenie wartości atrybutów w panelu (kontrast 6-9:1 zamiast 2.8-3.4:1). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tdet b[data-b="top"] { color: #7FDCA0; }
  :root:not([data-theme="light"]) .tdet b[data-b="good"] { color: #5BC27E; }
}
:root[data-theme="dark"] .tdet b[data-b="top"] { color: #7FDCA0; }
:root[data-theme="dark"] .tdet b[data-b="good"] { color: #5BC27E; }
@media (prefers-reduced-motion: no-preference) {
  .tdet:modal { animation: tdet-up 180ms ease-out; }
  @keyframes tdet-up { from { transform: translateY(32px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .tdrag--anim { animation: none; }
  .tac .slot-btn.is-over .slot-btn__dot { transform: none; }
}

/* Tablet i mały PC: boisko po lewej, siła składu i listy po prawej, atrybuty w oknie */
@media (min-width: 760px) {
  .tac {
    grid-template-columns: minmax(260px, 42%) minmax(0, 1fr); column-gap: var(--space-5);
    grid-template-areas: "form form" "pitch strength" "pitch lists"; grid-template-rows: auto auto 1fr;
  }
  .tdet:modal { inset: 0; margin: auto; width: min(720px, calc(100% - 48px)); max-height: min(88dvh, 860px); border-radius: var(--radius-m); box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
  .tdet:modal .tdet__groups { columns: 2; column-gap: var(--space-5); }
}
@media (min-width: 760px) and (min-height: 720px) {
  .tac__pitch { position: sticky; top: calc(var(--hub-top, 0px) + var(--space-3)); align-self: start; }
}

.instr { display: grid; gap: var(--space-3); }
.instr__label { display: block; font-weight: 600; margin-bottom: 4px; }
.instr .hint { margin: 4px 0 0; font-size: var(--step--1); color: var(--text-muted); }
.seg2 { display: flex; flex-wrap: wrap; gap: 4px; }
.seg2 button { flex: 1 1 auto; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font: 600 var(--step--1)/1.1 var(--font-body); cursor: pointer; }
.seg2 [aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.role { display: flex; flex-direction: column; gap: 4px; font-size: var(--step--1); color: var(--text-muted); }
.role select { width: 100%; min-width: 0; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font-size: var(--step-0); }
.hint { font-size: var(--step--1); color: var(--text-muted); }

@media (min-width: 1024px) {
  .instr { grid-template-columns: 1fr 1fr; column-gap: var(--space-5); }
  .roles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hub__main > * { max-width: 100%; }

/* ---------- Rozgrywki ---------- */
.tbl { background: var(--surface); border-radius: var(--radius-m); overflow: hidden; font-variant-numeric: tabular-nums; }
.tbl__row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px 52px 34px; gap: 6px; align-items: center; min-height: 40px; padding: 4px var(--space-3); border-left: 4px solid transparent; font-size: var(--step--1); }
.tbl__row:nth-child(even) { background: var(--surface-stripe); }
.tbl__row .w, .tbl__row .w2 { display: none; }
.tbl__head { color: var(--text-muted); font-weight: 600; min-height: 32px; }
.tbl__row b { font: 700 var(--step-0)/1 var(--font-display); text-align: right; }
/* Kolumny liczbowe (#, M, W, R, P, Bramki, Pkt) wyśrodkowane w nagłówku i wierszach, żeby liczby stały pod nagłówkiem */
.tbl__row > :not(:nth-child(2)):not(.w2) { text-align: center; }
.tbl__pos { font-weight: 700; text-align: right; }
.tbl__club { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tbl__club span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
/* Pewne rozstrzygnięcia za nazwą klubu (clinchTags): gwiazdka mistrza, awans, baraże, spadek; biały napis na kolorze */
:is(.tbl__club, .dash-t__cl) .tbl-tag { flex: none; overflow: visible; padding: 2px 6px; border-radius: 4px; color: #fff; font: 700 10px/1.3 var(--font-body); letter-spacing: .04em; }
:is(.tbl__club, .dash-t__cl) .tbl-tag--up { background: #1e7d36; }
:is(.tbl__club, .dash-t__cl) .tbl-tag--playoff { background: #1d5fbf; }
:is(.tbl__club, .dash-t__cl) .tbl-tag--down { background: #c42b2b; }
:is(.tbl__club, .dash-t__cl) .tbl-tag--champ { padding: 0 2px; color: #f2b705; font-size: 17px; line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.tbl__row.is-me { background: color-mix(in srgb, var(--led) 22%, transparent); }
[data-zone="europe-cl"] { border-left-color: #1E5AA8; }
[data-zone="europe"] { border-left-color: #4C8BD6; }
[data-zone="up"] { border-left-color: #2E8A4E; }
[data-zone="playoff"] { border-left-color: #8BC34A; }
[data-zone="playoff-down"] { border-left-color: #E0A030; }
[data-zone="down"] { border-left-color: var(--kartka-czerwona); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-2) 0 var(--space-5); padding: 0; font-size: var(--step--1); color: var(--text-muted); }
.legend li { border-left-width: 4px; border-left-style: solid; padding-left: 6px; }
.roundnav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); font: 700 var(--step-1)/1 var(--font-display); }
.roundnav .btn { min-width: 52px; font-size: var(--step-2); }
.fxlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; }
.fx { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto; column-gap: var(--space-2); align-items: center; padding: 8px var(--space-3); font-size: var(--step--1); }
.fx:nth-child(even) { background: var(--surface-stripe); }
.fx.is-me { background: color-mix(in srgb, var(--led) 22%, transparent); }
.fx__date { grid-column: 1 / -1; color: var(--text-muted); font-size: 11px; }
.fx__team { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
.fx__team--h { justify-content: flex-end; text-align: right; }
.fx__mid { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.fx__score { font: 700 var(--step-1)/1 var(--font-display); }
.fx__mid small { font-size: 10px; color: var(--text-muted); }
.stats-grid { display: grid; gap: var(--space-4); }
.stat-sec h3 { margin: 0 0 var(--space-2); }
.stat-list { margin: 0; padding: 0; list-style: none; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; counter-reset: s; }
.stat-list li { display: grid; grid-template-columns: 24px 22px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 6px var(--space-3); font-size: var(--step--1); counter-increment: s; }
.stat-list li::before { content: counter(s); color: var(--text-muted); text-align: right; }
.stat-list li:nth-child(even) { background: var(--surface-stripe); }
.stat-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-list small { display: block; color: var(--text-muted); font-size: 11px; }
.stat-list b { font-family: var(--font-display); }
.result-board { margin: var(--space-4) 0; }
@media (min-width: 760px) {
  .tbl__row { grid-template-columns: 32px minmax(0, 1fr) 34px 34px 34px 34px 60px 44px 130px; }
  .tbl__row .w, .tbl__row .w2 { display: block; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .fx { grid-template-columns: 110px 1fr auto 1fr; grid-template-rows: auto; }
  .fx__date { grid-column: auto; font-size: var(--step--1); }
}
.vs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-bottom: var(--space-4); }
.vs-table td { padding: 6px 4px; font: 700 var(--step-0)/1.2 var(--font-display); }
.vs-table td:last-child { text-align: right; }
.vs-table td.lbl { text-align: center; font: 400 var(--step--1)/1.2 var(--font-body); color: var(--text-muted); }
.vs-table tr:nth-child(even) { background: var(--surface-stripe); }
/* Tablica wyniku i nagłówek meczu (z projektu dnia meczowego) */
.board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-m); background: #0E1511; color: var(--kreda); }
.board__t { display: flex; align-items: center; gap: var(--space-2); font: 700 var(--step-1)/1 var(--font-display); }
.board__t:last-child { justify-content: flex-end; }
.board__score { font: 800 clamp(2rem, 1.4rem + 3vw, 3rem)/1 var(--font-led); color: var(--led); text-shadow: 0 0 10px rgba(255,178,26,.55); letter-spacing: .04em; text-align: center; }
.board__min { display: block; margin-top: 4px; font: 800 var(--step--1)/1 var(--font-led); color: var(--led); text-align: center; }
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-3); padding: var(--space-4) 0; text-align: center; }
.fixture__team { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.1; }
.fixture__mid { display: flex; flex-direction: column; align-items: center; }
.form { display: inline-flex; gap: 3px; }
.form b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 3px; font: 700 11px/1 var(--font-display); color: #fff; }
.form .W { background: #2E8A4E; } .form .R { background: #7C8780; } .form .P { background: var(--kartka-czerwona); }

/* ---------- Puchary europejskie (etap 8) ---------- */
.subtabs--5 button { font-size: var(--step--1); padding: 0 2px; }
.chips--sm .chip { min-height: 36px; }
.fx.is-pl, .tbl__row.is-pl { background: color-mix(in srgb, #1E5AA8 10%, transparent); }
.tie--win { font-weight: 800; }
.tie--out { color: var(--text-muted); font-weight: 500; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.sec-head h3 { margin: 0; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: var(--step--1); }
.champ { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; }
.stat-list.rank li.is-me { background: color-mix(in srgb, var(--led) 22%, transparent); }
.drawbox { background: #0E1511; color: var(--kreda, #F3F6F1); border-radius: var(--radius-m); padding: var(--space-3); margin-bottom: var(--space-4); scroll-margin-top: 120px; }
.drawbox h3, .drawbox h4 { color: inherit; }
.drawbox h4 { margin: var(--space-3) 0 var(--space-1); font: 700 var(--step-0)/1.2 var(--font-display); color: var(--led); }
.drawbox .btn--quiet { color: inherit; border-color: rgb(255 255 255 / .3); background: transparent; }
.drawbox .ctry { color: rgb(255 255 255 / .55); }
.pots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2) var(--space-3); margin-top: var(--space-2); }
.pots > div { display: flex; flex-direction: column; gap: 2px; }
.ball { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); min-width: 0; }
.draw-items { margin-top: calc(var(--hub-top, 0px) + var(--space-3)); border-top: 1px solid rgb(255 255 255 / .15); }
.draw-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid rgb(255 255 255 / .08); }
.draw-item small { color: rgb(255 255 255 / .65); }
.draw-item .vs { color: var(--led); font-weight: 700; }
.draw-item.pop { animation: ball-pop .45s ease-out; }
@keyframes ball-pop { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
.draw-ctrl { display: flex; gap: var(--space-2); justify-content: flex-end; margin: var(--space-3) 0 0; }
@media (prefers-reduced-motion: reduce) { .draw-item.pop { animation: none; } }
.stat-list li.is-me { background: color-mix(in srgb, var(--led) 22%, transparent); }
.mail-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
/* ================= Kadra > Rozmowy (src/ui/talksView.js) =================
   Kolory znaczeniowe: zielony dobrze, bursztyn ostrzeżenie, czerwony pilne, niebieski informacja.
   Tony zebrania mają własne barwy, żeby różniły się na pierwszy rzut oka. */
.tt { --tt-good: #2E8A4E; --tt-push: #C98A12; --tt-calm: #2D6A8F; --tt-unity: #6B4FB0; --tt-risk: #C23B3B;
  display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "notice" "side" "players"; }
.tt-head { grid-area: head; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
@media (min-width: 1200px) { .tt-head { grid-template-columns: 1fr 1fr 1.5fr 0.9fr; } }
.tt-notice { grid-area: notice; margin: 0; }
.tt-players { grid-area: players; }
.tt-side { grid-area: side; display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.tt-kpi { --k: var(--text-muted); display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 14px 12px; border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--k) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--k) 30%, var(--line)); border-top: 4px solid var(--k); }
.tt-kpi small { color: var(--text-muted); font-size: var(--step--1); }
.tt-kpi b { font: 700 var(--step-2)/1.1 var(--font-display); color: color-mix(in srgb, var(--k) 55%, var(--text)); }
.tt-kpi[data-m="top"], .tt-kpi[data-m="good"] { --k: var(--tt-good); }
.tt-kpi[data-m="mid"] { --k: var(--tt-push); }
.tt-kpi[data-m="low"], .tt-kpi[data-m="bad"] { --k: var(--tt-risk); }
.tt-kpi[data-m="calm"] { --k: var(--tt-calm); }
.tt-pips { display: flex; gap: 6px; margin-top: 4px; }
.tt-pips i { width: 22px; height: 8px; border-radius: 4px; background: var(--tt-calm); }
.tt-pips i.is-used { background: color-mix(in srgb, var(--text) 18%, transparent); }
.tt-panel { min-width: 0; padding: 14px 16px 16px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--pt, var(--murawa)) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pt, var(--murawa)) 22%, var(--line)); }
.tt-panel h3 { margin: 0 0 var(--space-1); font: 700 var(--step-1)/1.15 var(--font-display); }
.tt-panel > .hint { margin: 0 0 var(--space-3); }
.tt-players { --pt: var(--tt-calm); }
.tt-meet { --pt: var(--tt-push); }
.tt-log { --pt: var(--tt-unity); }
.tt-group { display: flex; align-items: center; gap: 8px; margin: var(--space-3) 0 var(--space-2); font: 700 var(--step-0)/1 var(--font-display); color: var(--text-muted); }
.tt-group span { padding: 2px 7px; border-radius: 999px; font-size: var(--step--1); background: color-mix(in srgb, var(--text) 10%, transparent); }
.tt-group--rec { color: var(--text); }
.tt-group--rec span { background: var(--tt-push); color: #1C1404; }
/* „Poproś asystenta”: zielony przycisk w wyróżnionym pasku (inny niż żółte „Porozmawiaj” w wierszach) */
.tt-asst { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 var(--space-3); padding: 10px 12px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tt-asst small { flex: 1 1 220px; color: var(--text-muted); font-size: var(--step--1); }
.tt-asst--off { background: none; border-style: dashed; border-color: var(--line); }
.tt-asst__btn { gap: 8px; padding: 0 var(--space-4); border-radius: 999px; font-size: var(--step-0); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 55%, #000); }
.tt-asst__btn:hover { filter: brightness(1.1); }
.tt-asst__btn:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.tt-asst__btn:active { transform: translateY(1px); box-shadow: none; }
@media (max-width: 600px) { .tt-asst__btn { width: 100%; } .tt-asst small { flex-basis: 100%; } }
.tt-ok { padding: 10px 12px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--tt-good) 12%, transparent); }
.tt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tt-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); }
.tt-row.is-rec { border-left-color: var(--tt-push); background: color-mix(in srgb, var(--tt-push) 6%, var(--surface)); }
.tt-row .pos { min-width: 38px; }
.tt-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tt-who > b { font-weight: 600; }
.tt-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tt-tag, .tt-mor { --c: var(--tt-calm); display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: var(--step--1); line-height: 1.35;
  color: color-mix(in srgb, var(--c) 70%, var(--text)); background: color-mix(in srgb, var(--c) 14%, transparent); }
.tt-tag[data-k="bad"] { --c: var(--tt-risk); } .tt-tag[data-k="warn"] { --c: var(--tt-push); color: var(--warn-text); } .tt-tag[data-k="good"] { --c: var(--tt-good); }
.tt-mor[data-m="top"], .tt-mor[data-m="good"] { --c: var(--tt-good); } .tt-mor[data-m="mid"] { --c: var(--text-muted); }
.tt-mor[data-m="low"] { --c: var(--tt-push); } .tt-mor[data-m="bad"] { --c: var(--tt-risk); }
.tt-act { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; min-width: 0; }
.tt-act .pick-select { flex: 1; min-width: 0; max-width: 15rem; }
.tt-go { background: var(--tt-push); color: #1C1404; border-color: transparent; font-weight: 700; }
.tt-go:hover:not([disabled]) { filter: brightness(1.08); }
.tt-tones { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2); }
.tt-tone { --h: var(--tt-calm); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px 12px; text-align: left; cursor: pointer; font: inherit; color: inherit;
  border-radius: var(--radius-s); border: 1px solid color-mix(in srgb, var(--h) 35%, var(--line)); border-left: 5px solid var(--h); background: color-mix(in srgb, var(--h) 9%, var(--surface)); }
.tt-tone strong { font: 700 var(--step-0)/1.1 var(--font-display); color: color-mix(in srgb, var(--h) 60%, var(--text)); }
.tt-tone .tt-quote { font-style: italic; }
.tt-tone small { color: var(--text-muted); }
.tt-tone:hover:not([disabled]) { background: color-mix(in srgb, var(--h) 16%, var(--surface)); }
.tt-tone:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tt-tone[disabled] { opacity: .5; cursor: not-allowed; }
.tt-tone[data-hue="good"] { --h: var(--tt-good); } .tt-tone[data-hue="push"] { --h: var(--tt-push); } .tt-tone[data-hue="calm"] { --h: var(--tt-calm); }
.tt-tone[data-hue="unity"] { --h: var(--tt-unity); } .tt-tone[data-hue="risk"] { --h: var(--tt-risk); }
.tt-react { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 4px; }
.tt-react li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.tt-log ol { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: 8px; }
.tt-log li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding-left: 10px; border-left: 3px solid var(--tt-calm); font-size: var(--step--1); }
.tt-log li[data-k="meet"] { border-left-color: var(--tt-push); }
.tt-log time { color: var(--text-muted); font-variant-numeric: tabular-nums; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tt { --tt-push: #E0A21C; --tt-calm: #4A8FC4; --tt-unity: #8F74D6; --tt-risk: #E05A5A; --tt-good: #3FA463; } }
:root[data-theme="dark"] .tt { --tt-push: #E0A21C; --tt-calm: #4A8FC4; --tt-unity: #8F74D6; --tt-risk: #E05A5A; --tt-good: #3FA463; }
/* Tablet i PC: wiersz zawodnika w jednej linii */
@media (min-width: 760px) {
  .tt-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tt-act { grid-column: auto; }
}
/* PC: lista zawodników po lewej, zebranie i historia w kolumnie po prawej (przyklejonej przy przewijaniu) */
@media (min-width: 1200px) {
  .hub__main:has(.tt) { max-width: 1440px; }
  .tt { grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); grid-template-areas: "head head" "notice notice" "players side"; align-items: start; }
  .tt-side { position: sticky; top: calc(var(--hub-top, 0px) + var(--space-3)); }
  .tt-tones { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1600px) {
  .hub__main:has(.tt) { max-width: 1840px; }
  .tt { grid-template-columns: minmax(0, 1.6fr) minmax(420px, 1fr); }
  .tt-tones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mecze pucharowe: drużyna, która awansowała */
.fx__team--win { font-weight: 800; }
.fx__team--win, .fx__team--h.fx__team--win { background: color-mix(in srgb, var(--led) 28%, transparent); border-radius: var(--radius-s); padding: 2px 6px; }
.fx__team--out { color: var(--text-muted); font-weight: 500; }
.fx__date .tag-up { margin-left: 8px; }
.tag-up { display: inline-block; flex: none; padding: 1px 6px; border-radius: 999px; background: var(--led); color: #14211A; font: 700 10px/1.4 var(--font-body, inherit); text-transform: none; letter-spacing: .02em; }

/* ================= Skład i taktyka: panele z własnym odcieniem tła =================
   Każda sekcja ma inny odcień, żeby listy, siła składu, instrukcje i stałe fragmenty nie zlewały się w jedno. */
.tac .tp-sec, .tac__strength, .tpanel3 {
  --tint: var(--murawa, #2E8A4E);
  padding: 12px 14px 14px; border-radius: var(--radius-m); border: 1px solid color-mix(in srgb, var(--tint) 28%, var(--line));
  background: color-mix(in srgb, var(--tint) 9%, var(--surface));
}
.tac .tp-sec h3, .tac__strength h3, .tpanel3 h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--space-2); }
.tac .tp-sec h3::before, .tac__strength h3::before, .tpanel3 h3::before { content: ""; flex: none; width: 4px; height: 1.1em; border-radius: 2px; background: var(--tint); }
.tac .tp-sec + .tp-sec { margin-top: calc(var(--hub-top, 0px) + var(--space-3)); }
.tp-sec--xi { --tint: var(--murawa, #2E8A4E); }
.tp-sec--bench { --tint: #3E7CB1; }
.tac .tp-out { --tint: #8A8F96; }
.tac__strength { --tint: #C9962B; }
.tpanel3 { margin-top: var(--space-4); }
.tpanel3--instr { --tint: #2F8F8A; }
.tpanel3--roles { --tint: #B8642E; margin-bottom: var(--space-5); }
.tpanel3--roles .roles { margin-bottom: 0; }
.tpanel3 .instr__row { padding: 10px 12px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.tp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 var(--space-2); color: var(--text-muted); font-size: var(--step--1); }
.tp-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.tp-legend .tp-fresh { height: 14px; }
.tp-legend b { color: var(--text); font-family: var(--font-display); }
.tdet__ovr { font: 700 var(--step-3)/1 var(--font-display); color: var(--led); }
/* Koszulki na boisku w barwach klubu, numer z tyłu koszulki; obwódka nadal pokazuje dopasowanie do pozycji */
.pitch2[style*="--kit"] .slot-btn:not(.slot-btn--gk):not(.slot-btn--empty) .slot-btn__dot { background: var(--kit); color: var(--kit-ink); box-shadow: inset 0 0 0 2px var(--kit-trim), 0 2px 4px rgba(0, 0, 0, .35); }
.slot-btn__dot { font-variant-numeric: tabular-nums; }
/* Ocena ogólna w profilu: zaokrąglona, czcionka jak wynik meczu (bez kropkowanego LED) */
.pp__ovrn { display: inline-block; min-width: 2.2ch; padding: 4px 12px; border-radius: 8px; background: #0E1511; color: var(--led); font: 700 var(--step-3)/1 var(--font-display); font-variant-numeric: tabular-nums; text-align: center; }

/* Karta zawodnika na ekranie taktyki: statystyki (ten sam moduł co w profilu) pod atrybutami */
.tdet__stats .phst { margin-top: var(--space-4); }
.tdet__stats h2, .tdet__stats h3 { font-size: var(--step-0); }
/* PC (od 1100 px): lewa kolumna przyklejona (boisko, komunikat, przyciski, zwijana siła składu), listy obok.
   Karta zawodnika to pływające okno (.tcard). Ten sam próg co WIDE_INFO w app.js. */
@media (min-width: 1100px) {
  .tac {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    grid-template-areas: "form form" "pitch lists"; grid-template-rows: auto 1fr; align-items: start;
  }
  .tac__pitch {
    position: sticky; top: calc(var(--hub-top, 0px) + var(--space-3)); align-self: start;
    max-height: calc(100dvh - var(--hub-top, 0px) - 24px); overflow-y: auto; scrollbar-width: thin;
    padding: 4px; margin: -4px; /* miejsce na obrys fokusu */
  }
  .tac__pitch > * { flex-shrink: 0; }
  .tac__pitch > .tac__strength { margin-top: var(--space-2); }
  /* Na niskim ekranie boisko się zmniejsza, żeby kolumna (boisko, przyciski, siła składu) mieściła się bez przewijania */
  .tac__pitch .pitch2 { flex: none; max-width: min(460px, max(260px, calc((100dvh - var(--hub-top, 0px) - 330px) * .68))); }
  .tac__lists > * { min-width: 0; }
}
/* Duży PC: boisko | pierwszy skład | ławka; pod składem zawodnicy spoza kadry i pas rezerw, ławka obok składu.
   Tablet dotykowy (wysokie wiersze pod palec) dopiero od 1500 px, inaczej listy są za wąskie i ucinają nazwiska. */
@media (min-width: 1280px) and (pointer: fine), (min-width: 1500px) {
  .hub__main:has(.tac) { max-width: 1440px; }
  .tac {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "form form form" "hint legend legend" "pitch xi bench" "pitch out bench" "pitch rz bench";
    grid-template-rows: auto auto auto auto 1fr; row-gap: var(--space-3);
  }
  /* Opis formacji w jednej linii z legendą, pierwszy skład wyrównany do góry z boiskiem; poza kadrą pod składem, ławka obok składu */
  .tac__form { display: contents; }
  .tac__form .chips { grid-area: form; }
  .tac__form .tac__hintrow { grid-area: hint; align-self: start; }
  .tac .tp-legend { align-self: start; } /* legenda w jednej linii z opisem formacji (przycisk pod opisem) */
  .tac__lists { display: contents; }
  .tac .tp-legend { grid-area: legend; margin: 0; }
  .tac .tp-sec--xi { grid-area: xi; }
  .tac .tp-sec--bench { grid-area: bench; }
  .tac__rz { grid-area: rz; }
  .tac .tp-out { grid-area: out; }
  .tac .tp-sec + .tp-sec { margin-top: 0; }
  .tac__rz .rz-strip { margin: 0; }
}

/* Zwarte wiersze list tylko na PC z myszą (ekran dotykowy zachowuje cele 44-48 px) */
@media (min-width: 1100px) and (pointer: fine) {
  .tac { --row-h: 34px; --row-fs: 14px; --pos-w: 38px; }
  .tac .tp-row__main { min-height: var(--row-h); font: 600 var(--row-fs)/1.2 var(--font-body); }
  .tac .tp-row__name small { display: inline; margin-left: 6px; font: 400 12px/1 var(--font-body); }
  .tac .tp-handle .pos { min-width: var(--pos-w); min-height: 22px; }
  .tac .tp-grip { height: 16px; }
  .tac .tp-row__main .tp-fresh { width: 4px; height: 16px; }
  .tac .tp-row__main b { font: 700 15px/1 var(--font-display); min-width: 1.8em; }
  .tac .tp-row__i, .tac .tp-row__x { width: var(--row-h); }
  .tac .tp-row__i { font-size: 14px; }
  .tac .tp-row__x { font-size: 17px; }
  .tac .tp-sec { padding: 8px 10px 10px; }
  .tac .tp-sec h3 { font-size: var(--step-0); margin-bottom: var(--space-1); }
  .tac .tp-row__name .tp-rep { display: inline-flex; margin: 0 0 0 6px; vertical-align: 1px; }
}
@media (min-width: 1100px) and (max-width: 1279px) and (pointer: fine) { .tac .tp-row__name small { display: block; margin: 1px 0 0; } }
/* Od 1280 px skład i ławka stoją obok siebie: w jednej linii skraca się nazwisko i uwaga, a odznaki zostają całe */
@media (min-width: 1280px) and (pointer: fine) {
  .tac .tp-row__name { display: flex; align-items: center; gap: 6px; }
  .tac .tp-row__nm, .tac .tp-row__name small { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tac .tp-row__nm { flex: 0 1 auto; }
  .tac .tp-row__name small { flex: 0 2 auto; margin: 0; }
  .tac .tp-row__name .tp-c, .tac .tp-row__name .tp-rep, .tac .tp-row__name .rz-chips { flex: none; margin: 0; }
}

/* Zmiennicy po wyborze zawodnika (telefon i PC): poziom z mapy pozycji (85, 70, 50), kolor plus kształt */
.tac {
  --rep-opt: #1E7A43; --rep-ok: #3F8F63; --rep-weak: #6B7A70;
  --rep-wash-opt: color-mix(in srgb, var(--rep-opt) 16%, var(--surface));
  --rep-wash-ok: color-mix(in srgb, var(--rep-ok) 10%, var(--surface));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tac { --rep-opt: #5BD08A; --rep-ok: #7FBF9C; --rep-weak: #9FB0A5; }
}
:root[data-theme="dark"] .tac { --rep-opt: #5BD08A; --rep-ok: #7FBF9C; --rep-weak: #9FB0A5; }
.tp-row.is-sel .tp-row__name { font-weight: 800; }
.tac.has-sel .tp-row:not(.is-sel):not([data-rep]):not(.tp-add) { opacity: .62; }
.tp-row[data-rep] { box-shadow: inset 4px 0 0 var(--rep-c); background: var(--rep-w, transparent); }
.tp-row[data-rep="opt"] { --rep-c: var(--rep-opt); --rep-w: var(--rep-wash-opt); }
.tp-row[data-rep="ok"] { --rep-c: var(--rep-ok); --rep-w: var(--rep-wash-ok); }
.tp-row[data-rep="weak"] { --rep-c: var(--rep-weak); box-shadow: inset 0 0 0 1px var(--rep-weak); }
.tp-row[data-rep="no"] { opacity: .45; }
.tp-row[data-rep].is-off { opacity: .5; }
.tp-rep {
  display: flex; width: fit-content; align-items: center; gap: 4px; margin-top: 2px; padding: 1px 7px; border-radius: 999px;
  font: 700 11.5px/1.4 var(--font-body); color: var(--rep-c); border: 1px solid currentColor; white-space: nowrap;
}
.tp-rep::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tp-row[data-rep="ok"] .tp-rep::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); box-shadow: inset 0 0 0 1px currentColor; }
.tp-row[data-rep="weak"] .tp-rep { border-style: dashed; }
.tp-row[data-rep="weak"] .tp-rep::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.tp-sec__hits { margin-left: auto; font: 600 12px/1 var(--font-body); color: var(--rep-opt); }
/* Boisko: sloty, gdy wybrany jest zawodnik z ławki lub spoza kadry (jasne barwy, bo murawa jest ciemna w obu motywach) */
.slot-btn[data-rep] .slot-btn__dot { outline: 3px solid var(--rep-c); outline-offset: 3px; }
.slot-btn[data-rep="opt"] { --rep-c: #A6F0C2; }
.slot-btn[data-rep="ok"] { --rep-c: #D9F3E3; }
.slot-btn[data-rep="weak"] { --rep-c: #F3F6F1; }
.slot-btn[data-rep="ok"] .slot-btn__dot { outline-style: double; outline-width: 5px; }
.slot-btn[data-rep="weak"] .slot-btn__dot { outline-style: dashed; outline-width: 2px; }
.slot-btn[data-rep="no"] { opacity: .5; }
.slot-btn[data-rep="no"] .slot-btn__dot { outline: 0; }
.tac.has-sel .slot-btn:not(.is-sel):not([data-rep]) { opacity: .6; }
.slot-btn__rep { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); padding: 0 5px; border-radius: 3px; background: rgba(14,21,17,.8); color: var(--rep-c); font: 700 10.5px/1.4 var(--font-body); white-space: nowrap; pointer-events: none; }
.slot-btn.is-sel .slot-btn__dot { box-shadow: 0 0 0 7px color-mix(in srgb, var(--led) 35%, transparent), 0 2px 4px rgba(0,0,0,.35); }

/* Siła składu zwijana (przycisk tylko na PC, app.js renderuje go od 1100 px) */
.tac__fold { display: flex; flex: 1; min-width: 0; align-items: center; gap: 8px; min-height: 34px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tac__fold-ico { display: block; width: 9px; height: 9px; margin-left: auto; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.tac__fold-sum { display: none; font: 700 14px/1 var(--font-display); color: var(--text-muted); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.tac__strength[data-open="0"] .zones { display: none; }
.tac__strength[data-open="0"] h3 { margin-bottom: 0; }
.tac__strength[data-open="0"] .tac__fold-sum { display: block; margin-left: auto; }
.tac__strength[data-open="0"] .tac__fold-ico { margin-left: 8px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .tac__fold-ico { transition: none; } }

/* Karta zawodnika na PC: pływające okno niemodalne (przeciągane za pasek, strzałki z uchwytu, Esc zamyka) */
.tcard__bar, .tcard__pin { display: none; }
@media (min-width: 1100px) {
  .tdet.tcard {
    position: fixed; inset: auto; left: var(--cx, auto); top: var(--cy, calc(var(--hub-top, 84px) + 12px)); right: 24px;
    width: min(460px, calc(100vw - 32px)); max-width: none; max-height: min(82dvh, 760px); margin: 0; padding: 0; z-index: 60; overflow: hidden;
    display: flex; flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--line) 80%, var(--text)); border-radius: var(--radius-m);
    background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: .97;
    box-shadow: 0 14px 40px rgba(0,0,0,.32), 0 2px 6px rgba(0,0,0,.2);
  }
  .tdet.tcard[style*="--cx:"] { right: auto; }
  .tdet.tcard[data-card="1"]:not([style*="--cx:"]) { left: 40px; right: auto; }
  .tdet.tcard:focus-within { opacity: 1; z-index: 61; box-shadow: 0 18px 48px rgba(0,0,0,.4), 0 0 0 2px var(--focus); }
  .tdet.tcard.is-moving { opacity: .88; user-select: none; -webkit-user-select: none; }
  .tcard .tdet__in { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--space-3) var(--space-4) var(--space-4); }
  .tcard .tdet__head .tdet__x, .tcard .tdet__title h3 { display: none; } /* nazwisko i zamknięcie są w pasku */
  .tcard .tdet__groups { columns: 1; }
  .tcard__bar { flex: none; display: flex; align-items: center; gap: var(--space-2); padding: 6px 8px 6px 4px; cursor: grab; touch-action: none; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--murawa) 12%, var(--surface)); }
  .tcard.is-moving .tcard__bar { cursor: grabbing; }
  .tcard__grip { flex: none; width: 28px; height: 28px; border: 0; border-radius: var(--radius-s); background: radial-gradient(circle, currentColor 1.4px, transparent 1.8px) center / 6px 6px; color: var(--text-muted); cursor: inherit; }
  .tcard__grip:focus-visible, .tcard__pin:focus-visible, .tcard__bar .tdet__x:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
  .tcard__name { flex: 1; min-width: 0; margin: 0; font: 700 var(--step-1)/1.1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tcard__name:focus { outline: 0; }
  .tcard__name:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .tcard__pin, .tcard__bar .tdet__x { display: grid; place-items: center; flex: none; width: 32px; height: 32px; font-size: 18px; }
  .tcard__pin { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-s); background: none; color: var(--text); cursor: pointer; }
  .tcard__pin:hover { background: var(--surface-stripe); }
  .tcard__pin[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
}
/* Szeroka karta: nagłówek, pasek statusu, atrybuty w 2 kolumnach z formą pod nimi, boisko pozycji po prawej */
@media (min-width: 1100px) {
  .tdet.tcard { width: min(1040px, calc(100vw - 48px)); max-height: calc(100dvh - var(--hub-top, 84px) - 24px); }
  .tcard .tdet__in {
    display: grid; align-content: start; gap: var(--space-3) var(--space-4);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) clamp(280px, 30%, 340px);
    grid-template-areas: "head head head" "facts facts facts" "attrs attrs map" "form stats map";
  }
  .tcard .tdet__head { grid-area: head; display: flex; align-items: center; gap: var(--space-3); }
  .tcard .tdet__ovr { font-size: var(--step-3); padding: 6px 12px; }
  .tcard .tdet__title { flex: 1; min-width: 0; }
  .tcard .tdet__title p { margin: 0; font-size: var(--step-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tcard .tdet__facts { grid-area: facts; grid-template-columns: 1.6fr 1.2fr 1fr .7fr .9fr; gap: var(--space-3); margin: 0; padding: var(--space-2) 0; }
  .tcard .tdet__facts > div { min-width: 0; }
  .tcard .tdet__facts > div:nth-child(-n + 2) { grid-column: auto; display: block; }
  .tcard .tdet__facts dt { display: block; font-size: 12px; margin-bottom: 2px; }
  .tcard .tdet__facts dd { font-size: var(--step-0); }
  .tcard .tdet__facts > div:nth-child(-n + 2) dd { white-space: normal; line-height: 1.2; }
  .tcard .tdet__vis { display: contents; }
  /* 3 kolumny grup (techniczne, mentalne, fizyczne): równe wysokości, bez pustego pola pod najkrótszą grupą */
  .tcard .tdet__groups { grid-area: attrs; columns: 3; column-gap: var(--space-4); column-fill: balance; }
  .tcard .tdet__groups h4 { break-after: avoid; break-before: column; padding-top: 0 !important; }
  .tcard .tdet__groups h4:first-child { break-before: auto; }
  /* Bramkarz ma 4 grupy: bez wymuszonych podziałów, przeglądarka wyrówna 3 kolumny (inaczej 4. grupa wchodzi na boisko pozycji) */
  .tcard .tdet__groups:has(> h4:nth-of-type(4)) h4 { break-before: auto; }
  /* Bramkarz: 2 kolumny, Mentalne nad Fizycznymi, Techniczne nad Bramkarskimi */
  /* Siatka zamiast kolumn: Fizyczne i Bramkarskie zaczynają się w tej samej linii */
  .tcard .tdet__groups--gk { columns: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-5); align-content: start; }
  .tcard .tdet__groups--gk > h4:nth-of-type(1) { grid-area: 1 / 1; }
  .tcard .tdet__groups--gk > ul:nth-of-type(1) { grid-area: 2 / 1; }
  .tcard .tdet__groups--gk > h4:nth-of-type(2) { grid-area: 3 / 1; }
  .tcard .tdet__groups--gk > ul:nth-of-type(2) { grid-area: 4 / 1; }
  .tcard .tdet__groups--gk > h4:nth-of-type(3) { grid-area: 1 / 2; }
  .tcard .tdet__groups--gk > ul:nth-of-type(3) { grid-area: 2 / 2; }
  .tcard .tdet__groups--gk > h4:nth-of-type(4) { grid-area: 3 / 2; }
  .tcard .tdet__groups--gk > ul:nth-of-type(4) { grid-area: 4 / 2; }
  .tcard .tdet__groups--gk > h4 { break-before: auto; padding-top: var(--space-2) !important; }
  .tcard .tdet__groups--gk > h4:nth-of-type(1), .tcard .tdet__groups--gk > h4:nth-of-type(3) { padding-top: 0 !important; }
  .tcard .tdet__groups--gk > ul { align-self: start; }
  .tcard .tdet__groups .attrs { break-inside: avoid; }
  .tcard .tdet__groups h4 { margin: 0 0 var(--space-1); padding-top: var(--space-2); }
  .tcard .tdet__groups h4:first-child { padding-top: 0; }
  .tcard .tdet__groups .attrs { margin-bottom: var(--space-1); }
  .tcard .tdet__groups .attrs li { grid-template-columns: minmax(0, 1fr) 56px 22px; gap: var(--space-2); padding: 2px 0; font-size: 13px; line-height: 1.25; }
  .tcard .tdet__groups .attrs li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tcard .tdet__groups .attrs b { font-size: 15px; }
  .tdet.tcard .fch { grid-area: form; max-width: none; margin: 0; padding: var(--space-2) var(--space-3); }
  /* wykres ma stałe proporcje (nie rozciąga się w poziomie), więc nagłówek i opis stoją obok niego */
  /* Forma i Statystyki obok siebie pod atrybutami (Forma w pierwszej kolumnie, wykres pod nagłówkiem) */
  .tdet.tcard .fch__head { flex-wrap: wrap; gap: var(--space-2); }
  .tdet.tcard .fch__head h3 { margin: 0 auto 0 0; }
  .tdet.tcard .fch__svg { margin: var(--space-1) 0 0; max-height: 140px; }
  .tcard .tdet__vis .pmap { grid-area: map; max-width: none; margin: 0; align-self: start; }
  .tdet.tcard .fch { align-self: start; }
  .tcard .tdet__stats { grid-area: stats; min-width: 0; margin: 0; align-self: start; }
  .tcard .tdet__stats > :first-child { margin-top: 0; }
  .tcard .tdet__stats th, .tcard .tdet__stats td { padding-top: 3px; padding-bottom: 3px; font-size: 13px; line-height: 1.2; }
  .tcard .tdet__stats td small { display: inline; margin-left: 4px; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .tdet.tcard { width: min(900px, calc(100vw - 32px)); }
  .tcard .tdet__in { grid-template-columns: minmax(0, 1fr) clamp(250px, 32%, 300px); grid-template-areas: "head head" "facts facts" "attrs map" "form map" "stats stats"; }
  .tcard .tdet__groups { columns: 2; }
  .tcard .tdet__facts { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) { .tdet.tcard.is-new { animation: tcard-in 140ms ease-out; } }
@keyframes tcard-in { from { opacity: 0; transform: translateY(6px); } }
@supports not (backdrop-filter: blur(1px)) { @media (min-width: 1100px) { .tdet.tcard { background: var(--surface); } } }
@media (prefers-reduced-transparency: reduce) and (min-width: 1100px) { .tdet.tcard { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; opacity: 1; } }

/* Szeroki PC: szersze kolumny boiska, składu i ławki (karta zawodnika pływa nad nimi) */
@media (min-width: 1600px) {
  .hub__main:has(.tac) { max-width: 1840px; }
  .tac { grid-template-columns: minmax(340px, 400px) minmax(0, 1.1fr) minmax(0, 1fr); }
}

/* ================= Karta zawodnika (Kadra) na PC: panele obok siebie, cała szerokość ================= */
@media (min-width: 1280px) {
  .hub__main:has(.pp__layout) { max-width: 1320px; }
  .pp__layout { display: grid; gap: var(--space-4); }
  .pp__cols { gap: var(--space-4); }
  .pp__cols > section, .pp__stats { padding: 14px 18px 18px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--pp-t, var(--murawa)) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pp-t, var(--murawa)) 25%, var(--line)); min-width: 0; }
  .pp__cols > section:first-child { --pp-t: var(--murawa, #2E8A4E); }
  .pp__cols > section:nth-child(2) { --pp-t: #C9962B; }
  .pp__stats { --pp-t: #3E7CB1; }
  .pp__cols > section > h3:first-child, .pp__cols > section > .attr-group:first-child h3 { margin-top: 0; }
  .pp__stats .phst { margin-top: 0; padding-top: 0; border-top: 0; }
}
/* Szeroki PC: u góry dwa panele obok siebie (atrybuty i stan/kontrakt/charakter), każdy w dwóch kolumnach;
   pod nimi statystyki i historia na całą szerokość */
@media (min-width: 1440px) {
  .hub__main:has(.pp__layout) { max-width: 1840px; }
  .pp__layout { grid-template-columns: minmax(0, 1fr); }
  .pp__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .pp__cols > section { columns: 2; column-gap: var(--space-5); }
  .pp__cols > section > h3 { break-after: avoid; margin-top: 0; padding-top: var(--space-2); }
  .pp__cols > section > ul { break-inside: avoid; margin-bottom: var(--space-4); }
}
/* Data w nagłówku gry: czytelna czcionka zamiast kropkowanego LED */
.led.hub__date { padding: 4px 12px; font: 700 var(--step-0)/1.2 var(--font-display); letter-spacing: .02em; text-shadow: none; font-variant-numeric: tabular-nums; }

/* Wykres formy zawodnika (src/ui/formChart.js): mały panel, 10 ostatnich ocen */
.fch { margin: var(--space-4) 0 var(--space-2); padding: var(--space-3) var(--space-3) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface-stripe); max-width: 420px; }
.fch__head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.fch__head h3 { margin: 0 auto 0 0; font: 700 var(--step-0)/1.1 var(--font-display); }
.pp__cols .fch__head h3 { margin: 0 auto 0 0; }
.fch__meta { font-size: var(--step--1); color: var(--text-muted); }
.fch__meta b { font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.fch__meta b[data-b="top"], .fch__meta b[data-b="good"] { color: var(--fch-up); }
.fch__meta b[data-b="low"] { color: var(--bad-text); }
.fch__trend { font: 600 var(--step--1)/1 var(--font-display); letter-spacing: .02em; padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.fch__trend[data-t="up"] { color: var(--fch-up); background: color-mix(in srgb, #2E8A4E 15%, transparent); }
.fch__trend[data-t="down"] { color: var(--bad-text); background: color-mix(in srgb, #D62839 13%, transparent); }
.fch__svg { display: block; width: 100%; height: auto; margin-top: var(--space-2); overflow: visible; }
.fch__zone--top { fill: color-mix(in srgb, var(--led) 13%, transparent); }
.fch__zone--low { fill: color-mix(in srgb, var(--kartka-czerwona) 8%, transparent); }
.fch__grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.fch__ax { fill: var(--text-muted); font: 600 11px var(--font-display); text-anchor: end; }
.fch__area { fill: color-mix(in srgb, var(--murawa) 10%, transparent); }
.fch__line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fch__pt circle { stroke: var(--surface-stripe); stroke-width: 1.5; fill: var(--text-muted); }
.fch__pt[data-b="top"] circle { fill: var(--led); stroke: var(--trybuna); }
.fch__pt[data-b="good"] circle { fill: var(--murawa-jasna); }
.fch__pt[data-b="low"] circle { fill: var(--kartka-czerwona); }
.fch__pt:focus-visible { outline: none; }
.fch__pt:focus-visible circle, .fch__pt:hover circle { stroke: var(--focus); stroke-width: 2.5; }
.fch__lbl { fill: var(--text); font: 700 14px var(--font-display); text-anchor: middle; font-variant-numeric: tabular-nums; }
.fch__ga { fill: var(--text-muted); font: 700 10.5px var(--font-display); text-anchor: middle; }
.fch__foot, .fch__none { margin: var(--space-1) 0 0; font-size: var(--step--1); color: var(--text-muted); }
.tdet .fch { max-width: 440px; margin-top: calc(var(--hub-top, 0px) + var(--space-3)); }
.fch { --fch-up: #1E7A43; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fch { --fch-up: #7BD69A; } }
:root[data-theme="dark"] .fch { --fch-up: #7BD69A; }
/* Trend reputacji w profilu zawodnika (docs/reputacja.md) */
.rep-trend { --rep-up: #1E7A43; margin-left: 4px; font-size: var(--step--1); font-family: var(--font-body); font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.rep-trend[data-t="up"] { color: var(--rep-up); }
.rep-trend[data-t="down"] { color: var(--bad-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rep-trend { --rep-up: #7BD69A; } }
:root[data-theme="dark"] .rep-trend { --rep-up: #7BD69A; }

/* ================= Kadra > Zawodnicy: widoki Przegląd / Atrybuty i forma / Statystyki (src/ui/squadView.js) ================= */
.sqx__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-2); }
.sqx__bar .chips { margin: 0; padding: 0; }
.sqv { margin: 0; flex: none; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.sqv button { padding: 8px 14px; border: 0; background: var(--surface); color: var(--text); font: 600 var(--step--1)/1.2 var(--font-body); cursor: pointer; }
.sqv button + button { border-left: 1px solid var(--line); }
.sqv button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
.sqv button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
/* Przegląd: forma i kondycja w wierszu (szeroki ekran) */
.sq__row .wx { display: none; }
.sq__form, .xl__form { display: inline-flex; align-items: center; gap: 6px; }
.sq__form b, .xl__form b, .xl__rt b { font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; }
[data-b="none"] { color: var(--text-muted); }
.xl td.xl__form { display: table-cell; }
.xl td.xl__form .spark { vertical-align: middle; margin-right: 6px; }
.spark { width: 64px; height: 20px; flex: none; overflow: visible; }
.spark path { fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-linejoin: round; }
.spark circle { fill: var(--text-muted); }
.spark circle[data-b="top"] { fill: var(--led); } .spark circle[data-b="good"] { fill: #2E8A4E; } .spark circle[data-b="low"] { fill: var(--kartka-czerwona); }
.spark--none { display: inline-block; width: 64px; }
.sq__fresh { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.sq__fresh i { width: 44px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, currentColor var(--v), var(--line) var(--v)); }
.sq__fresh[data-b="good"] { color: #2E8A4E; } .sq__fresh[data-b="mid"] { color: var(--warn-text); } .sq__fresh[data-b="low"] { color: var(--bad-text); }
/* Znaczniki stanu za nazwiskiem (src/ui/playerTags.js, docs/tagi-zawodnika.md): pełny kwadrat = sprawa pilna,
   obrys = drugorzędna. Telefon: 2 znaczniki i „+N”, od 760 px: 4 i „+N” (dwa warianty „+N” w HTML). */
.tg-row { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; flex: none; vertical-align: middle; }
.tg { --tg: var(--text-muted); --tg-ink: #fff; display: inline-grid; place-items: center; flex: none; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 3px; font: 700 10px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--tg); color: var(--tg-ink); cursor: help; }
.tg--o { background: var(--tg); color: var(--tg-ink); }
.tg[data-k="sy"] { --tg: var(--kartka-zolta); --tg-ink: #14211A; }
.tg[data-k="sr"], .tg[data-k="inj"] { --tg: var(--kartka-czerwona); }
.tg[data-k="nt"] { --tg: var(--murawa); }
.tg[data-k="tr"], .tg[data-k="pk"] { --tg: #6B4FB0; }
.tg[data-k="of"] { --tg: #2D6A8F; }
.tg[data-k="mw"] { --tg: var(--bad-text); }
.tg[data-k="y1"], .tg[data-k="s2"], .tg[data-k="kw"], .tg[data-k="z"], .tg[data-k="mr"] { --tg: var(--warn-text); }
.tg[data-k="tl"] { --tg: var(--led); --tg-ink: #14211A; }
.tg[data-k="ll"], .tg[data-k="li"], .tg[data-k="lo"] { --tg: var(--pa-fix); }
.tg-more { --tg: color-mix(in srgb, var(--text-muted) 22%, transparent); --tg-ink: var(--text); font-weight: 600; }
.tg--pc, .tg-more--pc { display: none; }
@media (min-width: 760px) {
  .tg--pc, .tg-more--pc { display: inline-grid; }
  .tg-more--ph { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tg[data-k="nt"] { --tg: #2E8A4E; }
  :root:not([data-theme="light"]) .tg[data-k="tr"], :root:not([data-theme="light"]) .tg[data-k="pk"] { --tg: #8F74D6; --tg-ink: #14211A; }
  :root:not([data-theme="light"]) .tg[data-k="of"] { --tg: #4A8FC4; --tg-ink: #0E1A14; }
  :root:not([data-theme="light"]) .tg:is([data-k="ll"], [data-k="li"], [data-k="lo"], [data-k="mw"], [data-k="mr"], [data-k="y1"], [data-k="s2"], [data-k="kw"], [data-k="z"]) { --tg-ink: #14211A; }
}
:root[data-theme="dark"] .tg[data-k="nt"] { --tg: #2E8A4E; }
:root[data-theme="dark"] .tg[data-k="tr"], :root[data-theme="dark"] .tg[data-k="pk"] { --tg: #8F74D6; --tg-ink: #14211A; }
:root[data-theme="dark"] .tg[data-k="of"] { --tg: #4A8FC4; --tg-ink: #0E1A14; }
:root[data-theme="dark"] .tg:is([data-k="ll"], [data-k="li"], [data-k="lo"], [data-k="mw"], [data-k="mr"], [data-k="y1"], [data-k="s2"], [data-k="kw"], [data-k="z"]) { --tg-ink: #14211A; }
/* Przegląd: nazwisko i znaczniki w jednej linii, nazwisko skraca się wielokropkiem */
.sq__nl { display: flex; align-items: center; min-width: 0; }
.sq__nl b { min-width: 0; }
/* Tabele: znaczniki w komórce nazwiska, szerokość kolumny jak dotąd (nazwisko oddaje miejsce znacznikom) */
.xl__nmw { display: inline-flex; align-items: center; max-width: 200px; vertical-align: middle; }
.xl__nmw button { min-width: 0; }
.xl__nmw .tg-row { margin-left: 3px; }
/* Panel podsumowania po prawej (PC) */
.sqa { display: none; }
.sqa__p { --t: var(--murawa); padding: 12px 14px 14px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--t) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--t) 24%, var(--line)); border-top: 4px solid var(--t); }
.sqa__p[data-t="calm"] { --t: #2D6A8F; } .sqa__p[data-t="bad"] { --t: var(--kartka-czerwona); } .sqa__p[data-t="warn"] { --t: #C98A12; } .sqa__p[data-t="good"] { --t: #2E8A4E; }
.sqa__p h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 var(--step-0)/1.1 var(--font-display); }
.sqa__p h3 span { padding: 1px 7px; border-radius: 999px; font-size: var(--step--1); background: color-mix(in srgb, var(--t) 22%, transparent); }
.sqa__lines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sqa__lines li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sqa__lines b { font: 700 var(--step-2)/1 var(--font-display); }
.sqa__lines .pos { min-width: 40px; }
.sqa__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sqa__list button { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 0 8px; align-items: center; width: 100%; padding: 5px 4px; border: 0; border-radius: var(--radius-s); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sqa__list button:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.sqa__list .pos { grid-row: span 2; }
.sqa__nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqa__list small { font-size: var(--step--1); color: var(--text-muted); }
.sqa__list small[data-k="inj"] { color: var(--bad-text); } .sqa__list small[data-k="sus"], .sqa__list small[data-k="warn"] { color: var(--warn-text); }
.sqa__ok { margin: 0; font-size: var(--step--1); color: var(--text-muted); }
/* Tabele jak w arkuszu (Atrybuty i forma, Statystyki) */
.xl-note { margin: 0 0 var(--space-2); font-size: var(--step--1); color: var(--text-muted); }
.xl-wrap { overflow: auto; max-height: calc(100dvh - 230px); border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); }
.xl-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.xl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.xl th, .xl td { padding: 6px 8px; text-align: center; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.xl thead th { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--text) 6%, var(--surface)); font-weight: 600; color: var(--text-muted); }
.xl thead tr.xl__grp th { top: 0; padding: 4px 8px; font: 700 var(--step--1)/1.1 var(--font-display); color: var(--text); text-align: left; border-bottom: 0; }
.xl thead tr.xl__grp + tr th { top: 24px; }
.xl__grp th[data-g="tech"] { box-shadow: inset 0 3px 0 #2D6A8F; } .xl__grp th[data-g="mental"] { box-shadow: inset 0 3px 0 #6B4FB0; }
.xl__grp th[data-g="phys"] { box-shadow: inset 0 3px 0 #C98A12; } .xl__grp th[data-g="gk"] { box-shadow: inset 0 3px 0 var(--gk); } .xl__grp th[data-g="info"] { box-shadow: inset 0 3px 0 #2E8A4E; }
.xl thead th button { display: inline-flex; align-items: center; gap: 3px; padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.xl thead th button:hover { color: var(--text); text-decoration: underline; }
.xl thead th[aria-sort="ascending"] button, .xl thead th[aria-sort="descending"] button { color: var(--text); }
.xl thead th button i { font-style: normal; font-size: 9px; }
.xl tbody tr:nth-child(even) td, .xl tbody tr:nth-child(even) th { background: var(--surface-stripe); }
.xl tbody tr:hover td, .xl tbody tr:hover th { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.xl tbody td, .xl tbody th { background: var(--surface); }
/* Pozycja i nazwisko przyklejone przy przewijaniu w poziomie */
.xl .xl__pos { position: sticky; left: 0; z-index: 1; width: 52px; text-align: left; }
.xl .xl__nm { position: sticky; left: 52px; z-index: 1; text-align: left; box-shadow: 1px 0 0 var(--line); }
.xl thead .xl__pos, .xl thead .xl__nm { z-index: 3; }
/* Pasek co drugiego wiersza jest w ciemnym motywie półprzezroczysty: przyklejone kolumny dostają pełne tło pod spodem,
   inaczej przewijane kolumny prześwitują przez pozycję i nazwisko */
.xl tbody tr:nth-child(even) .xl__pos, .xl tbody tr:nth-child(even) .xl__nm { background: linear-gradient(var(--surface-stripe), var(--surface-stripe)), var(--surface); }
.xl tbody tr:hover .xl__pos, .xl tbody tr:hover .xl__nm { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.xl__nm button { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; padding: 0; border: 0; background: none; color: var(--text); font: 600 var(--step--1)/1.2 var(--font-body); text-align: left; cursor: pointer; }
.xl__nm button span { overflow: hidden; text-overflow: ellipsis; }
.xl__nm button:hover span { text-decoration: underline; }
.xl__ovr { font: 700 var(--step-0)/1 var(--font-display); }
.xl__a { min-width: 30px; font-weight: 600; }
.xl__g0 { border-left: 2px solid var(--line); }
.xl__na, .xl__z { color: color-mix(in srgb, var(--text-muted) 60%, transparent); }
.xl__a[data-b="top"] { background: color-mix(in srgb, #2E8A4E 22%, var(--surface)) !important; }
.xl__a[data-b="good"] { background: color-mix(in srgb, #2E8A4E 10%, var(--surface)) !important; }
.xl__a[data-b="low"] { background: color-mix(in srgb, var(--kartka-czerwona) 10%, var(--surface)) !important; }
.xl__fresh[data-b="good"] { color: #2E8A4E; } .xl__fresh[data-b="mid"] { color: var(--warn-text); } .xl__fresh[data-b="low"] { color: var(--bad-text); }
.xl__card { display: inline-grid; place-items: center; width: 16px; height: 21px; border-radius: 3px; font: 700 11px/1 var(--font-display); color: #14211A; background: var(--kartka-zolta); }
.xl__card[data-c="r"] { background: var(--kartka-czerwona); color: #fff; }
.xl tfoot td, .xl tfoot th { position: sticky; bottom: 0; background: color-mix(in srgb, var(--text) 8%, var(--surface)); font-weight: 700; border-top: 2px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xl__a[data-b="top"] { color: #7BD69A; } :root:not([data-theme="light"]) .xl__a[data-b="good"] { color: #6FC48C; } }
:root[data-theme="dark"] .xl__a[data-b="top"] { color: #7BD69A; } :root[data-theme="dark"] .xl__a[data-b="good"] { color: #6FC48C; }
/* Ranking UEFA (Rozgrywki, puchary europejskie): kluby i kraje, 5 sezonów; polskie wiersze wyróżnione */
.rk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-2); }
.rk-bar .xl-note { margin: 0; }
.rk-filter { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); color: var(--text-muted); }
.rk-filter select { min-height: 36px; max-width: 220px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: inherit; }
.rk .xl__pos { width: 64px; }
.rk .xl__nm { left: 64px; max-width: 46vw; }
.rk-pos b { display: inline-block; min-width: 24px; font: 700 var(--step--1)/1 var(--font-display); }
.rk-mv { font-size: 10.5px; font-weight: 600; color: var(--text-muted); }
.rk-mv[data-d="up"] { color: #2E8A4E; } .rk-mv[data-d="down"] { color: var(--bad-text); } .rk-mv[data-d="0"] { opacity: .5; }
.rk-nm { display: table-cell; }
.rk-club { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 240px; vertical-align: middle; }
.rk-cn { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rk-nm .ctry { margin-left: 6px; vertical-align: middle; }
.rk-nocrest { flex: none; display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--text) 8%, transparent); }
.rk-gap td { padding: 8px; text-align: left; font-size: var(--step--1); color: var(--text-muted); font-style: italic; }
.rk-more { margin: var(--space-2) 0 0; }
.rk-sum { font: 700 var(--step--1)/1 var(--font-display); }
.rk-thr { color: var(--text); font-weight: 600; }
.rk tbody tr.is-pl td, .rk tbody tr.is-pl th { background: color-mix(in srgb, #1E5AA8 12%, var(--surface)); }
.rk tbody tr.is-pl .xl__pos { box-shadow: inset 3px 0 0 #1E5AA8; }
.rk tbody tr.is-me td, .rk tbody tr.is-me th { background: color-mix(in srgb, var(--led) 24%, var(--surface)); }
.rk tbody tr.is-me .xl__pos { box-shadow: inset 3px 0 0 var(--led); }
@media (max-width: 599px) {
  .rk .xl__pos { width: 52px; } .rk .xl__nm { left: 52px; }
  .rk-club { max-width: 150px; }
  .rk-filter select { max-width: 170px; }
}
/* PC: cała szerokość, w Przeglądzie lista + panel podsumowania po prawej */
@media (min-width: 1280px) {
  .hub__main:has(.sqx) { max-width: 1840px; }
  .sq__row { grid-template-columns: 52px minmax(140px, 1fr) 40px 44px 104px 92px 100px 106px 58px; gap: 7px; }
  .sq__row .wx { display: block; }
  .sq__row .sq__form.wx, .sq__row .sq__fresh.wx { display: inline-flex; }
  .xl-wrap { max-height: calc(100dvh - 210px); }
  /* Tabela atrybutów i statystyk w Kadrze: widok zwarty, żeby zmieścić całość bez przewijania w okienku */
  .sqx--table .xl-wrap { max-height: none; overflow: visible; }
  .sqx--table .xl { font-size: 12px; }
  .sqx--table .xl th, .sqx--table .xl td { padding: 2px 3px; line-height: 1.25; }
  .sqx--table .xl thead tr.xl__grp th { padding: 3px 4px; font-size: 12px; }
  .sqx--table .xl thead tr.xl__grp + tr th { top: 20px; }
  .sqx--table .xl thead th button { font-size: 11px; }
  .sqx--table .xl__a { min-width: 0; width: 25px; }
  .sqx--table .xl__ovr { font-size: 14px; }
  .sqx--table .xl .xl__pos { width: 44px; }
  .sqx--table .xl .xl__pos .pos { min-width: 30px; height: 18px; min-height: 0; padding: 0 4px; font-size: 10px; line-height: 18px; }
  .sqx--table .xl td, .sqx--table .xl tbody th { height: 22px; }
  .sqx--table .xl__card { width: 13px; height: 17px; font-size: 10px; }
  .sqx--table .xl .xl__nm { left: 44px; }
  .sqx--table .xl__nm button { max-width: 150px; min-height: 0; padding: 0; font-size: 12px; line-height: 1.2; }
  .sqx--table .xl__nmw { max-width: 150px; }
  .sqx--table .xl td, .sqx--table .xl tbody th { height: 20px; padding-top: 1px; padding-bottom: 1px; }
}
@media (min-width: 1440px) {
  .sqx__main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-4); align-items: start; }
  .sqa { display: grid; gap: var(--space-3); position: sticky; top: calc(var(--hub-top, 0px) + var(--space-3)); }
}
@media (min-width: 1600px) {
  .sqx__main { grid-template-columns: minmax(0, 1fr) 340px; }
  .sq__row { grid-template-columns: 56px minmax(160px, 1fr) 44px 48px 108px 100px 108px 114px 62px; gap: 9px; }
}

/* ================= Puchary europejskie: wiersze meczów (src/ui/europeView.js, ufxRow) =================
   Kraj jako subtelny dopisek, nazwy w jednej linii. Telefon: drużyny jedna pod drugą, wynik po prawej.
   PC: data | gospodarz | wynik | gość | dopisek, na całą szerokość; bardzo szeroki ekran: dwie kolumny. */
.ctry { flex: none; font: 600 9.5px/1 var(--font-body); letter-spacing: .06em; color: var(--text-muted); opacity: .75; }
.ufxlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.ufx { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date date" "th sh" "ta sa" "sub sub"; align-items: center; column-gap: 12px; row-gap: 3px;
  padding: 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.ufx:last-child { border-bottom: 0; }
.ufx.is-pl { background: color-mix(in srgb, #1E5AA8 9%, transparent); box-shadow: inset 3px 0 0 #1E5AA8; }
.ufx.is-me { background: color-mix(in srgb, var(--led) 18%, transparent); box-shadow: inset 3px 0 0 var(--led); }
.ufx__date { grid-area: date; color: var(--text-muted); font-size: 11px; }
.ufx__t { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; color: var(--text); }
.ufx__t--h { grid-area: th; } .ufx__t--a { grid-area: ta; }
.ufx__t .crest, .ufx__t svg, .ufx__t img { flex: none; }
.ufx__nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ufx__s { min-width: 18px; text-align: right; font: 700 var(--step-1)/1 var(--font-display); }
.ufx__s--h { grid-area: sh; } .ufx__s--a { grid-area: sa; }
.ufx__mid { display: none; color: var(--text-muted); }
.ufx.is-open .ufx__mid { display: block; grid-area: 2 / 2 / 4 / 3; align-self: center; font: 600 var(--step--1)/1 var(--font-display); }
.ufx .is-win { font-weight: 800; }
.ufx .ufx__t.is-out, .ufx .ufx__s.is-out { color: var(--text-muted); font-weight: 500; }
.ufx__sub { grid-area: sub; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-muted); font-size: 11px; }
.ufx__sub:empty { display: none; }
.ufx__tag { padding: 1px 7px; border-radius: 999px; font: 700 10px/1.5 var(--font-display); letter-spacing: .03em; color: #14211A; background: var(--led); }
@media (min-width: 760px) {
  .ufx { grid-template-columns: 118px minmax(0, 1fr) 30px 14px 30px minmax(0, 1fr) minmax(90px, 150px); grid-template-areas: "date th sh mid sa ta sub"; row-gap: 0; min-height: 44px; }
  .ufx__t--h { flex-direction: row-reverse; text-align: right; }
  .ufx__s--h { text-align: right; } .ufx__s--a { text-align: left; }
  .ufx__mid { display: block; grid-area: mid; text-align: center; }
  .ufx.is-open .ufx__mid { grid-area: 1 / 3 / 2 / 6; }
  .ufx__sub { justify-content: flex-end; text-align: right; }
  .ufx__sub:empty { display: block; }
}
@media (min-width: 1280px) {
  .hub__main:has(.eu) { max-width: 1840px; }
}
/* Puchary europejskie: przebieg i mecze zawsze w jednej kolumnie (czytelniej niż dwie kolumny na szerokim ekranie) */
.eu .ufxlist { margin-bottom: var(--space-4); }
.eu .seu .ufxlist { margin-bottom: var(--space-2); }

/* ================= Mapa pozycji w karcie zawodnika (src/ui/positionMap.js) ================= */
.pmap { --opt: #1E8A47; --ok: #8CC152; --weak: #E0A21C; --no: #7C8780;
  margin: var(--space-3) 0 var(--space-2); padding: var(--space-3); max-width: 340px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface-stripe); break-inside: avoid; }
.pmap__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: var(--space-2); }
.pmap__head h3 { margin: 0; font: 700 var(--step-0)/1.1 var(--font-display); }
.pp__cols .pmap__head h3 { margin: 0; padding: 0; }
.pmap__nat { font-size: var(--step--1); color: var(--text-muted); }
.pmap__nat b { color: var(--text); font-weight: 600; }
.pmap__svg { display: block; width: 100%; height: auto; }
.pmap__grass { fill: #1F6E3B; }
.pmap__stripe { fill: #237A42; }
.pmap__lines * { fill: none; stroke: rgba(243, 246, 241, .55); stroke-width: 1.2; }
.pmap__dot { fill: var(--no); stroke: rgba(14, 21, 17, .55); stroke-width: 1.2; }
.pmap__spot[data-b="opt"] .pmap__dot { fill: var(--opt); stroke: #F3F6F1; stroke-width: 1.6; }
.pmap__spot[data-b="ok"] .pmap__dot { fill: var(--ok); }
.pmap__spot[data-b="weak"] .pmap__dot { fill: var(--weak); }
.pmap__spot[data-b="no"] { opacity: .78; }
.pmap__ring { fill: none; stroke: var(--led); stroke-width: 3; }
.pmap__v { font: 700 11.5px var(--font-display); text-anchor: middle; fill: #fff; font-variant-numeric: tabular-nums; }
.pmap__spot[data-b="ok"] .pmap__v, .pmap__spot[data-b="weak"] .pmap__v { fill: #14211A; }
.pmap__pos { font: 700 8.5px var(--font-display); text-anchor: middle; fill: rgba(243, 246, 241, .92); letter-spacing: .03em; paint-order: stroke; stroke: rgba(14, 21, 17, .55); stroke-width: 2px; }
.pmap__spot:focus-visible { outline: none; }
.pmap__spot:focus-visible .pmap__dot, .pmap__spot:hover .pmap__dot { stroke: var(--focus); stroke-width: 2.5; }
.pmap__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: var(--space-2) 0 0; padding: 0; font-size: 11px; color: var(--text-muted); }
.pmap__legend li { display: inline-flex; align-items: center; gap: 5px; }
.pmap__legend li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--no); }
.pmap__legend li[data-b="opt"]::before { background: var(--opt); } .pmap__legend li[data-b="ok"]::before { background: var(--ok); } .pmap__legend li[data-b="weak"]::before { background: var(--weak); }
.pmap__note { margin: var(--space-1) 0 0; font-size: 11px; color: var(--text-muted); }
/* Mapa pozycji i forma w karcie na ekranie Skład i taktyka: obok siebie, gdy jest miejsce */
.tdet__vis { display: grid; gap: 0 var(--space-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.tdet__vis .pmap { max-width: 380px; }

/* ================= Rozgrywki (src/ui/competitionsView.js, europeView.js, nationalView.js) =================
   Telefon: wszystko jedno pod drugim. PC: pełna szerokość; tabela z panelem bocznym (kolejka, strzelcy),
   terminarz z tabelą obok, statystyki i karty w siatce, długie listy meczów w dwóch kolumnach. */
.cgrid--side { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.cgrid__aside { display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.cside { padding: 12px 14px 14px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--murawa) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--murawa) 22%, var(--line)); }
.cside__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cside__head h3 { margin: 0; font: 700 var(--step-1)/1.1 var(--font-display); }
.cside .stat-list { margin: 0; }
.ufxlist--compact .ufx { padding: 6px 10px; }
.ufx__nm.club-link { min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ufx__nm.club-link:hover { text-decoration: underline; }
.tbl--mini .tbl__row { grid-template-columns: 26px minmax(0, 1fr) 30px 54px 36px !important; min-height: 36px; font-size: var(--step--1); }
.tbl--mini .tbl__club span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.ccard { padding: 12px 14px 14px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.ccard h3 { display: flex; align-items: baseline; gap: 8px; margin-top: 0; }
.ccard .ufxlist { border: 0; border-radius: var(--radius-s); }
/* IV liga (src/ui/fourthLeagueView.js): wybór grupy wojewódzkiej i prosta karta klubu bez zawodników */
.l4-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-3); margin: 0 0 var(--space-3); }
.l4-pick label { font-size: var(--step--1); font-weight: 600; color: var(--text-muted); }
.l4-pick select { flex: 1 1 220px; max-width: 380px; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: inherit; }
.l4-card { margin-bottom: var(--space-4); }
.l4-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.l4-card__head > div { flex: 1; min-width: 0; }
.l4-card__head h3 { margin: 0; }
.l4-card__head p { margin: 2px 0 0; font-size: var(--step--1); }
.l4-card h4 { margin: var(--space-3) 0 6px; font: 700 var(--step-0)/1.2 var(--font-display); }
.l4-card .form { margin-left: 6px; vertical-align: middle; }
.l4-card__body { display: grid; gap: 0 var(--space-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .l4-card__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .l4-card__body > div > h4:first-child { margin-top: 0; } }
.nt-grid { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.nt-grid > p, .nt-grid > .legend { grid-column: 1 / -1; margin: 0; }
.nt-grid > .stat-sec { margin: 0; }
.stat-list--cols { margin: 0; }
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .nt-grid--ln, .nt-grid--euro { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .stat-list--cols { columns: 2; column-gap: var(--space-4); }
  .stat-list--cols li { break-inside: avoid; }
}
@media (min-width: 1280px) {
  .hub__main:has(.comp) { max-width: 1840px; }
  .cgrid--side { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); align-items: start; }
  .cgrid__aside { position: sticky; top: calc(var(--hub-top, 0px) + var(--space-3)); }
  .comp .stats-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .nt-grid--pol { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .nt-grid--pol > .stat-sec:first-of-type { grid-row: span 3; }
}
@media (min-width: 1680px) {
  /* Terminarz, Puchar Polski i puchary europejskie: wyniki zawsze w jednej kolumnie */
  .stat-list--cols { columns: 3; }
}
/* Wąska lista w panelu bocznym: zawsze układ telefonu (drużyny jedna pod drugą) */
.ufxlist--compact .ufx { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date date" "th sh" "ta sa" "sub sub"; row-gap: 3px; min-height: 0; }
.ufxlist--compact .ufx__t--h { flex-direction: row; text-align: left; }
.ufxlist--compact .ufx__s--h, .ufxlist--compact .ufx__s--a { text-align: right; }
.ufxlist--compact .ufx__mid { display: none; }
.ufxlist--compact .ufx.is-open .ufx__mid { display: block; grid-area: 2 / 2 / 4 / 3; }
.ufxlist--compact .ufx__sub { justify-content: flex-start; }
.ufxlist--compact .ufx__sub:empty { display: none; }

/* Tabele reprezentacji (Liga Narodów, eliminacje Euro): bez kolumny formy, nazwa drużyny zawsze widoczna */
.tbl--nt .tbl__row { grid-template-columns: 28px minmax(110px, 1fr) 30px 30px 30px 30px 52px 38px !important; column-gap: 6px; }
.tbl--nt .tbl__club { min-width: 0; }
.tbl--nt .tbl__club span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 759px) {
  .tbl--nt .tbl__row { grid-template-columns: 26px minmax(0, 1fr) 30px 52px 36px !important; }
}

/* Reprezentacje: zakładki przewijane, drabinka, karty turniejów, historia (src/ui/nationalView.js) */
.subtabs--scroll { overflow-x: auto; scrollbar-width: none; }
.subtabs--scroll::-webkit-scrollbar { display: none; }
.subtabs--scroll button { flex: 1 0 auto; padding: 0 14px; white-space: nowrap; }
.nt-grid > .ntko, .nt-grid > .ntcard, .nt-grid > .nthist-sec, .nt-grid > .panel__lead { grid-column: 1 / -1; margin: 0; }
.ntko__cols { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.ntko__col h4 { margin: 0 0 var(--space-2); font: 700 var(--step--1)/1.2 var(--font-body); color: var(--text-muted); }
.ntcard > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ntcard > summary::-webkit-details-marker { display: none; }
.ntcard > summary::before { content: "▸"; display: inline-block; color: var(--text-muted); transition: transform .15s; }
.ntcard[open] > summary::before { transform: rotate(90deg); }
.ntcard > summary h3 { margin: 0; }
.ntcard > .nt-grid { margin-top: var(--space-2); }
.ntfacts { margin: 0; padding: 0; list-style: none; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; }
.ntfacts li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px var(--space-3); font-size: var(--step--1); }
.ntfacts li:nth-child(even) { background: var(--surface-stripe); }
.ntfacts small { display: block; color: var(--text-muted); font-size: 11px; }
.ntfacts b { font-family: var(--font-display); text-align: right; }
.nthist { background: var(--surface); border-radius: var(--radius-m); overflow: hidden; }
.nthist__row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; min-height: 36px; padding: 4px var(--space-3); border-left: 4px solid transparent; font-size: var(--step--1); }
.nthist__row:nth-child(even) { background: var(--surface-stripe); }
.nthist__row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nthist__row > :nth-child(4) { display: none; }
.nthist--pol .nthist__row > :nth-child(2) { display: none; }
.nthist__head { color: var(--text-muted); font-weight: 600; min-height: 30px; }
.nthist__row.is-me { background: color-mix(in srgb, var(--led) 22%, transparent); }
@media (prefers-reduced-motion: reduce) { .ntcard > summary::before { transition: none; } }
@media (min-width: 900px) {
  .nt-grid--q, .nt-grid--tour, .nt-grid--sub { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .nt-grid--hist { grid-template-columns: repeat(auto-fill, minmax(600px, 1fr)); align-items: start; }
  .nt-grid--hist > .nthist-sec { grid-column: auto; }
  .ntko__cols { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); align-items: start; }
  .nthist__row { grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .nthist__row > :nth-child(4) { display: block; }
  .nthist--pol .nthist__row { grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
  .nthist--pol .nthist__row > :nth-child(2) { display: block; }
}

/* ================= Okno rozmowy indywidualnej (src/ui/talksView.js, career/talkDialog.js) ================= */
.tt-row.is-done { opacity: .92; background: color-mix(in srgb, var(--tt-good) 6%, var(--surface)); border-left-color: var(--tt-good); }
.tt-done { --c: var(--tt-good); display: inline-block; padding: 2px 8px; border-radius: 999px; font: 700 11.5px/1.4 var(--font-body); color: color-mix(in srgb, var(--c) 75%, var(--text)); background: color-mix(in srgb, var(--c) 16%, transparent); }
.tt-done[data-k="info"] { --c: var(--tt-calm); } .tt-done[data-k="warn"] { --c: var(--tt-push); } .tt-done[data-k="bad"] { --c: var(--tt-risk); }
.tt-done-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--tt-good); font-weight: 700; margin-left: auto; }
.ttd-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgb(8 14 10 / .62); }
.ttd { --tt-good: #2E8A4E; --tt-push: #C98A12; --tt-calm: #2D6A8F; --tt-risk: #C23B3B;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(720px, 100%); max-height: min(860px, calc(100dvh - 32px)); border-radius: var(--radius-m); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .4); overflow: hidden; }
.ttd-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--tt-calm) 8%, var(--surface)); }
.ttd-head .pos { min-width: 42px; min-height: 30px; font-size: 13px; }
.ttd-head h2 { margin: 0; font: 700 var(--step-1)/1.1 var(--font-display); }
.ttd-head p { margin: 2px 0 0; font-size: var(--step--1); color: var(--text-muted); }
.ttd-x { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 22px; cursor: pointer; }
.ttd-body { overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ttd-msg { max-width: 82%; padding: 8px 12px 10px; border-radius: 14px; line-height: 1.5; }
.ttd-msg p { margin: 2px 0 0; }
.ttd-msg__who { font: 700 11px/1 var(--font-display); letter-spacing: .04em; color: var(--text-muted); }
.ttd-msg--pl { align-self: flex-start; background: color-mix(in srgb, var(--text) 7%, var(--surface)); border-bottom-left-radius: 4px; }
.ttd-msg--co { align-self: flex-end; background: color-mix(in srgb, var(--tt-good) 16%, var(--surface)); border-bottom-right-radius: 4px; }
.ttd-note { margin: -4px 0 4px; font-size: var(--step--1); font-style: italic; color: var(--text-muted); }
.ttd-h { margin: 8px 0 2px; font: 700 var(--step-0)/1.1 var(--font-display); }
.ttd-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.ttd-topic { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.ttd-topic b { font: 700 var(--step-0)/1.15 var(--font-display); }
.ttd-topic small { color: var(--text-muted); font-size: 12px; }
.ttd-topic:hover { border-color: var(--tt-calm); background: color-mix(in srgb, var(--tt-calm) 8%, var(--surface)); }
.ttd-topic.is-sugg { border-color: var(--tt-push); background: color-mix(in srgb, var(--tt-push) 10%, var(--surface)); }
.ttd-sugg { margin-top: 2px; padding: 1px 7px; border-radius: 999px; font: 700 10.5px/1.5 var(--font-body); color: #1C1404; background: var(--tt-push); }
.ttd-topic-chosen { margin: 4px 0 0; font-size: var(--step--1); color: var(--text-muted); }
.ttd-says { display: grid; gap: 8px; }
.ttd-say { --c: var(--tt-calm); display: grid; gap: 3px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); border-left: 5px solid var(--c); border-radius: var(--radius-s); background: color-mix(in srgb, var(--c) 7%, var(--surface)); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.ttd-say[data-ap="wsparcie"] { --c: var(--tt-good); } .ttd-say[data-ap="stanowczo"] { --c: var(--tt-risk); }
.ttd-say:hover { background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
.ttd-say__k { font: 700 12px/1 var(--font-display); letter-spacing: .04em; color: color-mix(in srgb, var(--c) 75%, var(--text)); }
.ttd-say__line { font-style: italic; line-height: 1.45; }
.ttd-say small { color: var(--text-muted); font-size: 12px; }
.ttd-out { --c: var(--tt-calm); display: grid; gap: 4px; margin-top: 6px; padding: 10px 12px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); }
.ttd-out[data-k="good"] { --c: var(--tt-good); } .ttd-out[data-k="warn"] { --c: var(--tt-push); } .ttd-out[data-k="bad"] { --c: var(--tt-risk); }
.ttd-out b { font: 700 var(--step-0)/1.1 var(--font-display); color: color-mix(in srgb, var(--c) 75%, var(--text)); }
.ttd-out i { font-style: normal; } .ttd-out i[data-dir="up"] { color: var(--tt-good); } .ttd-out i[data-dir="down"] { color: var(--tt-risk); }
/* Historia morale: trend przy morale zawodnika i atmosferze, skutek rozmowy tydzień później */
.tt-trend { font-style: normal; font-size: 0.85em; color: var(--text-muted); }
.tt-trend[data-dir="up"] { color: var(--tt-good); } .tt-trend[data-dir="down"] { color: var(--tt-risk); }
.tt-follow { display: block; margin-top: 2px; color: var(--text-muted); }
.tt-follow[data-dir="up"]::before { content: '▲ '; color: var(--tt-good); } .tt-follow[data-dir="down"]::before { content: '▼ '; color: var(--tt-risk); }
.ttd-out small { color: var(--text-muted); }
.ttd-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.ttd-topic:focus-visible, .ttd-say:focus-visible, .ttd-x:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ttd { --tt-push: #E0A21C; --tt-calm: #4A8FC4; --tt-risk: #E05A5A; --tt-good: #3FA463; } }
:root[data-theme="dark"] .ttd { --tt-push: #E0A21C; --tt-calm: #4A8FC4; --tt-risk: #E05A5A; --tt-good: #3FA463; }
@media (max-width: 559px) { .ttd-back { padding: 0; align-items: end; } .ttd { max-height: 92dvh; border-radius: 16px 16px 0 0; } .ttd-msg { max-width: 92%; } }

/* Menu systemowe: Opcje, Zapis, Wyjście (src/ui/sysMenu.js). PC: u dołu bocznego menu; telefon: przycisk w nagłówku */
.nav__sys { display: none; }
.hub__sys { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: 4px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); cursor: pointer; }
.hub__sys .ico { width: 22px; height: 22px; }
@media (min-width: 1024px) {
  .hub__sys { display: none; }
  .nav__sys { display: grid; gap: var(--space-1); margin-top: auto; padding-top: calc(var(--hub-top, 0px) + var(--space-3)); border-top: 1px solid var(--line); }
  .nav { min-height: calc(100dvh - var(--hub-top, 64px)); }
}
.sysdlg { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--text); }
.sysdlg::backdrop { background: rgb(6 10 8 / .6); }
.sysdlg h2 { margin: 0 0 var(--space-3); font: 700 var(--step-2)/1.1 var(--font-display); }
.sysdlg h2:focus { outline: none; }
.sysdlg h3 { margin: 0 0 6px; font: 700 var(--step-0)/1.2 var(--font-display); }
.sysdlg__list { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.sysdlg__list .btn { justify-content: flex-start; gap: 10px; }
.sysdlg__list .ico { width: 20px; height: 20px; }
.sysdlg__sec { padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.sysdlg__note { margin: 0 0 var(--space-2); font-size: var(--step--1); color: var(--text-muted); max-width: 60ch; }
.sysdlg__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sysdlg__msg { margin: var(--space-2) 0; padding: 8px 12px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--murawa, #2E8A4E) 14%, var(--surface)); font-size: var(--step--1); }
.sysdlg__x { margin-top: calc(var(--hub-top, 0px) + var(--space-3)); }
.sysdlg__ver { display: flex; width: fit-content; align-items: baseline; gap: 8px; margin: var(--space-2) 0 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); font-size: var(--step--1); color: var(--text-muted); }
.sysdlg__ver b { color: var(--text); font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.sysdlg__themes { display: grid; gap: var(--space-2); margin: 0 0 var(--space-2); padding: 0; border: 0; }
.sysdlg__themes legend { margin-bottom: var(--space-2); font-weight: 600; }
.sysdlg__opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.sysdlg__opt input { width: 20px; height: 20px; accent-color: var(--murawa, #2E8A4E); }
.sysdlg__opt span { display: grid; }
.sysdlg__opt small { color: var(--text-muted); }
.pp-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* Instrukcje indywidualne zawodników (src/ui/playerInstrView.js): znacznik, okno zawodnika, okno z tabelą.
   PC: okno na środku, tabela z przyklejonym nagłówkiem i kolumną nazwisk. Telefon: arkusz od dołu, jedna instrukcja naraz. */
:root { --pi-tint: #2F8F8A; --pi-ink: #1D6763; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pi-ink: #8ED8D2; } }
:root[data-theme="dark"] { --pi-ink: #8ED8D2; }
.pi-mark { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; margin-left: 5px; vertical-align: -4px; border-radius: 4px; background: color-mix(in srgb, var(--pi-tint) 20%, transparent); color: var(--pi-ink); }
.pi-mark svg { width: 13px; height: 13px; }
.tac .tp-row__name .pi-mark { margin-left: 6px; }
.slot-btn__pi, .mm-tok__pi { position: absolute; top: 18px; right: 8px; width: 16px; height: 16px; margin: 0; border-radius: 50%; background: var(--pi-tint); color: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .4); }
.slot-btn__pi svg, .mm-tok__pi svg { width: 11px; height: 11px; }
.instr__pi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: var(--space-3); }
.instr__pi .hint { flex: 1 1 280px; margin: 0; }

.pidlg { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--text); overflow: hidden; }
.pidlg--table { width: min(1180px, calc(100vw - 32px)); height: min(880px, calc(100dvh - 32px)); }
.pidlg::backdrop { background: rgb(6 10 8 / .6); }
.pi { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 34px); }
.pidlg--table .pi, .pi-host--table .pi { height: 100%; max-height: none; }
.pi__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pi__head .pos { min-width: 40px; min-height: 30px; font-size: 14px; }
.pi__who { display: grid; gap: 2px; min-width: 0; margin-right: auto; }
.pi__title { font: 700 var(--step-2)/1.1 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi__title:focus { outline: none; }
.pi__who small { color: var(--text-muted); font-size: var(--step--1); }
.pi__x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.pi__x:hover { background: var(--line); }
.pi__body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 16px; }
.pidlg--table .pi__body, .pi-host--table .pi__body { display: flex; flex-direction: column; overflow: hidden; }
.pi__lead { margin: 0 0 12px; font-size: var(--step--1); color: var(--text-muted); max-width: 80ch; }
.pi__skip { margin: 10px 0 0; }
.pi__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.pi__note { flex: 1 1 260px; margin: 0; font-size: var(--step--1); color: var(--text-muted); }
.pi__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pi__btns .btn { min-height: 44px; padding: 0 16px; font-size: var(--step-0); }
.pi-rows { display: grid; gap: 10px; }
.pi-row { padding: 10px 12px; border-left: 4px solid transparent; border-radius: var(--radius-s); background: color-mix(in srgb, var(--text) 4%, transparent); }
.pi-row.is-set { border-left-color: var(--pi-tint); background: color-mix(in srgb, var(--pi-tint) 11%, transparent); }
.pi-row__lbl { display: block; margin-bottom: 6px; font: 700 var(--step-0)/1.2 var(--font-display); }
.pi-row__hint { margin: 6px 0 0; font-size: var(--step--1); color: var(--text-muted); }
.pi-seg { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 2px; padding: 2px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--text) 9%, transparent); }
.pi-seg button { display: grid; place-content: center; gap: 1px; min-height: 44px; padding: 2px 6px; border: 0; border-radius: 3px; background: transparent; color: var(--text); font: 600 var(--step--1)/1.1 var(--font-body); text-align: center; cursor: pointer; }
.pi-seg button small { font: 400 11px/1.1 var(--font-body); color: var(--text-muted); }
.pi-seg button:hover:not(:disabled):not([aria-pressed="true"]) { background: color-mix(in srgb, var(--text) 8%, transparent); }
.pi-seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.pi-seg button[aria-pressed="true"] small { color: inherit; opacity: .85; }
.pi-row.is-set .pi-seg button[aria-pressed="true"], .pit-item.is-set .pi-seg button[aria-pressed="true"] { background: var(--pi-tint); color: #fff; }
.pi-seg button:disabled { opacity: .4; cursor: not-allowed; }
.pi-seg button:focus-visible { outline: 3px solid var(--focus); outline-offset: -1px; }
.pi-chips { flex: none; margin-bottom: 8px; }

.pit-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.pit { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: var(--step--1); }
.pit th, .pit td { padding: 4px 6px; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; vertical-align: middle; }
.pit thead th { position: sticky; top: 0; z-index: 2; padding: 8px 6px; font: 700 var(--step--1)/1.15 var(--font-display); }
.pit thead th small { display: block; font: 400 11px/1.2 var(--font-body); color: var(--text-muted); }
.pit .pit-c0 { position: sticky; left: 0; z-index: 1; min-width: 220px; max-width: 260px; border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pit thead .pit-c0 { z-index: 3; }
.pit .pit-c0 .pos { min-width: 36px; margin-right: 6px; vertical-align: middle; }
.pit-grp th { position: sticky; left: 0; padding: 8px; background: var(--surface-stripe); font: 700 12px/1.2 var(--font-display); color: var(--text-muted); }
.pit-row[data-g="GK"] > * { background: color-mix(in srgb, var(--gk) 18%, var(--surface)); } /* tło wiersza w kolorze grupy pozycji */
.pit-row[data-g="DEF"] > * { background: color-mix(in srgb, #2D6A8F 18%, var(--surface)); }
.pit-row[data-g="MID"] > * { background: color-mix(in srgb, var(--murawa) 18%, var(--surface)); }
.pit-row[data-g="ATT"] > * { background: color-mix(in srgb, #A8323E 18%, var(--surface)); }
/* Podświetlenie wiersza pod kursorem i przy nawigacji klawiaturą: tło grupy mocniejsze, obwódka (inset na komórkach: góra i dół wszędzie, lewa na pierwszej, prawa na ostatniej) pulsuje; --pit-hl-mix animowany */
@property --pit-hl-mix { syntax: "<percentage>"; inherits: true; initial-value: 100%; }
.pit-row { --pit-hl: var(--text); }
.pit-row[data-g="GK"] { --pit-hl: var(--gk); --pit-bg: var(--gk); }
.pit-row[data-g="DEF"] { --pit-hl: #2D6A8F; --pit-bg: #2D6A8F; }
.pit-row[data-g="MID"] { --pit-hl: var(--murawa); --pit-bg: var(--murawa); }
.pit-row[data-g="ATT"] { --pit-hl: #A8323E; --pit-bg: #A8323E; }
.pit-row:is(:hover, :focus-within) { --pit-edge: color-mix(in srgb, color-mix(in srgb, var(--pit-hl) 50%, var(--text)) var(--pit-hl-mix), transparent); }
.pit-row:is(:hover, :focus-within) > * { background: color-mix(in srgb, var(--pit-bg, var(--text)) 40%, var(--surface)); box-shadow: inset 0 2px 0 var(--pit-edge), inset 0 -2px 0 var(--pit-edge); }
.pit-row:is(:hover, :focus-within) > :first-child { box-shadow: inset 3px 0 0 var(--pit-edge), inset 0 2px 0 var(--pit-edge), inset 0 -2px 0 var(--pit-edge); }
.pit-row:is(:hover, :focus-within) > :last-child { box-shadow: inset -3px 0 0 var(--pit-edge), inset 0 2px 0 var(--pit-edge), inset 0 -2px 0 var(--pit-edge); }
.pit-row:is(:hover, :focus-within) > td.is-set { box-shadow: inset 3px 0 0 var(--pi-tint), inset 0 2px 0 var(--pit-edge), inset 0 -2px 0 var(--pit-edge); }
.pit-row:is(:hover, :focus-within) > td.is-set:last-child { box-shadow: inset 3px 0 0 var(--pi-tint), inset -3px 0 0 var(--pit-edge), inset 0 2px 0 var(--pit-edge), inset 0 -2px 0 var(--pit-edge); }
@media (prefers-reduced-motion: no-preference) {
  .pit-row:is(:hover, :focus-within) { animation: pit-glow 1.6s ease-in-out infinite alternate; }
}
@keyframes pit-glow { from { --pit-hl-mix: 55%; } to { --pit-hl-mix: 100%; } }
.pit td.is-set { background: color-mix(in srgb, var(--pi-tint) 18%, var(--surface)); box-shadow: inset 3px 0 0 var(--pi-tint); }
.pit-sel { width: 100%; min-width: 104px; min-height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: 500 var(--step--1)/1 var(--font-body); }
.pit td.is-set .pit-sel { border-color: var(--pi-tint); background: color-mix(in srgb, var(--pi-tint) 22%, var(--surface)); font-weight: 700; }
.pit-pitch span { display: block; color: var(--text-muted); font-size: 11px; text-align: center; }
.pit-pitch.is-set span { color: var(--text); font-size: 12px; font-weight: 600; }
.pit-na span { display: block; color: var(--text-muted); font-size: 11px; font-style: italic; text-align: center; opacity: .8; }
.pit-name { padding: 6px 2px; border: 0; background: none; color: var(--text); font: 600 var(--step--1)/1.2 var(--font-body); text-align: left; cursor: pointer; }
.pit-name:hover { text-decoration: underline; }
.pit-one { display: none; }
.pit-one__team { margin: 0 0 8px; }
.pit-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pit-item { display: grid; gap: 6px; padding: 8px 10px; border-left: 4px solid transparent; border-radius: var(--radius-s); background: color-mix(in srgb, var(--text) 4%, transparent); }
.pit-item.is-set { border-left-color: var(--pi-tint); background: color-mix(in srgb, var(--pi-tint) 11%, transparent); }
.pit-item:is(:hover, :focus-within) { border-left-color: var(--text-muted); background: color-mix(in srgb, var(--text) 10%, transparent); }
.pit-item.is-set:is(:hover, :focus-within) { border-left-color: var(--pi-tint); background: color-mix(in srgb, var(--pi-tint) 20%, transparent); }
.pit-item__who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pit-item__who .pit-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pit-item .pi-seg { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 759px) {
  .pidlg { width: 100%; max-width: 100%; margin: auto 0 0; border-width: 1px 0 0; border-radius: 14px 14px 0 0; max-height: 92dvh; }
  .pidlg--table { height: 92dvh; }
  .pi { max-height: 92dvh; }
  .pi__head { padding: 10px 12px; }
  .pi__body { padding: 10px 12px; }
  .pidlg--table .pi__body, .pi-host--table .pi__body { display: block; overflow: auto; }
  .pi__foot { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .pi__btns { width: 100%; margin: 0; }
  .pi__btns .btn { flex: 1 1 auto; }
  .pit-wrap { display: none; }
  .pit-one { display: block; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 759px) {
  .pidlg[open] { animation: pi-up 180ms ease-out; }
}
@keyframes pi-up { from { transform: translateY(24px); opacity: .6; } }

/* ---------- Strzałki ruchu (docs/strzalki-ruchu.md): warstwa SVG pod żetonami, kompas, legenda ---------- */
/* Murawa ma ten sam kolor w obu motywach, więc kolory strzałek są stałe; ciemny obrys (halo) dla czytelności na trawie */
:root { --pa-run: #FFC233; --pa-lat: #6FE0FF; --pa-back: #F3F6F1; --pa-halo: rgba(6, 18, 10, .62); --pa-bad: #FF6B5E; }
.pa { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.pitch2 > .slot-btn, .pitch2 > .mm-tok { z-index: 1; }
/* Skład i taktyka: środek żetonu (kółka) leży ok. 8 px nad środkiem przycisku (nazwisko pod spodem), więc warstwa strzałek
   idzie w górę o tyle samo: strzałki w bok wychodzą ze środka kółka */
.tac .pitch2 > .pa { transform: translateY(-8px); }
.pa__halo { fill: none; stroke: var(--pa-halo); stroke-width: 3.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pa__l { fill: none; stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* Jedna strzałka dla wszystkich kierunków: ten sam kolor i ta sama linia */
.pa__l--run, .pa__l--back, .pa__l--lat { stroke: var(--pa-run); }
.pa__l--bad { stroke: var(--pa-bad); stroke-dasharray: 3 4; }
.pa__l--preview { stroke-width: 1.8; }
.pa__m path { stroke: var(--pa-halo); stroke-width: 1.2; stroke-linejoin: round; }
.pa__m--run path { fill: var(--pa-run); }
.pa__m--back path, .pa__m--lat path { fill: var(--pa-run); }
.pa-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
.pa-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pa-legend svg { width: 28px; height: 8px; border-radius: 2px; background: var(--murawa); overflow: visible; }
.pa-legend .pa__l { stroke-width: 1.6; }
/* Przycisk „Strzałki” obok „Instrukcje indywidualne” */
.tac__hintbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.tac__arrows { display: inline-flex; align-items: center; gap: 6px; }
.tac__arrows-i { width: 15px; height: 15px; }
.tac__arrows[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
@media (min-width: 1100px) { .tac__hintrow > .tac__hintbtns { align-self: center; justify-content: center; } }
.tac__msg.is-warn { color: var(--kartka-czerwona); }
/* Tryb strzałek: zawodnik bez strzałek przygaszony, kursor wskazuje rysowanie */
.pitch2.is-arrows .slot-btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.pitch2.is-arrows .slot-btn:not([aria-disabled="true"]) { cursor: crosshair; }
.pitch2.is-arrows .slot-btn.is-arrow .slot-btn__dot { outline: 3px solid var(--pa-run); outline-offset: 2px; }
.pitch2.is-drawing::after { content: attr(data-draw-hint); position: absolute; left: 50%; top: 6px; transform: translateX(-50%); padding: 3px 8px; border-radius: 4px; background: var(--pa-halo); color: #fff; font: 600 12px/1.3 var(--font-body); pointer-events: none; z-index: 3; white-space: nowrap; }
/* Kompas: siatka 3 x 3 wokół zawodnika (środek: brak ruchu), przyciski 44 px, tylko dozwolone kierunki */
.acomp { position: absolute; z-index: 4; left: clamp(86px, calc(var(--px) * 1%), calc(100% - 86px)); top: clamp(72px, calc(var(--py) * 1%), calc(100% - 96px)); transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.acomp__grid { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 44px); gap: 2px; padding: 4px; border-radius: 14px; background: rgba(6, 18, 10, .5); pointer-events: auto; }
.acomp__b { grid-column: var(--c); grid-row: var(--r); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 2px solid rgba(243, 246, 241, .75); border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); cursor: pointer; }
.acomp__b svg { width: 22px; height: 22px; transform: rotate(var(--a, 0deg)); }
.acomp__b--none { font: 700 20px/1 var(--font-display); color: var(--text-muted); }
.acomp__b:hover { border-color: var(--pa-run); }
.acomp__b.is-on { background: var(--pa-run); color: #14211A; border-color: #14211A; }
.acomp__b:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.acomp__cap { display: flex; align-items: center; gap: 6px; max-width: 168px; margin: 0; padding: 3px 4px 3px 8px; border-radius: 6px; background: var(--pa-halo); color: #fff; font-size: 12px; line-height: 1.3; pointer-events: auto; white-space: nowrap; }
.acomp__cap b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acomp__cap > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acomp__x { min-height: 28px; padding: 0 8px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 4px; background: transparent; color: #fff; font: 600 12px/1 var(--font-body); cursor: pointer; }
.acomp__x:focus-visible { outline: 2px solid var(--focus); }
/* Okno instrukcji: kierunki Ruchu zawijają się (do 7 przycisków) */
.pi-seg--dirs { display: flex; flex-wrap: wrap; }
.pi-seg--dirs button { flex: 1 1 96px; }
.pi-seg--sel { display: block; padding: 0; background: none; }
.pi-seg--sel .pit-sel { min-height: 44px; }
/* Transfery: nazwisko jak link do karty zawodnika w okienku (transferCardHtml) */
.pc-link { cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); text-underline-offset: 0.12em; text-decoration-thickness: 1px; }
.pc-link:hover { text-decoration-color: currentColor; color: var(--accent, inherit); }
.tf-pcard__go { margin: 0 0 var(--space-3); }
/* Poczta: odnośniki do ekranów, których dotyczy wiadomość (src/ui/mailLinks.js) */
.mail-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.mail-links__k { color: var(--text-muted); font-size: var(--step--1); }

/* Poprawki wyglądu (Nov 28, 2026): przewijany pasek chipów ma zanikającą prawą krawędź (sygnał, że jest więcej),
   telefon: podtytuł nagłówka w dwóch liniach zamiast ucięcia, chipy i małe przyciski co najmniej 44 px wysokości */
.chips:not(.chips--wrap)::after { content: ""; position: sticky; right: 0; flex: none; width: 28px; margin-left: -6px; background: linear-gradient(90deg, transparent, var(--bg) 85%); pointer-events: none; }
@media (max-width: 599px) {
  .hub__sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
  .hub__mgr { display: none; }
  .chip, .chips--sm .chip { min-height: 44px; }
  .btn--sm { min-height: 44px; }
}
@media (max-width: 759px) {
  .chips--wrap::after { content: ""; position: sticky; right: 0; flex: none; width: 28px; margin-left: -6px; background: linear-gradient(90deg, transparent, var(--bg) 85%); pointer-events: none; }
}

/* Okno „Co nowego” (src/ui/sysMenu.js newsHtml) */
.sysdlg__news { display: grid; gap: var(--space-3); max-height: min(60dvh, 520px); overflow-y: auto; margin-bottom: var(--space-3); }
.sysdlg__items { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; line-height: 1.4; }
.newsdlg .sysdlg__x { min-height: 44px; }
