@font-face {
  font-family: "DejaVu Sans";
  src: url("../fonts/DejaVuSans.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

/* Ranglistenimport */
.admin-dashboard-link { color: inherit; text-decoration: none; }
.admin-dashboard-link:hover { border-color: var(--main-color); transform: translateY(-2px); }
.import-panel { max-width: 92rem; }
.import-form { max-width: 44rem; }
.import-file { height: auto; padding: 0.75rem; }
.import-message { margin: 1rem 0; padding: 0.9rem 1rem; border: 1px solid currentColor; border-radius: 0.65rem; background: rgba(0, 0, 0, 0.22); }
.import-error, .import-warning { color: #ffca6a; }
.import-success { color: var(--main-color); }
.import-table small, .import-review-table small { display: block; margin-top: 0.3rem; opacity: 0.72; }
.import-status { display: inline-block; padding: 0.3rem 0.55rem; border-radius: 999px; white-space: nowrap; background: rgba(255, 202, 106, 0.14); color: #ffca6a; }
.import-status-approved { background: rgba(0, 255, 81, 0.12); color: var(--main-color); }
.import-status-deleted { background: rgba(255, 61, 61, 0.18); color: #ff6868; }
.import-deleted-row { background: rgba(255, 35, 35, 0.13); color: #ff8a8a; }
.import-deleted-message { border-color: #ff4e4e; background: rgba(255, 35, 35, 0.13); color: #ff8a8a; }
.import-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.import-summary > div { padding: 0.85rem; border: 1px solid rgba(0, 255, 81, 0.28); border-radius: 0.65rem; background: var(--second-bg-color); }
.import-summary strong, .import-summary span { display: block; }
.import-summary span { margin-top: 0.35rem; }
.import-review-table { min-width: 68rem; }
.import-review-table .import-select { min-width: 23rem; font-size: 0.9rem; }
.import-points { width: 6rem; min-width: 6rem; }
.import-unmatched { background: rgba(255, 202, 106, 0.06); }
.import-actions { display: flex; justify-content: flex-end; gap: 0.8rem; margin-top: 1rem; }
.import-actions .planner-submit { width: auto; }
.import-secondary { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.planner-submit:disabled { cursor: not-allowed; opacity: 0.45; }
.import-history { margin-top: 1.5rem; }
.import-licensed-summary { margin-top: 1.25rem; }
.import-licensed-summary .result-title { margin-bottom: 0.75rem; }
.import-licensed-table { min-width: 38rem; }
.import-licensed-table .ranking-points { color: var(--main-color); font-size: 1.1rem; font-weight: 700; }
.import-publish-box { margin-top: 1rem; padding: 1rem; border: 2px solid var(--main-color); border-radius: 0.8rem; background: rgba(0, 255, 81, 0.07); }
.import-publish-box p { margin-bottom: 0.85rem; line-height: 1.5; }
.import-publish-button { width: auto; min-width: 13rem; font-size: 1.15rem; }
.import-full-ranking { margin-top: 1rem; }
.import-full-ranking > .import-full-toggle { display: flex; width: 100%; min-height: 3.6rem; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.1rem; border: 2px solid var(--main-color); border-radius: 0.7rem; background: var(--second-bg-color); box-shadow: 0 0 0.65rem rgba(0, 255, 81, 0.2); color: var(--main-color); font-size: 1.08rem; font-weight: 700; cursor: pointer; list-style: none; }
.import-full-ranking > .import-full-toggle::-webkit-details-marker { display: none; }
.import-full-ranking > .import-full-toggle:hover { background: rgba(0, 255, 81, 0.12); }
.import-full-ranking[open] > .import-full-toggle { margin-bottom: 1rem; }
.import-full-ranking[open] > .import-full-toggle span:last-child { transform: rotate(180deg); }
.import-delete-box { margin-top: 2rem; padding: 1rem; border: 1px solid rgba(255, 78, 78, 0.7); border-radius: 0.7rem; background: rgba(255, 35, 35, 0.06); }
.import-delete-box p { margin: 0.5rem 0 1rem; }
.import-delete-box .planner-submit { width: auto; margin-top: 0.8rem; }
.import-reason { width: 100%; min-height: 6rem; resize: vertical; }
.import-danger { border-color: #ff4e4e; color: #ff8a8a; }
.import-danger:hover { background: #ff4e4e; color: #fff; }

@media (max-width: 700px) {
  .import-summary { grid-template-columns: 1fr 1fr; }
  .import-actions { flex-direction: column; }
  .import-actions .planner-submit { width: 100%; }
}

@font-face {
  font-family: "DejaVu Sans";
  src: url("../fonts/DejaVuSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg-color: black;
  --second-bg-color: #1a1a1a;
  --text-color: #cccccc;
  --main-color: #00ff51;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "DejaVu Sans", Arial, Helvetica, sans-serif;
}

.app-window-controls {
  position: fixed;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 10000;
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid rgba(0, 255, 81, 0.55);
  border-radius: 0.65rem;
  background-color: rgba(0, 0, 0, 0.88);
  box-shadow: 0 0 0.65rem rgba(0, 255, 81, 0.2);
}

.app-window-control {
  display: inline-flex;
  width: 2.15rem;
  height: 2.15rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text-color);
  border-radius: 0.45rem;
  background-color: var(--second-bg-color);
  color: var(--main-color);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.app-window-control:hover:not(:disabled),
.app-window-control:focus-visible:not(:disabled) {
  border-color: var(--main-color);
  background-color: var(--main-color);
  color: var(--bg-color);
}

.app-window-control:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.app-tournament-count {
  display: inline-flex;
  min-height: 2.15rem;
  align-items: center;
  padding: 0 0.65rem;
  border: 1px solid rgba(0, 255, 81, 0.55);
  border-radius: 0.45rem;
  background-color: transparent;
  color: var(--main-color);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.app-tournament-count:hover,
.app-tournament-count:focus-visible {
  background-color: var(--main-color);
  color: var(--bg-color);
}

.tournament-delete-dialog {
  width: min(calc(100% - 2rem), 34rem);
  padding: 1.5rem;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  box-shadow: 0 0 1.5rem rgba(0, 255, 81, 0.25);
}

.tournament-delete-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.78);
}

.tournament-delete-dialog label {
  display: block;
  margin: 1rem 0 0.5rem;
  color: var(--main-color);
  font-weight: 700;
}

.tournament-delete-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.tournament-delete-confirm {
  background-color: #ff3b3b;
  border-color: #ff3b3b;
}

.tournament-delete-confirm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.site-header {
  max-width: 90rem;
  margin: 0 auto 1rem;
  padding: 1.25rem 1rem 0;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.logo-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo-row a {
  display: inline-flex;
  text-decoration: none;
}

.logo-img {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 10px black;
  margin-right: 1rem;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.2);
}

.logo-text {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--main-color);
  transition: transform 0.3s ease;
}

.logo-text:hover {
  transform: scale(1.2);
}

.logo-text-light {
  color: var(--text-color);
}

.site-main {
  min-height: calc(100vh - 7rem);
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.page-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: min(100%, 22rem);
}

.page-link {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.85rem 1.2rem;
  border: 2px solid var(--main-color);
  border-radius: 0.9rem;
  background-color: var(--second-bg-color);
  color: var(--main-color);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.page-link:hover,
.page-link:focus-visible {
  transform: scale(1.03);
  background-color: var(--main-color);
  color: var(--bg-color);
}

.page-link-active {
  background-color: var(--main-color);
  color: var(--bg-color);
}

.page-link-preview {
  border-color: var(--text-color);
  color: var(--text-color);
}

.back-link::before {
  margin-right: 0.55rem;
  content: "←";
}

.standalone-back-navigation {
  width: min(100%, 38rem);
  margin: 0 auto 1rem;
}

.tournament-selection {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 100%;
}

.section-title {
  margin-bottom: 1.25rem;
  color: var(--main-color);
  font-size: clamp(1.5rem, 3.5vw, 2.3rem);
  font-weight: 700;
}

.section-copy {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.55;
}

.tournament-branch {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tournament-toggle,
.tournament-option {
  display: flex;
  align-items: center;
  width: 100%;
  border: 2px solid var(--main-color);
  border-radius: 0.9rem;
  background-color: var(--second-bg-color);
  color: var(--main-color);
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.tournament-toggle {
  min-height: 3.8rem;
  padding: 0.95rem 1.2rem;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.tournament-toggle:hover,
.tournament-toggle:focus-visible,
.tournament-option:hover,
.tournament-option:focus-visible {
  transform: scale(1.03);
  background-color: var(--main-color);
  color: var(--bg-color);
}

.tournament-options {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tournament-option {
  min-height: 3.4rem;
  padding: 0.85rem 1.1rem;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.home-card {
  display: flex;
  min-height: 8rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.home-card:hover,
.home-card:focus-visible {
  transform: scale(1.02);
  background-color: #111;
}

.home-card-title {
  color: var(--main-color);
  font-size: 1.2rem;
  font-weight: 700;
}

.home-card-copy {
  margin-top: 0.8rem;
  color: var(--text-color);
  font-size: 0.96rem;
  line-height: 1.45;
}

.home-main {
  min-height: calc(100vh - 10rem);
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.home-landing {
  display: flex;
  min-height: min(42rem, calc(100vh - 12rem));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-title {
  --home-title-max-size: 76;
  --home-title-min-size: 30;
  width: min(100%, 38rem);
  margin-bottom: 2rem;
  color: var(--main-color);
  font-size: calc(var(--home-title-max-size) * 1px);
  font-weight: 700;
  line-height: 1;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
  text-align: left;
  text-shadow: 0 0 8px rgba(0, 255, 81, 0.28);
  animation: titlePulse 4.5s ease-in-out infinite;
}

.home-title-light {
  color: var(--text-color);
}

.home-actions {
  display: flex;
  width: min(100%, 38rem);
  flex-direction: column;
  gap: 1rem;
}

.home-action {
  display: flex;
  min-height: 5.25rem;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.25rem;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  text-align: left;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.home-action:hover,
.home-action:focus-visible {
  transform: scale(1.03);
  background-color: var(--main-color);
  color: var(--bg-color);
}

.home-action-primary {
  background-color: var(--main-color);
  color: var(--bg-color);
}

.home-action-preview {
  border-color: var(--text-color);
}

.home-action-title {
  font-size: 1.45rem;
  font-weight: 700;
}

.home-action-copy {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

@keyframes titlePulse {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(0, 255, 81, 0.24);
  }

  50% {
    text-shadow: 0 0 12px rgba(0, 255, 81, 0.36);
  }
}

.planner-form {
  margin-bottom: 1.5rem;
}

.player-entry {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 2px solid rgba(0, 255, 81, 0.45);
  border-radius: 1rem;
  background: var(--second-bg-color);
}

.player-entry .planner-label,
.player-entry .section-copy { margin: 0; }

.player-search-results {
  display: grid;
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid rgba(0, 255, 81, 0.35);
  border-radius: 0.8rem;
}

.player-search-result,
.selected-player {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-bottom: 1px solid rgba(0, 255, 81, 0.22);
  background: transparent;
  color: var(--text-color);
  font: inherit;
  text-align: left;
}

button.player-search-result { width: 100%; cursor: pointer; }

button.player-search-result:hover,
button.player-search-result:focus-visible { background: rgba(0, 255, 81, 0.1); }

.player-search-result:last-child { border-bottom: 0; }
.player-result-name { font-weight: 700; }
.player-result-details { color: var(--main-color); font-size: 0.9rem; }
.guest-player-button { width: 100%; }
.player-selected-title { margin-top: 0.5rem; }
.selected-player-list { display: grid; gap: 0.5rem; }

.selected-player {
  border: 1px solid rgba(0, 255, 81, 0.3);
  border-radius: 0.75rem;
}

.selected-player-remove {
  min-width: 2.5rem;
  min-height: 2.5rem;
  border: 1px solid var(--main-color);
  border-radius: 0.65rem;
  background: transparent;
  color: var(--main-color);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.game-mode-selection {
  width: min(100%, 30rem);
  margin-bottom: 1.5rem;
}

.game-mode-select {
  width: 100%;
  cursor: pointer;
}

.planner-label {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--main-color);
  font-size: 1.05rem;
  font-weight: 700;
}

.planner-input-row {
  display: flex;
  gap: 0.9rem;
  align-items: stretch;
}

.planner-input {
  flex: 1;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--main-color);
  border-radius: 0.9rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  font: inherit;
}

.planner-submit {
  min-width: 10rem;
  min-height: 3.5rem;
  padding: 0.85rem 1.2rem;
  border: 2px solid var(--main-color);
  border-radius: 0.9rem;
  background-color: var(--main-color);
  color: var(--bg-color);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.planner-submit:hover,
.planner-submit:focus-visible {
  transform: scale(1.03);
}

.ko-planner-input-row {
  align-items: flex-start;
}

.ko-player-column {
  display: flex;
  width: 100%;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.ko-player-column .planner-input,
.ko-player-column .ko-tournament-overview {
  width: 100%;
  flex: none;
}

.planner-button-column {
  display: flex;
  width: 10rem;
  flex: 0 0 10rem;
  flex-direction: column;
  gap: 0.7rem;
}

.planner-button-column .planner-submit {
  width: 100%;
  min-width: 0;
}

.planner-submit[hidden] {
  display: none;
}

.login-form {
  width: min(100%, 30rem);
}

.login-form .planner-input {
  width: 100%;
  margin-bottom: 1rem;
}

.login-submit {
  width: 100%;
  margin-top: 0.25rem;
}

.login-error {
  margin-bottom: 1rem;
  color: #ff6b6b;
  font-size: 0.98rem;
  font-weight: 700;
}

.role-selection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 38rem;
}

.role-card {
  display: flex;
  min-height: 10rem;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.role-card:hover,
.role-card:focus-visible {
  transform: scale(1.02);
  background-color: var(--main-color);
  color: var(--bg-color);
}

.role-card-title {
  color: var(--main-color);
  font-size: 1.7rem;
  font-weight: 700;
}

.role-card:hover .role-card-title,
.role-card:focus-visible .role-card-title {
  color: var(--bg-color);
}

.role-card-copy {
  margin-top: 0.8rem;
  font-size: 1rem;
  line-height: 1.45;
}

.registration-main {
  display: block;
}

.registration-links {
  display: flex;
  width: min(100%, 38rem);
  margin: 0 auto 1rem;
  gap: 0.75rem;
}

.registration-link {
  display: inline-flex;
  min-height: 2.6rem;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--main-color);
  border-radius: 0.75rem;
  background-color: var(--second-bg-color);
  color: var(--main-color);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.registration-link:hover,
.registration-link:focus-visible {
  transform: scale(1.03);
  background-color: var(--main-color);
  color: var(--bg-color);
}

.registration-selection {
  width: min(100%, 38rem);
  margin: 0 auto;
}

.leader-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.leader-card {
  display: flex;
  min-height: 10rem;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.leader-card:hover,
.leader-card:focus-visible {
  transform: scale(1.02);
  background-color: var(--main-color);
  color: var(--bg-color);
}

.leader-card-title {
  color: var(--main-color);
  font-size: 1.35rem;
  font-weight: 700;
}

.leader-card:hover .leader-card-title,
.leader-card:focus-visible .leader-card-title {
  color: var(--bg-color);
}

.leader-card-copy {
  margin-top: 0.8rem;
  font-size: 0.98rem;
  line-height: 1.45;
}

.leader-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
}

.leader-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
}

.leader-table th,
.leader-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(0, 255, 81, 0.28);
  text-align: left;
}

.leader-table th {
  color: var(--main-color);
  font-size: 0.95rem;
}

.leader-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Die Rangliste vergangener Turniere nutzt die gesamte verfuegbare Breite. */
.site-main.ranking-page-main {
  display: block;
  max-width: none;
  padding-inline: clamp(1rem, 3vw, 3rem);
}

.page-links.ranking-page-links {
  position: static;
  flex-flow: row wrap;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.ranking-page-links .page-link {
  width: auto;
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  font-size: 1rem;
}

.ranking-page-main .tournament-selection {
  margin-top: 0;
}

.ranking-player {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.ranking-avatar {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--main-color);
  border-radius: 50%;
  background: rgba(0, 255, 81, 0.1);
  color: var(--main-color);
  font-size: 1.2rem;
  font-weight: 700;
}

.ranking-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-player-name,
.ranking-position,
.ranking-points {
  font-weight: 700;
}

.ranking-position {
  width: 7rem;
  color: var(--main-color);
  font-size: 1.2rem;
}

.ranking-points {
  width: 9rem;
  font-size: 1.1rem;
}

.ranking-avatar:is(img) { object-fit: cover; }
.site-main.player-match-main { display: block; max-width: 72rem; }
.page-links.player-match-links { position: static; flex-flow: row wrap; width: 100%; margin-bottom: 1.5rem; }
.player-match-links .page-link { width: auto; }
.player-next-match-card { max-width: 46rem; border-color: var(--main-color); box-shadow: 0 0 1.2rem rgba(0, 255, 81, 0.2); }
.player-device { margin: 1.25rem 0 0.5rem; color: var(--main-color); font-size: clamp(2rem, 8vw, 4.5rem); font-weight: 700; }
.player-test-note { margin-bottom: 1.25rem; padding: 0.75rem 1rem; border: 1px solid #ffd166; border-radius: 0.65rem; color: #ffd166; }

.admin-panel {
  margin-top: 1.5rem;
}

.admin-toolbar {
  max-width: 34rem;
  margin-bottom: 1rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
}

.admin-player-table {
  width: 100%;
  min-width: 58rem;
  border-collapse: collapse;
}

.admin-player-table th,
.admin-player-table td {
  padding: 0.85rem;
  border-bottom: 1px solid rgba(0, 255, 81, 0.28);
  text-align: left;
  vertical-align: middle;
}

.admin-player-table th {
  color: var(--main-color);
  font-size: 0.92rem;
}

.admin-player-table td {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.35;
}

.admin-player-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-phone-input {
  width: 12rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--main-color);
  border-radius: 0.75rem;
  background-color: black;
  color: var(--text-color);
  font: inherit;
}

.admin-small-link,
.admin-action-link,
.admin-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 0.15rem 0.25rem 0.15rem 0;
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--main-color);
  border-radius: 0.75rem;
  background-color: black;
  color: var(--main-color);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.admin-action-link {
  background-color: var(--main-color);
  color: var(--bg-color);
}

.planner-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.result-card {
  min-height: 10rem;
  padding: 1.15rem;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
}

.result-title {
  margin-bottom: 0.8rem;
  color: var(--main-color);
  font-size: 1.1rem;
  font-weight: 700;
}

.result-value {
  margin-bottom: 0.7rem;
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.result-copy {
  color: var(--text-color);
  font-size: 0.98rem;
  line-height: 1.55;
}

.player-toolbar {
  margin-bottom: 1rem;
  max-width: 34rem;
}

.players-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
}

.players-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
}

.players-table th,
.players-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(0, 255, 81, 0.28);
  text-align: left;
  vertical-align: top;
}

.players-table th {
  color: var(--main-color);
  font-size: 0.95rem;
  font-weight: 700;
}

.players-table td {
  color: var(--text-color);
  font-size: 0.98rem;
  line-height: 1.4;
}

.players-table tbody tr:last-child td {
  border-bottom: 0;
}

.ko-summary {
  margin-bottom: 1.5rem;
}

.info-toggle {
  background-color: var(--second-bg-color);
  color: var(--main-color);
}

.test-fill-button {
  background-color: var(--second-bg-color);
  color: var(--main-color);
}

.ko-test-status:empty {
  display: none;
}

.ko-tournament-overview {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.ko-tournament-overview:empty,
.ko-tournament-overview[hidden] {
  display: none;
}

.ko-saved-tournament {
  width: 100%;
}

.ko-restore-tournament {
  width: min(100%, 34rem);
  margin: 0 auto 1rem;
}

.ko-interactive-match {
  cursor: default;
}

.ko-winner-choice {
  width: 100%;
  min-height: 2.65rem;
  margin-top: 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(0, 255, 81, 0.5);
  border-radius: 0.55rem;
  background-color: black;
  color: var(--text-color);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ko-winner-choice:hover:not(:disabled),
.ko-winner-choice:focus-visible:not(:disabled) {
  border-color: var(--main-color);
  background-color: rgba(0, 255, 81, 0.14);
}

.ko-winner-choice:disabled {
  color: #777;
  cursor: not-allowed;
}

.ko-winner-choice.ko-winner-selected {
  border-color: var(--main-color);
  background-color: var(--main-color);
  color: var(--bg-color);
  font-weight: 700;
}

.ko-pending-source-link {
  border-style: dashed;
  color: var(--main-color);
  cursor: pointer;
}

.ko-source-match-highlight {
  z-index: 10;
  border-color: white !important;
  box-shadow: 0 0 0 0.18rem var(--main-color), 0 0 1.2rem rgba(0, 255, 81, 0.9);
  animation: sourceMatchPulse 0.7s ease-in-out 3;
}

.ko-match-result {
  margin-top: 0.2rem;
  color: var(--main-color);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.schedule-match-result {
  margin-top: 0.55rem;
  font-size: 0.9rem;
}

.ko-result-popover {
  position: fixed;
  z-index: 20000;
  display: flex;
  width: min(22rem, calc(100vw - 1rem));
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 2px solid var(--main-color);
  border-radius: 0.8rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  box-shadow: 0 0 1rem rgba(0, 255, 81, 0.4);
}

.ko-result-popover strong,
.ko-result-popover > span {
  color: var(--main-color);
}

.ko-result-pairing {
  font-size: 0.95rem;
}

.ko-result-winner {
  font-size: 1.4rem;
  font-weight: 700;
}

.ko-result-input-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ko-result-input {
  width: 3.4rem;
  min-height: 2.5rem;
  padding: 0.45rem;
  border: 2px solid var(--main-color);
  border-radius: 0.5rem;
  background-color: black;
  color: white;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.ko-result-input[readonly] {
  color: var(--main-color);
}

.ko-result-separator {
  color: var(--main-color);
  font-size: 1.6rem;
  font-weight: 700;
}

@media (min-width: 701px) {
  .ko-result-save,
  .ko-result-cancel {
    display: none;
  }
}

.ko-result-save,
.ko-result-cancel {
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--main-color);
  border-radius: 0.5rem;
  background-color: black;
  color: var(--main-color);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

@keyframes sourceMatchPulse {
  50% {
    transform: scale(1.04);
  }
}

.ko-info-panel[hidden] {
  display: none;
}

.ko-page-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.subpage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.subpage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
}

.close-button {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--text-color);
  border-radius: 0.7rem;
  background-color: var(--second-bg-color);
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.close-button:hover,
.close-button:focus-visible {
  background-color: var(--text-color);
  color: var(--bg-color);
}

.schedule-round {
  margin-bottom: 1.5rem;
}

.schedule-board {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(24rem, 1.2fr);
  gap: 1.25rem;
  align-items: start;
}

.schedule-column {
  min-width: 0;
}

.schedule-completed-column {
  padding-right: 1rem;
  border-right: 1px solid rgba(0, 255, 81, 0.35);
}

.schedule-match-completed {
  opacity: 0.82;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  list-style: none;
}

.schedule-match {
  display: flex;
  min-height: 5rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--main-color);
  border-radius: 0.8rem;
  background-color: var(--second-bg-color);
}

.schedule-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.schedule-player {
  min-width: 0;
}

.schedule-player .ko-winner-choice {
  margin-top: 0;
}

.player-wait-time {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-color);
  font-size: 0.82rem;
  text-align: center;
}

.schedule-match strong {
  color: var(--main-color);
}

.ko-bracket-section {
  margin-top: 1.5rem;
}

.ko-bracket-wrap {
  width: 100%;
  overflow-x: auto;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
}

.ko-bracket {
  display: flex;
  align-items: stretch;
  gap: 1.25rem;
  min-width: max-content;
  padding: 1rem;
}

.bracket-round-navigation {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.bracket-round-link {
  flex: 0 0 auto;
  min-height: 2.4rem;
  padding: 0.45rem 0.75rem;
  border: 2px solid var(--main-color);
  border-radius: 0.65rem;
  background-color: var(--second-bg-color);
  color: var(--main-color);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.bracket-round-link:hover,
.bracket-round-link:focus-visible {
  background-color: var(--main-color);
  color: var(--bg-color);
}

.tournament-tree-page .ko-bracket {
  --tree-match-height: 4.7rem;
  --tree-first-gap: 0.45rem;
  align-items: flex-start;
  gap: 2.5rem;
  padding: 0.8rem 1rem 1.5rem;
}

.tournament-tree-page .ko-round {
  width: 15rem;
  flex-basis: 15rem;
}

.tournament-tree-page .ko-round-title {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: auto;
  margin-bottom: 0.4rem;
  padding: 0.4rem 0.25rem;
  background-color: var(--second-bg-color);
  font-size: 0.86rem;
}

.tournament-tree-page .ko-round-matches {
  --tree-round-gap: calc((var(--tree-match-height) + var(--tree-first-gap)) * (var(--tree-round-factor) - 1) + var(--tree-first-gap));
  justify-content: flex-start;
  gap: var(--tree-round-gap) !important;
  padding-top: calc((var(--tree-match-height) + var(--tree-first-gap)) * (var(--tree-round-factor) - 1) / 2);
}

.tournament-tree-page .ko-tree-match {
  display: flex;
  height: var(--tree-match-height);
  min-height: var(--tree-match-height);
  flex-direction: column;
  padding: 0.25rem 0.4rem;
  border-width: 1px;
  border-radius: 0.5rem;
  overflow: visible;
}

.tournament-tree-page .ko-tree-match::after {
  right: -1.25rem;
  width: 1.25rem;
  background: none;
}

.tournament-tree-page .ko-tree-match:nth-child(odd)::after {
  top: 50%;
  height: calc((var(--tree-match-height) + var(--tree-round-gap)) / 2);
  border-top: 2px solid rgba(0, 255, 81, 0.72);
  border-right: 2px solid rgba(0, 255, 81, 0.72);
}

.tournament-tree-page .ko-tree-match:nth-child(even)::after {
  top: auto;
  bottom: 50%;
  height: calc((var(--tree-match-height) + var(--tree-round-gap)) / 2);
  border-right: 2px solid rgba(0, 255, 81, 0.72);
  border-bottom: 2px solid rgba(0, 255, 81, 0.72);
}

.tournament-tree-page .ko-round:not(:first-child) .ko-tree-match::before {
  position: absolute;
  top: 50%;
  left: -1.25rem;
  width: 1.25rem;
  height: 2px;
  background-color: rgba(0, 255, 81, 0.72);
  content: "";
}

.tournament-tree-page .ko-tree-match-title {
  min-height: 0.9rem;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  line-height: 0.9rem;
}

.tournament-tree-page .ko-winner-choice {
  height: 1.45rem;
  min-height: 1.45rem;
  margin-top: 0.1rem;
  padding: 0.12rem 0.4rem;
  font-size: 0.78rem;
  line-height: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-tree-page .ko-round {
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.tournament-tree-page .ko-round-completed {
  opacity: 1;
  filter: none;
}

.tournament-tree-page .ko-round-completed .ko-round-title::after {
  content: "  ✓ beendet";
  color: var(--text-color);
  font-size: 0.72em;
  font-weight: 600;
}

.double-ko-round-detail .ko-tree-match-completed {
  order: 1;
}

.tournament-tree-page .ko-match-correction-active {
  position: relative;
  z-index: 20;
  border-color: #fff36a;
  box-shadow: 0 0 0 3px rgba(255, 243, 106, 0.55), 0 0 1.35rem rgba(255, 243, 106, 0.85);
  transform: scale(1.035);
}

.ko-replay-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.78);
}

.ko-replay-panel {
  width: min(42rem, 100%);
  max-height: min(44rem, calc(100vh - 2rem));
  overflow-y: auto;
  padding: 1.25rem;
  border: 2px solid var(--main-color);
  border-radius: 1rem;
  background: var(--second-bg-color);
  box-shadow: 0 0 1.5rem rgba(0, 255, 81, 0.3);
}

.ko-replay-panel h2 {
  margin: 0 0 0.55rem;
  color: var(--main-color);
}

.ko-replay-panel p {
  margin-bottom: 1rem;
}

.ko-replay-list {
  display: grid;
  gap: 0.65rem;
}

.ko-replay-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(0, 255, 81, 0.65);
  border-radius: 0.65rem;
  background: var(--bg-color);
}

.ko-replay-card strong,
.ko-replay-winner {
  color: var(--main-color);
}

.ko-replay-close {
  width: 100%;
  min-height: 3rem;
  margin-top: 1rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--main-color);
  color: #000;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ko-correction-winner-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.ko-correction-winner-button,
.ko-replay-cancel {
  min-height: 3rem;
  padding: 0.65rem;
  border: 2px solid var(--main-color);
  border-radius: 0.7rem;
  background: var(--bg-color);
  color: var(--main-color);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ko-correction-winner-button:hover,
.ko-correction-winner-button:focus-visible {
  background: var(--main-color);
  color: #000;
}

.ko-correction-current-winner::after {
  content: " (bisher)";
  font-size: 0.78em;
}

.ko-replay-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.ko-replay-actions .ko-replay-close {
  margin-top: 0;
}

.ko-replay-panel > .ko-replay-cancel {
  width: 100%;
  margin-top: 1rem;
}

.tournament-tree-page .ko-round-selected {
  position: relative;
  z-index: 5;
  filter: drop-shadow(0 0 0.45rem rgba(0, 255, 81, 0.38));
}

.tournament-tree-page .ko-round-selected .ko-round-title {
  color: white;
}

.tournament-tree-page .ko-bracket-round-focus .ko-round:not(.ko-round-selected) {
  opacity: 0.2;
  filter: grayscale(0.75);
}

.tournament-tree-page .ko-bracket-round-focus .ko-round-selected .ko-round-matches {
  --tree-round-gap: var(--tree-first-gap);
  gap: var(--tree-first-gap) !important;
  padding-top: 0;
}

.tournament-tree-page .site-header {
  max-width: none;
}

.tournament-tree-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.site-main.tree-main {
  display: flex;
  width: 100%;
  height: 100vh;
  max-width: none;
  flex-direction: column;
  padding: 0.5rem;
}

.tree-toolbar {
  position: static;
  display: flex;
  width: auto;
  max-width: none;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
}

.tree-toolbar .page-link,
.tree-toolbar .close-button {
  width: auto;
  min-height: 2.6rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
}

.tree-toolbar-logo {
  display: inline-flex;
  border-radius: 50%;
}

.tree-toolbar-logo img {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(0, 255, 81, 0.3);
}

.round-select-label {
  display: flex;
  min-width: clamp(12rem, 22vw, 22rem);
  min-height: 3.25rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--main-color);
  border-radius: 0.75rem;
  background-color: var(--second-bg-color);
  color: var(--main-color);
  font-size: 0.88rem;
  font-weight: 700;
}

.round-select {
  min-width: 0;
  flex: 1;
  border: 0;
  background-color: var(--second-bg-color);
  color: var(--main-color);
  font: inherit;
  cursor: pointer;
}

.round-select .round-option-completed {
  color: #7f8a82;
}

.tree-main .tournament-selection {
  display: flex;
  width: 100%;
  min-height: 0;
  max-width: none;
  flex: 1;
  flex-direction: column;
  margin-top: 0;
}

.tree-main .subpage-heading {
  align-items: center;
  margin-bottom: 0.75rem;
}

.tree-main .subpage-heading .section-title {
  flex: 0 0 auto;
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .tree-main .subpage-heading {
    flex-wrap: wrap;
  }

  .tree-toolbar {
    flex-wrap: wrap;
  }
}

.tree-main .ko-bracket-wrap {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  flex: 1;
  overflow: auto;
}

.ko-round {
  display: flex;
  flex: 0 0 16rem;
  flex-direction: column;
  width: 16rem;
}

.ko-round-title {
  min-height: 2.8rem;
  margin-bottom: 0.8rem;
  color: var(--main-color);
  font-size: 1rem;
  font-weight: 700;
}

.ko-round-matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: var(--round-gap, 1rem);
}

.ko-tree-match {
  position: relative;
  min-height: 8.25rem;
  padding: 0.85rem;
  border: 2px solid rgba(0, 255, 81, 0.72);
  border-radius: 0.75rem;
  background-color: black;
}

.ko-tree-match::after {
  position: absolute;
  top: 50%;
  right: -1.25rem;
  width: 1.25rem;
  height: 2px;
  background-color: rgba(0, 255, 81, 0.72);
  content: "";
}

.ko-round:last-child .ko-tree-match::after {
  display: none;
}

.double-ko-bracket-wrap {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) 2px minmax(max-content, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: min(76vh, 52rem);
  padding: 1rem;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--main-color) var(--bg-color);
  border: 1px solid var(--main-color);
  border-radius: 1rem;
  background-color: var(--second-bg-color);
}

.double-ko-side {
  display: flex;
  height: 100%;
  min-width: max-content;
  flex-direction: column;
}

.double-ko-side[hidden],
.double-ko-rounds .ko-round[hidden] {
  display: none !important;
}

.double-ko-side-title {
  margin: 0 0 1rem;
  color: var(--main-color);
  text-align: center;
}

.double-ko-divider {
  width: 2px;
  min-height: 100%;
  background: linear-gradient(transparent, var(--main-color), transparent);
}

.double-ko-bracket-wrap.double-ko-single-side {
  grid-template-columns: max-content;
  justify-content: start;
}

.double-ko-bracket-wrap.double-ko-single-side .double-ko-divider {
  display: none;
}

.double-ko-rounds {
  display: flex;
  min-height: 0;
  flex: 1;
  gap: 1.25rem;
  align-items: stretch;
}

.double-ko-loser-rounds {
  flex-direction: row-reverse;
}

.double-ko-rounds .ko-round {
  align-self: stretch;
  width: 16rem;
  min-width: 16rem;
  height: 100%;
}

.double-ko-rounds .ko-round-matches {
  display: flex;
  height: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 0.75rem;
}

.double-ko-rounds .ko-tree-match {
  min-height: 5.4rem;
}

.double-ko-rounds .ko-tree-match-title {
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: normal;
}

.double-ko-loser-side .ko-round-title {
  color: var(--main-color);
}

@media (max-width: 900px) {
  .double-ko-bracket-wrap {
    display: flex;
    flex-direction: column-reverse;
    min-width: 0;
  }

  .double-ko-divider {
    width: 100%;
    height: 2px;
    min-height: 2px;
  }
}

.ko-tree-match-bye {
  border-color: rgba(204, 204, 204, 0.45);
}

.ko-tree-match-title {
  margin-bottom: 0.65rem;
  color: var(--main-color);
  font-size: 0.9rem;
  font-weight: 700;
}

.ko-tree-player {
  min-height: 2rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(0, 255, 81, 0.35);
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.2;
}

.ko-tree-note {
  margin-top: 0.65rem;
  color: var(--text-color);
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (min-width: 901px) {
  .site-main {
    display: grid;
    grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }

  .page-links {
    position: sticky;
    top: 1.5rem;
    width: 100%;
  }

  .page-link {
    width: 100%;
  }

  .tournament-selection {
    margin-top: 0;
    max-width: none;
  }

  .planner-results {
    grid-template-columns: repeat(2, minmax(18rem, 1fr));
  }

}

@media (max-width: 700px) {
  .logo-img {
    width: clamp(4.75rem, 18vw, 6.5rem);
    height: clamp(4.75rem, 18vw, 6.5rem);
    margin-right: 0.85rem;
  }

  .logo-text {
    font-size: clamp(1.4rem, 5.6vw, 2rem);
  }

  .page-link {
    width: 100%;
    font-size: 1.15rem;
  }

  .tournament-selection {
    width: 100%;
  }

  .tournament-toggle,
  .tournament-option {
    font-size: 1.08rem;
  }

  .planner-input-row {
    flex-direction: column;
  }

  .planner-submit {
    width: 100%;
    min-width: 0;
  }

  .planner-button-column {
    width: 100%;
    flex-basis: auto;
  }

  .planner-results {
    grid-template-columns: 1fr;
  }

  .schedule-list {
    flex-direction: column;
  }

  .schedule-board {
    grid-template-columns: 1fr;
  }

  .schedule-completed-column {
    padding-right: 0;
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 255, 81, 0.35);
  }

  .schedule-players {
    grid-template-columns: 1fr;
  }

  .role-selection {
    grid-template-columns: 1fr;
  }

  .leader-dashboard {
    grid-template-columns: 1fr;
  }

  .registration-main {
    padding-bottom: 1rem;
  }

  .registration-selection {
    margin-top: 0;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-landing {
    min-height: auto;
    padding-top: 1.4rem;
  }

  .home-title {
    --home-title-max-size: 58;
    --home-title-min-size: 24;
    margin-bottom: 1.4rem;
  }

  .ko-bracket {
    padding: 0.85rem;
  }

  .ko-round {
    width: 14rem;
    flex-basis: 14rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 1rem 0.85rem 0;
  }

  .logo-container {
    gap: 0.8rem;
  }

  .logo-img {
    width: 4.25rem;
    height: 4.25rem;
    margin-right: 0.7rem;
  }

  .logo-text {
    font-size: 1.18rem;
  }

  .site-main {
    padding: 0 0.85rem 1.5rem;
  }

  .page-links {
    width: 100%;
  }

  .page-link {
    width: 100%;
    min-height: 3.2rem;
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }

  .tournament-selection {
    margin-top: 2rem;
  }

  .section-title {
    margin-bottom: 1rem;
    font-size: 1.35rem;
  }

  .registration-links {
    margin-bottom: 0.75rem;
    gap: 0.55rem;
  }

  .registration-link {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
  }

  .registration-selection .section-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
  }

  .registration-selection .role-selection {
    gap: 0.75rem;
  }

  .registration-selection .role-card {
    min-height: 7.25rem;
    padding: 1rem;
  }

  .registration-selection .role-card-title {
    font-size: 1.45rem;
  }

  .registration-selection .role-card-copy {
    margin-top: 0.45rem;
    font-size: 0.95rem;
  }

  .section-copy {
    font-size: 0.95rem;
  }

  .tournament-toggle {
    min-height: 3.3rem;
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  .tournament-option {
    min-height: 3.1rem;
    padding: 0.75rem 1rem;
    font-size: 0.98rem;
  }

  .planner-input,
  .planner-submit {
    min-height: 3.2rem;
    font-size: 1rem;
  }

  .result-card {
    min-height: 0;
    padding: 1rem;
  }

  .result-title {
    font-size: 1rem;
  }

  .result-value {
    font-size: 1.1rem;
  }

  .result-copy {
    font-size: 0.94rem;
  }

  .home-action {
    min-height: 5.25rem;
    padding: 1rem;
  }

  .home-action-title {
    font-size: 1.3rem;
  }

  .home-action-copy {
    font-size: 1rem;
  }

  .admin-player-table {
    min-width: 48rem;
  }

  .admin-phone-input {
    width: 10rem;
  }
}
