/* Dzień meczowy (z projektu design/dzien-meczowy.css): szyna kroków, studio, odprawy, mecz na żywo. */

.md { min-height: 100dvh; display: flex; flex-direction: column; }
.md__main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: var(--space-4) var(--space-4) calc(96px + env(safe-area-inset-bottom)); }
.proto-note { margin: 0; padding: var(--space-2) var(--space-4); font-size: var(--step--1); color: var(--text-muted); text-align: center; }

/* Szyna przebiegu dnia: prawdziwa sekwencja, więc numerowana */
.rail {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 2px; margin: 0; padding: var(--space-2) var(--space-3);
  list-style: none; overflow-x: auto; scrollbar-width: none;
  background: var(--murawa);
  background-image: repeating-linear-gradient(90deg, transparent 0 40px, rgba(255,255,255,.05) 40px 80px);
}
.rail::-webkit-scrollbar { display: none; }
.rail button {
  display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: 999px; background: none; color: color-mix(in srgb, var(--kreda) 70%, transparent);
  font: 600 13px/1 var(--font-body); white-space: nowrap; cursor: pointer;
}
.rail .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font: 700 11px/1 var(--font-display); }
.rail [aria-current="step"] { background: var(--kreda); color: var(--murawa); }
.rail [aria-current="step"] .n { background: var(--murawa); color: var(--kreda); border-color: var(--murawa); }
.rail .done { color: var(--kreda); }
.rail .done .n { background: var(--kreda); color: var(--murawa); border-color: var(--kreda); }

/* Nagłówek meczu (studio) */
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-3); padding: var(--space-4) 0 var(--space-3); 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; gap: var(--space-1); }
.fixture__meta { margin: 0 0 var(--space-4); color: var(--text-muted); font-size: var(--step--1); text-align: center; }

/* Sekcje programu meczowego: rytm pasów murawy zamiast kart */
.sec { padding: var(--space-4) 0; border-top: 6px solid var(--murawa-jasna); }
.sec:nth-of-type(even) { border-top-color: var(--murawa); }
.sec h2 { font-size: var(--step-2); margin-bottom: var(--space-3); }
.sec p { margin: 0 0 var(--space-2); }

/* Szanse 1X2: jeden pasek */
.odds { display: flex; height: 40px; border-radius: var(--radius-s); overflow: hidden; font: 700 var(--step-0)/40px var(--font-display); }
.odds span { display: block; padding: 0 var(--space-2); white-space: nowrap; overflow: hidden; }
.odds .h { background: var(--home); color: var(--home-ink); }
.odds .d { background: var(--surface-stripe); color: var(--text); text-align: center; }
.odds .a { background: var(--away); color: var(--away-ink); text-align: right; }
.odds-legend { display: flex; justify-content: space-between; margin-top: var(--space-1); font-size: var(--step--1); color: var(--text-muted); }

/* Porównanie dwóch drużyn */
.vs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vs td { padding: 8px 4px; }
.vs td:first-child { text-align: left; font: 700 var(--step-1)/1 var(--font-display); width: 22%; }
.vs td:last-child { text-align: right; font: 700 var(--step-1)/1 var(--font-display); width: 22%; }
.vs td.lbl { text-align: center; color: var(--text-muted); font-size: var(--step--1); }
.vs tr:nth-child(even) { background: var(--surface-stripe); }
.bar2 { display: flex; height: 6px; margin-top: 4px; border-radius: 3px; overflow: hidden; background: var(--surface-stripe); }
.bar2 i { display: block; }
.bar2 .bh { background: var(--home); }
.bar2 .ba { background: var(--away); margin-left: auto; }

/* Forma W/R/P */
.form { display: inline-flex; gap: 3px; }
.form b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; font: 700 12px/1 var(--font-display); color: #fff; }
.form .W { background: #2E8A4E; } .form .R { background: #7C8780; } .form .P { background: var(--kartka-czerwona); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 6px 0; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; gap: var(--space-2); 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: 64px; color: var(--text-muted); font-size: var(--step--1); }

.assistant { margin: 0; padding: var(--space-3) var(--space-4); border-left: 4px solid var(--murawa); background: var(--surface); font-size: var(--step-0); }
.assistant footer { margin-top: var(--space-2); font-size: var(--step--1); color: var(--text-muted); }

.headlines { list-style: none; margin: 0; padding: 0; }
.headlines li { padding: 10px 0; border-bottom: 1px solid var(--line); font: 600 var(--step-1)/1.2 var(--font-display); }
.headlines small { display: block; margin-top: 2px; font: 400 var(--step--1)/1.3 var(--font-body); color: var(--text-muted); }

/* Odprawa */
.talk-ctx { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); background: var(--surface); border-radius: var(--radius-m); }
.tones { display: grid; gap: 6px; margin: 0 0 var(--space-4); padding: 0; border: 0; }
.tone { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); border: 1.5px solid var(--line); border-radius: var(--radius-m); background: var(--surface); cursor: pointer; }
.tone input { margin-top: 4px; accent-color: var(--murawa); width: 18px; height: 18px; flex: none; }
.tone strong { display: block; font: 700 var(--step-1)/1.15 var(--font-display); }
.tone span { font-size: var(--step--1); color: var(--text-muted); }
.tone:has(input:checked) { border-color: var(--murawa); background: color-mix(in srgb, var(--murawa) 9%, var(--surface)); }
.hint { font-size: var(--step--1); color: var(--text-muted); margin: 0 0 var(--space-2); }

.players { list-style: none; margin: 0; padding: 0; }
.prow { display: grid; grid-template-columns: 30px 1fr auto; gap: var(--space-2); align-items: center; min-height: 56px; padding: 6px var(--space-2); border-bottom: 1px solid var(--line); }
.prow:nth-child(even) { background: var(--surface-stripe); }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--home); color: var(--home-ink); font: 700 13px/1 var(--font-display); }
.pname { font-weight: 600; line-height: 1.2; }
.pname small { display: block; font-weight: 400; font-size: var(--step--1); color: var(--text-muted); }
.pick-select { min-height: 40px; max-width: 150px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.react { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.react::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.react[data-r="zmotywowany"] { color: #1E7A43; background: color-mix(in srgb, #2E8A4E 14%, transparent); }
.react[data-r="spokojny"] { color: #2D6A8F; background: color-mix(in srgb, #2D6A8F 13%, transparent); }
.react[data-r="obojętny"] { color: var(--text-muted); background: var(--surface-stripe); }
.react[data-r="zdenerwowany"] { color: #9A6A00; background: color-mix(in srgb, var(--kartka-zolta) 22%, transparent); }
.react[data-r="urażony"] { color: var(--kartka-czerwona); background: color-mix(in srgb, var(--kartka-czerwona) 12%, transparent); }

/* Pasek akcji na dole */
.actionbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: flex; gap: var(--space-2); justify-content: center;
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
}
.actionbar .btn { flex: 1; max-width: 360px; }

/* Mecz na żywo */
.live { display: grid; gap: var(--space-3); }
.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-0)/1 var(--font-led); color: var(--led); text-align: center; }

.live > .board { position: sticky; top: 52px; z-index: 15; box-shadow: 0 6px 0 var(--bg); }
.momentum { display: block; width: 100%; height: 56px; border-radius: var(--radius-s); background: var(--surface); }
.poss { display: flex; align-items: center; gap: var(--space-2); font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.poss .bar2 { flex: 1; height: 8px; margin: 0; }

.pitch-wrap { position: relative; }
.pitch { display: block; width: min(100%, calc(60dvh * 0.68)); margin: 0 auto; aspect-ratio: 68 / 100; border-radius: var(--radius-m); }
.goal {
  position: fixed; inset: 0; z-index: 60; display: none; place-items: center;
  background: rgba(14, 21, 17, .86);
}
.goal.on { display: grid; }
.goal b { font: 800 clamp(4rem, 3rem + 10vw, 8rem)/1 var(--font-led); color: var(--led); text-shadow: 0 0 24px rgba(255,178,26,.8); animation: blink .5s steps(2, jump-none) 6; }
.goal small { display: block; margin-top: var(--space-2); font: 700 var(--step-1)/1.2 var(--font-display); color: var(--kreda); text-align: center; }
@keyframes blink { 50% { opacity: .15; } }

.feed { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.feed li { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-2); padding: 8px var(--space-2); border-bottom: 1px solid var(--line); }
.feed .m { font: 700 var(--step-0)/1.3 var(--font-display); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.feed .goalrow { background: color-mix(in srgb, var(--led) 18%, transparent); font-weight: 600; }
.card-ico { display: inline-block; width: 10px; height: 14px; margin-right: 6px; border-radius: 2px; vertical-align: -2px; }
.card-ico.y { background: var(--kartka-zolta); } .card-ico.r { background: var(--kartka-czerwona); }

.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.controls .btn { font-size: var(--step-0); min-height: 44px; padding: 0 var(--space-2); }
.speed[aria-pressed="true"] { background: var(--murawa); color: var(--kreda); border-color: var(--murawa); }

.tabs2 { display: flex; border-bottom: 1px solid var(--line); margin-bottom: var(--space-2); }
.tabs2 button { flex: 1; min-height: 40px; border: 0; background: none; font: 700 var(--step-0)/1 var(--font-display); color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs2 [aria-selected="true"] { color: var(--text); border-bottom-color: var(--murawa); }

/* Studio pomeczowe */
.final { text-align: center; padding: var(--space-4) 0; }
.final .board { margin-bottom: var(--space-3); }
.scorers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); font-size: var(--step--1); }
.scorers div:last-child { text-align: right; }
.mvp { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: #0E1511; color: var(--kreda); border-radius: var(--radius-m); }
.mvp .r { margin-left: auto; font: 800 var(--step-3)/1 var(--font-led); color: var(--led); }
.moments { list-style: none; margin: 0; padding: 0; position: relative; }
.moments li { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-2); padding: 8px 0; }
.moments .m { font: 700 var(--step-0)/1.3 var(--font-display); }
.mood { display: grid; gap: var(--space-2); }
.mood-row { display: grid; grid-template-columns: 90px 1fr 44px; gap: var(--space-2); align-items: center; font-size: var(--step--1); }
.meter { height: 8px; border-radius: 4px; background: var(--surface-stripe); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--murawa); }
.ratings { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--space-4); }
.ratings li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: var(--step--1); }
.ratings b { font-family: var(--font-display); font-size: var(--step-0); }
.mini-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--step--1); }
.mini-table td, .mini-table th { padding: 6px 4px; text-align: right; }
.mini-table td:nth-child(2), .mini-table th:nth-child(2) { text-align: left; }
.mini-table tr.me { background: color-mix(in srgb, var(--murawa) 14%, transparent); font-weight: 700; }
.mini-table th { color: var(--text-muted); font-weight: 600; }
.qa { margin: 0 0 var(--space-4); }
.qa p { font-weight: 600; margin: 0 0 var(--space-2); }

/* PC: mecz w trzech kolumnach */
@media (min-width: 1024px) {
  .md__main { max-width: 1200px; padding-left: var(--space-6); padding-right: var(--space-6); }
  .actionbar { justify-content: flex-end; padding-right: var(--space-6); }
  .studio-cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
}

@media (prefers-reduced-motion: reduce) {
  .goal b { animation: none; }
}

/* Dialogi w trakcie meczu (zmiany, taktyka, okrzyk) */
.md-dlg { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-m, 12px); padding: var(--space-4); background: var(--surface); color: var(--text); }
.md-dlg::backdrop { background: rgb(0 0 0 / .55); }
.md-dlg .role { margin-bottom: var(--space-3); }
.md-dlg h2 { margin-top: 0; }
.md .notice { margin: 0 0 var(--space-3); }
.side-area h3 { font: 700 var(--step-0)/1.2 var(--font-display); margin: var(--space-3) 0 var(--space-1); }

.players .sub-head { padding: var(--space-3) 0 var(--space-1); font: 700 var(--step-0)/1.2 var(--font-display); }

/* Start / pauza meczu: główny przycisk sterowania, wyraźnie inny niż pozostałe */
.controls .md-play { grid-column: 1 / -1; min-height: 52px; font: 700 var(--step-1)/1 var(--font-display); background: var(--led); color: #14211A; border: 2px solid #14211A; box-shadow: 0 3px 0 #14211A; }
.controls .md-play:hover { filter: brightness(1.06); }
.controls .md-play:active { transform: translateY(2px); box-shadow: 0 1px 0 #14211A; }
.controls .md-play.is-running { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .controls .md-play:active { transform: none; } }

/* Panel zmian: listy na boisku i ławka, zaplanowane zmiany */
.md-dlg--wide { width: min(860px, calc(100vw - 24px)); position: relative; }
.subs-grid { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .subs-grid { grid-template-columns: 1fr 1fr; } }
.subs-grid h3, .subs-pending h3 { margin: 0 0 var(--space-2); font: 700 var(--step-0)/1.2 var(--font-display); }
.sub-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.sub-row + .sub-row, .sub-pend + .sub-pend { border-top: 1px solid var(--line); }
.sub-row__main { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) 54px 38px; gap: 8px; align-items: center; width: 100%; min-height: 48px; padding: 4px 10px 4px 4px; border: 0; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: grab; }
.sub-row__main:focus-visible { outline: 3px solid var(--led); outline-offset: -3px; }
.sub-row__main:disabled { cursor: default; opacity: .45; }
.sub-row.is-sel .sub-row__main { box-shadow: inset 4px 0 0 var(--led); background: color-mix(in srgb, var(--led) 14%, var(--surface)); }
.sub-row.is-target .sub-row__main { outline: 3px dashed var(--led); outline-offset: -4px; }
.sub-row.is-hurt .sub-name { color: var(--kartka-czerwona); }
.sub-handle { width: 22px; height: 32px; touch-action: none; background: radial-gradient(circle, var(--text-muted) 1.4px, transparent 1.6px) 0 0 / 7px 7px; opacity: .7; }
.sub-name { display: flex; flex-direction: column; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-name small { font-weight: 400; color: var(--text-muted); font-size: var(--step--1); }
.sub-cond { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.sub-cond i { display: block; height: 100%; background: var(--murawa, #2E8A4E); }
.sub-cond i.mid { background: var(--led); } .sub-cond i.low { background: var(--kartka-czerwona); }
.sub-row__main b { text-align: right; font-variant-numeric: tabular-nums; }
.subs-pending { margin-top: var(--space-3); }
.sub-pend { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 8px 10px; background: color-mix(in srgb, var(--led) 12%, var(--surface)); }
.sub-pend .out, .sub-pend .in { color: var(--text); }
.sub-pend .out::before, .sub-pend .in::before { display: inline-block; width: 1.1em; font-weight: 800; }
.sub-pend .out::before { content: '−'; color: var(--kartka-czerwona); }
.sub-pend .in::before { content: '+'; color: var(--led); }
.sub-pend small { display: block; color: var(--text-muted); }
.sub-ghost { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: 999px; background: var(--led); color: #14211A; font-weight: 700; box-shadow: 0 6px 18px rgb(0 0 0 / .3); white-space: nowrap; }
.md-dlg.is-dragging { user-select: none; }

/* Telefon i tablet: sterowanie meczem (Start) zaraz pod tablicą wyniku, nad boiskiem */
@media (max-width: 1023px) {
  .live > .board { order: 0; }
  .live .ctrl-area { order: 1; }
  .live .mom-area { order: 2; }
  .live .pitch-area { order: 3; }
  .live .feed-area { order: 4; }
  .live .side-area { order: 5; }
}
/* Zatwierdzanie zmian zawsze widoczne na dole panelu */
.md-dlg--wide .tac__actions { position: sticky; bottom: calc(-1 * var(--space-4)); margin: var(--space-2) calc(-1 * var(--space-4)) calc(-1 * var(--space-4)); padding: var(--space-3) var(--space-4); background: var(--surface); border-top: 1px solid var(--line); justify-content: flex-end; }
.md-dlg--wide #mdDlgMsg:empty { display: none; }

/* Okienka zdarzeń nad boiskiem: kartki, VAR, karne, kontuzje */
.pitch-area { position: relative; }
.md-toasts { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 4; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.md-toast { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: var(--radius-m); background: rgb(14 21 17 / .92); color: var(--kreda, #F3F6F1); border-left: 6px solid var(--line); box-shadow: 0 6px 16px rgb(0 0 0 / .3); font-size: var(--step--1); animation: md-toast-in .25s ease-out; }
.md-toast__k { font: 700 var(--step-0)/1.2 var(--font-display); }
.md-toast__k small { opacity: .7; font-weight: 400; }
.md-toast--y { border-left-color: var(--kartka-zolta); }
.md-toast--r { border-left-color: var(--kartka-czerwona); }
.md-toast--var { border-left-color: #6FA8FF; }
.md-toast--pen { border-left-color: var(--led); }
.md-toast--inj { border-left-color: #E8A33D; }
@keyframes md-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* Gra wstrzymana po czerwonej kartce albo kontuzji zawodnika gracza */
.md-halt { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 5; padding: var(--space-3); border-radius: var(--radius-m); background: var(--surface); color: var(--text); border: 2px solid var(--led); box-shadow: 0 10px 28px rgb(0 0 0 / .35); }
.md-halt[hidden] { display: none; }
.md-halt b { font: 700 var(--step-1)/1.2 var(--font-display); }
.md-halt p { margin: 4px 0 var(--space-2); font-size: var(--step--1); }
.md-halt__btns { display: flex; flex-wrap: wrap; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .md-toast { animation: none; } }

/* ================= Mecz na żywo: układ v2 =================
   Nagłówek (tablica + pasek tempa) przyklejony u góry. Tempo osobno od decyzji trenera:
   pasek tempa pod tablicą, pasek trenera pod boiskiem. */
.actionbar:empty { display: none; }
.live { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.live__head { position: sticky; top: 52px; z-index: 15; display: grid; gap: 6px; background: var(--bg); padding-bottom: 6px; }
.live__head > .board { position: static; box-shadow: none; }
.live .ctrl-area, .live .controls { display: none; }

.transport { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 6px; border-radius: var(--radius-m); background: #0E1511; color: var(--kreda, #F3F6F1); }
.md-play { flex: none; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--led); color: #14211A; font: 700 var(--step-0)/1 var(--font-display); cursor: pointer; }
.md-play:hover { filter: brightness(1.06); }
.md-play.is-running { background: transparent; color: var(--led); box-shadow: inset 0 0 0 2px var(--led); }
.md-play:focus-visible, .speed:focus-visible, .tp-skip:focus-visible, .coachbar button:focus-visible { outline: 3px solid var(--led); outline-offset: 2px; }
.speedset { display: inline-flex; flex: none; padding: 3px; gap: 2px; border-radius: 999px; background: rgb(255 255 255 / .08); }
.speed { min-height: 34px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: rgb(243 246 241 / .8); font: 700 var(--step--1)/1 var(--font-display); font-variant-numeric: tabular-nums; cursor: pointer; }
.speed[aria-pressed="true"] { background: var(--kreda, #F3F6F1); color: #14211A; border-color: transparent; }
.tp-skip { margin-left: auto; flex: none; min-height: 40px; padding: 0 14px; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; background: transparent; color: inherit; font: 600 var(--step--1)/1 var(--font-body, inherit); cursor: pointer; white-space: nowrap; }
.tp-skip:hover { background: rgb(255 255 255 / .08); }

.pitch-area { position: relative; display: grid; gap: 8px; }
.pitch-wrap { position: relative; }
.coachbar { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; }
.coachbar button { min-height: 40px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: 700 var(--step--1)/1 var(--font-display); cursor: pointer; }
.coachbar button:hover { border-color: var(--murawa); }

.mom-area { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--radius-m); background: var(--surface); }
.mom-area .momentum { height: 56px; background: transparent; }
.mom-area .poss { margin: 0; }

/* Telefon: wąski pasek tempa w jednym rzędzie */
@media (max-width: 479px) {
  .transport { gap: 6px; padding: 5px; }
  .md-play { padding: 0 12px; font-size: var(--step--1); }
  .speed { min-width: 38px; padding: 0 6px; }
  .tp-skip { padding: 0 12px; }
  .tp-skip__x { display: none; }
}
@media (max-width: 1023px) {
  .live > .live__head { order: 0; }
  .live .pitch-area { order: 1; }
  .live .mom-area { order: 2; }
  .live .feed-area { order: 3; }
  .live .side-area { order: 4; }
  .live .pitch { width: min(100%, calc(56dvh * 0.68)); }
}

/* PC: relacja | boisko z paskiem trenera | przebieg i statystyki */
@media (min-width: 1024px) {
  .live { grid-template-columns: minmax(240px, 1fr) auto minmax(280px, 1fr); grid-template-areas: "head head head" "feed pitch mom" "feed pitch side"; column-gap: var(--space-4); align-items: start; }
  .live > .live__head { grid-area: head; }
  .live .pitch-area { grid-area: pitch; position: sticky; top: 236px; justify-self: center; width: clamp(260px, calc((100dvh - 310px) * 0.68), 400px); }
  .live .mom-area { grid-area: mom; }
  .live .feed-area { grid-area: feed; }
  .live .side-area { grid-area: side; }
  .live .feed { max-height: calc(100dvh - 300px); overflow: auto; }
  .live .pitch { width: 100%; }
}

/* Momentum: oś 90 minut, strzały i gole, wskaźnik ostatnich 5 minut */
.mom-area .momentum { height: 72px; overflow: visible; }
.momentum .mom-axis { stroke: var(--text); stroke-opacity: .3; stroke-width: .35; vector-effect: non-scaling-stroke; }
.momentum .mom-ht { stroke: var(--text); stroke-opacity: .18; stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.momentum .mom-now { stroke: var(--led); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.momentum .mom-shot { stroke: var(--surface); stroke-width: .3; }
.momentum .mom-goal { fill: var(--led); stroke: #14211A; stroke-width: .5; }
.press { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.press__track { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--home) 0 50%, var(--away) 50% 100%); opacity: .9; }
.press__track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--surface); }
.press__knob { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--kreda, #F3F6F1); box-shadow: 0 0 0 2px #14211A, 0 2px 6px rgb(0 0 0 / .35); transition: left .6s cubic-bezier(.3, .7, .3, 1); z-index: 1; }
.press__knob[data-side="0"] { box-shadow: 0 0 0 3px var(--home), 0 0 0 5px #14211A; }
.press__knob[data-side="1"] { box-shadow: 0 0 0 3px var(--away), 0 0 0 5px #14211A; }
.press__lbl { min-width: 9.5em; text-align: right; font: 700 var(--step--1)/1.1 var(--font-display); }
@media (prefers-reduced-motion: reduce) { .press__knob { transition: none; } }

/* Tablica wyniku: czytelne cyfry zamiast kropkowanego LED */
.board__score { font: 700 clamp(2.5rem, 1.9rem + 3vw, 3.5rem)/.9 var(--font-display); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; color: var(--led); text-shadow: 0 0 14px rgb(255 178 26 / .3); }
.board__min { display: inline-block; margin-top: 6px; padding: 3px 8px; border-radius: 3px; background: rgb(255 178 26 / .14); font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--led); }
.board > div:nth-child(2) { text-align: center; }
.mvp .r { font-family: var(--font-display); font-weight: 700; }

/* GOL: na środku boiska, miga w barwach drużyny, która strzeliła */
.pitch-wrap { container-type: inline-size; }
.goal { position: absolute; inset: 0; z-index: 6; display: none; place-items: center; border-radius: var(--radius-m); background: rgb(14 21 17 / .55); pointer-events: none; }
.goal.on { display: grid; }
.goal[data-side="0"] { --gc: var(--home); --gc-ink: var(--home-ink); }
.goal[data-side="1"] { --gc: var(--away); --gc-ink: var(--away-ink); }
.goal[data-side="var"] { --gc: #6FA8FF; --gc-ink: #0E1511; }
.goal__in { display: grid; justify-items: center; gap: 8px; max-width: 92%; }
.goal b { display: block; padding: .06em .32em; border-radius: 8px; font: 700 clamp(3.2rem, 20cqi, 6rem)/1 var(--font-display); letter-spacing: .05em; background: var(--gc); color: var(--gc-ink); text-shadow: none; box-shadow: 0 0 0 3px var(--gc-ink), 0 10px 30px rgb(0 0 0 / .45); animation: gol-flash .36s steps(1, end) 6, gol-in .25s ease-out; }
.goal small { margin: 0; padding: 4px 10px; border-radius: 4px; background: rgb(14 21 17 / .85); color: var(--kreda, #F3F6F1); font: 700 var(--step-0)/1.2 var(--font-display); text-align: center; }
@keyframes gol-flash { 50% { background: var(--gc-ink); color: var(--gc); box-shadow: 0 0 0 3px var(--gc), 0 10px 30px rgb(0 0 0 / .45); } }
@keyframes gol-in { from { transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .goal b { animation: none; } }
/* Dramaturgia: rzut karny, protest, analiza VAR i werdykt. Dłuższe napisy mniejszym krojem, analiza z paskiem postępu */
.goal--long b { font-size: clamp(1.9rem, 9cqi, 3.6rem); letter-spacing: .03em; text-align: center; }
.goal[data-kind="check"] b, .goal[data-kind="claim"] b, .goal[data-kind="penalty"] b { animation: gol-in .25s ease-out; }
.goal[data-kind="check"] b { animation: var-pulse 1.1s ease-in-out infinite; }
.goal[data-kind="verdict"] b { animation: gol-in .25s ease-out; }
.goal__bar { display: none; width: min(260px, 70cqi); height: 6px; border-radius: 3px; background: rgb(243 246 241 / .18); overflow: hidden; }
.goal[data-kind="check"] .goal__bar { display: block; }
.goal__bar::after { content: ""; display: block; height: 100%; width: 100%; background: #6FA8FF; transform-origin: left; animation: var-progress var(--stage-ms, 3s) linear forwards; }
@keyframes var-pulse { 50% { box-shadow: 0 0 0 3px var(--gc-ink), 0 0 0 9px rgb(111 168 255 / .35), 0 10px 30px rgb(0 0 0 / .45); } }
@keyframes var-progress { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .goal[data-kind] b { animation: none; } .goal__bar::after { animation-duration: 0s; } }

/* Relacja: pasek w barwach klubu, gospodarze z lewej, goście z prawej */
.feed li[data-side] { --c: var(--home); --ci: var(--home-ink); box-shadow: inset 5px 0 0 var(--c), inset 6px 0 0 color-mix(in srgb, var(--text) 22%, transparent); padding-left: 14px; }
.feed li[data-side="1"] { --c: var(--away); --ci: var(--away-ink); box-shadow: inset -5px 0 0 var(--c), inset -6px 0 0 color-mix(in srgb, var(--text) 22%, transparent); padding-left: var(--space-2); padding-right: 14px; }
.feed li[data-side] b.tm { padding: 1px 5px; border-radius: 3px; background: var(--c); color: var(--ci); font: 700 12px/1.3 var(--font-display); }
.feed li:not([data-side]) { color: var(--text-muted); }
.feed li.goalrow[data-side] { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }

/* ================= Zmiany i taktyka: jedno okno =================
   PC: boisko z ustawieniem | na boisku | ławka, instrukcje pod listami, kolejka i Zatwierdź w stopce.
   Telefon: pełny ekran, boisko poziomo u góry, zakładki Ławka / Na boisku / Taktyka. */
.md-dlg.mm-dlg { width: min(1220px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; }
.mm { display: grid; height: min(860px, calc(100dvh - 34px)); grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head head" "pitch lists" "foot foot"; }
.mm__head { grid-area: head; display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mm__head h2 { margin: 0; font: 700 var(--step-2)/1 var(--font-display); }
.mm__info { margin-right: auto; color: var(--text-muted); font-size: var(--step--1); }
.mm__x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.mm__x:hover { background: var(--line); }
.mm__pitch { grid-area: pitch; display: grid; align-content: start; gap: 8px; padding: 12px 16px; overflow: auto; border-right: 1px solid var(--line); }
.mm-form { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; font: 700 var(--step--1)/1 var(--font-display); }
.mm-form select { min-height: 40px; }
.mm__tip { margin: 0; color: var(--text-muted); font-size: 12px; text-align: center; }
.mm-field { max-width: 308px; }
.mm-tok { position: absolute; left: calc(var(--x) * 1%); top: calc((94 - var(--y) * .98) * 1%); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 62px; padding: 0; border: 0; background: none; color: var(--kreda, #F3F6F1); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; --cc: #4CC27A; }
.mm-tok[data-c="mid"] { --cc: var(--led); }
.mm-tok[data-c="low"] { --cc: var(--kartka-czerwona); }
.mm-tok__dot { width: 36px; height: 36px; padding: 3px; border-radius: 50%; background: conic-gradient(var(--cc) calc(var(--cond) * 1%), rgb(255 255 255 / .22) 0); box-shadow: 0 2px 4px rgb(0 0 0 / .35); }
.mm-tok__dot > span { display: grid; place-items: center; height: 100%; border-radius: 50%; background: var(--home); color: var(--home-ink); font: 700 11px/1 var(--font-display); }
.mm-tok.is-gk .mm-tok__dot > span { background: var(--gk-kit, #7A3FB0); color: var(--gk-kit-text, #fff); }
.mm-tok__name { max-width: 62px; padding: 0 3px; border-radius: 3px; background: rgb(14 21 17 / .7); font: 600 11px/1.3 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-tok__yc { position: absolute; top: -2px; right: 12px; width: 7px; height: 10px; border-radius: 1px; background: var(--kartka-zolta); }
.mm-tok__inj { position: absolute; top: -4px; left: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--kartka-czerwona); color: #fff; font: 800 12px/14px var(--font-display); font-style: normal; }
.mm-tok.is-planned { cursor: default; }
.mm-tok.is-planned .mm-tok__dot { outline: 2px dashed var(--led); outline-offset: 2px; }
.mm-tok.is-planned .mm-tok__name { background: var(--led); color: #14211A; }
.mm-tok.is-sel .mm-tok__dot, .mm-tok.is-target .mm-tok__dot { outline: 3px solid var(--led); outline-offset: 2px; transform: scale(1.1); }
.mm-tok:focus-visible .mm-tok__dot { outline: 3px solid var(--focus, var(--led)); outline-offset: 2px; }
.mm__tabs { display: none; }
.mm__lists { grid-area: lists; display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "xi bench" "tac tac"; align-content: start; gap: 14px 16px; padding: 12px 16px; overflow: auto; }
.mm__xi { grid-area: xi; } .mm__bench { grid-area: bench; } .mm__tac { grid-area: tac; }
.mm__lists h3 { margin: 0 0 6px; font: 700 var(--step-0)/1.2 var(--font-display); }
.mm .sub-row__main { min-height: 42px; grid-template-columns: 18px 36px minmax(0, 1fr) 44px 36px; gap: 6px; }
.mm-segs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.mm-seg { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.mm-seg__lbl { padding: 0; font: 700 12px/1.2 var(--font-display); float: left; }
.mm-seg.is-dirty .mm-seg__lbl::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--led); vertical-align: middle; }
.mm-seg__opts { display: flex; min-width: 0; padding: 2px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.mm-seg__opts label { flex: 1; min-width: 0; position: relative; }
.mm-seg__opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mm-seg__opts span { display: grid; place-items: center; min-height: 34px; padding: 0 4px; border-radius: 999px; font: 700 12px/1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.mm-seg__opts input:checked + span { background: var(--murawa, #2E8A4E); color: var(--kreda, #F3F6F1); }
.mm-seg__opts input:focus-visible + span { outline: 3px solid var(--led); outline-offset: 1px; }
.mm__foot { grid-area: foot; display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.mm__queue { flex: 1; min-width: 0; }
.mm__queue ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 84px; overflow: auto; }
.mm__queue p { margin: 2px 0 0; font-size: var(--step--1); }
.mm__queue #mdDlgMsg:empty { display: none; }
.mm-pend { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--led) 16%, var(--surface)); font-size: var(--step--1); }
.mm-pend .out::before { content: '↓ '; color: var(--kartka-czerwona); } .mm-pend .in::before { content: '↑ '; color: var(--murawa, #2E8A4E); }
.mm-pend small { display: block; color: var(--text-muted); }
.mm-pend.is-warn { background: color-mix(in srgb, var(--kartka-czerwona) 18%, var(--surface)); }
.mm-pend button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 18px; cursor: pointer; }
.mm-pend button:hover { background: var(--line); }
.mm__btns { display: flex; gap: 8px; }
.mm__ok { min-width: 150px; }
.mm__ok:disabled { opacity: .45; cursor: default; }
.mm__tabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--led); vertical-align: middle; }

@media (max-width: 1023px) and (min-width: 700px) {
  .mm { grid-template-columns: 300px minmax(0, 1fr); }
  .mm__lists { grid-template-columns: 1fr; grid-template-areas: "bench" "xi" "tac"; }
  .mm-segs { grid-template-columns: 1fr; }
}
/* Telefon: pełny ekran, boisko poziomo */
@media (max-width: 699px) {
  .md-dlg.mm-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .mm { height: 100dvh; grid-template-columns: 1fr; grid-template-rows: auto auto auto minmax(0, 1fr) auto; grid-template-areas: "head" "pitch" "tabs" "lists" "foot"; }
  .mm__head { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .mm__head h2 { font-size: var(--step-1); }
  .mm__info { order: 3; flex-basis: 100%; font-size: 12px; }
  .mm__pitch { padding: 8px 12px; border-right: 0; gap: 6px; overflow: visible; }
  .mm-form select { min-height: 36px; }
  .mm__tip { display: none; }
  .mm-field { max-width: none; aspect-ratio: 100 / 64;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 68' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23F3F6F1' stroke-opacity='.8' stroke-width='.45'%3E%3Crect x='2.5' y='3' width='95' height='62'/%3E%3Cline x1='50' y1='3' x2='50' y2='65'/%3E%3Ccircle cx='50' cy='34' r='8.5'/%3E%3Crect x='2.5' y='14' width='16' height='40'/%3E%3Crect x='2.5' y='25' width='5.5' height='18'/%3E%3Crect x='81.5' y='14' width='16' height='40'/%3E%3Crect x='92' y='25' width='5.5' height='18'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat,
      repeating-linear-gradient(90deg, var(--murawa) 0 8.33%, var(--murawa-jasna) 8.33% 16.66%); }
  .mm-tok { left: calc((var(--y) * .92 + 3) * 1%); top: calc((var(--x) * .86 + 7) * 1%); width: 54px; }
  .mm-tok__dot { width: 30px; height: 30px; }
  .mm-tok__dot > span { font-size: 10px; }
  .mm-tok__name { max-width: 54px; font-size: 10px; }
  .mm__tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .mm__tabs button { min-height: 44px; border: 0; background: none; color: var(--text-muted); font: 700 var(--step--1)/1 var(--font-display); border-bottom: 3px solid transparent; cursor: pointer; }
  .mm__tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--led); }
  .mm__lists { grid-template-columns: 1fr; grid-template-areas: none; padding: 8px 12px; }
  .mm__lists > section { grid-area: auto; }
  .mm[data-tab="bench"] .mm__xi, .mm[data-tab="bench"] .mm__tac,
  .mm[data-tab="xi"] .mm__bench, .mm[data-tab="xi"] .mm__tac,
  .mm[data-tab="tac"] .mm__xi, .mm[data-tab="tac"] .mm__bench { display: none; }
  .mm-segs { grid-template-columns: 1fr; }
  .mm-seg { grid-template-columns: 84px 1fr; }
  .mm__foot { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .mm__btns { justify-content: stretch; } .mm__btns > * { flex: 1; }
  .mm__queue ul { max-height: 64px; }
}
@media (max-width: 699px) {
  .mm__x { margin-left: auto; }
  .mm__queue ul { flex-wrap: nowrap; overflow-x: auto; max-height: none; padding-bottom: 2px; }
  .mm-pend { flex: none; white-space: nowrap; }
}

/* ================= Studio pomeczowe: sekcje o różnych formach ================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pst { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.pst__score .final { margin: 0; }
.pst__verdict { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 8px 0 0; color: var(--text-muted); font-size: var(--step--1); text-align: center; }
.pst__verdict span { font-weight: 700; color: var(--text); }
.pst__motm { position: relative; display: grid; align-content: center; gap: 2px; padding: 16px 18px; border-radius: var(--radius-m); background: #0E1511; color: var(--kreda, #F3F6F1); overflow: hidden; }
.pst__motm::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--led); }
.pst__motm small { opacity: .7; }
.pst__motm strong { font: 700 var(--step-2)/1.1 var(--font-display); }
.pst__motm span { opacity: .75; font-size: var(--step--1); }
.pst__motm .rt { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: var(--step-2); min-width: 64px; padding: 8px 10px; }
.pcard { position: relative; padding: 14px 16px 16px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.pcard h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 var(--step-1)/1.1 var(--font-display); }
.pcard h2::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--pc, var(--murawa)); }
.pcard h3 { margin: 12px 0 6px; font: 700 var(--step-0)/1.2 var(--font-display); }
.pcard--moments { --pc: var(--led); }
.pcard--stats { --pc: var(--murawa, #2E8A4E); }
.pcard--voices { --pc: #6FA8FF; }
.pcard--after { --pc: var(--kartka-czerwona); }
.pcard--ratings { --pc: var(--kartka-zolta); }
/* Oś czasu */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 58px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl__i { position: relative; display: grid; grid-template-columns: 44px 30px minmax(0, 1fr); gap: 0 8px; align-items: start; padding: 6px 0; }
.tl__m { font: 700 var(--step-0)/1.4 var(--font-display); color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.tl__k { position: relative; z-index: 1; display: grid; place-items: center; height: 24px; border-radius: 6px; background: var(--surface); border: 2px solid var(--line); font: 700 10px/1 var(--font-display); }
.tl__i[data-side="0"] .tl__k { border-color: var(--home); }
.tl__i[data-side="1"] .tl__k { border-color: var(--away); }
.tl--goal .tl__k { background: var(--led); color: #14211A; border-color: var(--led); }
.tl--red .tl__k { background: var(--kartka-czerwona); color: #fff; border-color: var(--kartka-czerwona); }
.tl--var .tl__k { background: #6FA8FF; color: #0E1511; border-color: #6FA8FF; }
.tl--goal .tl__t { font-weight: 600; }
.tl__t { line-height: 1.4; }
.pst-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pst-list li { padding: 8px 10px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--text) 5%, transparent); font-size: var(--step--1); }
.pst-list li.is-inj { border-left: 4px solid var(--kartka-czerwona); }
.pst-list li.is-sus { border-left: 4px solid var(--kartka-zolta); }
.pst-teams { display: flex; justify-content: space-between; margin-bottom: 4px; font: 700 var(--step--1)/1 var(--font-display); }
.pst-teams span:first-child { color: var(--home); } .pst-teams span:last-child { color: var(--away); }
.pcard--stats .vs .lbl .bar2 { height: 5px; margin-top: 4px; }
/* Reakcje: nagłówek gazety i głosy */
.paper { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-s); background: #F3F0E6; color: #14211A; border-top: 4px double #14211A; }
.paper p { margin: 0; font: 700 var(--step-1)/1.15 var(--font-display); }
.paper footer { margin-top: 4px; font-size: 12px; opacity: .65; }
.voices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.voice { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--text) 5%, transparent); border-left: 4px solid var(--line); }
.voice.is-up { border-left-color: var(--murawa, #2E8A4E); } .voice.is-down { border-left-color: var(--kartka-czerwona); }
.voice__k { font: 700 var(--step--1)/1.4 var(--font-display); color: var(--text-muted); }
/* Po meczu: zmiana miejsca w tabeli */
.pos-move { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pos-move b { display: grid; place-items: center; min-width: 58px; height: 58px; border-radius: 12px; background: color-mix(in srgb, var(--text) 8%, transparent); font: 700 var(--step-3)/1 var(--font-display); }
.pos-move.is-up b { background: color-mix(in srgb, var(--murawa, #2E8A4E) 22%, transparent); color: var(--murawa, #2E8A4E); }
.pos-move.is-down b { background: color-mix(in srgb, var(--kartka-czerwona) 18%, transparent); color: var(--kartka-czerwona); }
.pos-move span { display: grid; font-weight: 600; } .pos-move small { font-weight: 400; color: var(--text-muted); }
/* Oceny jako kafelki */
.rt { display: inline-grid; place-items: center; min-width: 42px; padding: 4px 6px; border-radius: 6px; font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.rt--top { background: var(--led); color: #14211A; }
.rt--good { background: var(--murawa, #2E8A4E); color: #F3F6F1; }
.rt--mid { background: color-mix(in srgb, var(--text) 14%, transparent); color: var(--text); }
.rt--low { background: var(--kartka-czerwona); color: #fff; }
.rts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.rts li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--text) 4%, transparent); min-width: 0; }
.rts li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Telefon: wynik i statystyki na górze, potem reszta */
.pst__score { order: 0; } .pcard--stats { order: 1; } .pst__motm { order: 2; } .pcard--moments { order: 3; } .pst__side { order: 4; } .pcard--ratings { order: 5; }
/* PC: na środku wynik i pod nim statystyki; z lewej zawodnik meczu i kluczowe momenty, z prawej reakcje i po meczu; oceny na dole */
.md__main:has(> .pst) { max-width: 1680px; }
@media (min-width: 1024px) {
  .pst { align-items: start; column-gap: var(--space-4);
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas: "score score" "stats motm" "stats moments" "stats side" "ratings ratings"; }
  .pst > * { order: 0; }
  .pst__score { grid-area: score; } .pcard--stats { grid-area: stats; } .pst__motm { grid-area: motm; align-self: stretch; }
  .pcard--moments { grid-area: moments; } .pst__side { grid-area: side; } .pcard--ratings { grid-area: ratings; }
}
@media (min-width: 1280px) {
  .pst { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas: "score score score" "motm stats side" "moments stats side" "ratings ratings ratings"; }
  .pst__motm { align-self: stretch; }
  .pcard--moments, .pst__side { align-self: start; }
}
@media (min-width: 1600px) {
  .pst .rts { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ================= Odprawy: panele obok siebie na PC ================= */
.talk-grid { display: grid; gap: var(--space-3); }
.tpanel { padding: 14px 16px 16px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tpanel h2 { margin: 0 0 8px; font: 700 var(--step-1)/1.1 var(--font-display); display: flex; align-items: center; gap: 8px; }
.tpanel h2::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--tp, var(--murawa)); }
.tpanel--speech { --tp: var(--led); } .tpanel--talks { --tp: var(--murawa, #2E8A4E); } .tpanel--press { --tp: #6FA8FF; }
.tpanel .talk-ctx { margin-top: 0; }
.tpanel .tones { display: grid; gap: 6px; }
.tpanel .players .prow { grid-template-columns: 30px minmax(0, 1fr) auto auto; }
.tpanel .players .rt { font-size: var(--step--1); min-width: 36px; }
.tpanel .qa { margin-bottom: var(--space-3); }
@media (min-width: 1024px) {
  .md__main:has(.talk-grid) { max-width: 1320px; }
  .talk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .tpanel--talks .players { max-height: calc(100dvh - 300px); overflow: auto; }
  .tpanel { position: sticky; top: 64px; }
}
.pst__side { display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.tpanel .qa { border: 0; padding: 0; }
.tpanel .qa > p { margin-bottom: 6px; }
/* Podpowiedzi asystenta w okienku zatrzymania gry */
.md-halt__sugg { display: grid; gap: 6px; margin-bottom: var(--space-2); }
.md-halt__sugg:empty { display: none; }
.md-halt__sugg small { color: var(--text-muted); font-size: 12px; }
.md-halt__sugg small.ok { color: var(--murawa, #2E8A4E); font-weight: 600; }
.md-sugg { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: color-mix(in srgb, var(--led) 10%, var(--surface)); color: var(--text); font: 600 var(--step--1)/1.3 var(--font-body, inherit); text-align: left; cursor: pointer; }
.md-sugg span { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--murawa, #2E8A4E); color: #F3F6F1; font: 700 12px/1 var(--font-display); }
.md-sugg:hover { border-color: var(--led); }
.md-sugg:focus-visible { outline: 3px solid var(--led); outline-offset: 2px; }
.feed li[data-side] b.tm { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); }

/* Konferencja prasowa: klimat prasy (agresywna, neutralna, pozytywna) */
[data-c="agresywna"] { --pc: var(--kartka-czerwona); }
[data-c="neutralna"] { --pc: #8A968E; }
[data-c="pozytywna"] { --pc: #2E8A4E; }
.pclimate { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--pc) 18%, transparent); border: 1.5px solid color-mix(in srgb, var(--pc) 70%, transparent); font: 700 var(--step-0)/1 var(--font-display); white-space: nowrap; }
.pclimate i { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); }

/* Drzwi do sali na odprawie pomeczowej */
.pdoor { margin: 0 0 var(--space-3); padding: 12px 16px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--pc); }
.pdoor__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pdoor__state { font-weight: 600; }
.pdoor__why { margin: 8px 0 0; font-size: var(--step--1); color: var(--text-muted); }
.pdoor__skip { margin: 6px 0 0; font-size: var(--step--1); }
.pdoor .paper { margin: 10px 0 0; }
.paper--sm p { font-size: var(--step-0); }
.press-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: var(--space-3) 0 0; font-size: var(--step--1); color: var(--text-muted); }

/* Okno konferencji: osobne okno nad odprawą, na telefonie pełny ekran */
.prs {
  width: min(1120px, calc(100vw - 48px)); height: min(860px, calc(100dvh - 48px)); max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: var(--radius-m); overflow: hidden;
  background: var(--bg); color: var(--text);
}
.prs[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.prs::backdrop { background: rgb(6 10 8 / .72); }

/* Ścianka sponsorska: herb klubu i znak ligi na przemian, jak za stołem w prawdziwej sali */
.prs__wall {
  position: relative; padding: 16px 24px 14px; color: var(--kreda);
  border-top: 5px solid var(--pc);
  background: #0E1511; overflow: hidden; isolation: isolate;
}
.prs__tiles { position: absolute; inset: -6px 0 0 0; z-index: -1; display: grid; grid-template-columns: repeat(12, 96px); grid-auto-rows: 44px; justify-content: end; align-items: center; justify-items: center; opacity: .34; }
.prs__wall::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0E1511 0 32%, rgb(14 21 17 / .25) 80%); }
.prs__tiles img, .prs__tiles svg { display: block; width: 28px; height: 28px; object-fit: contain; }
.prs__tiles b { font: 700 13px/1 var(--font-display); color: var(--kreda); letter-spacing: .02em; }
.prs__bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prs__wall h2 { margin: 0; font: 800 var(--step-3)/1 var(--font-display); }
.prs__match { margin: 4px 0 0; font: 600 var(--step-0)/1.2 var(--font-display); opacity: .85; }
.prs__wall .pclimate { color: var(--kreda); background: color-mix(in srgb, var(--pc) 30%, #0E1511); }
.prs__mood { margin: 10px 0 0; max-width: 72ch; font-size: var(--step--1); line-height: 1.4; }
.prs__mood span { opacity: .75; }

.prs__body { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; }
.prs__room { padding: 16px 12px 16px 20px; border-right: 1px solid var(--line); overflow: auto; background: var(--surface); }
.prs__room h3 { margin: 0 0 8px; font: 700 var(--step-0)/1.2 var(--font-display); color: var(--text-muted); }
.prs__people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.prs__p { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--radius-s); border-left: 4px solid transparent; }
.prs__p b { font: 700 var(--step-0)/1.15 var(--font-display); }
.prs__p span { font-size: var(--step--1); color: var(--text-muted); }
.prs__p.is-officer { border-bottom: 1px dashed var(--line); border-radius: 0; margin-bottom: 4px; }
.prs__p.is-now { border-left-color: var(--led); background: color-mix(in srgb, var(--led) 14%, var(--surface)); }
.prs__p.is-done { opacity: .55; }

.prs__main { overflow: auto; padding: 20px 28px 24px; }
.prs__stage { max-width: 760px; }
.prs__count { margin: 0 0 6px; font: 700 var(--step--1)/1 var(--font-display); color: var(--text-muted); }
.prs__intro { margin: 0 0 10px; color: var(--text-muted); }
.prs__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.prs__who b { font: 700 var(--step-1)/1.1 var(--font-display); }
.prs__who span { font-size: var(--step--1); color: var(--text-muted); }
.prs__q { margin: 8px 0 18px; max-width: 34ch; font: 700 var(--step-3)/1.08 var(--font-display); }
.prs h3[tabindex]:focus:not(:focus-visible) { outline: none; }
.prs h3[tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
.prs__answers { display: grid; gap: 8px; }
.prs__a {
  display: grid; gap: 3px; width: 100%; min-height: 56px; padding: 10px 14px 11px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); border-left: 6px solid var(--tc, var(--line)); border-radius: var(--radius-m);
  background: var(--surface); color: var(--text); font: inherit;
}
.prs__a small { font: 700 var(--step--1)/1.1 var(--font-display); color: var(--text-muted); }
.prs__a span { font-size: var(--step-0); line-height: 1.35; }
.prs__a:hover { border-color: var(--murawa); border-left-color: var(--tc, var(--murawa)); background: color-mix(in srgb, var(--murawa) 7%, var(--surface)); }
.prs__a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.prs__a[data-tone="spokojny"] { --tc: #2E8A4E; }
.prs__a[data-tone="pewny"] { --tc: #3D7FD9; }
.prs__a[data-tone="dyplomatyczny"] { --tc: #8A968E; }
.prs__a[data-tone="konfrontacyjny"] { --tc: var(--kartka-czerwona); }
.prs__a[data-tone="humor"] { --tc: var(--led); }
.prs__a[data-tone="bezkomentarza"] { --tc: var(--text-muted); border-style: dashed; border-left-style: solid; }

.prs__confirm p { max-width: 60ch; }
.prs__confirm h3, .prs__stage--after h3 { margin: 0 0 12px; font: 700 var(--step-2)/1.1 var(--font-display); }
.prs__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.prs__paper { margin: 0 0 14px; }
.prs__paper p { font-size: var(--step-2); line-height: 1.1; }
.prs-fx { margin-bottom: 12px; }
.prs-fx .voice { grid-template-columns: 96px 1fr; }

.prs__log { margin-top: 22px; max-width: 760px; border-top: 1px solid var(--line); padding-top: 10px; }
.prs__log summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font: 700 var(--step-0)/1 var(--font-display); color: var(--text-muted); }
.prs__log ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.prs__lq { margin: 0; font-size: var(--step--1); color: var(--text-muted); }
.prs__lq b { color: var(--text); font-weight: 600; }
.prs__la { margin: 3px 0 0; padding-left: 10px; border-left: 3px solid var(--line); }

.prs__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.prs__foot .btn { min-width: 180px; }

@media (prefers-reduced-motion: no-preference) {
  .prs__stage { animation: prsIn .18s ease-out; }
  @keyframes prsIn { from { opacity: 0; transform: translateY(6px); } }
}

@media (max-width: 699px) {
  .prs { width: 100vw; height: 100dvh; border-radius: 0; }
  .prs__wall { padding: 12px 16px 10px; }
  .prs__tiles { grid-template-columns: repeat(12, 72px); grid-auto-rows: 36px; }
  .prs__wall h2 { font-size: var(--step-2); }
  .prs__mood span { display: none; }
  .prs__body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .prs__room { padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .prs__room h3 { display: none; }
  .prs__people { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .prs__p { flex: none; padding: 4px 10px; border-left-width: 3px; }
  .prs__p span { font-size: 12px; }
  .prs__p.is-officer { border-bottom: 0; margin: 0; }
  .prs__main { padding: 14px 16px 20px; }
  .prs__q { font-size: var(--step-2); margin-bottom: 14px; }
  .prs__foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .prs__foot .btn { flex: 1; min-width: 0; }
  .prs-fx .voice { grid-template-columns: 78px 1fr; }
}

/* Konferencja po meczu jako osobny krok dnia meczowego (ekran, nie okno). PC: cała szerokość, trzy kolumny:
   sala, pytanie i odpowiedzi, zapis konferencji albo nagłówki dnia. Telefon: jedna kolumna. */
.prs.prs--page { display: grid; grid-template-rows: auto minmax(0, 1fr); width: auto; height: auto; min-height: calc(100dvh - 210px); border: 1px solid var(--line); }
.prs__body--page { grid-template-columns: minmax(0, 1fr); }
.prs__side { padding: 16px 20px 24px; background: var(--surface); border-top: 1px solid var(--line); min-width: 0; }
.prs__side h3, .prs__log--empty h3 { margin: 0 0 8px; font: 700 var(--step-0)/1.2 var(--font-display); color: var(--text-muted); }
.prs__side .prs__log { margin-top: 0; border-top: 0; padding-top: 0; max-width: none; }
.prs__side .headlines { margin: 0; }
.prs__lobby h3 { margin: 0 0 8px; font: 700 var(--step-3)/1.08 var(--font-display); }
.prs__lobby > p { margin: 0 0 16px; max-width: 60ch; color: var(--text-muted); }
.prs__opts { display: grid; gap: 10px; margin: 0; }
.prs__opts div { padding: 12px 14px; border: 1.5px solid var(--line); border-left: 6px solid var(--murawa); border-radius: var(--radius-m); background: var(--surface); }
.prs__opts div + div { border-left-color: var(--text-muted); }
.prs__opts dt { font: 700 var(--step-1)/1.15 var(--font-display); }
.prs__opts dd { margin: 4px 0 0; color: var(--text-muted); max-width: 70ch; }
@media (min-width: 1100px) {
  .md__main:has(.prs--page) { max-width: 1840px; padding-left: var(--space-5, 24px); padding-right: var(--space-5, 24px); }
  .prs__body--page { grid-template-columns: 260px minmax(0, 1fr) minmax(320px, 420px); }
  .prs__body--page .prs__main { padding: 28px 40px; }
  .prs__body--page .prs__stage { max-width: 900px; }
  .prs__side { border-top: 0; border-left: 1px solid var(--line); overflow: auto; }
  .prs--page .prs__q { max-width: 40ch; }
}
@media (max-width: 699px) {
  .prs.prs--page { width: auto; height: auto; min-height: 0; border-radius: var(--radius-m); }
}

/* ================= Mecz na żywo v3: składy po bokach, zdarzenia na tablicy =================
   Tablica jak grafika telewizyjna: pełne nazwy (telefon: skróty), pod nimi strzelcy i czerwone kartki.
   PC od 1280 px: składy obu drużyn przy liniach bocznych (gospodarze z lewej, goście z prawej, jak na tablicy),
   pasek w barwach drużyny po zewnętrznej stronie. Środek: boisko, przebieg meczu, Relacja/Statystyki. */
.board { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "th mid ta" "eh mid ea"; row-gap: 6px; column-gap: var(--space-3); }
.board:not(.has-ev) { row-gap: 0; }
.board > .board__t:first-child { grid-area: th; min-width: 0; }
.board > .board__t:nth-child(3) { grid-area: ta; min-width: 0; justify-content: flex-end; text-align: right; }
.board__mid { grid-area: mid; align-self: center; text-align: center; }
.board__t { font: 700 var(--step-1)/1.05 var(--font-display); }
.board__t .nm { min-width: 0; overflow: hidden; }
.nm__full { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm__short { display: none; }
.bev { grid-area: eh; display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; padding: 0; list-style: none; font: 600 13px/1.3 var(--font-body); color: rgb(243 246 241 / .88); }
.bev--a { grid-area: ea; align-items: flex-end; text-align: right; }
.bev li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; max-width: 100%; }
.bev--a li { justify-content: flex-end; }
.bev__n { white-space: nowrap; }
.bev__n small, .bev__m small { color: var(--led); font: 700 11px/1 var(--font-display); }
.bev__m { display: inline-flex; align-items: center; gap: 3px; font: 700 14px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bev .ico { width: 14px; height: 14px; flex: none; }
.bev__m--nogoal .ico { opacity: .45; }
.bev__m--nogoal .bev__t, .bev__m--nogoal ~ .bev__t { text-decoration: line-through; text-decoration-thickness: 2px; color: rgb(243 246 241 / .6); }
.bev__m--penmiss .bev__t { color: rgb(243 246 241 / .75); }
.bev .var { padding: 2px 4px; border-radius: 3px; background: #6FA8FF; color: #0E1511; font: 700 10px/1 var(--font-display); letter-spacing: .02em; }
.brk-board { margin-bottom: 16px; }
@media (min-width: 700px) {
  .board__t { font-size: var(--step-2); }
}
@media (max-width: 699px) {
  .nm__full { display: none; }
  .nm__short { display: inline; }
  .board { padding: 10px 12px; column-gap: 8px; }
  .bev { font-size: 12px; }
  .bev__m { font-size: 13px; }
}

/* Składy na żywo */
.ros { --tc: var(--home); --ti: var(--home-ink); min-width: 0; padding: 10px 8px 10px 14px; border-radius: var(--radius-m); background: var(--surface); box-shadow: inset 5px 0 0 var(--tc), inset 6px 0 0 color-mix(in srgb, var(--text) 20%, transparent); }
.ros[data-side="1"] { --tc: var(--away); --ti: var(--away-ink); padding: 10px 14px 10px 8px; box-shadow: inset -5px 0 0 var(--tc), inset -6px 0 0 color-mix(in srgb, var(--text) 20%, transparent); }
.ros__head { display: grid; gap: 2px; padding: 0 4px 8px; border-bottom: 1px solid var(--line); }
.ros__team { display: flex; align-items: center; gap: 8px; min-width: 0; font: 700 var(--step-1)/1.1 var(--font-display); }
.ros__team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ros__shape { font-size: 12px; color: var(--text-muted); }
.ros__list { margin: 0; padding: 0; list-style: none; }
.ros__row { display: grid; grid-template-columns: 24px 32px minmax(0, 1fr) 34px 38px; align-items: center; gap: 6px; width: 100%; min-height: 34px; padding: 3px 4px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ros__row:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.ros__row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 4px; }
.ros__no { display: grid; place-items: center; height: 22px; border-radius: 4px; background: var(--tc); color: var(--ti); font: 700 13px/1 var(--font-display); font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); }
.ros .pos { min-height: 22px; font-size: 11px; }
.ros__nm { display: flex; align-items: center; gap: 4px; min-width: 0; font: 600 var(--step--1)/1.2 var(--font-body); }
.ros__last { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk { flex: none; display: inline-grid; }
.mk .ico { width: 14px; height: 14px; }
.ros__in, .ros__out, .ros__note { flex: none; font: 700 11px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.ros__in { color: #2E8A4E; }
.ros__out { color: var(--bad-text); }
.ros__note { color: var(--warn-text); }
.ros__cw { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; }
.ros__c { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ros__cp { font: 600 10px/1 var(--font-display); color: var(--text-muted); text-align: center; font-variant-numeric: tabular-nums; }
.ros__cp[data-c="low"] { color: var(--bad-text); }
.ros__row .rt[data-hov] { cursor: help; }
.ros__c i { display: block; height: 100%; background: #2E8A4E; }
.ros__c[data-c="mid"] i { background: var(--kartka-zolta); }
.ros__c[data-c="low"] i { background: var(--kartka-czerwona); }
.ros .rt { min-width: 36px; padding: 4px 3px; font-size: var(--step--1); }
.rt--none { color: var(--text-muted); }
.ros__sub { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 12px 4px 4px; font: 700 var(--step-0)/1.2 var(--font-display); }
.ros__sub small { font: 500 12px/1 var(--font-body); color: var(--text-muted); }
.ros__i.is-out .ros__row { opacity: .6; }
.ros__i.is-off .pos { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--kartka-zolta); }
.ros__i.is-off--bad .pos { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--kartka-czerwona); }
.ros__list .hint { padding: 6px 4px; font-size: 12px; }

/* Zakładki i układ: telefon i tablet w jednej kolumnie */
.live { --md-top: calc(52px + var(--md-head, 170px) + 12px); }
.live__tabs { margin: 0; }
.live__tabs [hidden] { display: none; }
.stats-area, .rosters { min-width: 0; }
.rosters { display: grid; gap: var(--space-3); }
.live[data-tab="stats"] .rosters, .live[data-tab="feed"] .rosters { display: none; }
.live[data-tab="lineups"] .stats-area { display: none; }
@media (max-width: 1023px) {
  .live .live__tabs { order: 4; }
  .live .stats-area { order: 5; }
  .live .rosters { order: 6; }
}

/* Laptop 1024-1279: relacja | boisko | przebieg i Statystyki/Składy */
@media (min-width: 1024px) {
  .live { grid-template-columns: minmax(240px, 1fr) auto minmax(280px, 1fr); grid-template-rows: auto auto auto 1fr; grid-template-areas: "head head head" "feed pitch mom" "feed pitch tabs" "feed pitch panel"; }
  .live .live__tabs { grid-area: tabs; }
  .live .stats-area, .live .rosters { grid-area: panel; }
  .live .pitch-area { top: var(--md-top); width: clamp(260px, calc((100dvh - var(--md-top) - 64px) * .68), 420px); }
  .live .feed { max-height: calc(100dvh - var(--md-top) - 60px); }
}

/* PC od 1280: skład gospodarzy | boisko | przebieg, Relacja/Statystyki | skład gości */
@media (min-width: 1280px) {
  .md__main:has(.live) { max-width: 1840px; padding-left: var(--space-5, 24px); padding-right: var(--space-5, 24px); }
  .live { column-gap: 14px; grid-template-columns: minmax(260px, 300px) auto minmax(300px, 1fr) minmax(260px, 300px); grid-template-rows: auto auto auto 1fr; grid-template-areas: "head head head head" "rosh pitch mom rosa" "rosh pitch tabs rosa" "rosh pitch panel rosa"; }
  .live[data-tab] .rosters { display: contents; }
  .live .ros { position: sticky; top: var(--md-top); max-height: calc(100dvh - var(--md-top) - 12px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .live .ros[data-side="0"] { grid-area: rosh; }
  .live .ros[data-side="1"] { grid-area: rosa; }
  .live .feed-area, .live .stats-area { grid-area: panel; }
  .live[data-tab="stats"] .feed-area, .live[data-tab="feed"] .stats-area { display: none; }
  .live .feed-area h2 { display: none; }
  .live .feed, .live .stats-area { max-height: calc(100dvh - var(--md-top) - 230px); overflow: auto; }
  .live .pitch-area { width: clamp(280px, calc((100dvh - var(--md-top) - 64px) * .68), 460px); }
}
/* Bardzo szeroki ekran: relacja i statystyki obok siebie, bez zakładek */
@media (min-width: 1760px) {
  .live { grid-template-columns: 310px auto minmax(300px, 1fr) minmax(280px, 1fr) 310px; grid-template-rows: auto auto 1fr; grid-template-areas: "head head head head head" "rosh pitch mom mom rosa" "rosh pitch feed stats rosa"; }
  .live .live__tabs { display: none; }
  .live .feed-area { grid-area: feed; }
  .live .stats-area { grid-area: stats; }
  .live[data-tab] .feed-area, .live[data-tab] .stats-area { display: block; }
  .live .feed-area h2 { display: block; }
  .live .feed, .live .stats-area { max-height: calc(100dvh - var(--md-top) - 190px); }
}

/* ================= Zmiany i taktyka: ustawienie przyciskami, gra poza pozycją, osłabienie ================= */
.mm-forms { margin: 0; padding: 0; border: 0; min-width: 0; }
.mm-forms__lbl { padding: 0; margin-bottom: 6px; font: 700 var(--step--1)/1 var(--font-display); }
.mm-forms__opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.mm-fchip { position: relative; min-width: 0; }
.mm-fchip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mm-fchip span { display: grid; place-items: center; min-height: 34px; padding: 0 4px; border: 1px solid #2F4438; border-radius: 6px; background: #14211A; color: #F3F6F1; font: 700 14px/1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-fchip:hover span { border-color: #2E8A4E; }
.mm-fchip input:checked + span { background: #1E6B3A; border-color: var(--led); box-shadow: inset 0 0 0 1px var(--led); color: #fff; }
.mm-fchip.is-now span { position: relative; }
.mm-fchip.is-now span::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--led); }
.mm-fchip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.mm-short, .mm-err { margin: 0; padding: 8px 10px; border-radius: 6px; font-size: 13px; line-height: 1.35; }
.mm-short { background: color-mix(in srgb, var(--kartka-czerwona) 10%, var(--surface)); border-left: 4px solid var(--kartka-czerwona); }
.mm-err { margin-bottom: 6px; background: color-mix(in srgb, var(--kartka-czerwona) 16%, var(--surface)); border-left: 4px solid var(--kartka-czerwona); color: var(--bad-text); font-weight: 600; }
.mm-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0; font-size: 12px; color: var(--text-muted); }
.mm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fit { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.fit--mid { background: var(--kartka-zolta); }
.fit--bad { background: var(--kartka-czerwona); }
/* Poza pozycją: obwódka kropki i podświetlone nazwisko na boisku, pasek i obwódka pozycji na liście */
.mm-tok[data-fit="mid"] .mm-tok__dot { box-shadow: 0 0 0 2px #14211A, 0 0 0 5px var(--kartka-zolta); }
.mm-tok[data-fit="bad"] .mm-tok__dot { box-shadow: 0 0 0 2px #14211A, 0 0 0 5px var(--kartka-czerwona); }
.mm-tok[data-fit="mid"] .mm-tok__name { background: var(--kartka-zolta); color: #14211A; }
.mm-tok[data-fit="bad"] .mm-tok__name { background: var(--kartka-czerwona); color: #fff; }
.sub-row.is-off:not(.is-sel) .sub-row__main { box-shadow: inset 4px 0 0 var(--kartka-zolta); background: color-mix(in srgb, var(--kartka-zolta) 9%, var(--surface)); }
.sub-row.is-off--bad:not(.is-sel) .sub-row__main { box-shadow: inset 4px 0 0 var(--kartka-czerwona); background: color-mix(in srgb, var(--kartka-czerwona) 8%, var(--surface)); }
.sub-row.is-off .pos { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--kartka-zolta); }
.sub-row.is-off--bad .pos { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--kartka-czerwona); }
.sub-name__l { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sub-name__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sub-name .ico { flex: none; width: 13px; height: 13px; }
/* Puste miejsce w osłabieniu */
.mm-tok--empty .mm-tok__dot { padding: 0; background: none; border: 2px dashed rgb(243 246 241 / .8); box-shadow: none; }
.mm-tok--empty .mm-tok__dot > span { background: rgb(14 21 17 / .3); color: #F3F6F1; }
.mm-tok--empty .mm-tok__name { font-style: italic; background: rgb(14 21 17 / .5); }
.mm-tok--empty.is-open .mm-tok__dot, .mm-tok--empty.is-target .mm-tok__dot { border-color: var(--led); border-style: solid; }
.mm-tok--empty:focus-visible .mm-tok__dot { outline: 3px solid var(--focus); outline-offset: 2px; }
.mm-tok__knock { position: absolute; top: -4px; left: 10px; width: 15px; height: 15px; }
.mm-tok__knock .ico { display: block; width: 15px; height: 15px; }
@media (max-width: 699px) {
  .mm-forms__opts { display: flex; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .mm-fchip { flex: none; }
  .mm-fchip span { padding: 0 10px; min-height: 36px; }
  .mm-legend { justify-content: flex-start; }
  .mm-short { font-size: 12px; }
  .mm__tabs button { font-size: 13px; padding: 0 2px; }
}

/* Statystyki zawodnika w meczu (menu zawodnika) */
.pstat-dlg { width: min(420px, calc(100vw - 32px)); }
.pstat__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 8px; }
.pstat__head h2 { margin: 0; font: 700 var(--step-2)/1.1 var(--font-display); }
.pstat__head p { margin: 2px 0 0; color: var(--text-muted); font-size: var(--step--1); }
.pstat__no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--home); color: var(--home-ink); font: 700 var(--step-2)/1 var(--font-display); }
.pstat__head[data-side="1"] .pstat__no { background: var(--away); color: var(--away-ink); }
.pstat__st { margin: 0 0 8px; font-weight: 600; }
.pstat { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin: 0 0 8px; }
.pstat div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pstat dt { color: var(--text-muted); }
.pstat dd { margin: 0; font: 700 var(--step-0)/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
@media (max-width: 479px) { .pstat { grid-template-columns: 1fr; } }
/* Wybrany zawodnik (dotknięcie) innym kolorem niż gra poza pozycją (żółta/czerwona obwódka) */
.mm-tok.is-sel .mm-tok__dot, .mm-tok.is-target .mm-tok__dot { outline: 3px solid #fff; outline-offset: 3px; transform: scale(1.12); }
.mm-tok.is-sel .mm-tok__name { background: #fff; color: #14211A; }
.sub-row.is-sel .sub-row__main { box-shadow: inset 4px 0 0 var(--focus); background: color-mix(in srgb, var(--focus) 14%, var(--surface)); }
.sub-row.is-target .sub-row__main { outline-color: var(--focus); }

/* ================= Mecz na żywo, układ 2: przebieg nad boiskiem, tempo i decyzje trenera pod boiskiem =================
   Telefon: tablica, przebieg, boisko, tempo, decyzje trenera, zakładki (Relacja, Statystyki, Składy).
   1024-1279: Relacja | środek | Statystyki/Składy. 1280-1759: skład | Relacja/Statystyki | środek | skład.
   Od 1760: skład | Relacja | środek | Statystyki | skład. Środek jest przyklejony, więc przyciski są zawsze widoczne. */
.live__centre { display: grid; gap: 8px; min-width: 0; align-content: start; }
.live .live__centre > * { grid-area: auto; }
.live .live__centre > .mom-area { order: 0; }
.live .live__centre > .pitch-area { order: 1; }
.live .live__centre > .live__ctrl { order: 2; }
.live .stats-area > h2 { display: none; }
.live .live__centre .pitch-area { position: relative; top: auto; width: auto; justify-self: stretch; }
.live__ctrl { display: grid; gap: 6px; container-type: inline-size; }
.live__ctrl .transport { flex-wrap: wrap; row-gap: 6px; }
@container (max-width: 460px) {
  .tp-skip__x { display: none; }
  .live__ctrl .transport { gap: 6px; }
  .live__ctrl .md-play { padding: 0 14px; }
  .live__ctrl .speed { min-width: 38px; padding: 0 8px; }
  .live__ctrl .tp-skip { padding: 0 12px; }
}
@container (max-width: 330px) { .live__ctrl .tp-skip { margin-left: 0; flex: 1 1 100%; } }

/* Decyzje trenera: wyraźne kolory (murawa i pomarańcz trybun), spójne z żółtym przyciskiem startu */
.coachbar { grid-template-columns: 3fr 2fr; }
.coachbar button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 12px; border: 2px solid transparent; border-radius: 999px; font: 700 var(--step-0)/1 var(--font-display); letter-spacing: .01em; }
.coachbar small { padding: 2px 6px; border-radius: 999px; background: rgb(255 255 255 / .18); font: 600 11px/1.2 var(--font-body); }
.coachbar .coachbar__manage { background: var(--murawa); color: #FFFFFF; border-color: var(--murawa); }
.coachbar .coachbar__manage:hover { background: var(--murawa-jasna); border-color: var(--murawa-jasna); }
.coachbar .coachbar__shout { background: #F28C28; color: #14211A; border-color: #F28C28; }
.coachbar .coachbar__shout:hover { background: #F7A04A; border-color: #F7A04A; }
.coachbar button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:root[data-theme="dark"] .coachbar .coachbar__manage { border-color: #3FA866; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .coachbar .coachbar__manage { border-color: #3FA866; } }

@media (max-width: 1023px) {
  .live > .live__head { order: 0; }
  .live > .live__centre { order: 1; }
  .live .live__tabs { order: 2; }
  .live .feed-area { order: 3; }
  .live .stats-area { order: 4; }
  .live .rosters { order: 5; }
  .live .live__centre .pitch-wrap { width: min(100%, max(220px, calc((100dvh - 430px) * 0.68))); margin: 0 auto; }
  .live .live__centre .pitch { width: 100%; }
  .live:not([data-tab="feed"]) .feed-area { display: none; }
  .live[data-tab="feed"] .stats-area, .live[data-tab="lineups"] .stats-area { display: none; }
  .live .feed-area h2 { display: none; }
  .live .feed { max-height: 60dvh; overflow: auto; }
}
@media (min-width: 1024px) {
  .live { grid-template-columns: minmax(240px, 1fr) auto minmax(260px, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "head head head" "feed centre tabs" "feed centre panel"; }
  /* Boisko tak wysokie, żeby przebieg nad nim i oba paski pod nim mieściły się na ekranie; kolumna co najmniej 380 px,
     żeby pasek tempa i przyciski trenera były w jednym rzędzie */
  .live > .live__centre { grid-area: centre; position: sticky; top: var(--md-top); --pitch-w: max(220px, calc((100dvh - var(--md-top) - 290px) * .68)); width: clamp(380px, var(--pitch-w), 480px); }
  .live .live__centre .pitch-wrap { width: min(100%, var(--pitch-w)); margin: 0 auto; }
  .live .live__centre .pitch { width: 100%; }
  .live .live__centre .mom-area .momentum { height: 56px; }
  .live .feed-area { grid-area: feed; }
  .live .feed { max-height: calc(100dvh - var(--md-top) - 60px); }
  .live .stats-area, .live .rosters { grid-area: panel; }
}
@media (min-width: 1280px) {
  .live { grid-template-columns: minmax(250px, 290px) minmax(260px, 1fr) auto minmax(250px, 290px); grid-template-rows: auto auto 1fr; grid-template-areas: "head head head head" "rosh tabs centre rosa" "rosh panel centre rosa"; }
  .live .live__tabs { grid-area: tabs; }
  .live .feed-area, .live .stats-area { grid-area: panel; }
  .live .feed, .live .stats-area { max-height: calc(100dvh - var(--md-top) - 70px); overflow: auto; }
}
@media (min-width: 1760px) {
  .live { grid-template-columns: 300px minmax(280px, 1fr) auto minmax(280px, 1fr) 300px; grid-template-rows: auto 1fr; grid-template-areas: "head head head head head" "rosh feed centre stats rosa"; }
  .live .feed-area { grid-area: feed; }
  .live .stats-area { grid-area: stats; }
  .live .feed-area h2, .live .stats-area > h2 { display: block; }
  .live .feed, .live .stats-area { max-height: calc(100dvh - var(--md-top) - 50px); }
}

/* ================= Zmiany bez limitu i powrotne ================= */
.ros__back { color: var(--accent); font-weight: 700; }
.sub-row.is-back .sub-name small { color: var(--accent); }
.md-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center; }

/* Druga jedenastka w przerwie sparingu */
.sxi-dlg { width: min(720px, calc(100vw - 24px)); }
.sxi__head h2 { margin: 0 0 4px; }
.sxi { display: grid; gap: 4px; margin: var(--space-3) 0; padding: 0; list-style: none; max-height: min(60dvh, 560px); overflow: auto; }
.sxi__i label { display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 52px; padding: 6px 10px; border-radius: var(--radius-s); background: var(--surface-stripe); cursor: pointer; }
.sxi__i input { width: 20px; height: 20px; accent-color: var(--murawa); }
.sxi__i input:not(:checked) ~ span { opacity: .5; }
.sxi__out, .sxi__in { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sxi__out > span:last-child, .sxi__in > span:last-child { display: grid; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.sxi small { font-weight: 400; font-size: 12px; color: var(--text-muted); }
.sxi__out > span:last-child { color: var(--bad-text); }
.sxi__arrow::before { content: ''; display: block; width: 10px; height: 10px; border-top: 2px solid var(--text-muted); border-right: 2px solid var(--text-muted); transform: rotate(45deg); }
.sxi__btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@media (max-width: 559px) {
  .sxi__i label { grid-template-columns: 24px minmax(0, 1fr); }
  .sxi__arrow { display: none; }
  .sxi__in { grid-column: 2; }
  .sxi__in::before { content: 'wchodzi'; font-size: 11px; color: var(--text-muted); }
}

/* ================= Seria rzutów karnych ================= */
.so-title { margin: 0 0 var(--space-3); }
.so { display: grid; gap: var(--space-4); }
.so h2 { margin: 0 0 4px; font-size: var(--step-1); }
.so-list { margin: var(--space-2) 0 0; padding: 0; list-style: none; display: grid; gap: 3px; touch-action: pan-y; }
.so-row { display: grid; grid-template-columns: 34px 22px 40px minmax(0, 1fr) minmax(86px, 120px) auto; gap: 8px; align-items: center; min-height: 54px; padding: 4px 6px 4px 4px; border-radius: var(--radius-s); background: var(--surface); }
.so-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #0E1511; color: var(--led); font: 700 var(--step-1)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.so-row.is-out { opacity: .62; }
.so-row.is-out .so-n { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.so-row.is-gk .so-nm b::after { content: ' (bramkarz serii)'; font-weight: 400; color: var(--text-muted); font-size: 12px; }
.so-grip { align-self: stretch; cursor: grab; touch-action: none; background: radial-gradient(circle, var(--text-muted) 1.4px, transparent 1.6px) 0 0 / 7px 7px; opacity: .55; border-radius: 3px; min-height: 30px; }
.so-grip:hover { opacity: 1; }
.so-list.is-dragging { user-select: none; }
.so-row.is-drag { outline: 2px dashed var(--led); outline-offset: -2px; background: color-mix(in srgb, var(--led) 12%, var(--surface)); }
.so-nm { display: grid; min-width: 0; }
.so-nm b { font: 700 var(--step-0)/1.15 var(--font-display); overflow-wrap: anywhere; }
.so-nm small { color: var(--text-muted); font-size: 12px; line-height: 1.3; }
.so-pct { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.so-pct b { font: 700 var(--step-0)/1 var(--font-display); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.so-pct__bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-stripe); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.so-pct__bar > i { display: block; height: 100%; background: var(--text-muted); }
.so-pct__bar > i[data-b="top"] { background: var(--murawa-jasna); }
.so-pct__bar > i[data-b="good"] { background: var(--murawa); }
.so-pct__bar > i[data-b="mid"] { background: var(--kartka-zolta); }
.so-pct__bar > i[data-b="low"] { background: var(--text-muted); }
.so-mv { display: inline-flex; gap: 2px; }
.so-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-stripe); color: var(--text); font-size: 13px; cursor: pointer; }
.so-btn:disabled { opacity: .3; cursor: default; }
.so-btn:focus-visible, .so-grip:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.so-sep { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; color: var(--text-muted); font: 600 12px/1.2 var(--font-body); }
.so-sep::before, .so-sep::after { content: ''; flex: 1; border-top: 1px dashed var(--line); }
.so-sep--out { color: var(--bad-text); }
.so-side { display: grid; gap: var(--space-3); align-content: start; }
.so-card { padding: var(--space-3); border-radius: var(--radius-m); background: var(--surface); }
.so-card p { margin: 6px 0 0; }
.so-card select.pick-select { display: block; width: 100%; max-width: none; min-height: 44px; }
@media (max-width: 559px) {
  .so-row { grid-template-columns: 30px 18px minmax(0, 1fr) auto; grid-template-areas: "n g nm mv" "n g pct mv"; row-gap: 2px; padding: 6px 4px; }
  .so-row > .pos { display: none; }
  .so-n { grid-area: n; } .so-grip { grid-area: g; } .so-nm { grid-area: nm; } .so-pct { grid-area: pct; } .so-mv { grid-area: mv; flex-direction: column; }
  .so-btn { width: 40px; height: 32px; }
}
@media (min-width: 1024px) { .so { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; } .so-side { position: sticky; top: 64px; } }

/* Seria: tablica LED z kółkami (gol: kreda, nietrafiony: czerwony krzyżyk), zawodnik przy piłce, przebieg */
.so-led { display: grid; gap: 8px; padding: var(--space-3); border-radius: var(--radius-m); background: #0E1511; color: var(--kreda); }
.so-led__row { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.so-led__t { display: flex; align-items: center; gap: 8px; min-width: 0; font: 700 var(--step-0)/1 var(--font-display); }
.so-led__t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-led__n { font: 700 var(--step-3)/1 var(--font-display); color: var(--led); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.so-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.so-dot { position: relative; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgb(243 246 241 / .35); }
.so-dot.is-sd { box-shadow: inset 0 0 0 2px rgb(255 178 26 / .45); }
.so-dot--goal { background: var(--kreda); box-shadow: inset 0 0 0 2px var(--kreda); }
.so-dot--miss { background: var(--kartka-czerwona); box-shadow: inset 0 0 0 2px var(--kartka-czerwona); }
.so-dot--miss::before, .so-dot--miss::after { content: ''; position: absolute; left: 5px; right: 5px; top: 10px; height: 2px; background: #FFFFFF; transform: rotate(45deg); }
.so-dot--miss::after { transform: rotate(-45deg); }
.so-spot { position: relative; display: grid; justify-items: center; gap: 4px; margin: var(--space-3) auto; padding: var(--space-3) var(--space-3) var(--space-4); border-radius: var(--radius-m); background: var(--murawa); background-image: repeating-linear-gradient(0deg, transparent 0 28px, rgb(255 255 255 / .04) 28px 56px); color: var(--kreda); text-align: center; min-height: 170px; overflow: hidden; }
.so-spot[data-side="0"] { box-shadow: inset 0 6px 0 var(--home); }
.so-spot[data-side="1"] { box-shadow: inset 0 6px 0 var(--away); }
.so-spot small { color: rgb(243 246 241 / .82); font-size: var(--step--1); }
.so-spot__nm { font: 700 var(--step-3)/1.05 var(--font-display); overflow-wrap: anywhere; }
.so-spot__vs { font-size: var(--step--1); color: rgb(243 246 241 / .85); }
.so-spot__ball { display: block; margin-top: 4px; }
.so-reveal { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
.so-led.so-reveal { box-sizing: border-box; }
/* Bramka na górze boiska: poprzeczka i słupki kredą, bramkarz pod poprzeczką, wynik strzału w siatce */
.so-goal { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding-top: 8px; width: min(300px, 86%); height: 104px; margin: 0 auto 10px; border: 4px solid var(--kreda); border-bottom: 0; border-radius: 3px 3px 0 0; background-image: linear-gradient(45deg, rgb(243 246 241 / .12) 1px, transparent 1px), linear-gradient(-45deg, rgb(243 246 241 / .12) 1px, transparent 1px); background-size: 12px 12px; }
.so-goal__gk { padding: 2px 10px; border-radius: 999px; background: var(--gk-kit); color: var(--gk-kit-text); font: 700 var(--step--1)/1.3 var(--font-display); }
.so-goal .so-spot__res { position: absolute; inset: auto 0 8px; margin: 0 auto; width: max-content; }
.so-spot__ball .ico { width: 28px; height: 28px; }
.so-spot__res { display: block; margin-top: 6px; padding: 2px 16px; border-radius: 6px; font: 700 var(--step-3)/1.1 var(--font-display); }
.so-spot.is-goal .so-spot__res { background: var(--kreda); color: var(--murawa); }
.so-spot.is-miss .so-spot__res { background: var(--kartka-czerwona); color: #FFFFFF; }
.so-spot.is-goal .so-spot__ball, .so-spot.is-miss .so-spot__ball { display: none; }
.so-spot.is-done .so-spot__nm { color: var(--led); }
.so-log { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.so-log li { display: grid; grid-template-columns: 28px 56px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 36px; padding: 2px 8px; border-radius: var(--radius-s); background: var(--surface); font-size: var(--step--1); }
.so-log li[data-side="0"] { box-shadow: inset 4px 0 0 var(--home); }
.so-log li[data-side="1"] { box-shadow: inset 4px 0 0 var(--away); }
.so-log__r { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.so-log em { font-style: normal; font-weight: 700; }
.so-log .is-miss em { color: var(--bad-text); }
.so-log .is-goal em { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .so-spot.is-runup .so-spot__ball { animation: so-runup .9s ease-in both; }
  .so-spot.is-runup .so-spot__nm { animation: so-breathe .9s ease-in-out both; }
  .so-spot__res { animation: so-hit .28s ease-out both; }
  .so-dot.is-new { animation: so-pop .25s ease-out both; }
}
@keyframes so-runup { 0% { transform: translateY(6px) scale(1.1); opacity: .5; } 70% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-6px) scale(.9); opacity: 1; } }
@keyframes so-breathe { 0%, 100% { letter-spacing: .01em; } 50% { letter-spacing: .04em; } }
@keyframes so-hit { from { transform: scale(1.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes so-pop { from { transform: scale(.4); } to { transform: scale(1); } }
.sxi .pos { flex: none; min-width: 34px; text-align: center; }
/* Jeden pasek przewagi: procenty z ostatnich 5 minut, płynny ruch */
.poss--live .bar2 { height: 12px; }
.poss--live .bh, .poss--live .ba { transition: width .6s cubic-bezier(.3, .7, .3, 1); }
.poss--live span { font-variant-numeric: tabular-nums; min-width: 3.2ch; }
.mom-area .press__lbl { margin: 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .poss--live .bh, .poss--live .ba { transition: none; } }

/* Przerwa: tylko statystyki meczu, wyśrodkowane */
.brk-stats { max-width: 760px; margin: var(--space-4) auto 0; }
.brk-stats h2 { text-align: center; }
.brk-stats .vs .lbl .bar2 { height: 5px; margin-top: 4px; }

/* Strzelcy na tablicy: obok siebie w linii, zawijanie dopiero przy braku miejsca; bramki jednego zawodnika za jego nazwiskiem */
.bev { flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 3px 16px; }
.bev--a { justify-content: flex-end; }
.bev li { flex-wrap: wrap; max-width: 100%; }

/* ================= Okrzyk z linii bocznej ================= */
.md-dlg.sh-dlg { width: min(720px, calc(100vw - 24px)); padding: 18px 20px 20px; }
.sh-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.sh-head h2 { margin: 0; margin-right: auto; font: 700 var(--step-2)/1.1 var(--font-display); }
.sh-sub { margin: 0 0 12px; color: var(--text-muted); font-size: var(--step--1); }
.sh-dlg .notice { margin: 0 0 12px; }
.sh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sh-card { --sc: #F28C28; position: relative; display: grid; gap: 4px; align-content: start; min-height: 104px; padding: 14px 14px 12px 18px; border: 1px solid color-mix(in srgb, var(--sc) 40%, var(--line)); border-radius: var(--radius-m); background: color-mix(in srgb, var(--sc) 10%, var(--surface)); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.sh-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--sc); }
.sh-card:hover:not([disabled]) { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 18%, var(--surface)); transform: translateY(-1px); }
.sh-card:focus-visible { outline: 3px solid var(--focus, var(--led)); outline-offset: 2px; }
.sh-card[disabled] { cursor: not-allowed; opacity: .5; filter: saturate(.4); }
.sh-card__t { font: 700 var(--step-1)/1.1 var(--font-display); }
.sh-card__w { font-weight: 600; font-size: var(--step--1); }
.sh-card__c { color: var(--text-muted); font-size: 12px; }
.sh-card__x { color: var(--kartka-czerwona); font-size: 12px; font-weight: 600; }
.sh-card--att { --sc: #E0602B; }
.sh-card--def { --sc: #3E7CB1; }
.sh-card--calm { --sc: #2F8F8A; }
.sh-card--fight { --sc: #C0392B; }
.sh-card--praise { --sc: #E0A21A; }
.coachbar .coachbar__shout:disabled { background: color-mix(in srgb, #F28C28 30%, var(--surface)); border-color: transparent; color: var(--text-muted); cursor: not-allowed; }
.coachbar__shout small { font: 600 12px/1 var(--font-body); opacity: .85; }
@media (max-width: 560px) { .sh-grid { grid-template-columns: 1fr; } .sh-card { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .sh-card { transition: none; } .sh-card:hover:not([disabled]) { transform: none; } }
/* Zawodnicy, którzy zeszli: bez nagłówka, oddzieleni cienką linią pod ławką (nazwiska są wyszarzone) */
.ros__list--out { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
/* Studio pomeczowe: tablica równo z panelami obok, szerszy środek, mniejsze nazwy, żeby mieściły się pełne */
.pst__score .final, .pst__score .board { margin-top: 0; }
.pst__score .final .board { margin-bottom: 0; }
@media (min-width: 1280px) {
  .pst { grid-template-columns: minmax(250px, 1fr) minmax(560px, 1.5fr) minmax(250px, 1fr); }
}
.pst__score .final { padding: 0; }
/* Zawodnik meczu: zwarta karta, kluczowe momenty pod nią (statystyki na środku zajmują wysokość obu wierszy) */
@media (min-width: 1280px) {
  .pst { grid-template-rows: auto auto 1fr auto; }
  .pst__motm { align-self: start; min-height: 104px; }
}
/* Przyciski dnia meczowego z kolorem znaczenia (główna akcja zostaje zielona) */
.actionbar .btn--lineup { background: #2F8F8A; border-color: #2F8F8A; color: #FFFFFF; }
.actionbar .btn--lineup:hover { background: #267A76; border-color: #267A76; }
.actionbar .btn--press { background: #2F6FB0; border-color: #2F6FB0; color: #FFFFFF; }
.actionbar .btn--press:hover { background: #285F97; border-color: #285F97; }
.actionbar .btn--lineup:focus-visible, .actionbar .btn--press:focus-visible { outline: 3px solid var(--focus, var(--led)); outline-offset: 2px; }

/* Podgląd statystyk po najechaniu na ocenę zawodnika (lista składów, PC) */
.md-hov { position: fixed; z-index: 60; width: min(340px, calc(100vw - 16px)); padding: 12px 14px 6px; border-radius: var(--radius-m); background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .28); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s ease; }
.md-hov.is-open { opacity: 1; visibility: visible; }
.md-hov .pstat__head h2 { font-size: var(--step-1); }
.md-hov .pstat div { padding: 4px 0; }
@media (prefers-reduced-motion: reduce) { .md-hov { transition: none; } }

/* Karta zawodnika w meczu (menu pod prawym przyciskiem) */
.mcard-dlg { width: min(860px, calc(100vw - 32px)); }
.mcard__head { grid-template-columns: auto 1fr auto auto; }
.mcard__x { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: 600 22px/1 var(--font-body); cursor: pointer; }
.mcard__x:hover { background: color-mix(in srgb, var(--text) 8%, var(--surface)); }
.mcard__x:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mcard__side { order: -1; }
.mcard__ovr { display: inline-grid; place-items: center; min-width: 2.2ch; padding: 4px 10px; border-radius: 8px; background: #0E1511; color: var(--led); font: 700 var(--step-2)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.mcard__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; margin: 4px 0 10px; padding: 8px 0; border-block: 1px solid var(--line); }
.mcard__facts div { display: flex; flex-direction: column; gap: 2px; }
.mcard__facts dt { font-size: var(--step--1); color: var(--text-muted); }
.mcard__facts dd { margin: 0; font-weight: 600; }
.mcard__body { display: grid; gap: 12px 24px; grid-template-columns: minmax(0, 1fr); }
.mcard__attrs h4 { margin: 10px 0 4px; font: 700 var(--step-0)/1.1 var(--font-display); }
.mcard__attrs h4:first-child { margin-top: 0; }
.mcard__attrs .attrs li { grid-template-columns: minmax(0, 1fr) 72px 24px; padding: 3px 0; }
.mcard__side .fch { margin-top: 0; max-width: none; }
@media (min-width: 760px) {
  .mcard__body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .mcard__side { order: 0; }
  .mcard__attrs { columns: 2; column-gap: 20px; }
  .mcard__attrs h4 { break-after: avoid; }
  .mcard__attrs .attrs { break-inside: avoid; }
}
.mcard__side .pmap { max-width: none; margin-top: var(--space-3); }

/* Pasek informacji o meczu pod tablicą wyniku (rozgrywki, pogoda, sędzia, miejsce, widzowie) */
.minfo { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 0; padding: 0; }
.minfo__it { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: 12px; line-height: 1.3; color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.minfo__it span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minfo__it[data-k="comp"] { color: var(--text); font-weight: 600; }
.minfo__i { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.minfo__it[data-k="comp"] .minfo__i { color: var(--led); }
.minfo__it[data-k="weather"] .minfo__i { color: #4A8FC4; }
.minfo__it[data-k="ref"] .minfo__i { color: var(--kartka-zolta); }
.minfo__it[data-k="venue"] .minfo__i { color: #E05A5A; }
.minfo__it[data-k="crowd"] .minfo__i { color: #3FA463; }
@media (max-width: 759px) {
  .minfo { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .minfo::-webkit-scrollbar { display: none; }
  .minfo__it { flex: none; font-size: 11px; }
}

/* Przerwa: składy obu drużyn (pierwsza jedenastka z ocenami) po bokach statystyk */
.brk-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stats stats" "home away"; align-items: start; }
.brk-grid .brk-stats { grid-area: stats; margin: 0 auto; width: 100%; }
.brk-xi[data-side="0"] { grid-area: home; } .brk-xi[data-side="1"] { grid-area: away; }
.brk-xi { margin: 0; padding: 12px 12px 10px; border-radius: var(--radius-m); background: var(--surface); border-top: 4px solid var(--home); }
.brk-xi[data-side="1"] { border-top-color: var(--away); }
.brk-xi h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 var(--step-0)/1.1 var(--font-display); }
.brk-xi h2 span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brk-xi ol { list-style: none; margin: 0; padding: 0; }
.brk-xi li { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 32px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); font-size: var(--step--1); }
.brk-xi li:last-child { border-bottom: 0; }
.brk-xi__no { color: var(--text-muted); font: 700 12px/1 var(--font-display); text-align: right; }
.brk-xi__nm { display: flex; align-items: center; gap: 4px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brk-xi .rt { min-width: 38px; padding: 3px 5px; font-size: var(--step--1); }
@media (max-width: 559px) {
  .brk-xi { padding: 10px 8px 8px; }
  .brk-xi li { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .brk-xi__no { display: none; }
  .brk-xi .pos { min-width: 0; padding: 0 3px; font-size: 10px; }
}
@media (min-width: 1100px) {
  .brk-grid { grid-template-columns: minmax(260px, 1fr) minmax(0, 760px) minmax(260px, 1fr); grid-template-areas: "home stats away"; }
}

/* Podpowiedzi zmian w oknie „Zmiany i taktyka”: najlepsi kandydaci po kliknięciu zawodnika */
.sub-row.is-sugg .sub-row__main { box-shadow: inset 4px 0 0 #2E8A4E; background: color-mix(in srgb, #2E8A4E 12%, var(--surface)); }
.sub-row.is-sugg--1 .sub-row__main { background: color-mix(in srgb, #2E8A4E 22%, var(--surface)); }
.sub-sugg { display: inline-block; align-self: flex-start; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font: 700 11px/1.5 var(--font-body); color: #fff; background: #2E8A4E; }
.sub-row.is-sugg--2 .sub-sugg, .sub-row.is-sugg--3 .sub-sugg { color: #1E6B3A; background: color-mix(in srgb, #2E8A4E 22%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sub-row.is-sugg--2 .sub-sugg, :root:not([data-theme="light"]) .sub-row.is-sugg--3 .sub-sugg { color: #7BD69A; } }
:root[data-theme="dark"] .sub-row.is-sugg--2 .sub-sugg, :root[data-theme="dark"] .sub-row.is-sugg--3 .sub-sugg { color: #7BD69A; }
.mm-tok.is-sugg .mm-tok__dot { outline: 3px solid #7BD69A; outline-offset: 3px; box-shadow: 0 0 0 7px rgb(123 214 154 / .25); }
.mm-tok.is-sugg--1 .mm-tok__dot { animation: mm-sugg 1.4s ease-in-out infinite; }
@keyframes mm-sugg { 50% { box-shadow: 0 0 0 11px rgb(123 214 154 / .12); } }
@media (prefers-reduced-motion: reduce) { .mm-tok.is-sugg--1 .mm-tok__dot { animation: none; } }
