.com-schachturniere,
.com-schachturniere-admin {
  --st-border: #d8d1c3;
  --st-soft: #f7f2e7;
  --st-head: #7a5b28;
  --st-planned: #fff7d7;
  --st-win: #dff3df;
  --st-draw: #edf0f5;
  --st-loss: #f8dfd9;
  --st-diag: #eee7d9;
  max-width: 100%;
}

.com-schachturniere h1,
.com-schachturniere-admin h1 {
  margin-bottom: .4rem;
}

.st-meta,
.com-schachturniere .small,
.com-schachturniere-admin .small {
  color: #665f54;
  font-size: .95rem;
}

.st-table-wrap {
  overflow-x: auto;
  margin: .75rem 0 1.4rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: #fffdf9;
}

.st-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.st-table th,
.st-table td {
  border: 1px solid var(--st-border);
  padding: .38rem .5rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.st-table thead th {
  background: var(--st-soft);
  color: var(--st-head);
  font-weight: 700;
}

.st-cross .st-name,
.st-table td:first-child,
.st-table th:first-child {
  text-align: left;
}

.st-cross td.st-diag {
  background: var(--st-diag);
  color: #8c8375;
}

.st-planned { background: var(--st-planned); }
.st-win { background: var(--st-win); font-weight: 700; }
.st-draw { background: var(--st-draw); }
.st-loss { background: var(--st-loss); }
.st-ok { color: #18733f; font-weight: 700; }
.st-warn { color: #9f3a1a; font-weight: 700; }

.st-admin-box {
  border: 1px solid var(--st-border);
  border-radius: 10px;
  padding: .8rem 1rem;
  background: #fffdf8;
  margin: 1rem 0;
}

.st-admin-form label {
  display: inline-block;
  margin-right: .8rem;
}

.st-inline-form {
  display: inline-flex;
  gap: .3rem;
  align-items: center;
}

.st-inline-form select {
  min-width: 6rem;
}

.st-filter-panel {
  border: 1px solid var(--st-border);
  border-radius: 10px;
  padding: .75rem .9rem;
  background: #fffaf0;
  margin: .75rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem .85rem;
  align-items: end;
}

.st-filter-panel .st-filter-title {
  width: 100%;
  font-weight: 700;
  color: var(--st-head);
}

.st-filter-panel label {
  display: inline-flex;
  flex-direction: column;
  gap: .22rem;
  font-size: .9rem;
  color: #4f4638;
}

.st-filter-panel select,
.st-filter-panel input[type="search"] {
  min-width: 11rem;
}

.st-filter-panel .st-filter-count {
  font-weight: 700;
  color: #665f54;
  margin-left: auto;
  padding-bottom: .35rem;
}

.st-filter-panel .small {
  width: 100%;
  margin: .15rem 0 0;
}

.st-actionbar {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .7rem;
  align-items: center;
  margin: .75rem 0 1rem;
  padding: .65rem .75rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: #fffaf0;
}

.st-actionbar .button {
  margin: 0;
}

.st-ranking-note {
  margin: .25rem 0 .55rem;
}

.st-ranking tbody tr:first-child td:first-child {
  font-weight: 700;
}


/* Namen lesbarer: in Namensspalten linksbündig mit etwas Luft zur Trennlinie. */
.st-cross .st-name,
.st-ranking tbody td:nth-child(3),
.st-colors tbody td:first-child,
.st-pairs tbody td:nth-child(2),
.st-pairs tbody td:nth-child(3) {
  text-align: left;
  padding-left: .75rem;
}

.st-ranking thead th:nth-child(3),
.st-colors thead th:first-child,
.st-pairs thead th:nth-child(2),
.st-pairs thead th:nth-child(3) {
  text-align: left;
  padding-left: .75rem;
}

.st-status-badge {
  display: inline-block;
  min-width: 4.8rem;
  padding: .12rem .45rem;
  border-radius: 999px;
  font-size: .85rem;
  line-height: 1.35;
  text-align: center;
  border: 1px solid var(--st-border);
  background: #fffaf0;
  color: #665f54;
}

.st-status-played {
  background: #e7f3ea;
  color: #18733f;
  border-color: #bfdcc7;
}

/* Version 0.1.7: Kampflos-Ergebnisse und TWZ-Spalten. */
.st-forfeit-win {
  background: #e9f1dc;
  font-weight: 700;
}

.st-forfeit-loss {
  background: #f3e2d5;
  font-weight: 700;
}

.st-status-forfeit {
  background: #f5ead9;
  color: #7a4e18;
  border-color: #e0c49b;
}

.st-twz,
.st-ranking tbody td:nth-child(4),
.st-colors tbody td:nth-child(2) {
  text-align: center;
  color: #665f54;
}

.st-twz-editor summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--st-head);
}

.st-twz-input {
  width: 7rem;
}

/* Version 0.2.0: Turnier-Zentrale und Turnier-Dashboard. */
.st-portal-head,
.st-tournament-hero,
.st-dashboard-section {
  border: 1px solid var(--st-border);
  border-radius: 14px;
  background: #fffdf9;
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
}

.st-portal-head {
  background: linear-gradient(180deg, #fffaf0, #fffdf9);
}

.st-portal-head h1,
.st-tournament-hero h1 {
  margin-top: 0;
}

/* Version 0.2.7: Turnier-Zentrale als sinnvolles Kartenraster. */
.st-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  align-items: stretch;
}

.st-tournament-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.st-tournament-card > p:last-of-type,
.st-tournament-card > .st-card-actions:last-child,
.st-tournament-card > p:last-child {
  margin-top: auto;
}

.st-tournament-card {
  border: 1px solid var(--st-border);
  border-radius: 14px;
  background: #fffdf9;
  padding: .9rem 1rem;
  box-shadow: 0 2px 8px rgba(40, 30, 10, .06);
}

.st-tournament-card h3 {
  margin: .5rem 0 .3rem;
}

.st-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}

.st-tournament-badge {
  display: inline-block;
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--st-border);
  font-size: .86rem;
  font-weight: 700;
  background: #fffaf0;
  color: #665f54;
}

.st-status-tournament-active {
  background: #e7f3ea;
  color: #18733f;
  border-color: #bfdcc7;
}

.st-status-tournament-planned {
  background: #fff7d7;
  color: #7a5b28;
  border-color: #ead48f;
}

.st-status-tournament-completed {
  background: #edf0f5;
  color: #3f4b5a;
  border-color: #ccd3dd;
}

.st-status-tournament-archived {
  background: #f2ece1;
  color: #665f54;
  border-color: #d8d1c3;
}

.st-season {
  color: #665f54;
  font-size: .9rem;
}

.st-mini-stats,
.st-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin: .75rem 0;
}

.st-mini-stats div,
.st-summary-cards div {
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: #fffaf0;
  padding: .5rem;
  text-align: center;
}

.st-mini-stats dt,
.st-summary-cards dt {
  font-size: .78rem;
  color: #665f54;
  margin-bottom: .15rem;
}

.st-mini-stats dd,
.st-summary-cards dd {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--st-head);
}

.st-tournament-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 1rem;
  align-items: start;
  background: linear-gradient(180deg, #fffaf0, #fffdf9);
}

.st-lead {
  font-size: 1.05rem;
  color: #4f4638;
  margin-bottom: 0;
}

.st-richtext {
  max-width: 75ch;
  line-height: 1.55;
}

.st-placeholder {
  color: #665f54;
  font-style: italic;
}

.st-backlink {
  margin: 0 0 .75rem;
}

.st-backlink a {
  text-decoration: none;
}

.st-results-block h3 {
  margin-top: 1.15rem;
}

.st-embedded-module {
  border-top: 1px solid var(--st-border);
  padding-top: .75rem;
  margin-top: .75rem;
}

.st-dashboard-form input[type="text"],
.st-dashboard-form select,
.st-dashboard-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.st-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem .9rem;
}

.st-form-grid label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-weight: 600;
  color: #4f4638;
}

.st-form-grid .st-full {
  grid-column: 1 / -1;
}

.st-dashboard-editor summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--st-head);
}

@media (max-width: 1100px) {
  .st-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .st-tournament-hero {
    grid-template-columns: 1fr;
  }

  .st-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .st-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Version 0.2.1: PGN-/Download-Auswahl, Frontend-Filter und TWZ-Namensspalte. */
.st-module-picker .small {
  display: block;
  margin-top: .25rem;
  font-weight: 400;
}

.st-module-select {
  min-height: 12rem;
  font-family: inherit;
}

.st-dashboard-form code {
  padding: .08rem .28rem;
  border-radius: 5px;
  background: #f2ece1;
}

.st-twz-editor tbody td:nth-child(2),
.st-twz-editor thead th:nth-child(2) {
  text-align: left;
  padding-left: .75rem;
}

.st-section-results .st-filter-panel {
  margin-top: .35rem;
}

/* Version 0.2.2: Zugriff pro Turnier. */
.st-card-locked {
  opacity: .92;
  background: #fbf7ef;
}

.st-access-note {
  margin: .45rem 0;
  color: #665f54;
  font-size: .9rem;
}

.st-locked-box {
  border: 1px dashed var(--st-border);
  border-radius: 10px;
  background: #fffaf0;
  color: #665f54;
  padding: .55rem .65rem;
  margin: .7rem 0;
}

.st-access-denied .st-dashboard-section {
  max-width: 760px;
}

/* Version 0.2.3: Bereichsauswahl im Turnier-Dashboard. */
.st-dashboard-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .75rem;
  margin: .9rem 0 1rem;
}

.st-switch-card {
  appearance: none;
  border: 1px solid var(--st-border);
  border-radius: 14px;
  background: #fffdf9;
  color: inherit;
  padding: .85rem .9rem;
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .65rem;
  row-gap: .15rem;
  box-shadow: 0 2px 8px rgba(40, 30, 10, .06);
  cursor: pointer;
  min-height: 5.4rem;
}

.st-switch-card:hover,
.st-switch-card:focus {
  border-color: #d5b372;
  box-shadow: 0 4px 14px rgba(40, 30, 10, .10);
  outline: none;
}

.st-switch-card.is-active {
  background: linear-gradient(180deg, #fff7d7, #fffdf9);
  border-color: #d5b372;
  box-shadow: inset 0 0 0 2px rgba(213, 179, 114, .35), 0 4px 14px rgba(40, 30, 10, .10);
}

.st-switch-icon {
  grid-row: 1 / span 2;
  font-size: 1.55rem;
  line-height: 1.1;
  padding-top: .08rem;
}

.st-switch-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: #182b40;
  line-height: 1.2;
}

.st-switch-hint {
  color: #665f54;
  font-size: .88rem;
  line-height: 1.3;
}

.st-switch-card-all {
  background: #fffaf0;
}

.st-dashboard-ready .st-dashboard-panel[hidden] {
  display: none !important;
}

.st-dashboard-panel.is-active {
  animation: stPanelFade .18s ease-out;
}

@keyframes stPanelFade {
  from { opacity: .65; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .st-dashboard-switch {
    grid-template-columns: 1fr;
  }

  .st-switch-card {
    min-height: auto;
  }
}


/* Version 0.2.4: Kompaktere gesperrte Turnierkarten. */
.st-card-compact {
  padding: .75rem .85rem;
}

.st-card-compact h3 {
  margin: .4rem 0 .25rem;
}

.st-locked-compact {
  margin: .25rem 0 .55rem;
  color: #665f54;
  font-size: .95rem;
}

.st-card-actions {
  margin: .35rem 0 0;
}

.st-card-compact .button {
  padding: .35rem .7rem;
  line-height: 1.2;
}


/* Version 0.2.5: HTML-Eingabe nur fuer Ausschreibung / Turnierinformation. */
.st-html-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
}

.st-htmltext p:first-child,
.st-htmltext h2:first-child,
.st-htmltext h3:first-child,
.st-htmltext h4:first-child {
  margin-top: 0;
}

.st-htmltext table {
  border-collapse: collapse;
  margin: .75rem 0;
  width: auto;
  max-width: 100%;
}

.st-htmltext th,
.st-htmltext td {
  border: 1px solid var(--st-border);
  padding: .35rem .55rem;
  text-align: left;
}

.st-htmltext th {
  background: var(--st-soft);
  color: var(--st-head);
}

/* Version 0.2.8: Eine gemeinsame Turnierübersicht, neueste Turniere zuerst. */
.st-overview-section {
  padding: 1rem;
}

.st-card-grid-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.st-card-grid-overview .st-tournament-card {
  min-width: 0;
}

@media (max-width: 1100px) {
  .st-card-grid-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .st-card-grid-overview {
    grid-template-columns: 1fr;
  }
}


/* Version 0.3.0: Online-Anmeldung pro Turnier. */
.st-subbox {
  border: 1px solid var(--st-border);
  border-radius: 12px;
  background: #fffaf0;
  padding: .75rem .85rem;
  margin-top: .25rem;
}

.st-subbox h3 {
  margin: 0 0 .5rem;
  color: var(--st-head);
}

.st-checkline,
.st-privacy-check {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  font-weight: 500;
  color: #4f4638;
}

.st-checkline input,
.st-privacy-check input {
  margin-top: .18rem;
}

.st-registration-form {
  margin-top: .65rem;
}

.st-registration-form .st-form-grid {
  align-items: start;
}

.st-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.st-public-registrations {
  margin-top: 1rem;
}

.st-privacy-note {
  border: 1px dashed var(--st-border);
  border-radius: 10px;
  background: #fffaf0;
  padding: .45rem .6rem;
  color: #665f54;
  font-size: .92rem;
}

.st-registration-table tbody td:nth-child(2),
.st-registration-table thead th:nth-child(2),
.st-registration-table tbody td:nth-child(3),
.st-registration-table thead th:nth-child(3),
.st-registration-admin-table tbody td:nth-child(3),
.st-registration-admin-table thead th:nth-child(3),
.st-registration-admin-table tbody td:nth-child(4),
.st-registration-admin-table thead th:nth-child(4),
.st-registration-admin-table tbody td:nth-child(6),
.st-registration-admin-table thead th:nth-child(6),
.st-registration-admin-table tbody td:nth-child(8),
.st-registration-admin-table thead th:nth-child(8),
.st-registration-admin-table tbody td:nth-child(9),
.st-registration-admin-table thead th:nth-child(9) {
  text-align: left;
  padding-left: .75rem;
}

.st-reg-received {
  background: #fff7d7;
  color: #7a5b28;
  border-color: #ead48f;
}

.st-reg-confirmed {
  background: #e7f3ea;
  color: #18733f;
  border-color: #bfdcc7;
}

.st-reg-waiting {
  background: #edf0f5;
  color: #3f4b5a;
  border-color: #ccd3dd;
}

.st-reg-rejected,
.st-reg-withdrawn {
  background: #f8dfd9;
  color: #8a321a;
  border-color: #e0b6aa;
}

.st-registration-note-row td {
  background: #fffaf0;
  color: #665f54;
  text-align: left;
}


/* Version 0.3.1: Zurückziehen/Löschen etwas zurückhaltender darstellen. */
.st-danger-form,
.st-registration-admin-table .st-inline-form + .st-inline-form {
  margin-top: .28rem;
}

.st-danger-form .button,
.st-twz-editor td:last-child .button {
  border-color: #d9b9aa;
  background: #fff7f3;
  color: #8a3f25;
}

/* Version 0.3.2: Geburtsdatum/Jahrgang, U-Klassen und Swiss-Chess-Export. */
.st-u-badge {
  display: inline-block;
  min-width: 2.6rem;
  padding: .12rem .4rem;
  border-radius: 999px;
  border: 1px solid #d8d1c3;
  background: #fff7d7;
  color: #7a5b28;
  font-weight: 700;
  font-size: .86rem;
  text-align: center;
}

.st-date-input {
  width: 9rem;
}

.st-club-input {
  min-width: 12rem;
}

.st-export-admin summary,
.st-registration-admin summary,
.st-twz-editor summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--st-head);
}

.st-actionbar-compact {
  display: inline-flex;
  width: auto;
  margin: .45rem 0;
}

.st-registration-table thead th:nth-child(2),
.st-registration-table tbody td:nth-child(2),
.st-registration-admin-table thead th:nth-child(3),
.st-registration-admin-table tbody td:nth-child(3) {
  text-align: left;
  padding-left: .75rem;
}

.st-registration-id {
  white-space: nowrap;
  font-weight: 700;
}


/* Version 0.3.3: Anmeldeliste zuerst, Formular nur bei Bedarf aufklappen. */
.st-registration-details {
  margin: .9rem 0 0;
  border: 1px solid var(--st-border);
  border-radius: 12px;
  background: #fffdf9;
  padding: .65rem .75rem;
}

.st-registration-details > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: auto;
  padding: .48rem .85rem;
  border-radius: 8px;
  border: 1px solid #bfa05d;
  background: #d5b372;
  color: #182b40;
  font-weight: 700;
  list-style: none;
}

.st-registration-details > summary::-webkit-details-marker {
  display: none;
}

.st-registration-details > summary::before {
  content: "＋";
  font-weight: 800;
}

.st-registration-details[open] > summary::before {
  content: "−";
}

.st-registration-details > summary:hover,
.st-registration-details > summary:focus {
  background: #e1c487;
  outline: none;
}

.st-registration-form-wrap {
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid var(--st-border);
}

.st-section-registration .st-public-registrations {
  margin-top: .75rem;
}


/* Version 0.3.4: Anmeldeknopf vor der öffentlichen Liste anzeigen. */
.st-registration-details-top {
  margin: .65rem 0 .9rem;
}

.st-registration-topnotice {
  margin: .65rem 0 .9rem;
}

.st-section-registration .st-public-registrations {
  margin-top: .9rem;
}


/* Version 0.3.5: Auf dem Handy springt die Auswahl direkt zum sichtbaren Bereich. */
.st-dashboard-selection {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  border: 1px solid var(--st-border);
  border-radius: 12px;
  background: #fffaf0;
  color: #4f4638;
  padding: .55rem .75rem;
  margin: -.25rem 0 .85rem;
}

.st-dashboard-selection strong {
  color: var(--st-head);
}

.st-dashboard-selection span {
  color: #665f54;
  font-size: .92rem;
}

.st-dashboard-panel {
  scroll-margin-top: 1rem;
}

@media (max-width: 760px) {
  .st-dashboard-selection {
    position: sticky;
    top: .25rem;
    z-index: 3;
    box-shadow: 0 3px 12px rgba(40, 30, 10, .08);
  }

  .st-dashboard-panel {
    scroll-margin-top: 4.25rem;
  }
}



/* Version 0.3.6: Download-Dateien als direkte Linkliste statt Modulzwang. */
.st-download-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
}

.st-download-list td:nth-child(2),
.st-download-list th:nth-child(2),
.st-download-list td:nth-child(3),
.st-download-list th:nth-child(3) {
  text-align: left;
}

.st-download-list td:nth-child(2),
.st-download-list td:nth-child(3) {
  white-space: normal;
}

.st-filetype {
  display: inline-block;
  min-width: 3.6rem;
  padding: .14rem .45rem;
  border: 1px solid var(--st-border);
  border-radius: 999px;
  background: #fffaf0;
  color: var(--st-head);
  font-weight: 700;
  font-size: .84rem;
  text-align: center;
}

.st-subdetails {
  border: 1px dashed var(--st-border);
  border-radius: 10px;
  padding: .65rem .75rem;
  background: #fffdf9;
}

.st-subdetails summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--st-head);
}


/* Version 0.3.7: Kompakte Downloadliste, PGN/PDF pro Runde in einer Zeile. */
.st-download-compact th:nth-child(1),
.st-download-compact td:nth-child(1),
.st-download-compact th:nth-child(2),
.st-download-compact td:nth-child(2),
.st-download-compact th:nth-child(3),
.st-download-compact td:nth-child(3) {
  text-align: left;
}

.st-download-compact .st-download-label {
  font-weight: 700;
  color: #182b40;
  white-space: nowrap;
  width: 10rem;
}

.st-download-actions {
  white-space: nowrap;
  width: 12rem;
}

.st-filebutton {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin: .08rem .18rem .08rem 0;
}

.st-filebutton:hover .st-filetype,
.st-filebutton:focus .st-filetype {
  border-color: #d5b372;
  background: #fff7d7;
}

.st-download-note {
  white-space: normal;
}

@media (max-width: 680px) {
  .st-download-compact thead {
    display: none;
  }

  .st-download-compact,
  .st-download-compact tbody,
  .st-download-compact tr,
  .st-download-compact td {
    display: block;
    width: 100%;
  }

  .st-download-compact tr {
    border-bottom: 1px solid var(--st-border);
    padding: .55rem .35rem;
  }

  .st-download-compact td {
    border: 0;
    padding: .15rem .25rem;
  }

  .st-download-compact .st-download-label {
    width: auto;
    font-size: 1.05rem;
  }

  .st-download-actions {
    width: auto;
  }
}

/* Version 0.3.8: deutlichere Öffnen-Aktion und Zeitmarken je Turnier. */
.st-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  min-height: 2.55rem;
  padding: .65rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(122, 91, 40, .18);
}

.st-open-button::after {
  content: " →";
  font-weight: 900;
}

.st-card-actions {
  display: flex;
  align-items: flex-end;
}

.st-card-time {
  margin: .25rem 0 .45rem;
}

.st-time-badge {
  display: inline-block;
  padding: .22rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--st-border);
  background: #fffaf0;
  color: #665f54;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.25;
}

.st-time-planned {
  background: #fff7d7;
  color: #7a5b28;
  border-color: #ead48f;
}

.st-time-active {
  background: #e7f3ea;
  color: #18733f;
  border-color: #bfdcc7;
}

.st-time-completed {
  background: #edf0f5;
  color: #3f4b5a;
  border-color: #ccd3dd;
}

@media (max-width: 640px) {
  .st-open-button {
    width: 100%;
    min-width: 0;
  }
}


/* Version 0.3.9: Anmelden-Aktion und Zeitdaten in Turnierkarten sichtbar. */
.st-login-button {
  background: #d5b372;
  color: #182b40;
  border-color: #b99648;
}

.st-login-button:hover,
.st-login-button:focus {
  background: #e1c487;
  color: #182b40;
}

.st-card-timebox {
  display: grid;
  gap: .32rem;
  margin: .35rem 0 .65rem;
  padding: .5rem .55rem;
  border: 1px solid var(--st-border);
  border-radius: 12px;
  background: #fffaf0;
}

.st-card-timebox .st-time-badge {
  margin: 0;
}

.st-card-time-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}

.st-card-date-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  font-size: .9rem;
  color: #665f54;
}

.st-card-date-line span {
  color: #665f54;
}

.st-card-date-line strong {
  color: #182b40;
  font-weight: 800;
  white-space: nowrap;
}

.st-card-locked .st-card-timebox {
  background: #fffdf9;
}


/* Version 0.3.12: Ladehinweis fuer die Turnierverwaltung im Backend. */
.st-admin-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(24, 43, 64, .18);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease-in-out;
}

.st-admin-loader.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.st-admin-loader__card {
  display: flex;
  align-items: center;
  gap: .9rem;
  max-width: 28rem;
  padding: 1rem 1.15rem;
  border: 1px solid #d5b372;
  border-radius: 16px;
  background: #fffdf9;
  color: #182b40;
  box-shadow: 0 14px 36px rgba(24, 43, 64, .2);
}

.st-admin-loader__spinner {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border: .28rem solid #f0dfb6;
  border-top-color: #ae281d;
  border-radius: 50%;
  animation: st-admin-loader-spin .82s linear infinite;
}

.st-admin-loader__text {
  display: grid;
  gap: .18rem;
}

.st-admin-loader__text strong {
  color: #7a5b28;
  font-size: 1.02rem;
}

.st-admin-loader__text span {
  color: #665f54;
  font-size: .92rem;
}

.st-admin-is-loading {
  cursor: progress;
}

@keyframes st-admin-loader-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .st-admin-loader__spinner {
    animation: none;
  }
}

/* Version 0.3.17: Header-Aktionen optisch unter dem Hauptmenü ausrichten. */
.st-portal-head--with-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem 2rem;
  align-items: center;
}

.st-portal-head--with-module .st-portal-head__text {
  min-width: 0;
}

.st-portal-head--with-module .st-portal-head__module--actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  width: clamp(22rem, 32vw, 34rem);
  min-width: 0;
}

.st-portal-head__hilfmit .st-embedded-module,
.st-module-page__body > .st-embedded-module {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.st-portal-head__hilfmit .moduletable,
.st-portal-head__hilfmit .card,
.st-portal-head__hilfmit .card-body,
.st-portal-head__hilfmit .custom {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.st-header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 5.8rem;
  height: 5.8rem;
  text-decoration: none;
  border-radius: 22px;
  transition: transform .15s ease, filter .15s ease;
}

.st-header-icon-link:hover,
.st-header-icon-link:focus-visible {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.06) saturate(1.05);
}

.st-header-icon-link:focus-visible {
  outline: 3px solid rgba(213, 179, 114, .6);
  outline-offset: 3px;
}

.st-header-icon-link__image {
  display: block;
  width: 5.8rem;
  height: 5.8rem;
  object-fit: contain;
}

.st-module-page__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.st-module-page__head h1 {
  margin: 0 0 .2rem;
}

.st-module-page__body {
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .st-portal-head--with-module {
    grid-template-columns: 1fr;
  }

  .st-portal-head--with-module .st-portal-head__module--actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
  }

  .st-header-icon-link,
  .st-header-icon-link__image {
    width: 4.75rem;
    height: 4.75rem;
  }

  .st-header-icon-link {
    border-radius: 18px;
  }
}

.st-header-icon-link .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* Version 0.3.18: Stadtmeister-Icon weiter Richtung „über uns“ und Header kompakter. */
.st-portal-head.st-portal-head--with-module {
  padding: .72rem .95rem;
  margin-bottom: .85rem;
}

.st-portal-head--with-module {
  gap: .75rem 1.4rem;
}

.st-portal-head--with-module h1 {
  font-size: clamp(2.25rem, 3.2vw, 3rem);
  line-height: 1.04;
  margin: 0 0 .35rem;
}

.st-portal-head--with-module p {
  margin: 0;
}

.st-portal-head--with-module .st-portal-head__module--actions {
  width: clamp(40rem, 50vw, 52rem);
  justify-content: flex-end;
  gap: 1rem;
}

.st-portal-head--with-module .st-header-icon-link {
  margin-right: auto;
}

.st-header-icon-link,
.st-header-icon-link__image {
  width: 4.9rem;
  height: 4.9rem;
}

.st-header-icon-link {
  border-radius: 18px;
}

@media (max-width: 1100px) {
  .st-portal-head--with-module .st-portal-head__module--actions {
    width: clamp(27rem, 44vw, 40rem);
  }
}

@media (max-width: 768px) {
  .st-portal-head.st-portal-head--with-module {
    padding: .85rem 1rem;
  }

  .st-portal-head--with-module .st-portal-head__module--actions {
    width: 100%;
    justify-content: flex-start;
    gap: .8rem;
  }

  .st-portal-head--with-module .st-header-icon-link {
    margin-right: 0;
  }

  .st-header-icon-link,
  .st-header-icon-link__image {
    width: 4.25rem;
    height: 4.25rem;
  }
}


/* Version 0.3.19: Icons wieder auf Ursprungsgröße, Headerbox kompakt, Stadtmeister-Icon moderat unter „über uns“. */
.st-portal-head.st-portal-head--with-module {
  padding: .62rem .95rem;
  margin-bottom: .85rem;
}

.st-portal-head--with-module {
  gap: .65rem 1.35rem;
}

.st-portal-head--with-module h1 {
  font-size: clamp(2.45rem, 3.35vw, 3.2rem);
  line-height: 1.02;
  margin: 0 0 .25rem;
}

.st-portal-head--with-module p {
  margin: 0;
}

.st-portal-head--with-module .st-portal-head__module--actions {
  width: clamp(22rem, 32vw, 34rem);
  justify-content: space-between;
  gap: .9rem;
}

.st-portal-head--with-module .st-header-icon-link {
  margin-right: 0;
}

.st-header-icon-link,
.st-header-icon-link__image {
  width: 5.8rem;
  height: 5.8rem;
}

.st-header-icon-link {
  border-radius: 22px;
}

@media (max-width: 1100px) {
  .st-portal-head--with-module .st-portal-head__module--actions {
    width: clamp(21rem, 38vw, 28rem);
  }
}

@media (max-width: 768px) {
  .st-portal-head.st-portal-head--with-module {
    padding: .75rem .9rem;
  }

  .st-portal-head--with-module .st-portal-head__module--actions {
    width: 100%;
    justify-content: flex-start;
    gap: .8rem;
  }

  .st-portal-head--with-module .st-header-icon-link {
    margin-right: 0;
  }

  .st-header-icon-link,
  .st-header-icon-link__image {
    width: 4.75rem;
    height: 4.75rem;
  }

  .st-header-icon-link {
    border-radius: 18px;
  }
}


/* Version 0.3.20: Headerhöhe aus 0.3.19 behalten, Stadtmeister-Icon gezielt Richtung „über uns“ schieben. */
.st-portal-head.st-portal-head--with-module {
  padding: .62rem .95rem;
  margin-bottom: .85rem;
}

.st-portal-head--with-module .st-portal-head__module--actions {
  width: clamp(22rem, 32vw, 34rem);
  justify-content: space-between;
  gap: .9rem;
}

.st-portal-head--with-module .st-header-icon-link,
.st-portal-head--with-module .st-header-icon-link__image {
  width: 5.8rem;
  height: 5.8rem;
}

.st-portal-head--with-module .st-header-icon-link--stadtmeister {
  position: relative;
  left: clamp(-15rem, -13vw, -8rem);
}

@media (max-width: 1100px) {
  .st-portal-head--with-module .st-portal-head__module--actions {
    width: clamp(21rem, 38vw, 28rem);
  }

  .st-portal-head--with-module .st-header-icon-link--stadtmeister {
    left: clamp(-8rem, -8vw, -4rem);
  }
}

@media (max-width: 768px) {
  .st-portal-head.st-portal-head--with-module {
    padding: .75rem .9rem;
  }

  .st-portal-head--with-module .st-portal-head__module--actions {
    width: 100%;
    justify-content: flex-start;
    gap: .8rem;
  }

  .st-portal-head--with-module .st-header-icon-link--stadtmeister {
    left: 0;
  }

  .st-portal-head--with-module .st-header-icon-link,
  .st-portal-head--with-module .st-header-icon-link__image {
    width: 4.75rem;
    height: 4.75rem;
  }
}

/* Version 0.3.22: Endgültiges Löschen von Turnieren. */
.st-button-danger,
.st-delete-confirm-form .button-danger {
  border-color: #d9b9aa;
  background: #fff7f3;
  color: #8a3f25;
}

.st-button-danger:hover,
.st-button-danger:focus,
.st-delete-confirm-form .button-danger:hover,
.st-delete-confirm-form .button-danger:focus {
  border-color: #b86a4c;
  background: #fbe7de;
  color: #6f2f1b;
}

.st-delete-confirm h2 {
  margin-top: 0;
}

.st-delete-confirm-form {
  margin-top: 1rem;
  padding-top: .8rem;
  border-top: 1px solid var(--st-border);
}
