.turnaj-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px;
  font-family: system-ui, sans-serif;
}

/* ===== HEADER ===== */
.turnaj-header h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.turnaj-header .meta {
  font-size: .9rem;
  color: #666;
}

/* ===== KOLO ===== */
.kolo {
  margin-top: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.kolo-toggle {
  width: 100%;
  padding: 10px;
  background: #f5f5f5;
  border: 0;
  text-align: left;
  font-weight: bold;
}

.kolo-body {
  display: none;
  padding: 6px 10px;
}

.kolo.open .kolo-body {
  display: block;
}

/* ===== ZÁPAS ===== */
.zapas {
  display: grid;
  grid-template-columns: 52px 1fr auto 1fr;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 0;
  width: 100%;
  box-sizing: border-box;
}

.zapas + .zapas {
  border-top: 1px dashed #eee;
}

.zapas-id {
  font-weight: 600;
  font-size: 0.85rem;
  color: #555;
  text-align: right;
  padding-right: 4px;
  white-space: nowrap;
}

/* ===== HRÁČI ===== */
.hrac {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}

.hrac-left {
  text-align: right;
  padding-right: 0.5rem;
}

.hrac-right {
  text-align: left;
  padding-left: 0.5rem;
}

.hrac select,
.hrac span {
  height: 24px;
  line-height: 24px;
}

/* ===== SKÓRE ===== */
.skore {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: bold;
  min-width: 50px;
  justify-content: center;
}

.score-input {
  width: 36px;
  text-align: center;
  padding: 2px;
  height: 24px;
}

/* ===== VÍTĚZ ===== */
.jmeno.winner {
  font-weight: 700;
  color: #0a7b12;
}

.jmeno.winner::after {
  content: " ✓";
  font-size: 0.9em;
}

html[data-theme="dark"] .jmeno.winner {
  color: #22c55e;
}

/* ===== AKCE ===== */
.actions {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 4px;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .zapas {
    grid-template-columns: 40px 1fr auto 1fr;
    font-size: 0.85rem;
  }

  .zapas-id {
    font-size: 0.75rem;
  }

  .score-input {
    width: 30px;
  }
}
/* =========================
   MOBILE – ZMENŠENÍ TYPOGRAFIE
   ========================= */
@media (max-width: 600px) {

  /* celý zápas – trochu menší základ */
  .zapas {
    grid-template-columns: 38px 1fr auto 1fr;
    font-size: 0.8rem;
    gap: 0.25rem;
  }

  /* označení zápasu K1.1 */
  .zapas-id {
    font-size: 0.7rem;
    padding-right: 2px;
  }

  /* jména hráčů + placeholdery */
  .hrac {
    font-size: 0.78rem;
  }

  /* text typu "Vítěz K1.1" */
  .hrac span {
    font-size: 0.75rem;
  }

  /* selecty hráčů */
  .hrac select {
    font-size: 0.75rem;
    height: 22px;
  }

  /* skóre */
  .skore {
    font-size: 0.75rem;
    min-width: 42px;
  }

  .score-input {
    width: 26px;
    height: 22px;
    font-size: 0.75rem;
    padding: 1px;
  }

  /* vítěz – ať není tak "tlustý" */
  .jmeno.winner {
    font-weight: 600;
  }
}
/* admin – uložený zápas */
.zapas-ulozen {
  background: #f0fdf4; /* velmi světle zelená */
  border-left: 3px solid #22c55e;
}

html[data-theme="dark"] .zapas-ulozen {
  background: #112b23;
  border-left-color: #22c55e;
  color: #dce7e3;
}

html[data-theme="dark"] .zapas-ulozen .zapas-id {
  color: #a9bbb4;
}

.ulozeno-ikona {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}
.bye-label {
  color: #0a7b12;
  font-weight: 600;
  font-size: 0.8rem;
  margin-left: 6px;
}
.zapas-id {
  display: flex;
  align-items: center;
  gap: 6px;

  position: relative;
  z-index: 5;          /* důležité – nad ostatními */
}

/* samotné tlačítko */
.btn-cancel-bye {
  cursor: pointer;
  pointer-events: auto;

  background: none;
  border: none;
  color: #c00;
  font-size: 0.75rem;
  padding: 2px 4px;
}

/* zabrání označování textu při klikání */
.bye-label,
.btn-cancel-bye {
  user-select: none;
}
/* =========================================================
   MOBILE – skrýt BYE UI
   ========================================================= */
@media (max-width: 600px) {

  /* zelený text "Volný los" */
  .bye-label {
    display: none !important;
  }

  /* tlačítko Zrušit volný los */
  .btn-cancel-bye {
    display: none !important;
  }

}

/* Dark theme: readable round headers. */
html[data-theme="dark"] .kolo { border-color: #304047; }
html[data-theme="dark"] .kolo-toggle { background: #1b292f; color: #e7eff1; }
html[data-theme="dark"] .kolo-toggle:hover,
html[data-theme="dark"] .kolo-toggle:focus-visible { background: #21434a; color: #ffffff; }
