/* WK Studio V11 — spójny, transmisyjny interfejs */
:root {
  --font-display: "Rajdhani", "Segoe UI", Arial, sans-serif !important;
  --font-ui: "Rajdhani", "Segoe UI", Arial, sans-serif !important;
  --tournament-accent: #e7000e;
}

body,
button,
input,
select,
textarea,
h1,
h2,
h3,
.intro-title,
.intro-prompt,
.intro-vs-mark,
.studio-header h1,
.panel-heading-title,
.tournament-title,
.tournament-section-bar,
.btn,
.col-title,
.rules-tooltip-title,
.empty-state,
.rail-value,
.active-tournament-empty-state strong,
.main-server .active-metric > strong,
.main-server .active-metric .players-count {
  font-family: var(--font-ui) !important;
}

.intro-title,
.studio-header h1,
.tournament-title,
.panel-heading-title,
.tournament-section-bar,
.col-title {
  font-weight: 700 !important;
  letter-spacing: .075em !important;
}

.active-tournament-stage {
  width: 100%;
}

.active-tournaments-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
}

.active-tournaments-list:empty {
  display: none;
}

.active-tournament-card-v9 {
  width: 100%;
  border-top-color: color-mix(in srgb, var(--card-accent) 78%, white) !important;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--card-accent) 12%, transparent), 0 16px 34px rgba(0,0,0,.32) !important;
}

.active-tournament-card-v9:hover,
.active-tournament-card-v9:focus-visible {
  border-color: color-mix(in srgb, var(--card-accent) 58%, #dcefff) !important;
  box-shadow: 0 22px 52px color-mix(in srgb, var(--card-accent) 19%, transparent), 0 18px 38px rgba(0,0,0,.4) !important;
  outline: none;
}

.active-tournament-empty-state:not([hidden]) {
  display: flex;
}

.status-badge {
  min-height: 32px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .085em !important;
}

.status-badge .status-dot {
  width: 8px !important;
  height: 8px !important;
  flex-basis: 8px !important;
}

.schedule-match-status {
  min-height: 29px !important;
  padding: 7px 11px 6px !important;
  margin-bottom: 7px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .09em !important;
  border-radius: 5px !important;
  animation: none !important;
}

.schedule-match-card,
.schedule-match-card[class*="match-status-"] {
  border-left-color: #343c47 !important;
  transition: transform .26s cubic-bezier(.16,1,.3,1), border-color .22s ease, background .22s ease, box-shadow .22s ease !important;
}

.schedule-match-card:hover {
  border-left-color: var(--match-accent, var(--tournament-accent)) !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 10%, transparent), rgba(13,17,23,.96) 22%) !important;
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 72%, white), 0 12px 28px rgba(0,0,0,.24) !important;
  transform: translateX(3px);
}

.schedule-player-score {
  font-size: clamp(27px, 2.1vw, 38px) !important;
  font-weight: 700 !important;
}

.ranking-live-badge::before {
  display: none !important;
}

.ranking-live-badge {
  min-height: 21px !important;
  padding: 4px 8px !important;
  gap: 6px !important;
  color: #f5f8fb !important;
  background: linear-gradient(180deg, rgba(52,60,72,.98), rgba(23,28,35,.98)) !important;
  border: 1px solid color-mix(in srgb, var(--match-accent, #e7000e) 48%, #728092) !important;
  border-radius: 5px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
  box-shadow: inset 2px 0 0 var(--match-accent, #e7000e), 0 8px 18px rgba(0,0,0,.25) !important;
}

.ranking-live-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--match-accent, #e7000e);
  box-shadow: 0 0 8px color-mix(in srgb, var(--match-accent, #e7000e) 65%, transparent);
}

.ranking-match-upcoming-card.is-live {
  border-color: color-mix(in srgb, var(--match-accent, #e7000e) 28%, #26303b) !important;
  box-shadow: inset 3px 0 0 var(--match-accent, #e7000e), inset 0 0 24px color-mix(in srgb, var(--match-accent, #e7000e) 4%, transparent) !important;
}

.rank-movement {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
  vertical-align: middle;
}

.rank-up {
  color: #79f59b;
  background: rgba(67,227,111,.11);
  border: 1px solid rgba(67,227,111,.28);
}

.rank-down {
  color: #ff7a7a;
  background: rgba(255,78,78,.11);
  border: 1px solid rgba(255,78,78,.28);
}

.qualified-player .player-nickname,
.eliminated-player .player-nickname {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.qualified-player .player-nickname::after,
.eliminated-player .player-nickname::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
}

.qualified-player .player-nickname {
  color: #b7ffc8;
}

.qualified-player .player-nickname::after {
  background: #43e36f;
  box-shadow: 0 0 8px rgba(67,227,111,.5);
}

.eliminated-player .player-nickname {
  color: #ffc0c0;
}

.eliminated-player .player-nickname::after {
  background: #ff4e4e;
  box-shadow: 0 0 8px rgba(255,78,78,.42);
}

.rules-tooltip {
  width: min(440px, calc(100vw - 28px)) !important;
  max-height: min(70vh, 520px);
  overflow: auto;
}

.rules-list {
  margin: 12px 0 0;
  padding-left: 25px;
  color: #d9e2e9;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: .025em;
}

.rules-list li {
  padding: 5px 0 6px 5px;
  border-bottom: 1px solid rgba(185,237,255,.08);
}

.rules-list li::marker {
  color: var(--tournament-accent);
  font-weight: 800;
}

.rules-empty {
  display: block;
  margin-top: 10px;
  color: #7d8995;
}

.history-card.history-arrived {
  position: relative;
}

.history-card.history-arrived::after {
  content: "PRZENIESIONO DO HISTORII";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  color: #dce8ef;
  background: rgba(15,20,27,.94);
  border: 1px solid color-mix(in srgb, var(--card-accent) 48%, #566575);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  animation: historyLabelOut 1.3s ease both;
}

@keyframes historyLabelOut {
  0% { opacity: 0; transform: translateY(-7px); }
  24%, 70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

.bracket-match {
  border-top-color: color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 60%, #344250) !important;
}

#tournament-detail-status:not(.status-ended):not(.status-cancelled) .status-dot {
  animation: statusBeaconV7 2.4s ease-in-out infinite !important;
}

@keyframes statusBeaconV7 {
  0%, 100% { opacity: .72; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 1; box-shadow: 0 0 0 4px transparent, 0 0 10px currentColor; }
}

@media (max-width: 760px) {
  .status-badge { font-size: 10px !important; min-height: 28px !important; }
  .schedule-match-status { font-size: 9px !important; min-height: 24px !important; padding: 5px 7px !important; }
  .schedule-player-score { font-size: 25px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #tournament-detail-status .status-dot,
  .history-card.history-arrived::after {
    animation: none !important;
  }
}

/* =========================================================
   WK STUDIO V8 — precyzyjne aktualizacje i transmisyjny ruch
   ========================================================= */

/* Hierarchia typograficzna */
.studio-header h1 {
  font-size: clamp(28px, 3.1vw, 48px) !important;
  letter-spacing: .105em !important;
}

.center-column > h1,
.events-history-heading .panel-heading-title {
  font-size: clamp(25px, 2.5vw, 38px) !important;
  line-height: 1.05 !important;
  letter-spacing: .085em !important;
}

.tournament-title {
  font-size: clamp(42px, 5.1vw, 76px) !important;
  line-height: .93 !important;
}

.tournament-title .ranking-sub {
  margin-top: 10px !important;
  font-size: clamp(20px, 2.25vw, 34px) !important;
  line-height: 1 !important;
  letter-spacing: .13em !important;
}

#rules-button {
  min-width: 128px;
  padding: 12px 24px !important;
  font-size: 16px !important;
  letter-spacing: .1em !important;
}

.rules-tooltip-title {
  font-size: 21px !important;
  line-height: 1 !important;
  letter-spacing: .12em !important;
}

.rules-list {
  font-size: 15px !important;
  line-height: 1.6 !important;
}

/* Brak komunikatów-zapychaczy w sekcjach turniejowych */
#active-tournament-empty,
#events-history-row > .empty-state {
  display: none !important;
}

/* Termin: HH:MM / DD:MM:RRRR */
.schedule-match-date:not(.is-pending-date),
.ranking-date-pill:not(.is-pending-date) {
  font-variant-numeric: tabular-nums;
}

.match-date-time {
  display: block !important;
  font-size: clamp(17px, 1.35vw, 23px) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .055em !important;
  color: #f4c95d !important;
}

.match-date-day {
  display: block !important;
  margin-top: 7px !important;
  font-size: clamp(12px, .9vw, 15px) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
  color: #c5ced6 !important;
}

/* Terminarz: jeden, wyraźny kolor akcentu po najechaniu */
.schedule-match-card,
.schedule-match-card[class*="match-status-"] {
  border-left: 4px solid #343c47 !important;
  box-shadow: none !important;
}

.schedule-match-card:hover {
  border-left-color: var(--match-accent, var(--tournament-accent)) !important;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 15%, #11161d) 0,
      color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 8%, #11161d) 22%,
      rgba(13,17,23,.98) 58%) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.28) !important;
  transform: translateX(3px);
}

.schedule-match-card:hover .schedule-match-date {
  background: color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 16%, #171b21) !important;
  border-color: color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 50%, #3a424c) !important;
}

/* Wyraźna, ale elegancka sygnalizacja pojedynczej aktualizacji */
.match-card-just-updated {
  animation: matchSurfaceUpdateV8 1.12s cubic-bezier(.16,1,.3,1) both !important;
}

@keyframes matchSurfaceUpdateV8 {
  0% {
    outline: 0 solid transparent;
    background-color: transparent;
  }
  30% {
    outline: 1px solid color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 78%, white);
    outline-offset: 3px;
    background-color: color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 15%, transparent);
    box-shadow: 0 0 28px color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 24%, transparent) !important;
  }
  100% {
    outline: 0 solid transparent;
    outline-offset: 8px;
    background-color: transparent;
    box-shadow: none;
  }
}

.bracket-match.match-card-just-updated {
  animation-name: bracketSurfaceUpdateV8 !important;
}

@keyframes bracketSurfaceUpdateV8 {
  0% { filter: brightness(1); transform: scale(1); }
  36% {
    filter: brightness(1.4) drop-shadow(0 0 12px color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 65%, transparent));
    transform: scale(1.025);
  }
  100% { filter: brightness(1); transform: scale(1); }
}

/* Tabela — stałe miejsce na strzałkę, więc kolumny nigdy nie skaczą */
.rank-position-cell {
  width: 64px !important;
  min-width: 64px !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rank-movement-slot {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  vertical-align: middle;
}

.rank-position-number {
  display: inline-block;
  min-width: 20px;
  text-align: left;
  vertical-align: middle;
}

.rank-movement {
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
  border-radius: 5px !important;
  font-size: 15px !important;
  line-height: 1 !important;
  animation: rankArrowArrivalV8 .72s cubic-bezier(.16,1,.3,1) both;
}

@keyframes rankArrowArrivalV8 {
  0% { opacity: 0; transform: translateY(7px) scale(.55); }
  58% { opacity: 1; transform: translateY(-2px) scale(1.2); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.table-row-just-updated {
  animation: tableRowUpdateV8 1.02s cubic-bezier(.16,1,.3,1) both;
}

@keyframes tableRowUpdateV8 {
  0% { background: transparent; }
  35% { background: color-mix(in srgb, var(--tournament-accent) 14%, transparent); }
  100% { background: transparent; }
}

/* LIVE na stronie głównej: spokojny znacznik transmisyjny, bez amatorskiego pulsowania */
.ranking-live-badge {
  background: linear-gradient(180deg, rgba(34,40,48,.98), rgba(18,22,28,.98)) !important;
  border-color: color-mix(in srgb, var(--match-accent, #e7000e) 50%, #596674) !important;
  box-shadow: inset 2px 0 0 var(--match-accent, #e7000e), 0 7px 16px rgba(0,0,0,.24) !important;
  animation: none !important;
}

.ranking-live-dot {
  box-shadow: 0 0 6px color-mix(in srgb, var(--match-accent, #e7000e) 48%, transparent) !important;
  animation: none !important;
}

/* Nowe i zmienione pozycje w bocznych listach */
.ranking-match-card[data-home-match] {
  will-change: transform, opacity, filter;
}

/* Przejście aktywny -> historia: zanik, potem osobne pojawienie — bez przesuwania karty */
.tournament-card-leaving {
  pointer-events: none !important;
}

.history-card.history-arrived::after {
  display: none !important;
}

@media (max-width: 760px) {
  .studio-header h1 { font-size: 28px !important; }
  .center-column > h1,
  .events-history-heading .panel-heading-title { font-size: 24px !important; }
  .tournament-title { font-size: 41px !important; }
  .tournament-title .ranking-sub { font-size: 20px !important; }
  #rules-button { min-width: 112px; font-size: 14px !important; }
  .match-date-time { font-size: 16px !important; }
  .match-date-day { font-size: 11px !important; }
  .rank-position-cell { width: 56px !important; min-width: 56px !important; }
  .rank-movement-slot { flex-basis: 18px; width: 18px; margin-right: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .match-card-just-updated,
  .table-row-just-updated,
  .rank-movement {
    animation: none !important;
  }
}

/* =========================================================
   WK STUDIO V9 — stabilny layout i widowiskowe aktualizacje
   ========================================================= */

/* Nagłówki: jedna typografia i wyrównana hierarchia. */
.studio-header h1,
.center-column > h1,
.events-history-heading .panel-heading-title {
  font-family: var(--font-ui) !important;
  font-size: clamp(25px, 2.5vw, 38px) !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  letter-spacing: .085em !important;
}

.tournament-title {
  font-size: clamp(38px, 4.55vw, 66px) !important;
  line-height: .96 !important;
}

.tournament-title .ranking-sub {
  font-size: clamp(19px, 2vw, 31px) !important;
}

/* Boczne listy mają stałą wysokość. Dodawanie i usuwanie meczu nie rozciąga strony. */
.left-column .ranking-list,
.right-column .ranking-list {
  height: 346px !important;
  min-height: 346px !important;
  max-height: 346px !important;
  overflow: hidden !important;
  contain: layout style;
  overflow-anchor: none;
}

.left-column .ranking-list > .empty-state.empty-state-detailed,
.right-column .ranking-list > .empty-state.empty-state-detailed {
  position: absolute !important;
  inset: 10px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 20px 16px !important;
}

.ranking-match-card,
.schedule-match-card,
.bracket-match {
  contain: layout style;
  transform-origin: center;
}

/* Terminarz: neutralne tło, kolor turnieju wyłącznie na lewym pasku. */
.schedule-match-card,
.schedule-match-card[class*="match-status-"] {
  border-left: 5px solid #56606b !important;
  background: #0a0e13 !important;
  box-shadow: none !important;
  transition:
    transform .34s cubic-bezier(.16,1,.3,1),
    border-left-color .28s ease,
    background-color .28s ease,
    box-shadow .28s ease !important;
}

.schedule-match-card:hover,
.schedule-match-card[class*="match-status-"]:hover {
  border-left-color: var(--match-accent, var(--tournament-accent)) !important;
  background: #0d1218 !important;
  box-shadow: 0 13px 30px rgba(0,0,0,.28) !important;
  transform: translateX(3px);
}

.schedule-match-card:hover .schedule-match-date {
  background: rgba(255,255,255,.025) !important;
  border-left-color: rgba(255,255,255,.075) !important;
  border-right-color: rgba(255,255,255,.075) !important;
}

/* Status wyżej i większy, data zawsze pod nim. */
.schedule-match-date {
  justify-content: center !important;
  gap: 0 !important;
  padding: 7px 7px 8px !important;
  background: rgba(255,255,255,.018) !important;
}

.schedule-match-status {
  min-height: 30px !important;
  margin: -3px 0 7px !important;
  padding: 7px 11px 6px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  letter-spacing: .085em !important;
  border-radius: 6px !important;
  transform: translateY(-1px);
}

.match-date-time {
  font-size: clamp(18px, 1.4vw, 24px) !important;
  line-height: 1 !important;
}

.match-date-day {
  margin-top: 7px !important;
  font-size: clamp(12px, .92vw, 15px) !important;
  line-height: 1 !important;
  letter-spacing: .035em !important;
}

/* Profesjonalny, spokojny puls LIVE — na głównej i w terminarzu. */
.match-status-live .schedule-match-status,
.ranking-live-badge {
  animation: liveBroadcastPulseV9 1.85s cubic-bezier(.4,0,.2,1) infinite !important;
}

.ranking-live-badge {
  color: #fff !important;
  background: linear-gradient(180deg, rgba(94,16,20,.96), rgba(45,10,13,.98)) !important;
  border-color: color-mix(in srgb, var(--match-accent, #e7000e) 72%, #ffb5b5) !important;
  box-shadow: inset 2px 0 0 var(--match-accent, #e7000e), 0 7px 18px rgba(0,0,0,.28) !important;
}

.ranking-live-dot {
  background: #fff !important;
  box-shadow: 0 0 7px color-mix(in srgb, var(--match-accent, #e7000e) 80%, white) !important;
  animation: liveDotV9 1.85s ease-in-out infinite !important;
}

@keyframes liveBroadcastPulseV9 {
  0%, 100% {
    filter: brightness(.94);
    box-shadow: inset 2px 0 0 var(--match-accent, #e7000e), 0 7px 18px rgba(0,0,0,.28), 0 0 0 color-mix(in srgb, var(--match-accent, #e7000e) 0%, transparent);
  }
  48% {
    filter: brightness(1.18);
    box-shadow: inset 2px 0 0 var(--match-accent, #e7000e), 0 7px 18px rgba(0,0,0,.28), 0 0 17px color-mix(in srgb, var(--match-accent, #e7000e) 30%, transparent);
  }
}

@keyframes liveDotV9 {
  0%, 100% { opacity: .72; transform: scale(.82); }
  48% { opacity: 1; transform: scale(1.18); }
}

/* Strzałki są jednoznaczne, mają stałe miejsce i nie animują się po samym wejściu. */
.rank-position-cell {
  width: 70px !important;
  min-width: 70px !important;
}

.rank-movement-slot {
  width: 23px !important;
  height: 22px !important;
  flex-basis: 23px !important;
  margin-right: 5px !important;
}

.rank-movement {
  display: inline-grid !important;
  place-items: center !important;
  width: 21px !important;
  height: 21px !important;
  border-radius: 5px !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  animation: none !important;
}

.rank-up {
  color: #b7ffca !important;
  background: rgba(32,176,75,.25) !important;
  border: 1px solid rgba(91,255,137,.62) !important;
  box-shadow: 0 0 10px rgba(67,227,111,.16), inset 0 0 8px rgba(67,227,111,.08) !important;
}

.rank-down {
  color: #ffc0c0 !important;
  background: rgba(196,35,35,.26) !important;
  border: 1px solid rgba(255,93,93,.62) !important;
  box-shadow: 0 0 10px rgba(255,78,78,.14), inset 0 0 8px rgba(255,78,78,.08) !important;
}

/* Dłuższe aktualizacje wartości bez zmiany wymiarów elementów. */
.player-nickname,
.schedule-player-score,
[data-stat],
.ranking-score-line {
  transform-origin: center;
}

.schedule-player-name .player-nickname,
[data-player-cell] .player-nickname {
  display: inline-block;
  max-width: 100%;
}

.match-card-just-updated {
  animation: matchSurfaceUpdateV9 1.75s cubic-bezier(.16,1,.3,1) both !important;
}

@keyframes matchSurfaceUpdateV9 {
  0% { filter: brightness(1); }
  22% {
    filter: brightness(1.2);
    box-shadow: inset 5px 0 0 var(--match-accent, var(--tournament-accent)), 0 0 30px color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 25%, transparent) !important;
  }
  60% {
    filter: brightness(1.08);
    box-shadow: inset 5px 0 0 var(--match-accent, var(--tournament-accent)), 0 0 16px color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 13%, transparent) !important;
  }
  100% { filter: brightness(1); box-shadow: none; }
}

.table-row-just-updated {
  animation: tableRowUpdateV9 1.5s cubic-bezier(.16,1,.3,1) both !important;
}

@keyframes tableRowUpdateV9 {
  0% { background: transparent; }
  24% { background: color-mix(in srgb, var(--tournament-accent) 20%, transparent); }
  66% { background: color-mix(in srgb, var(--tournament-accent) 8%, transparent); }
  100% { background: transparent; }
}

/* Kontenery kart zmieniają wysokość kontrolowanie, bez nagłego skoku strony. */
.active-tournaments-list,
.events-history-row {
  overflow-anchor: none;
  min-height: 0;
}

.active-tournaments-list:empty,
.events-history-row:empty {
  display: grid !important;
  height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
}

.tournament-card-leaving {
  contain: layout style;
}

@media (max-width: 1100px) {
  .left-column .ranking-list,
  .right-column .ranking-list {
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
  }
}

@media (max-width: 760px) {
  .studio-header h1,
  .center-column > h1,
  .events-history-heading .panel-heading-title {
    font-size: 24px !important;
  }

  .tournament-title { font-size: 38px !important; }
  .tournament-title .ranking-sub { font-size: 19px !important; }

  .left-column .ranking-list,
  .right-column .ranking-list {
    height: 260px !important;
    min-height: 260px !important;
    max-height: 260px !important;
  }

  .schedule-match-status {
    min-height: 26px !important;
    padding: 6px 8px 5px !important;
    font-size: 10px !important;
  }

  .match-date-time { font-size: 16px !important; }
  .match-date-day { font-size: 11px !important; }
  .rank-position-cell { width: 63px !important; min-width: 63px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .match-status-live .schedule-match-status,
  .ranking-live-badge,
  .ranking-live-dot,
  .match-card-just-updated,
  .table-row-just-updated {
    animation: none !important;
  }
}

.bracket-match.match-card-just-updated {
  animation: matchSurfaceUpdateV9 1.75s cubic-bezier(.16,1,.3,1) both !important;
}


/* =========================================================
   WK STUDIO V10 — precyzyjne pola, dłuższe animacje, zero skoków
   ========================================================= */

/* Daty są zawsze dwoma fizycznymi wierszami, niezależnie od starszych reguł. */
.match-date-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  grid-auto-flow: row !important;
  place-items: center !important;
  align-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.match-date-time,
.match-date-day {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

.schedule-match-date:not(.is-pending-date) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  place-items: center !important;
}

.ranking-date-pill:not(.is-pending-date) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: auto !important;
  place-items: center !important;
  align-content: center !important;
  min-width: 128px !important;
}

.match-date-pending {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

/* LIVE jest częścią kolumny terminu, a nie nakładką. */
.ranking-live-badge {
  position: static !important;
  top: auto !important;
  right: auto !important;
  justify-self: center !important;
  margin: 0 0 7px !important;
}

.ranking-match-upcoming-card.is-live .ranking-date-pill {
  padding-top: 8px !important;
}

.ranking-match-upcoming-card.is-live .match-date-time,
.ranking-match-upcoming-card.is-live .match-date-day {
  color: color-mix(in srgb, var(--match-accent, #e7000e) 78%, white) !important;
  text-shadow: 0 0 12px color-mix(in srgb, var(--match-accent, #e7000e) 38%, transparent) !important;
}

/* Nagłówek turnieju ma stałą rezerwę wysokości i nigdy nie nachodzi na przyciski. */
.tournament-top {
  min-height: 184px !important;
  padding-bottom: 12px !important;
}

.tournament-title {
  font-size: clamp(36px, 4.15vw, 60px) !important;
  line-height: .96 !important;
}

.tournament-title .ranking-sub {
  margin-top: 8px !important;
  font-size: clamp(17px, 1.65vw, 25px) !important;
  line-height: 1 !important;
}

.tournament-status-row {
  gap: 9px !important;
  margin-top: 12px !important;
}

.tournament-meta-badge {
  min-height: 30px !important;
  padding: 7px 12px 6px !important;
  font-size: 10px !important;
}

.nav-buttons {
  margin-top: 8px !important;
}

/* Długie animacje działają wyłącznie przez transform/filter i nie zmieniają wymiarów. */
.player-nickname,
.schedule-player-score,
.ranking-score-line,
[data-stat],
.rank-movement,
.status-badge,
.match-date-stack {
  backface-visibility: hidden;
  transform-origin: center;
}

.match-card-just-updated {
  animation-duration: 3.2s !important;
}

.table-row-just-updated {
  animation-duration: 3.6s !important;
}

/* Aktualizacja karty na stronie głównej zachowuje jej wymiary i obraz. */
.active-tournament-card-v9,
.compact-history-card,
.ranking-match-card {
  overflow-anchor: none !important;
}

.active-tournaments-list,
.events-history-row,
.home-layout,
.center-column {
  overflow-anchor: none !important;
}

/* Hover terminarza: kolor przede wszystkim na lewym pasku. */
.schedule-match-card,
.schedule-match-card[class*="match-status-"] {
  border-left-color: #56606b !important;
}

.schedule-match-card:hover,
.schedule-match-card[class*="match-status-"]:hover {
  border-left-color: var(--match-accent, var(--tournament-accent)) !important;
  background: #0d1218 !important;
  box-shadow: 0 13px 30px rgba(0,0,0,.28) !important;
}

@media (max-width: 760px) {
  .tournament-top { min-height: 174px !important; }
  .tournament-title { font-size: 36px !important; }
  .tournament-title .ranking-sub { font-size: 17px !important; }
  .ranking-date-pill:not(.is-pending-date) { min-width: 112px !important; }
}

/* =========================================================
   WK STUDIO V11 — czytelność, logiczne dane terminu i panele
   ========================================================= */

/* Nagłówek marki: osobny, grubszy krój, ale ta sama skala co sekcje. */
.studio-header h1 {
  font-family: "Barlow Condensed", "Rajdhani", "Segoe UI", sans-serif !important;
  font-size: clamp(25px, 2.5vw, 38px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .105em !important;
  text-transform: uppercase;
}

/* Górna część turnieju ma stałą rezerwę — menu nie nachodzi na fazy. */
.tournament-top {
  min-height: 248px !important;
  padding-bottom: 14px !important;
  contain: layout style;
}

.tournament-title-block {
  box-sizing: border-box;
  width: 100%;
  padding-inline: 176px !important;
}

.tournament-status-row {
  gap: 11px !important;
  margin-top: 15px !important;
}

/* Informacje o turnieju są większe i czytelniejsze na transmisji. */
.tournament-meta-badge {
  min-height: 40px !important;
  padding: 10px 15px 9px !important;
  font-size: clamp(12px, 1vw, 14px) !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  letter-spacing: .08em !important;
  white-space: nowrap;
}

.tournament-meta-badge .status-dot {
  width: 9px !important;
  height: 9px !important;
  flex-basis: 9px !important;
}

/* ZASADY / NAGRODY / UCZESTNICY — jeden pionowy, równy zestaw. */
.tournament-info-menu {
  position: relative;
  width: 148px;
  flex: 0 0 148px;
}

.tournament-info-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 148px;
}

.tournament-info-buttons .tournament-action-button {
  box-sizing: border-box;
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  min-height: 42px !important;
  padding: 9px 10px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.tournament-info-panel {
  top: 0 !important;
  right: calc(100% + 14px) !important;
  width: min(440px, calc(100vw - 360px)) !important;
  min-width: 320px;
  max-height: 520px;
  overflow: auto;
  transform-origin: top right;
}

.tournament-info-panel::before {
  top: 18px !important;
  right: -7px !important;
  transform: rotate(135deg) !important;
}

.info-list {
  margin: 12px 0 0;
  padding-left: 25px;
  color: #d9e2e9;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: .025em;
  text-align: left;
}

.info-list li {
  padding: 6px 0 7px 5px;
  border-bottom: 1px solid rgba(185,237,255,.08);
}

.participants-list {
  columns: 2;
  column-gap: 30px;
}

.participants-list li {
  break-inside: avoid;
}

/* Statusy meczu mają identyczną szerokość w obu widokach. */
.schedule-match-status,
.ranking-match-status {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 6px 8px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  letter-spacing: .075em !important;
  white-space: nowrap !important;
}

.ranking-match-status {
  margin: 0 0 8px !important;
  color: #dfe7ee;
  background: linear-gradient(180deg, rgba(48,55,65,.98), rgba(22,27,34,.98));
  border: 1px solid rgba(148,162,177,.28);
  box-shadow: inset 2px 0 0 rgba(148,162,177,.36), 0 7px 18px rgba(0,0,0,.24);
}

.ranking-live-badge {
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
  height: 34px !important;
  min-height: 34px !important;
}

/* Termin to zawsze dwa fizyczne wiersze: godzina, potem data. */
.match-date-stack {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.match-date-time,
.match-date-day {
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  margin: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.match-date-time {
  font-size: clamp(17px, 1.25vw, 22px) !important;
  line-height: 1 !important;
}

.match-date-day {
  font-size: clamp(12px, .9vw, 15px) !important;
  line-height: 1 !important;
}

.schedule-match-date:not(.is-pending-date),
.ranking-date-pill:not(.is-pending-date) {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

.ranking-date-pill:not(.is-pending-date) {
  min-width: 142px !important;
}

.schedule-match-date {
  min-width: 150px;
}

/* Strzałki zachowują animację, ale bez systemowego dymka po najechaniu. */
.rank-movement {
  cursor: default !important;
}

/* Karta historii jest niewidoczna do pierwszej klatki właściwej animacji. */
.history-entry-pending {
  visibility: hidden !important;
  opacity: 0 !important;
}

.events-history-row,
.active-tournaments-list {
  overflow-anchor: none !important;
}

@media (max-width: 900px) {
  .tournament-top {
    min-height: 264px !important;
  }

  .tournament-title-block {
    padding-inline: 150px !important;
  }

  .tournament-info-menu,
  .tournament-info-buttons {
    width: 130px;
  }

  .tournament-info-buttons .tournament-action-button {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    font-size: 11px !important;
  }

  .tournament-info-panel {
    width: min(390px, calc(100vw - 310px)) !important;
    min-width: 280px;
  }
}

@media (max-width: 760px) {
  .tournament-top {
    min-height: 382px !important;
  }

  .tournament-toolbar {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding-inline: 8px;
  }

  .tournament-info-menu,
  .tournament-info-buttons,
  .tournament-info-buttons .tournament-action-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .tournament-title-block {
    padding-inline: 8px !important;
    margin-top: 18px;
  }

  .tournament-info-panel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    width: min(92vw, 440px) !important;
    min-width: 0 !important;
    transform: translate(-50%, -48%) scale(.98) !important;
  }

  .tournament-info-panel.is-visible {
    transform: translate(-50%, -50%) scale(1) !important;
  }

  .tournament-info-panel::before {
    display: none;
  }

  .participants-list {
    columns: 1;
  }

  .tournament-meta-badge {
    font-size: 11px !important;
  }
}


/* =========================================================
   WK STUDIO V12 — premium polish, zegar meczu i stabilny layout
   ========================================================= */

/* Logo tekstowe ma własną tożsamość, bez sztucznego rozciągania. */
.intro-title,
.studio-header h1 {
  font-family: "Orbitron", "Rajdhani", "Segoe UI", sans-serif !important;
  font-weight: 900 !important;
  font-stretch: normal !important;
  transform: none !important;
  letter-spacing: .08em !important;
  line-height: 1 !important;
  -webkit-text-stroke: .35px rgba(202, 239, 255, .34);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, .55),
    0 0 8px rgba(67, 160, 255, .18) !important;
}

.studio-header h1 {
  font-size: clamp(24px, 2.25vw, 36px) !important;
}

/* Karty meczów zachowują identyczny wymiar niezależnie od terminu. */
.schedule-legend,
.schedule-match-card {
  grid-template-columns: minmax(0, 1fr) 138px 58px !important;
}

.schedule-match-card,
.schedule-match-card[class*="match-status-"] {
  grid-template-rows: 42px 42px !important;
  height: 86px !important;
  min-height: 86px !important;
  max-height: 86px !important;
  contain: layout;
}

.schedule-match-date {
  box-sizing: border-box !important;
  width: 138px !important;
  min-width: 138px !important;
  max-width: 138px !important;
  height: 84px !important;
  min-height: 84px !important;
  max-height: 84px !important;
  padding: 5px 6px !important;
  overflow: hidden !important;
}

.ranking-item.ranking-match-card {
  grid-template-rows: 41px 41px !important;
  height: 84px !important;
  min-height: 84px !important;
  max-height: 84px !important;
  contain: layout;
}

.ranking-match-pill,
.ranking-date-pill:not(.is-pending-date) {
  box-sizing: border-box !important;
  width: 138px !important;
  min-width: 138px !important;
  max-width: 138px !important;
  height: 82px !important;
  min-height: 82px !important;
  max-height: 82px !important;
  padding: 5px 6px !important;
  overflow: hidden !important;
}

/* Jeden kompaktowy wymiar dla wszystkich statusów. */
.schedule-match-status,
.ranking-match-status {
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
  height: 27px !important;
  min-height: 27px !important;
  max-height: 27px !important;
  margin: 0 0 5px !important;
  padding: 4px 6px !important;
  border-radius: 5px !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  letter-spacing: .065em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.match-clock-countdown,
.match-clock-awaiting {
  font-size: 7.7px !important;
  letter-spacing: .035em !important;
}

.match-clock-status .match-clock-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.match-clock-live {
  color: #fff !important;
  border-color: color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 66%, #8a96a4) !important;
  box-shadow:
    inset 2px 0 0 var(--match-accent, var(--tournament-accent)),
    0 0 14px color-mix(in srgb, var(--match-accent, var(--tournament-accent)) 20%, transparent) !important;
}

.match-live-dot {
  animation: wkLiveDotV12 1.45s ease-in-out infinite !important;
}

@keyframes wkLiveDotV12 {
  0%, 100% { opacity: .52; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1.16); }
}

.match-date-stack {
  flex: 0 0 auto !important;
  gap: 3px !important;
  height: 31px !important;
  min-height: 31px !important;
  max-height: 31px !important;
}

.match-date-time {
  font-size: 15px !important;
  line-height: 15px !important;
}

.match-date-day {
  font-size: 10.5px !important;
  line-height: 11px !important;
}

.match-date-pending,
.match-date-unparsed {
  display: grid !important;
  place-items: center !important;
  height: 31px !important;
  min-height: 31px !important;
  max-height: 31px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Wynik jest wyśrodkowany także po zwężeniu okna. */
.schedule-player-score,
.schedule-player-score.score-one,
.schedule-player-score.score-two {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  padding: 0 !important;
  text-align: center !important;
}

.schedule-player-score > span,
.schedule-player-score .empty-score {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  text-align: center !important;
}

.ranking-score-pill {
  display: grid !important;
  grid-template-rows: 41px 41px !important;
  place-items: stretch !important;
  padding: 0 !important;
}

.ranking-score-line {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 41px !important;
  padding: 0 !important;
  text-align: center !important;
}

/* Panel informacyjny rośnie do treści i nie pokazuje wewnętrznych suwaków. */
.tournament-info-panel,
.rules-tooltip {
  width: min(560px, calc(100vw - 390px)) !important;
  min-width: 430px !important;
  max-width: 560px !important;
  height: auto !important;
  min-height: 190px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 20px 24px 22px !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.tournament-info-panel .info-list,
.tournament-info-panel .rules-list {
  columns: 1 !important;
  width: 100%;
  margin-top: 16px !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

#tournament-rules-text,
#tournament-participants-text {
  text-align: left !important;
}

#tournament-prizes-text,
.prizes-list,
.prizes-list li {
  text-align: center !important;
}

.prizes-list {
  padding-left: 0 !important;
  list-style-position: inside !important;
}

.rules-list li,
.info-list li {
  min-height: 34px;
  padding-block: 7px !important;
}

/* Strzałka nie ma własnej podpowiedzi ani aktywnego kursora. */
.rank-movement {
  pointer-events: none !important;
  user-select: none !important;
}

@media (max-width: 900px) {
  .schedule-legend,
  .schedule-match-card {
    grid-template-columns: minmax(0, 1fr) 126px 52px !important;
  }
  .schedule-match-date {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
  }
  .schedule-match-status,
  .ranking-match-status {
    width: 114px !important;
    min-width: 114px !important;
    max-width: 114px !important;
  }
  .ranking-match-pill,
  .ranking-date-pill:not(.is-pending-date) {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
  }
  .match-clock-countdown,
  .match-clock-awaiting { font-size: 7.1px !important; }
  .tournament-info-panel,
  .rules-tooltip {
    width: min(510px, calc(100vw - 330px)) !important;
    min-width: 360px !important;
  }
}

@media (max-width: 760px) {
  .studio-header h1 { font-size: 25px !important; }
  .schedule-legend,
  .schedule-match-card {
    grid-template-columns: minmax(0, 1fr) 118px 46px !important;
  }
  .schedule-match-date {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
  }
  .schedule-match-status,
  .ranking-match-status {
    width: 106px !important;
    min-width: 106px !important;
    max-width: 106px !important;
    font-size: 8px !important;
  }
  .match-clock-countdown,
  .match-clock-awaiting { font-size: 6.55px !important; }
  .ranking-match-pill,
  .ranking-date-pill:not(.is-pending-date) {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
  }
  .tournament-info-panel,
  .rules-tooltip {
    width: min(92vw, 560px) !important;
    min-width: 0 !important;
    max-height: 78vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .match-live-dot { animation: none !important; }
}

/* =========================================================
   WK STUDIO V12.1 — branding logo i czytelniejsze etykiety
   ========================================================= */

/* Większy jest wyłącznie tekst statusu — obramowania zachowują stały wymiar. */
.schedule-match-status,
.ranking-match-status {
  font-size: 10.3px !important;
  font-weight: 900 !important;
}

/* DO USTALENIA ma własną, większą typografię bez zmiany wysokości kolumny. */
.match-date-pending {
  font-size: 11.2px !important;
  font-weight: 900 !important;
  letter-spacing: .055em !important;
}

/* Odliczanie ma być czytelne, ale nadal mieścić się w stałym badge'u. */
.match-clock-countdown {
  font-size: 9.45px !important;
  font-weight: 900 !important;
  letter-spacing: .018em !important;
}

/* Długi komunikat zachowuje kompaktowy rozmiar, aby nie naruszać layoutu. */
.match-clock-awaiting {
  font-size: 7.8px !important;
  letter-spacing: .018em !important;
}

@media (max-width: 760px) {
  .schedule-match-status,
  .ranking-match-status {
    font-size: 9.15px !important;
  }

  .match-date-pending {
    font-size: 10.1px !important;
  }

  .match-clock-countdown {
    font-size: 8.35px !important;
  }

  .match-clock-awaiting {
    font-size: 6.85px !important;
  }
}

/* =========================================================
   WK STUDIO V12.5 — powrót do pierwszego stylu VIRTUAL STUDIO
   ========================================================= */

/*
 * Branding wraca dokładnie do spokojnego wariantu z V12:
 * Orbitron 900, naturalna szerokość, umiarkowany odstęp,
 * cienki obrys i subtelny cień. Brak backplate'u oraz mocnego glow.
 * Właściwe reguły znajdują się w głównym bloku „WK STUDIO V12”.
 */
.intro-title::before,
.studio-header h1::before {
  content: none !important;
  display: none !important;
}

/* =========================================================
   WK STUDIO V12.5 — otwarty, spójny logotyp tekstowy
   ========================================================= */
/*
 * VIRTUAL STUDIO korzysta teraz z kroju interfejsu (Rajdhani),
 * ale z większym odstępem liter. Dzięki temu napis jest mniej
 * zbity, zachowuje czytelność i nadal ma własny charakter.
 */
.intro-title,
.studio-header h1 {
  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
  font-stretch: normal !important;
  transform: none !important;
  letter-spacing: .145em !important;
  line-height: 1.04 !important;
  -webkit-text-stroke: .25px rgba(202, 239, 255, .28) !important;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, .5),
    0 0 7px rgba(67, 160, 255, .15) !important;
}

.studio-header h1 {
  font-size: clamp(24px, 2.25vw, 36px) !important;
}


/* =========================================================
   WK STUDIO V12.8 — profesjonalny branding VIRTUAL STUDIO
   ========================================================= */
/*
 * Oxanium ExtraBold daje napisowi własną, esportową tożsamość,
 * ale zachowuje czytelność i proporcje reszty interfejsu.
 * Efekt nie używa transformacji ani sztucznego rozciągania.
 */
.intro-title,
.studio-header h1 {
  font-family: "Oxanium", "Rajdhani", "Segoe UI", Arial, sans-serif !important;
  font-weight: 800 !important;
  font-stretch: normal !important;
  transform: none !important;
  letter-spacing: .09em !important;
  line-height: 1.06 !important;
  color: #d9f3ff !important;
  background: linear-gradient(
    180deg,
    #f8fdff 0%,
    #d9f4ff 34%,
    #8fd5ff 67%,
    #5b9dff 100%
  ) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: .38px rgba(8, 24, 38, .78) !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .20),
    0 2px 0 rgba(2, 8, 15, .78),
    0 7px 17px rgba(0, 0, 0, .46),
    0 0 11px rgba(62, 160, 255, .24) !important;
}

.studio-header h1 {
  font-size: clamp(24px, 2.25vw, 36px) !important;
}

/* Wymuszony czytelny fallback w przeglądarkach bez background-clip:text. */
@supports not (-webkit-background-clip: text) {
  .intro-title,
  .studio-header h1 {
    color: #cceeff !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
  }
}

/* =========================================================
   WK STUDIO V12.8 — branding dopasowany do logo VS
   ========================================================= */
/*
 * Napis jest celowo dwukolorowy jak znak graficzny:
 * VIRTUAL — lodowy błękit/cyjan,
 * STUDIO — żywszy niebieski.
 * Bez metalicznej szarości, sztucznego rozciągania i ciężkiego neonu.
 */
.intro-title,
.studio-header h1 {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: .31em !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;

  font-family: "Oxanium", "Rajdhani", "Segoe UI", Arial, sans-serif !important;
  font-weight: 800 !important;
  font-stretch: normal !important;
  line-height: 1.04 !important;
  letter-spacing: normal !important;

  color: inherit !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

.intro-title::before,
.intro-title::after,
.studio-header h1::before,
.studio-header h1::after {
  content: none !important;
  display: none !important;
}

.brand-word {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;

  font: inherit;
  font-weight: 800 !important;
  font-style: normal !important;
  line-height: 1 !important;
  letter-spacing: .105em !important;
  font-stretch: normal !important;
  transform: none !important;

  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: .52px rgba(3, 27, 57, .94) !important;

  filter:
    drop-shadow(0 2px 0 rgba(0, 14, 32, .92))
    drop-shadow(0 5px 8px rgba(0, 0, 0, .48))
    drop-shadow(0 0 5px rgba(58, 169, 255, .24)) !important;
}

.brand-word-virtual {
  color: #9cddff !important;
  background-image: linear-gradient(
    180deg,
    #f4fcff 0%,
    #d9f4ff 18%,
    #9ce1ff 52%,
    #5db8ee 100%
  ) !important;
}

.brand-word-studio {
  color: #459cff !important;
  background-image: linear-gradient(
    180deg,
    #bfeaff 0%,
    #70c8ff 28%,
    #358fff 65%,
    #176bd4 100%
  ) !important;
}

/* Drobne rozjaśnienie przy interakcji, bez zmiany wymiarów napisu. */
.studio-header:hover .brand-word,
.intro-screen:hover .brand-word {
  filter:
    drop-shadow(0 2px 0 rgba(0, 14, 32, .92))
    drop-shadow(0 5px 8px rgba(0, 0, 0, .48))
    drop-shadow(0 0 7px rgba(71, 183, 255, .33)) !important;
}

.studio-header h1 {
  font-size: clamp(24px, 2.25vw, 36px) !important;
}

@media (max-width: 760px) {
  .intro-title,
  .studio-header h1 {
    gap: .24em !important;
  }

  .brand-word {
    letter-spacing: .075em !important;
    -webkit-text-stroke-width: .42px !important;
  }
}

@supports not (-webkit-background-clip: text) {
  .brand-word {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
  }

  .brand-word-virtual { color: #9cddff !important; }
  .brand-word-studio { color: #459cff !important; }
}


/* =========================================================
   WK STUDIO V12.8 — kompaktowe listy 5 meczów i czysty zegar
   ========================================================= */

/*
 * Oba panele na stronie głównej mieszczą dokładnie pięć pozycji.
 * Zmiana dotyczy wyłącznie bocznych list — pełny terminarz turnieju
 * zachowuje większe, transmisyjne karty.
 */
#sidebar-upcoming,
#sidebar-results {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  height: 346px !important;
  min-height: 346px !important;
  max-height: 346px !important;
  padding: 8px !important;
  overflow: hidden !important;
}

#sidebar-upcoming .ranking-item.ranking-match-card,
#sidebar-results .ranking-item.ranking-match-card {
  box-sizing: border-box !important;
  flex: 0 0 60px !important;
  grid-template-rows: 29px 29px !important;
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

#sidebar-upcoming .ranking-player-name,
#sidebar-results .ranking-player-name {
  min-height: 0 !important;
  height: 29px !important;
  padding: 5px 10px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
}

#sidebar-upcoming .ranking-player-name .player-nickname,
#sidebar-results .ranking-player-name .player-nickname {
  font-size: 11.5px !important;
  line-height: 1 !important;
}

#sidebar-upcoming .ranking-match-pill,
#sidebar-results .ranking-match-pill {
  box-sizing: border-box !important;
  width: 122px !important;
  min-width: 122px !important;
  max-width: 122px !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  padding: 3px 5px !important;
  overflow: hidden !important;
}

#sidebar-results .ranking-score-pill {
  display: grid !important;
  grid-template-rows: 29px 29px !important;
  padding: 0 !important;
}

#sidebar-results .ranking-score-line {
  height: 29px !important;
  min-height: 29px !important;
  max-height: 29px !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

#sidebar-upcoming .ranking-match-status {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  margin: 0 0 2px !important;
  padding: 2px 4px !important;
  border-radius: 4px !important;
  font-size: 8.25px !important;
  line-height: 1 !important;
}

/* Odliczanie jest samą wartością czasu: 59, 01:00 albo 1:02:00. */
#sidebar-upcoming .match-clock-countdown {
  font-size: 10.5px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em !important;
}

#sidebar-upcoming .match-clock-awaiting {
  font-size: 6.45px !important;
  letter-spacing: .012em !important;
}

#sidebar-upcoming .match-date-stack {
  gap: 1px !important;
  height: 25px !important;
  min-height: 25px !important;
  max-height: 25px !important;
}

#sidebar-upcoming .match-date-time {
  font-size: 12.5px !important;
  line-height: 13px !important;
}

#sidebar-upcoming .match-date-day {
  margin-top: 0 !important;
  font-size: 8.7px !important;
  line-height: 9px !important;
}

#sidebar-upcoming .match-date-pending,
#sidebar-upcoming .match-date-unparsed {
  height: 25px !important;
  min-height: 25px !important;
  max-height: 25px !important;
  font-size: 9.6px !important;
}

/* Pięć kart pozostaje widocznych również w średnim widoku desktopowym. */
@media (max-width: 1280px) {
  #sidebar-upcoming .ranking-match-pill,
  #sidebar-results .ranking-match-pill {
    width: 116px !important;
    min-width: 116px !important;
    max-width: 116px !important;
  }

  #sidebar-upcoming .ranking-match-status {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
  }
}


/* =========================================================
   WK STUDIO V12.10 — czytelne listy 5 meczów i panel turniejowy
   ========================================================= */

/*
 * Pięć kart nadal mieści się bez przewijania, ale każdy wpis ma
 * większą wysokość, czytelniejszą typografię i więcej oddechu.
 * Wymiary są stałe, więc pojawienie się daty lub statusu nie
 * rozciąga panelu ani nie przesuwa sąsiednich elementów.
 */
#sidebar-upcoming,
#sidebar-results {
  gap: 7px !important;
  height: 390px !important;
  min-height: 390px !important;
  max-height: 390px !important;
  padding: 8px !important;
  overflow: hidden !important;
}

.left-column .ranking-list,
.right-column .ranking-list {
  height: 390px !important;
  min-height: 390px !important;
  max-height: 390px !important;
}

#sidebar-upcoming .ranking-item.ranking-match-card,
#sidebar-results .ranking-item.ranking-match-card {
  flex: 0 0 69px !important;
  grid-template-rows: 34px 34px !important;
  height: 69px !important;
  min-height: 69px !important;
  max-height: 69px !important;
  border-radius: 9px !important;
}

#sidebar-upcoming .ranking-player-name,
#sidebar-results .ranking-player-name {
  height: 34px !important;
  min-height: 34px !important;
  padding: 7px 11px !important;
  font-size: 12.4px !important;
  line-height: 1 !important;
}

#sidebar-upcoming .ranking-player-name .player-nickname,
#sidebar-results .ranking-player-name .player-nickname {
  font-size: 12.4px !important;
  line-height: 1 !important;
}

#sidebar-upcoming .ranking-match-pill,
#sidebar-results .ranking-match-pill {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 67px !important;
  min-height: 67px !important;
  max-height: 67px !important;
  padding: 4px 6px !important;
}

#sidebar-results .ranking-score-pill {
  grid-template-rows: 34px 33px !important;
}

#sidebar-results .ranking-score-line {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  font-size: 16px !important;
}

#sidebar-upcoming .ranking-match-status {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  margin: 0 0 3px !important;
  padding: 2px 5px !important;
  font-size: 9.15px !important;
  line-height: 1 !important;
}

#sidebar-upcoming .match-clock-countdown {
  font-size: 13.3px !important;
  font-weight: 950 !important;
  letter-spacing: .025em !important;
  font-variant-numeric: tabular-nums;
}

#sidebar-upcoming .match-clock-awaiting {
  font-size: 7.15px !important;
  letter-spacing: .012em !important;
}

#sidebar-upcoming .match-date-stack {
  gap: 1px !important;
  height: 33px !important;
  min-height: 33px !important;
  max-height: 33px !important;
}

#sidebar-upcoming .match-date-time {
  font-size: 13.7px !important;
  line-height: 15px !important;
}

#sidebar-upcoming .match-date-day {
  font-size: 9.6px !important;
  line-height: 10px !important;
}

#sidebar-upcoming .match-date-pending,
#sidebar-upcoming .match-date-unparsed {
  height: 33px !important;
  min-height: 33px !important;
  max-height: 33px !important;
  font-size: 10.5px !important;
}

/* Pusty stan pozostaje wyśrodkowany w nowej wysokości panelu. */
#sidebar-upcoming > .empty-state.empty-state-detailed,
#sidebar-results > .empty-state.empty-state-detailed {
  inset: 8px !important;
  min-height: 0 !important;
  height: auto !important;
}

/*
 * Pełny terminarz: powiększamy wyłącznie litery statusu i licznik.
 * Obramowania oraz wysokości kart pozostają bez zmian.
 */
.schedule-match-status {
  font-size: 11.45px !important;
  font-weight: 950 !important;
}

.schedule-match-status.match-clock-countdown,
.schedule-match-date .match-clock-countdown {
  font-size: 13.15px !important;
  font-weight: 950 !important;
  letter-spacing: .022em !important;
  font-variant-numeric: tabular-nums;
}

.schedule-match-status.match-clock-awaiting,
.schedule-match-date .match-clock-awaiting {
  font-size: 8.45px !important;
  font-weight: 950 !important;
  letter-spacing: .012em !important;
}

.schedule-match-status.match-clock-live,
.schedule-match-status.match-clock-finished,
.schedule-match-status.match-clock-walkover,
.schedule-match-status.match-clock-cancelled,
.schedule-match-status.match-clock-waiting,
.schedule-match-status.match-clock-scheduled {
  font-size: 11.45px !important;
}

/* Zabezpieczenie przed nachodzeniem: stałe centrowanie tekstu statusu. */
.schedule-match-status .match-clock-label,
.ranking-match-status .match-clock-label {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

@media (max-width: 1280px) {
  #sidebar-upcoming .ranking-match-pill,
  #sidebar-results .ranking-match-pill {
    width: 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
  }

  #sidebar-upcoming .ranking-match-status {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }
}

@media (max-width: 1100px) {
  #sidebar-upcoming,
  #sidebar-results,
  .left-column .ranking-list,
  .right-column .ranking-list {
    height: 390px !important;
    min-height: 390px !important;
    max-height: 390px !important;
  }
}

@media (max-width: 760px) {
  #sidebar-upcoming,
  #sidebar-results,
  .left-column .ranking-list,
  .right-column .ranking-list {
    height: 390px !important;
    min-height: 390px !important;
    max-height: 390px !important;
  }

  .schedule-match-status {
    font-size: 10.35px !important;
  }

  .schedule-match-status.match-clock-countdown,
  .schedule-match-date .match-clock-countdown {
    font-size: 11.7px !important;
  }

  .schedule-match-status.match-clock-awaiting,
  .schedule-match-date .match-clock-awaiting {
    font-size: 7.55px !important;
  }
}

/* =========================================================
   WK STUDIO V12.10 — stabilna nawigacja, tooltipy i czytelne panele
   ========================================================= */

/* Podczas otwierania jedna karta nie może zostać kliknięta drugi raz. */
body.tournament-open-pending [data-tournament-card] {
  pointer-events: none !important;
}

/*
 * Panel strony głównej: status i informacja o terminie zajmują dwa
 * niezależne wiersze. Dzięki temu OCZEKUJE nigdy nie nachodzi na
 * DO USTALENIA, także przy węższej kolumnie bocznej.
 */
#sidebar-upcoming .ranking-date-pill {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 23px 36px !important;
  place-items: center !important;
  align-content: center !important;
  row-gap: 0 !important;
  padding: 4px 6px !important;
}

#sidebar-upcoming .ranking-match-status {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
}

#sidebar-upcoming .match-date-stack,
#sidebar-upcoming .match-date-pending,
#sidebar-upcoming .match-date-unparsed {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: center !important;
  justify-self: stretch !important;
  margin: 0 !important;
}

#sidebar-upcoming .match-date-pending,
#sidebar-upcoming .match-date-unparsed {
  line-height: 1 !important;
  text-align: center !important;
}

/* Strzałka każdego panelu wskazuje jego faktycznie aktywny przycisk. */
.tournament-info-panel::before,
.rules-tooltip::before {
  top: var(--info-arrow-y, 18px) !important;
}

/* Ukryty panel nie przechwytuje kursora; widoczny można swobodnie czytać. */
.tournament-info-panel,
.rules-tooltip {
  pointer-events: none;
}

.tournament-info-panel.is-visible,
.rules-tooltip.is-visible {
  pointer-events: auto;
}

/* Nieco mniejszy tekst daje więcej oddechu bez zmniejszania samego panelu. */
.tournament-info-panel .info-list,
.tournament-info-panel .rules-list,
.tournament-info-panel #tournament-rules-text,
.tournament-info-panel #tournament-prizes-text,
.tournament-info-panel #tournament-participants-text {
  font-size: 13.25px !important;
  line-height: 1.48 !important;
  letter-spacing: .018em !important;
}

.tournament-info-panel .rules-list li,
.tournament-info-panel .info-list li {
  min-height: 30px !important;
  padding-block: 5px !important;
}

.tournament-info-panel .rules-tooltip-title {
  font-size: 11px !important;
  letter-spacing: .12em !important;
}

/*
 * Zmniejszony martwy odstęp między metadanymi turnieju a przyciskami faz.
 * Nie zmieniamy wymiarów samych przycisków ani paneli informacyjnych.
 */
@media (min-width: 901px) {
  .tournament-top {
    min-height: 210px !important;
    padding-bottom: 4px !important;
  }

  .nav-buttons {
    margin-top: -10px !important;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .tournament-top {
    min-height: 226px !important;
    padding-bottom: 6px !important;
  }

  .nav-buttons {
    margin-top: -4px !important;
  }
}
