:root {
  --background: #f3f6fa;
  --surface: #ffffff;
  --primary: #123a63;
  --primary-light: #e8f0f8;
  --accent: #18a06b;
  --accent-dark: #0e7950;
  --text: #172033;
  --muted: #667085;
  --border: #d9e1ea;
  --danger: #b42318;
  --danger-light: #fee4e2;
  --shadow: 0 12px 30px rgba(18, 58, 99, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px max(20px, calc((100% - 1100px) / 2));
  color: white;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 35%),
    linear-gradient(135deg, #123a63, #1a5d91);
}

.site-header h1,
.section-heading h2,
.sport-selection h2,
.empty-state h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
}

.subtitle {
  max-width: 640px;
  margin: 8px 0 0;
  line-height: 1.55;
  opacity: 0.9;
}

.page {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.admin-layout {
  display: grid;
  gap: 24px;
}

.sport-selection,
.panel {
  margin-bottom: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sport-selection h2 {
  margin-bottom: 18px;
}

.sport-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sport-button {
  min-height: 96px;
  padding: 16px;
  border: 2px solid transparent;
  border-radius: 16px;
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.sport-button:hover {
  transform: translateY(-2px);
}

.sport-button.active {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
}

.sport-icon {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.counter {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.84rem;
  font-weight: 800;
}

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

.tournament-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-accent {
  height: 7px;
  background: var(--accent);
}

.card-accent.volleyball {
  background: #ef8c26;
}

.card-content {
  padding: 22px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sport-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.82rem;
  font-weight: 800;
}

.tournament-card h3 {
  margin: 16px 0 8px;
  font-size: 1.35rem;
}

.tournament-description {
  min-height: 48px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.meta-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.meta-list strong {
  color: var(--text);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: white;
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  color: var(--primary);
  background: white;
}

.button-danger {
  color: var(--danger);
  background: var(--danger-light);
}

form {
  display: grid;
  gap: 18px;
}

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

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: white;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 58, 99, 0.12);
}

textarea {
  resize: vertical;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.admin-item h3 {
  margin: 0 0 5px;
}

.admin-item p {
  margin: 0;
  color: var(--muted);
}

.notice {
  padding: 18px;
  border-left: 5px solid #ef8c26;
  border-radius: 12px;
  color: #69410d;
  background: #fff4e5;
  line-height: 1.55;
}

.empty-state {
  padding: 42px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  margin-bottom: 10px;
  font-size: 2.4rem;
}

.hidden {
  display: none;
}

.site-footer {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 700px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .site-header .button {
    width: 100%;
  }

  .page {
    width: min(100% - 24px, 1100px);
    padding-top: 20px;
  }

  .sport-selection,
  .panel {
    padding: 18px;
  }

  .sport-buttons {
    grid-template-columns: 1fr;
  }

  .sport-button {
    min-height: 74px;
  }

  .sport-icon {
    display: inline;
    margin-right: 8px;
    font-size: 1.4rem;
  }

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-item {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-item .button {
    width: 100%;
  }
}


/* Ergänzungen für Schritt 1.1 */

.site-footer {
  position: relative;
}

.admin-secret-link {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  opacity: 0.20;
  filter: grayscale(1);
  transition: opacity 160ms ease, background 160ms ease;
}

.admin-secret-link:hover,
.admin-secret-link:focus-visible {
  background: rgba(18, 58, 99, 0.08);
  opacity: 0.75;
  outline: none;
}

.admin-sport-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-sport-tab {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  min-height: 64px;
  align-items: center;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 16px;
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.admin-sport-tab span:first-child {
  font-size: 1.45rem;
}

.admin-sport-tab strong {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-light);
}

.admin-sport-tab.active {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
}

.admin-sport-tab.active strong {
  color: var(--primary);
  background: white;
}

.full-width-field {
  grid-column: 1 / -1;
}

.admin-item .sport-badge {
  margin-bottom: 8px;
}

@media (max-width: 700px) {
  .admin-sport-tabs {
    grid-template-columns: 1fr;
  }

  .admin-secret-link {
    right: 8px;
    bottom: 8px;
  }
}


/* Ergänzungen für Schritt 1.2 – Schiedsrichterseite */

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secret-links {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 4px;
}

.secret-link {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  opacity: 0.20;
  filter: grayscale(1);
  transition: opacity 160ms ease, background 160ms ease;
}

.secret-link:hover,
.secret-link:focus-visible {
  background: rgba(18, 58, 99, 0.08);
  opacity: 0.80;
  outline: none;
}

.referee-layout {
  display: grid;
  gap: 24px;
}

.scoreboard {
  margin-bottom: 0;
}

.score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.team-score-card {
  padding: 24px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--background);
  text-align: center;
}

.team-side-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.team-score-card h3 {
  min-height: 34px;
  margin: 0;
  font-size: 1.35rem;
}

.score-number {
  margin: 18px 0;
  color: var(--primary);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 1;
}

.score-divider {
  color: var(--muted);
  font-size: 3rem;
  font-weight: 900;
}

.score-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.score-button {
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

.score-plus {
  color: white;
  background: var(--accent);
}

.score-minus {
  color: var(--danger);
  background: var(--danger-light);
}

.game-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.button-warning {
  color: #69410d;
  background: #fff0c7;
}

.button-dark {
  color: white;
  background: #344054;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 900;
}

.status-ready {
  color: var(--primary);
  background: var(--primary-light);
}

.status-live {
  color: #067647;
  background: #d1fadf;
}

.status-paused {
  color: #934f00;
  background: #fef0c7;
}

.status-finished {
  color: #344054;
  background: #eaecf0;
}

@media (max-width: 700px) {
  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .score-divider {
    display: none;
  }

  .game-control-grid {
    grid-template-columns: 1fr 1fr;
  }

  .secret-links {
    right: 6px;
    bottom: 6px;
  }
}


/* Ergänzung Schritt 1.3 – Volleyball-Turnierart */

.tournament-type-line {
  margin-top: 7px !important;
  color: var(--primary) !important;
}


/* Ergänzung Schritt 1.4 – Volleyball-Teams */

.admin-item-openable {
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.admin-item-openable:hover,
.admin-item-openable:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 14px 34px rgba(18, 58, 99, 0.16);
  transform: translateY(-2px);
  outline: none;
}

.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tournament-admin-layout {
  display: grid;
  gap: 24px;
}

.tournament-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-box {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background);
}

.detail-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-box strong {
  font-size: 1.05rem;
}

.team-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.team-list {
  display: grid;
  gap: 12px;
}

.team-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.team-list-number {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: var(--primary);
  font-weight: 900;
}

.team-list-name {
  display: grid;
  gap: 3px;
}

.team-list-name span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.team-list-name strong {
  font-size: 1.05rem;
}

@media (max-width: 700px) {
  .admin-item-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .tournament-detail-grid,
  .team-form {
    grid-template-columns: 1fr;
  }

  .team-list-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .team-list-item .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* Ergänzung Schritt 1.5 – Ranglisten und Turnierbäume */

.system-description {
  margin: -4px 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.ranking-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.ranking-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: var(--surface);
}

.ranking-table th,
.ranking-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

.ranking-table th {
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.ranking-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.ranking-table .ranking-position {
  width: 54px;
  font-weight: 900;
}

.ranking-table .ranking-team {
  min-width: 180px;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}

.ranking-table .ranking-points {
  color: var(--primary);
  font-weight: 900;
}

.ranking-table-compact .ranking-table {
  min-width: 590px;
}

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

.group-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background);
}

.group-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.group-card-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.group-card-heading strong {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: var(--primary);
  font-size: 1.05rem;
}

.system-subsection + .system-subsection {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.system-subsection-heading {
  margin-bottom: 16px;
}

.system-subsection-heading span {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-subsection-heading h3 {
  margin: 5px 0 0;
  font-size: 1.25rem;
}

.bracket-scroll {
  overflow-x: auto;
  padding: 4px 2px 16px;
}

.tournament-bracket {
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: 24px;
  align-items: stretch;
}

.bracket-round {
  display: flex;
  width: 230px;
  flex: 0 0 230px;
  flex-direction: column;
}

.bracket-round h3 {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.9rem;
  text-align: center;
}

.bracket-round-matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
}

.bracket-match {
  position: relative;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(18, 58, 99, 0.08);
}

.bracket-match-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.bracket-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--background);
}

.bracket-team + .bracket-team {
  margin-top: 6px;
}

.bracket-team span {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-team strong {
  color: var(--primary);
  font-size: 1.05rem;
}

.bracket-team-bye {
  color: var(--muted);
  background: #f2f4f7;
  font-style: italic;
}

.double-ko-section .bracket-round {
  width: 220px;
  flex-basis: 220px;
}

.loser-bracket .bracket-round h3 {
  color: #934f00;
  background: #fef0c7;
}

.grand-final-bracket .bracket-round h3 {
  color: #067647;
  background: #d1fadf;
}

@media (max-width: 850px) {
  .group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .tournament-system-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .bracket-round {
    width: 205px;
    flex-basis: 205px;
  }
}


/* Ergänzung Schritt 1.6 – K.-o. ohne Freilos */

.knockout-settings {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid #b8d6c9;
  border-radius: 16px;
  background: #f0fbf6;
}

.knockout-settings.hidden {
  display: none;
}

.knockout-settings-heading h3 {
  margin: 2px 0 0;
  color: var(--primary);
}

.knockout-settings label {
  max-width: 520px;
}

.knockout-settings-hint {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.knockout-settings-hint.hint-success {
  color: #067647;
  background: #d1fadf;
}

.knockout-settings-hint.hint-error {
  color: #b42318;
  background: #fee4e2;
}


/* Ergänzung Schritt 1.7 – mobile Tabellen ohne seitliches Scrollen */

body {
  overflow-x: hidden;
}

.ranking-table-wrapper {
  max-width: 100%;
  overflow: hidden;
}

.ranking-table,
.ranking-table-compact .ranking-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.ranking-table th,
.ranking-table td {
  white-space: normal;
}

.ranking-table .ranking-position {
  width: 48px;
}

.ranking-table .ranking-team {
  width: auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.ranking-table th:nth-child(n + 3),
.ranking-table td:nth-child(n + 3) {
  width: 54px;
}

.team-list-item,
.team-list-name,
.admin-item > div,
.detail-box {
  min-width: 0;
}

.team-list-name strong,
.admin-item h3,
.detail-box strong {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Der Turnierbaum behält bewusst seine Reihenform und bleibt scrollbar. */
.bracket-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {
  .ranking-table-wrapper {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .ranking-table,
  .ranking-table tbody {
    display: block;
    width: 100%;
  }

  .ranking-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ranking-table tbody {
    display: grid;
    gap: 10px;
  }

  .ranking-table tbody tr {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
  }

  .ranking-table tbody tr:nth-child(even) {
    background: var(--surface);
  }

  .ranking-table td {
    display: grid;
    width: auto !important;
    min-width: 0;
    gap: 3px;
    align-content: center;
    padding: 6px 4px;
    border: 0;
    border-radius: 8px;
    background: var(--background);
    font-size: 0.78rem;
    text-align: center;
  }

  .ranking-table td::before {
    content: attr(data-short-label);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
  }

  .ranking-table .ranking-position {
    grid-column: 1;
    grid-row: 1;
    font-size: 1rem;
  }

  .ranking-table .ranking-team {
    grid-column: 2 / 5;
    grid-row: 1;
    align-content: center;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: left;
  }

  .ranking-table .ranking-team::before {
    text-align: left;
  }

  .ranking-table .ranking-points {
    grid-column: 5;
    grid-row: 1;
    font-size: 1rem;
  }

  .ranking-table td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
  }

  .ranking-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .ranking-table td:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
  }

  .ranking-table td:nth-child(6) {
    grid-column: 4;
    grid-row: 2;
  }

  .ranking-table td:nth-child(7) {
    grid-column: 5;
    grid-row: 2;
  }

  .team-list-item {
    width: 100%;
  }

  .team-list-name strong {
    line-height: 1.3;
  }
}


/* Ergänzung Schritt 1.8 – Teamnamen nur an Leerzeichen umbrechen */

.ranking-table .ranking-team,
.team-list-name strong,
.admin-item h3,
.detail-box strong {
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  white-space: normal;
}

@media (max-width: 700px) {
  .ranking-table .ranking-team {
    font-size: clamp(0.76rem, 3.1vw, 0.9rem);
  }

  .team-list-name strong,
  .admin-item h3,
  .detail-box strong {
    font-size: clamp(0.86rem, 3.4vw, 1.05rem);
  }
}


/* Ergänzung Schritt 2.0 – Gruppenqualifikation und gruppengetrennte Paarungen */

.qualification-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.qualification-summary-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background);
}

.qualification-summary-item span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.qualification-summary-item strong {
  color: var(--primary);
  font-size: 1.6rem;
}

.qualification-summary-item small {
  color: var(--muted);
  line-height: 1.4;
}

.group-pairing-rule {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-left: 5px solid var(--primary);
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-light);
  line-height: 1.5;
}

.reseeded-bracket .bracket-team span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}

@media (max-width: 900px) {
  .qualification-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .qualification-summary {
    grid-template-columns: 1fr;
  }
}


/* Ergänzung Schritt 2.1 – Paarungsmodus und Gruppen-K.-o.-Gesamtansicht */

.group-knockout-settings {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid #c8d7e8;
  border-radius: 16px;
  background: #f4f8fc;
}

.group-knockout-settings.hidden {
  display: none;
}

.group-knockout-settings h3 {
  margin: 3px 0 6px;
  color: var(--primary);
}

.group-knockout-settings p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pairing-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pairing-mode-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 15px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}

.pairing-mode-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pairing-mode-card input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.pairing-mode-card span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.pairing-mode-card strong {
  color: var(--primary);
}

.pairing-mode-card small {
  color: var(--muted);
  line-height: 1.4;
}

.pairing-mode-hint {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--primary) !important;
  background: white;
  font-weight: 700;
}

.summary-text-value {
  font-size: 1rem !important;
  line-height: 1.2;
}

.group-bracket-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 2px 20px;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.group-bracket-board {
  display: flex;
  width: max-content;
  min-width: 100%;
  min-height: var(--group-bracket-height);
  gap: 28px;
  align-items: stretch;
  padding: 0 8px 10px;
}

.group-bracket-column {
  position: relative;
  display: flex;
  width: 238px;
  flex: 0 0 238px;
  flex-direction: column;
  min-height: var(--group-bracket-height);
}

.group-bracket-column > h3 {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.9rem;
  text-align: center;
}

.group-stage-board-column {
  width: 252px;
  flex-basis: 252px;
}

.bracket-group-stack,
.group-board-round-matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
}

.bracket-group-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 6px 15px rgba(18, 58, 99, 0.07);
}

.bracket-group-card::after,
.group-board-match-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -29px;
  width: 29px;
  border-top: 2px solid #a9b8c8;
}

.group-bracket-column:last-child .group-board-match-wrap::after {
  display: none;
}

.bracket-group-card h4 {
  margin: 0;
  padding: 7px 9px;
  color: white;
  background: var(--primary);
  font-size: 0.78rem;
  text-align: center;
}

.bracket-group-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.72rem;
}

.bracket-group-card th,
.bracket-group-card td {
  padding: 6px 5px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.bracket-group-card tr:last-child td {
  border-bottom: 0;
}

.bracket-group-card th {
  color: var(--muted);
  background: #f7f9fc;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.bracket-group-card th:nth-child(1),
.bracket-group-card td:nth-child(1) {
  width: 32px;
}

.bracket-group-card th:nth-child(3),
.bracket-group-card td:nth-child(3) {
  width: 38px;
}

.bracket-group-card td:nth-child(2) {
  overflow: hidden;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-group-card .direct-qualifier-row {
  background: #eef6ff;
}

.bracket-group-card .direct-qualifier-row td:first-child {
  color: var(--primary);
  font-weight: 900;
}

.group-board-match-wrap {
  position: relative;
}

.group-board-match-wrap .bracket-match {
  width: 100%;
}

.group-board-match-wrap .bracket-team span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}

.match-group-rule {
  display: block;
  margin: 5px 4px 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.3;
}

.group-board-round-matches::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 14px;
  left: -15px;
  border-left: 2px solid rgba(169, 184, 200, 0.55);
}

@media (max-width: 700px) {
  .pairing-mode-options {
    grid-template-columns: 1fr;
  }

  .group-bracket-column {
    width: 215px;
    flex-basis: 215px;
  }

  .group-stage-board-column {
    width: 230px;
    flex-basis: 230px;
  }
}


/* Ergänzung Schritt 2.2 – Volleyball-WM-System */

.wm-system-settings {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid #a9d2c0;
  border-radius: 16px;
  background: #f0fbf6;
}

.wm-system-settings.hidden,
.wm-only-pairing-option.hidden {
  display: none;
}

.wm-system-settings h3 {
  margin: 3px 0 6px;
  color: var(--primary);
}

.wm-system-settings p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.wm-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wm-rule-card,
.wm-size-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.wm-rule-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.wm-rule-card strong {
  color: var(--primary);
  font-size: 1.05rem;
}

.wm-rule-card small {
  color: var(--muted);
  line-height: 1.4;
}

.wm-system-hint {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.wm-system-hint.hint-success {
  color: #067647;
  background: #d1fadf;
}

.wm-system-hint.hint-error {
  color: #b42318;
  background: #fee4e2;
}

.wm-third-comparison {
  margin: 26px 0;
}

.wm-third-note {
  margin: -4px 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.wm-third-qualified {
  background: #eaf8f1 !important;
}

.wm-third-qualified td:first-child,
.wm-third-qualified td:last-child {
  color: #067647;
  font-weight: 900;
}

.wm-third-empty,
.system-validation-warning {
  margin: 18px 0;
  padding: 16px;
  border-radius: 13px;
  color: #7a4510;
  background: #fff4e5;
}

.system-validation-warning strong {
  display: block;
  margin-bottom: 5px;
}

.system-validation-warning p {
  margin: 0;
  line-height: 1.5;
}

.bracket-group-card .third-place-candidate-row {
  background: #fff6e8;
}

.bracket-group-card .third-place-candidate-row td:first-child {
  color: #a15c00;
  font-weight: 900;
}

.wm-summary .qualification-summary-item:nth-child(3) {
  border-color: #f0bd78;
  background: #fff8ed;
}

@media (max-width: 850px) {
  .wm-rule-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .wm-third-table tbody tr {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .wm-third-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .wm-third-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .wm-third-table td:nth-child(3) {
    grid-column: 3 / 5;
    grid-row: 1;
  }

  .wm-third-table td:nth-child(9) {
    grid-column: 5;
    grid-row: 1;
  }

  .wm-third-table td:nth-child(4),
  .wm-third-table td:nth-child(5),
  .wm-third-table td:nth-child(6),
  .wm-third-table td:nth-child(7),
  .wm-third-table td:nth-child(8) {
    grid-row: 2;
  }

  .wm-third-table td:nth-child(4) { grid-column: 1; }
  .wm-third-table td:nth-child(5) { grid-column: 2; }
  .wm-third-table td:nth-child(6) { grid-column: 3; }
  .wm-third-table td:nth-child(7) { grid-column: 4; }
  .wm-third-table td:nth-child(8) { grid-column: 5; }

  .wm-third-table td:nth-child(10) {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}


/* Ergänzung Schritt 2.3 – feste Gruppenblöcke */

.wm-start-rule {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--primary);
  background: var(--surface);
  line-height: 1.5;
}


/* Ergänzung Schritt 2.4 – große Gruppentabellen oberhalb des Baums */

.large-group-overview {
  margin: 28px 0 34px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.large-group-overview-note {
  margin: -6px 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.large-group-overview .group-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.large-group-overview .group-card {
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(18, 58, 99, 0.08);
}

.large-group-overview .group-card-heading {
  margin-bottom: 16px;
}

.large-group-overview .ranking-table {
  min-width: 700px;
}

.large-group-overview .ranking-table th,
.large-group-overview .ranking-table td {
  padding: 14px 12px;
}

.large-group-overview .ranking-table tbody tr:nth-child(1),
.large-group-overview .ranking-table tbody tr:nth-child(2) {
  background: #eaf4ff;
}

.large-group-overview .ranking-table tbody tr:nth-child(1) td:first-child,
.large-group-overview .ranking-table tbody tr:nth-child(2) td:first-child {
  color: var(--primary);
  font-weight: 900;
}

.wm-large-group-overview .ranking-table tbody tr:nth-child(3) {
  background: #fff6e8;
}

.wm-large-group-overview .ranking-table tbody tr:nth-child(3) td:first-child {
  color: #a15c00;
  font-weight: 900;
}

@media (max-width: 1050px) {
  .large-group-overview .group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .large-group-overview {
    margin-left: -4px;
    margin-right: -4px;
    padding: 14px;
  }

  .large-group-overview .group-card {
    padding: 14px;
  }

  .large-group-overview .ranking-table {
    min-width: 0;
  }
}


/* Ergänzung Schritt 2.5 – aufklappbare Übersichtsbereiche */

.collapsible-section {
  overflow: hidden;
}

.collapsible-section-toggle {
  display: flex;
  width: 100%;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.collapsible-section-toggle:focus-visible {
  outline: 3px solid rgba(18, 58, 99, 0.28);
  outline-offset: 6px;
  border-radius: 10px;
}

.collapsible-heading-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.collapsible-title {
  color: var(--primary);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 900;
  line-height: 1.2;
}

.collapsible-heading-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  align-items: center;
}

.collapsible-chevron {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  background: var(--surface);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 180ms ease;
}

.collapsible-section.is-collapsed .collapsible-chevron {
  transform: rotate(-90deg);
}

.collapsible-section-content {
  margin-top: 22px;
}

.collapsible-section-content[hidden] {
  display: none !important;
}

.collapsible-subsection + .collapsible-subsection {
  margin-top: 26px;
}

.collapsible-subsection-separated {
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.compact-section-heading {
  margin-bottom: 14px;
}

.large-group-overview .large-overview-toggle,
.tournament-tree-section .tournament-tree-toggle {
  padding: 18px 20px;
  border-radius: 14px;
  background: #f4f8fc;
}

.large-group-overview.is-collapsed,
.tournament-tree-section.is-collapsed {
  padding-bottom: 0;
}

.large-group-overview.is-collapsed .large-overview-toggle,
.tournament-tree-section.is-collapsed .tournament-tree-toggle {
  margin-bottom: 0;
}

.large-group-overview .collapsible-section-content {
  margin-top: 20px;
}

.tournament-tree-section {
  margin: 28px 0 8px;
  padding: 0 0 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.tournament-tree-section .collapsible-section-content {
  margin-top: 4px;
  padding: 0 18px;
}

.tournament-tree-section .group-bracket-scroll {
  margin-top: 12px;
}

@media (max-width: 700px) {
  .collapsible-section-toggle {
    gap: 10px;
  }

  .collapsible-heading-actions {
    gap: 7px;
  }

  .collapsible-heading-actions .counter {
    display: none;
  }

  .collapsible-chevron {
    width: 32px;
    height: 32px;
  }

  .large-group-overview .large-overview-toggle,
  .tournament-tree-section .tournament-tree-toggle {
    padding: 14px;
  }

  .tournament-tree-section .collapsible-section-content {
    padding: 0 8px;
  }
}


/* Ergänzung Schritt 2.6 – aufklappbarer Paarungsmodus */

.group-knockout-settings.collapsible-section {
  padding: 0;
}

.group-knockout-settings .pairing-mode-toggle {
  padding: 18px;
  border-radius: 14px;
  background: #f4f8fc;
}

.group-knockout-settings .collapsible-section-content {
  margin-top: 0;
  padding: 18px;
}

.group-knockout-settings.is-collapsed {
  padding-bottom: 0;
}

.pairing-mode-current {
  display: inline-flex;
  max-width: 220px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #c8d7e8;
  border-radius: 999px;
  color: var(--primary);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.pairing-mode-description {
  margin: 0 0 16px !important;
}

@media (max-width: 700px) {
  .group-knockout-settings .pairing-mode-toggle {
    padding: 14px;
  }

  .group-knockout-settings .collapsible-section-content {
    padding: 14px;
  }

  .pairing-mode-current {
    display: inline-flex !important;
    max-width: 135px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }
}


/* Ergänzung Schritt 2.7 – aufklappbare Turnierübersicht */

.tournament-overview-section {
  margin: 0 0 28px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.tournament-overview-toggle {
  padding: 18px 20px;
  border-radius: 14px;
  background: #f4f8fc;
}

.tournament-overview-section .collapsible-section-content {
  margin-top: 0;
  padding: 20px;
}

.tournament-overview-section .qualification-summary {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  margin-bottom: 18px;
}

.tournament-overview-current {
  display: inline-flex;
  max-width: 250px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #c8d7e8;
  border-radius: 999px;
  color: var(--primary);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.tournament-overview-section .group-pairing-rule,
.tournament-overview-section .wm-start-rule {
  margin-bottom: 0;
}

.tournament-overview-section .wm-start-rule + .group-pairing-rule {
  margin-top: 12px;
}

.first-round-summary-item {
  border-color: #b8d6c9;
  background: #f0fbf6;
}

.first-round-summary-item strong {
  font-size: 1.05rem;
  line-height: 1.25;
}

@media (max-width: 700px) {
  .tournament-overview-toggle {
    padding: 14px;
  }

  .tournament-overview-section .collapsible-section-content {
    padding: 14px;
  }

  .tournament-overview-current {
    display: inline-flex !important;
    max-width: 145px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }
}


/* Ergänzung Schritt 2.8 – Turnierübersicht oberhalb der Teams */

.tournament-overview-slot:empty {
  display: none;
}

.tournament-overview-slot .tournament-overview-section {
  margin-top: 0;
  margin-bottom: 24px;
}


/* Ergänzung Schritt 2.9 – feste gemeinsame Turnierdaten */

.tournament-details-extension:empty {
  display: none;
}

.tournament-details-extension:not(:empty) {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.combined-tournament-overview {
  display: grid;
  gap: 18px;
}

.combined-tournament-overview-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.combined-tournament-overview-heading h3 {
  margin: 3px 0 0;
  color: var(--primary);
  font-size: 1.25rem;
}

.combined-tournament-overview .qualification-summary {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  margin: 0;
}

.combined-tournament-overview .group-pairing-rule,
.combined-tournament-overview .wm-start-rule {
  margin-bottom: 0;
}

.combined-tournament-overview .wm-start-rule + .group-pairing-rule {
  margin-top: -6px;
}

/* Der bisherige separate, aufklappbare Übersichtsrahmen wird nicht mehr verwendet. */
.tournament-overview-slot .tournament-overview-section {
  margin: 0;
}

@media (max-width: 700px) {
  .combined-tournament-overview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .combined-tournament-overview-heading .tournament-overview-current {
    max-width: none;
  }
}


/* Ergänzung Schritt 2.10 – passende Bereiche für alle Volleyballsysteme */

.system-collapsible-section {
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.system-section-toggle {
  padding: 18px 20px;
  border-radius: 14px;
  background: #f4f8fc;
}

.system-collapsible-section .collapsible-section-content {
  margin-top: 0;
  padding: 20px;
}

.ranking-system-section .ranking-table-wrapper {
  margin: 0;
}

.fixture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 12px;
}

.fixture-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fafc;
}

.fixture-number {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.fixture-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.fixture-teams strong {
  min-width: 0;
  color: var(--primary);
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: keep-all;
}

.fixture-teams strong:last-child {
  text-align: right;
}

.fixture-teams span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.fixture-card small {
  color: var(--muted);
  font-weight: 700;
}

.fixture-empty {
  padding: 18px;
  border-radius: 12px;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}

.neutral-group-overview .ranking-table tbody tr:nth-child(1),
.neutral-group-overview .ranking-table tbody tr:nth-child(2) {
  background: transparent;
}

.neutral-group-overview .ranking-table tbody tr:nth-child(1) td:first-child,
.neutral-group-overview .ranking-table tbody tr:nth-child(2) td:first-child {
  color: inherit;
  font-weight: inherit;
}

.knockout-system-section .bracket-scroll,
.double-ko-system-section .bracket-scroll {
  margin: 0;
}

.grand-final-section {
  margin-bottom: 4px;
}

@media (max-width: 700px) {
  .system-section-toggle {
    padding: 14px;
  }

  .system-collapsible-section .collapsible-section-content {
    padding: 12px;
  }

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

  .fixture-teams {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: left;
  }

  .fixture-teams strong:last-child {
    text-align: left;
  }
}


/* Ergänzung Schritt 2.11 – paralleler Spielplan nach Spielfeldern */

.playing-field-schedule-section {
  border-color: #b8d6c9;
}

.playing-field-schedule-section .system-section-toggle {
  background: #f0fbf6;
}

.playing-field-settings {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 12px;
}

.playing-field-select-field {
  display: grid;
  gap: 7px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fafc;
  font-weight: 800;
}

.playing-field-select-field select {
  width: 100%;
}

.playing-field-statistics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.playing-field-statistics > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.playing-field-statistics span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playing-field-statistics strong {
  color: var(--primary);
  font-size: 1.3rem;
}

.playing-field-explanation {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-left: 4px solid #40916c;
  border-radius: 9px;
  color: #315c4a;
  background: #f0fbf6;
  line-height: 1.5;
}

.playing-field-block-list {
  display: grid;
  gap: 16px;
}

.playing-field-block {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #f8fafc;
}

.playing-field-block-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.playing-field-block-heading > div {
  display: grid;
  gap: 3px;
}

.playing-field-block-heading span,
.playing-field-block-heading small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playing-field-block-heading strong {
  color: var(--primary);
}

.playing-field-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(220px, 1fr)
  );
  gap: 10px;
  padding: 12px;
}

.playing-field-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #c8d7e8;
  border-radius: 12px;
  background: var(--surface);
}

.playing-field-card-topline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.playing-field-name {
  color: #067647;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playing-field-card-topline small,
.playing-field-meta {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.playing-field-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.playing-field-teams strong {
  min-width: 0;
  color: var(--primary);
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: keep-all;
}

.playing-field-teams strong:last-child {
  text-align: right;
}

.playing-field-teams span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.playing-field-free {
  align-content: center;
  min-height: 112px;
  border-style: dashed;
  color: var(--muted);
  background: #f1f4f7;
}

.playing-field-free strong {
  color: var(--muted);
  font-size: 1.05rem;
}

.playing-field-free small {
  line-height: 1.35;
}

@media (max-width: 800px) {
  .playing-field-settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .playing-field-statistics {
    grid-template-columns: 1fr;
  }

  .playing-field-grid {
    grid-template-columns: 1fr;
  }

  .playing-field-block-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .playing-field-teams {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .playing-field-teams strong:last-child {
    text-align: left;
  }
}


/* Ergänzung Schritt 2.13 – alle Turniere auf der Schiedsrichterseite */

.referee-tournament-catalogue {
  display: grid;
  gap: 24px;
}

.referee-overview-description {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.referee-sport-tournament-section {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.referee-football-section {
  border-top: 6px solid var(--accent);
}

.referee-volleyball-section {
  border-top: 6px solid #ef8c26;
}

.referee-sport-section-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.referee-sport-section-heading > div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.referee-sport-section-heading h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.25rem;
}

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

.referee-tournament-card .tournament-description {
  min-height: 0;
}

.referee-date-state {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.referee-date-upcoming {
  color: #067647;
  background: #d1fadf;
}

.referee-date-past {
  color: #475467;
  background: #eaecf0;
}

.referee-date-missing {
  color: #934f00;
  background: #fef0c7;
}

.referee-team-preview {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.referee-team-preview-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.referee-team-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.referee-team-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.referee-team-chip-more {
  color: #934f00;
  background: #fef0c7;
}

.referee-team-preview-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.referee-open-tournament {
  width: 100%;
  margin-top: auto;
}

.referee-sport-empty {
  padding: 26px 18px;
}

@media (max-width: 700px) {
  .referee-sport-tournament-section {
    padding: 16px;
  }

  .referee-sport-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .referee-sport-section-heading > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .referee-date-state {
    white-space: normal;
    text-align: right;
  }
}


/* Ergänzung Schritt 2.14 – Schiedsrichterseite nur als Turnierübersicht */

.referee-layout {
  padding-bottom: 24px;
}

.referee-tournament-catalogue {
  margin-bottom: 0;
}

.referee-tournament-card .referee-team-preview {
  margin-bottom: 0;
}


/* Ergänzung Schritt 2.15 – Schiedsrichter-Spielplanseite */

.referee-tournament-link {
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.referee-tournament-link:hover,
.referee-tournament-link:focus-visible {
  transform: translateY(-2px);
  border-color: #9bb7d3;
  box-shadow: 0 16px 32px rgba(18, 58, 99, 0.14);
  outline: none;
}

.referee-schedule-link {
  width: 100%;
  margin-top: auto;
}

.referee-schedule-page {
  display: grid;
  gap: 26px;
}

.referee-schedule-tournament-details {
  display: grid;
  gap: 20px;
}

.referee-status-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.referee-status-summary-item {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.referee-status-summary-item span {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.referee-status-summary-item strong {
  color: var(--primary);
  font-size: 1.65rem;
}

.referee-status-summary-item.status-running {
  color: #067647;
  background: #ecfdf3;
}

.referee-status-summary-item.status-upcoming {
  color: #184f86;
  background: #eff8ff;
}

.referee-status-summary-item.status-completed {
  color: #475467;
  background: #f2f4f7;
}

.referee-match-status-section {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.referee-running-section {
  border-top: 6px solid #12b76a;
}

.referee-upcoming-section {
  border-top: 6px solid #2e90fa;
}

.referee-completed-section {
  border-top: 6px solid #98a2b3;
}

.referee-match-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(285px, 1fr)
  );
  gap: 14px;
}

.referee-schedule-match-card {
  display: grid;
  gap: 15px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #f8fafc;
}

.referee-match-card-topline {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.referee-match-status,
.referee-match-field {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.referee-match-status.status-running {
  color: #067647;
  background: #d1fadf;
}

.referee-match-status.status-upcoming {
  color: #175cd3;
  background: #d1e9ff;
}

.referee-match-status.status-completed {
  color: #475467;
  background: #eaecf0;
}

.referee-match-field {
  color: var(--primary);
  background: var(--primary-light);
}

.referee-match-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.referee-match-context strong {
  color: var(--primary);
}

.referee-match-context span:not(:last-child)::after {
  margin-left: 10px;
  content: "·";
}

.referee-match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 56px;
}

.referee-match-teams strong {
  min-width: 0;
  color: var(--primary);
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.referee-match-teams strong:last-child {
  text-align: right;
}

.referee-match-versus {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.referee-match-result {
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--primary);
  font-size: 1.15rem;
  font-weight: 900;
  text-align: center;
}

.referee-status-empty {
  padding: 22px;
  border: 1px dashed #c8d7e8;
  border-radius: 13px;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 700px) {
  .referee-status-summary {
    grid-template-columns: 1fr;
  }

  .referee-match-status-section {
    padding: 16px;
  }

  .referee-match-grid {
    grid-template-columns: 1fr;
  }

  .referee-match-teams {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .referee-match-teams strong:last-child {
    text-align: left;
  }

  .referee-match-versus {
    display: none;
  }

  .referee-match-result {
    justify-self: start;
  }
}


/* Ergänzung Schritt 2.16 – Volleyball-Scoreboard */

.referee-scoreboard-openable {
  cursor: pointer;
  border-color: #b8d6c9;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.referee-scoreboard-openable:hover,
.referee-scoreboard-openable:focus-visible {
  transform: translateY(-2px);
  border-color: #12b76a;
  box-shadow: 0 14px 28px rgba(18, 58, 99, 0.14);
  outline: none;
}

.referee-match-scoreboard-link {
  width: 100%;
  margin-top: 2px;
}

.referee-scoreboard-unavailable {
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--muted);
  background: #f2f4f7;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.referee-match-status.status-paused,
.status-pill.status-paused {
  color: #934f00;
  background: #fef0c7;
}

.volleyball-scoreboard-page {
  display: grid;
  gap: 24px;
}

.volleyball-scoreboard-context {
  display: grid;
  gap: 20px;
}

.volleyball-live-scoreboard {
  border-top: 6px solid #ef8c26;
}

.volleyball-live-scoreboard .scoreboard {
  margin-top: 4px;
}

.scoreboard-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 11px;
  color: var(--muted);
  background: #f2f4f7;
  font-weight: 700;
  line-height: 1.45;
}

.scoreboard-message-success {
  color: #067647;
  background: #ecfdf3;
}

.scoreboard-message-warning {
  color: #934f00;
  background: #fffaeb;
}

.scoreboard-message-error {
  color: #b42318;
  background: #fef3f2;
}

.volleyball-live-scoreboard button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 700px) {
  .volleyball-live-scoreboard .scoreboard {
    gap: 14px;
  }

  .volleyball-live-scoreboard .scoreboard-actions {
    grid-template-columns: 1fr;
  }
}


/* Ergänzung Schritt 2.17 – Scoreboard im früheren Schiedsrichterstil */

.volleyball-scoreboard-content {
  display: grid;
  gap: 24px;
}

.volleyball-game-selection {
  display: grid;
  gap: 20px;
}

.volleyball-selection-form,
.volleyball-selection-field {
  display: grid;
  gap: 8px;
}

.volleyball-selection-field {
  color: var(--primary);
  font-weight: 900;
}

.volleyball-selection-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.volleyball-selection-field input,
.volleyball-readonly-control {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--primary);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
}

.volleyball-selection-field input[readonly] {
  cursor: default;
}

.volleyball-readonly-control {
  display: flex;
  align-items: center;
}

.volleyball-readonly-select {
  position: relative;
  padding-right: 44px;
}

.volleyball-readonly-select::after {
  position: absolute;
  right: 16px;
  color: var(--primary);
  content: "⌄";
  font-size: 1.05rem;
  font-weight: 900;
}

.volleyball-selection-message {
  margin: -3px 0 0;
  color: #067647;
  font-weight: 800;
}

.volleyball-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.volleyball-match-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2f4f7;
  font-size: 0.72rem;
  font-weight: 800;
}

.scoreboard-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.scoreboard-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.scoreboard-heading h2 {
  margin: 3px 0 0;
  color: var(--primary);
}

.volleyball-score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.volleyball-team-score-card {
  display: grid;
  min-width: 0;
  padding: 26px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--background);
  text-align: center;
}

.volleyball-team-side {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.volleyball-team-score-card h3 {
  min-height: 32px;
  margin: 10px 0 0;
  color: var(--primary);
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.volleyball-score-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.volleyball-score-controls.hidden {
  display: none;
}

.volleyball-score-controls .score-button {
  min-height: 62px;
}

.volleyball-game-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.button-danger-light {
  color: #b42318;
  background: #fef3f2;
}

.status-badge.status-upcoming {
  color: var(--primary);
  background: var(--primary-light);
}

.status-badge.status-running {
  color: #067647;
  background: #d1fadf;
}

.status-badge.status-paused {
  color: #934f00;
  background: #fef0c7;
}

.status-badge.status-completed {
  color: #475467;
  background: #eaecf0;
}

.volleyball-scoreboard-notice {
  padding: 18px 20px;
  border-left: 4px solid #ef8c26;
  border-radius: 13px;
  color: #69410d;
  background: #fff4e5;
  line-height: 1.5;
}

.volleyball-scoreboard-notice strong {
  margin-right: 4px;
}

.volleyball-live-scoreboard button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 760px) {
  .volleyball-selection-team-grid,
  .volleyball-game-control-grid {
    grid-template-columns: 1fr;
  }

  .volleyball-score-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .volleyball-score-grid .score-divider {
    display: none;
  }

  .scoreboard-heading {
    align-items: flex-start;
  }
}


/* Ergänzung Schritt 2.18 – gemeinsame Ergebnisse in Admin und Schiedsrichter */

.referee-progress-section {
  border-top: 6px solid #7f56d9;
}

.referee-progress-note {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-left: 4px solid #7f56d9;
  border-radius: 9px;
  color: #53389e;
  background: #f4f3ff;
  line-height: 1.45;
}

.referee-progress-group-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(310px, 1fr)
  );
  gap: 16px;
}

.referee-progress-group-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.referee-progress-group-card h3,
.referee-progress-subsection > h3 {
  margin: 0 0 14px;
  color: var(--primary);
}

.referee-progress-subsection + .referee-progress-subsection {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.referee-progress-phase {
  display: inline-flex;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.referee-progress-bracket-match {
  position: relative;
  padding-bottom: 34px;
}

.referee-progress-match-status {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 0.66rem;
  font-weight: 900;
  text-align: center;
}

.referee-progress-match-status.status-running,
.admin-match-status.status-running {
  color: #067647;
  background: #d1fadf;
}

.referee-progress-match-status.status-paused,
.admin-match-status.status-paused {
  color: #934f00;
  background: #fef0c7;
}

.referee-progress-match-status.status-completed,
.admin-match-status.status-completed {
  color: #475467;
  background: #eaecf0;
}

.referee-progress-match-status.status-upcoming,
.admin-match-status.status-upcoming {
  color: #175cd3;
  background: #d1e9ff;
}

.admin-result-match {
  position: relative;
  padding-bottom: 31px;
}

.admin-match-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 900;
}

.bracket-match > .admin-match-status {
  position: absolute;
  right: 9px;
  bottom: 8px;
  left: 9px;
}

.admin-schedule-match.status-running {
  border-color: #12b76a;
  background: #ecfdf3;
}

.admin-schedule-match.status-paused {
  border-color: #fdb022;
  background: #fffaeb;
}

.admin-schedule-match.status-completed {
  border-color: #98a2b3;
  background: #f2f4f7;
}

.admin-schedule-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.admin-schedule-meta > small:first-child:empty {
  display: none;
}

@media (max-width: 700px) {
  .referee-progress-group-grid {
    grid-template-columns: 1fr;
  }
}


/* Ergänzung Schritt 2.19 – einklappbare Ranglistenregeln */

.ranking-rules-section {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #c8d7e8;
  border-radius: 18px;
  background: #f8fafc;
}

.ranking-rules-toggle {
  padding: 18px 20px;
  border-radius: 14px;
  background: #eff8ff;
}

.ranking-rules-current {
  display: inline-flex;
  max-width: 290px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #b2ddff;
  border-radius: 999px;
  color: #175cd3;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.ranking-rules-section .collapsible-section-content {
  margin-top: 0;
  padding: 20px;
}

.ranking-rules-description {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.ranking-rules-grid {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(150px, 1fr)
  );
  gap: 14px;
}

.ranking-rule-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--primary);
  background: var(--surface);
  font-weight: 900;
}

.ranking-rule-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--primary);
  background: #f8fafc;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
}

.ranking-direct-comparison-card {
  display: flex;
  grid-column: 1 / -1;
  gap: 12px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid #b2ddff;
  border-radius: 13px;
  color: var(--primary);
  background: #eff8ff;
  cursor: pointer;
}

.ranking-direct-comparison-card input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.ranking-direct-comparison-card span {
  display: grid;
  gap: 4px;
}

.ranking-direct-comparison-card small {
  color: var(--muted);
  line-height: 1.4;
}

.ranking-rules-message {
  min-height: 22px;
  margin: 12px 0 0;
  font-weight: 800;
}

.ranking-rules-message.hint-success {
  color: #067647;
}

.ranking-rules-message.hint-error {
  color: #b42318;
}

.ranking-rules-order {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 4px solid #2e90fa;
  border-radius: 9px;
  color: #184f86;
  background: #eff8ff;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .ranking-rules-grid {
    grid-template-columns: 1fr;
  }

  .ranking-rules-toggle {
    padding: 14px;
  }

  .ranking-rules-current {
    max-width: 165px;
    font-size: 0.66rem;
  }

  .ranking-rules-section .collapsible-section-content {
    padding: 14px;
  }
}


/* Ergänzung Schritt 2.20 – Fußball-Scoreboard mit Countdown */

.football-timer-settings {
  display: grid;
  gap: 18px;
}

.football-timer-setting-grid {
  display: grid;
  grid-template-columns:
    minmax(130px, 1fr)
    minmax(130px, 1fr)
    minmax(190px, auto);
  gap: 14px;
  align-items: end;
}

.football-timer-setting-grid > .button {
  min-height: 76px;
}

.football-countdown {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 0 auto 24px;
  width: min(100%, 430px);
  padding: 18px 24px;
  border: 2px solid #b2ddff;
  border-radius: 18px;
  color: #184f86;
  background: #eff8ff;
  text-align: center;
}

.football-countdown-label {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.football-countdown strong {
  font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 10vw, 5.6rem);
  line-height: 1;
}

.football-countdown > span:last-child {
  font-weight: 900;
}

.football-countdown-expired {
  border-color: #f04438;
  color: #b42318;
  background: #fef3f2;
  animation: football-timer-pulse 1.2s ease-in-out infinite;
}

@keyframes football-timer-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 68, 56, 0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(240, 68, 56, 0.12);
  }
}

@media (max-width: 700px) {
  .football-timer-setting-grid {
    grid-template-columns: 1fr;
  }

  .football-timer-setting-grid > .button {
    min-height: 50px;
  }
}


/* Ergänzung Schritt 2.21 – Live-Fußballtimer in der Adminseite */

.admin-football-timer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #b2ddff;
  border-radius: 10px;
  color: #184f86;
  background: #eff8ff;
}

.admin-football-timer-label {
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-football-timer-value {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  line-height: 1;
}

.admin-football-timer.status-running {
  border-color: #6ce9a6;
  color: #067647;
  background: #ecfdf3;
}

.admin-football-timer.status-paused {
  border-color: #fec84b;
  color: #934f00;
  background: #fffaeb;
}

.admin-football-timer.status-completed {
  border-color: #d0d5dd;
  color: #475467;
  background: #f2f4f7;
}

.admin-football-timer-expired {
  border-color: #f97066 !important;
  color: #b42318 !important;
  background: #fef3f2 !important;
  animation: admin-football-timer-pulse 1.25s ease-in-out infinite;
}

.bracket-match .admin-football-timer {
  margin: 8px 0 0;
  padding: 7px 8px;
}

.bracket-match .admin-football-timer-label {
  font-size: 0.61rem;
}

.bracket-match .admin-football-timer-value {
  font-size: 0.92rem;
}

@keyframes admin-football-timer-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 68, 56, 0);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(240, 68, 56, 0.12);
  }
}

@media (max-width: 620px) {
  .admin-football-timer {
    align-items: flex-start;
  }
}


/* Ergänzung Schritt 2.22 – Halbzeiten und getrennte Nachspielzeiten */

.football-halftime-toggle {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #b2ddff;
  border-radius: 14px;
  color: var(--primary);
  background: #eff8ff;
  cursor: pointer;
}

.football-halftime-toggle input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  accent-color: var(--primary);
}

.football-halftime-toggle span {
  display: grid;
  gap: 4px;
}

.football-halftime-toggle small {
  color: var(--muted);
  line-height: 1.4;
}

.football-time-mode-panel {
  display: grid;
  gap: 14px;
}

.football-time-mode-panel > h3 {
  margin: 0;
  color: var(--primary);
}

.football-phase-settings-grid {
  display: grid;
  grid-template-columns: repeat(
    2,
    minmax(230px, 1fr)
  );
  gap: 14px;
}

.football-phase-time-card {
  min-width: 0;
  margin: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.football-phase-time-card legend {
  padding: 0 7px;
  color: var(--primary);
  font-weight: 900;
}

.football-time-input-pair {
  display: grid;
  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );
  gap: 10px;
}

.football-time-input-pair label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.football-time-input-pair input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--primary);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
}

.football-timer-apply {
  justify-self: start;
}

.football-countdown-halftime {
  border-color: #fec84b;
  color: #934f00;
  background: #fffaeb;
}

.status-badge.status-halftime {
  color: #934f00;
  background: #fef0c7;
}

@media (max-width: 760px) {
  .football-phase-settings-grid,
  .football-time-input-pair {
    grid-template-columns: 1fr;
  }

  .football-timer-apply {
    width: 100%;
  }
}


/* Ergänzung Schritt 2.23 – einklappbare Zeiten und Live-Nachspielzeit */

.football-timer-settings {
  overflow: hidden;
  padding: 0;
}

.football-timer-settings-toggle {
  display: flex;
  width: 100%;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 19px 21px;
  border: 0;
  color: var(--primary);
  background: #eff8ff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.football-timer-settings-heading {
  display: grid;
  gap: 3px;
}

.football-timer-settings-title {
  font-size: 1.25rem;
  font-weight: 900;
}

.football-timer-settings-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.football-timer-mode-summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #b2ddff;
  border-radius: 999px;
  color: #175cd3;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.football-timer-settings-chevron {
  display: inline-block;
  font-size: 1.25rem;
  transition: transform 180ms ease;
}

.football-timer-settings-collapsed
  .football-timer-settings-chevron {
  transform: rotate(-90deg);
}

.football-timer-settings-content {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.football-live-stoppage {
  display: grid;
  gap: 14px;
  width: min(100%, 720px);
  margin: 0 auto 24px;
  padding: 17px;
  border: 1px solid #fec84b;
  border-radius: 16px;
  color: #7a2e0e;
  background: #fffaeb;
}

.football-live-stoppage-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.football-live-stoppage-heading h3 {
  margin: 2px 0 0;
  color: #7a2e0e;
}

.football-live-stoppage-total {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #fedf89;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.football-live-stoppage > p {
  margin: 0;
  line-height: 1.45;
}

.football-live-stoppage-controls {
  display: grid;
  grid-template-columns:
    minmax(105px, 1fr)
    minmax(105px, 1fr)
    minmax(190px, auto);
  gap: 12px;
  align-items: end;
}

.football-live-stoppage-controls label {
  display: grid;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.football-live-stoppage-controls input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #fedf89;
  border-radius: 10px;
  color: var(--primary);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
}

.football-live-stoppage-controls .button {
  min-height: 48px;
}

@media (max-width: 700px) {
  .football-timer-settings-toggle,
  .football-live-stoppage-heading {
    align-items: flex-start;
  }

  .football-timer-settings-toggle {
    padding: 15px;
  }

  .football-timer-settings-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .football-timer-mode-summary {
    font-size: 0.68rem;
  }

  .football-timer-settings-content {
    padding: 15px;
  }

  .football-live-stoppage-controls {
    grid-template-columns: 1fr;
  }

  .football-live-stoppage-controls .button {
    width: 100%;
  }
}


/* =====================================================================
   Schritt 2.24 – vereinheitlichte, reduzierte Benutzeroberfläche
   ===================================================================== */

:root {
  --background: #f4f7fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-strong: #eef3f8;
  --primary: #173b63;
  --primary-hover: #0f2f52;
  --primary-light: #eaf1f8;
  --accent: #16845d;
  --accent-dark: #0d6848;
  --accent-light: #eaf8f1;
  --text: #172033;
  --muted: #667085;
  --border: #d8e1eb;
  --border-strong: #becbd9;
  --danger: #b42318;
  --danger-light: #fff1f0;
  --warning: #925300;
  --warning-light: #fff8e7;
  --info: #175cd3;
  --info-light: #eff8ff;
  --shadow: 0 5px 18px rgba(23, 59, 99, 0.07);
  --shadow-hover: 0 12px 28px rgba(23, 59, 99, 0.12);
  --radius: 16px;
  --radius-small: 11px;
  --content-width: 1180px;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body.app-page {
  color: var(--text);
  background:
    linear-gradient(180deg, #eef3f8 0, var(--background) 260px);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  color: white;
  background: var(--primary);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 0;
  padding: 24px max(20px, calc((100% - var(--content-width)) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(115deg, #173b63 0%, #245b87 100%);
  box-shadow: 0 5px 18px rgba(15, 47, 82, 0.14);
}

.site-header > div:first-child {
  max-width: 760px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.site-header .eyebrow {
  color: #d9e9f7;
  opacity: 1;
}

.subtitle {
  max-width: 720px;
  margin-top: 7px;
  color: #e9f2f9;
  font-size: 0.96rem;
  line-height: 1.5;
  opacity: 1;
}

.page {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.admin-layout,
.tournament-admin-layout,
.referee-layout,
.volleyball-scoreboard-page,
.volleyball-scoreboard-content {
  gap: 18px;
}

.panel,
.sport-selection,
.scoreboard-panel,
.referee-match-status-section {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 0;
}

.section-heading {
  align-items: flex-start;
  margin-bottom: 16px;
}

.section-heading h2,
.sport-selection h2,
.scoreboard-heading h2 {
  color: var(--primary);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.eyebrow {
  margin-bottom: 4px;
  color: #5f7185;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  opacity: 1;
}

.counter,
.sport-badge,
.status-badge,
.status-pill {
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}

.counter {
  min-height: 32px;
  padding: 6px 10px;
  border-color: #d4e0ec;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.76rem;
}

.button {
  min-height: 46px;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  box-shadow: none;
  font-size: 0.91rem;
  font-weight: 850;
  line-height: 1.2;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(23, 59, 99, 0.12);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:focus-visible,
.sport-button:focus-visible,
.admin-sport-tab:focus-visible,
.score-button:focus-visible,
.collapsible-section-toggle:focus-visible,
.football-timer-settings-toggle:focus-visible {
  outline: 3px solid rgba(46, 144, 250, 0.35);
  outline-offset: 2px;
}

.button-primary {
  color: white;
  background: var(--accent);
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.button-secondary {
  border-color: var(--border-strong);
  color: var(--primary);
  background: var(--surface);
}

.button-secondary:hover:not(:disabled) {
  border-color: #8da4ba;
  background: var(--surface-subtle);
}

.button-warning {
  border-color: #fedf89;
  color: #7a2e0e;
  background: #fff7db;
}

.button-dark {
  color: white;
  background: #344054;
}

.button-danger,
.button-danger-light {
  border-color: #fecdca;
  color: var(--danger);
  background: var(--danger-light);
}

.button:disabled,
.score-button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

form {
  gap: 16px;
}

label {
  gap: 7px;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select,
textarea,
.volleyball-readonly-control {
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  background: #fbfdff;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.025);
}

textarea {
  min-height: 108px;
}

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: #a9b9c9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2e90fa;
  box-shadow: 0 0 0 3px rgba(46, 144, 250, 0.16);
}

.form-message,
.ranking-rules-message {
  min-height: 0;
  font-size: 0.83rem;
}

.notice {
  padding: 15px 17px;
  border: 1px solid #fedf89;
  border-left: 4px solid #f79009;
  color: #7a2e0e;
  background: var(--warning-light);
  box-shadow: none;
}

.empty-state {
  padding: 34px 18px;
  border: 1px dashed #b9c7d6;
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface-subtle);
}

.empty-state p {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
}

.empty-icon {
  font-size: 2rem;
  filter: saturate(0.75);
}

/* Startseite und Turnierkarten */

.sport-selection {
  padding: 18px;
}

.sport-selection .compact-section-heading {
  margin-bottom: 12px;
}

.sport-buttons {
  gap: 9px;
}

.sport-button {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--primary);
  background: var(--surface-subtle);
  box-shadow: none;
  font-size: 0.89rem;
  transition: all 140ms ease;
}

.sport-button:hover {
  border-color: #a9b9c9;
  background: var(--surface-strong);
  transform: none;
}

.sport-button.active {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
  box-shadow: 0 5px 12px rgba(23, 59, 99, 0.18);
}

.sport-icon {
  margin-bottom: 4px;
  font-size: 1.55rem;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.tournament-card {
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.referee-tournament-link:hover,
.referee-tournament-link:focus-visible {
  border-color: #9db2c7;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  outline: none;
}

.card-accent {
  height: 5px;
}

.card-content {
  padding: 19px;
}

.tournament-card h3 {
  margin: 13px 0 6px;
  color: var(--primary);
  font-size: 1.23rem;
}

.tournament-description {
  min-height: 0;
  margin-bottom: 15px;
  font-size: 0.91rem;
  line-height: 1.5;
}

.meta-list {
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid #e7edf3;
  font-size: 0.86rem;
}

/* Sichtbare, verständliche Fußnavigation */

.site-footer {
  position: relative;
  display: flex;
  width: min(var(--content-width), calc(100% - 32px));
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: left;
}

.site-footer p {
  margin: 0;
}

.footer-actions,
.secret-links {
  position: static;
  display: flex;
  gap: 8px;
}

.footer-action,
.secret-link {
  display: inline-flex;
  width: auto;
  height: auto;
  gap: 7px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--primary);
  background: var(--surface);
  filter: none;
  font-weight: 800;
  text-decoration: none;
  opacity: 1;
}

.footer-action:hover,
.secret-link:hover,
.secret-link:focus-visible {
  border-color: #9db2c7;
  background: var(--surface-subtle);
  opacity: 1;
}

/* Adminübersicht */

.admin-sport-tabs {
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #eaf0f6;
  box-shadow: none;
}

.admin-sport-tab {
  min-height: 56px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.admin-sport-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.62);
}

.admin-sport-tab.active {
  border-color: #c7d4e1;
  color: var(--primary);
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(23, 59, 99, 0.08);
}

.admin-sport-tab.active strong {
  color: white;
  background: var(--primary);
}

.admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 17px;
  border-radius: 12px;
  background: var(--surface);
}

.admin-item-openable:hover,
.admin-item-openable:focus-visible {
  border-color: #9db2c7;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.admin-item h3 {
  color: var(--primary);
  font-size: 1.15rem;
}

.admin-item p {
  font-size: 0.86rem;
}

.admin-item-actions {
  align-items: center;
}

.admin-item-actions .button-danger {
  min-width: 90px;
}

/* Turnierverwaltung */

.tournament-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-box {
  min-width: 0;
  padding: 14px;
  border-radius: 11px;
  background: var(--surface-subtle);
}

.detail-box span {
  font-size: 0.67rem;
  letter-spacing: 0.07em;
}

.detail-box strong {
  color: var(--primary);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.collapsible-section {
  overflow: hidden;
}

.collapsible-section-toggle {
  min-height: 48px;
  padding: 2px;
  border-radius: 10px;
}

.collapsible-section-toggle:hover {
  background: var(--surface-subtle);
}

.collapsible-title {
  color: var(--primary);
  font-size: 1.35rem;
}

.collapsible-chevron {
  width: 32px;
  height: 32px;
  border-color: #cbd6e1;
  box-shadow: none;
}

.collapsible-section-content {
  margin-top: 18px;
}

.collapsible-subsection-separated {
  padding-top: 20px;
}

.team-form {
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  gap: 10px;
}

.team-list {
  gap: 8px;
}

.team-list-item {
  gap: 11px;
  padding: 12px;
  border-radius: 11px;
  background: var(--surface-subtle);
}

.team-list-number {
  width: 34px;
  height: 34px;
  background: var(--primary);
  font-size: 0.86rem;
}

.team-list-name strong {
  font-size: 0.98rem;
}

.tournament-system-panel > .section-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid #e7edf3;
}

.system-description,
.referee-overview-description {
  max-width: 850px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.55;
}

.knockout-settings,
.group-knockout-settings,
.wm-system-settings,
.playing-field-settings,
.ranking-rules-section,
.combined-tournament-overview,
.tournament-tree-section,
.large-group-overview {
  border-color: var(--border);
  border-radius: 13px;
  background: var(--surface-subtle);
  box-shadow: none;
}

.ranking-rules-section {
  margin-top: 18px;
}

.ranking-rules-toggle,
.pairing-mode-toggle,
.large-overview-toggle,
.tournament-tree-toggle,
.system-section-toggle {
  background: #f0f5fa;
}

.ranking-rule-field,
.pairing-mode-card,
.wm-rule-card,
.qualification-summary-item,
.playing-field-statistics > div,
.first-round-summary-item {
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.ranking-direct-comparison-card {
  border-radius: 10px;
  background: var(--info-light);
}

.ranking-rules-order {
  border-left-width: 3px;
  border-radius: 8px;
  font-size: 0.84rem;
}

/* Tabellen und Turnierbäume */

.ranking-table-wrapper {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: none;
}

.ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.ranking-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #475467;
  background: #edf3f8;
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.ranking-table th,
.ranking-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #e7edf3;
}

.ranking-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

.ranking-table tbody tr:hover {
  background: #f2f7fb;
}

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

.group-grid {
  gap: 12px;
}

.group-card,
.bracket-group-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
}

.bracket-scroll,
.group-bracket-scroll {
  padding-bottom: 8px;
  scrollbar-color: #b8c6d4 transparent;
  scrollbar-width: thin;
}

.bracket-round {
  min-width: 245px;
}

.bracket-round > h3 {
  color: #475467;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bracket-match {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: none;
}

.bracket-match-label {
  color: var(--muted);
  font-size: 0.68rem;
}

.bracket-team {
  min-height: 37px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

/* Spielfeldplan */

.playing-field-settings {
  padding: 15px;
}

.playing-field-statistics {
  gap: 8px;
}

.playing-field-block-list {
  gap: 14px;
}

.playing-field-block {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f7f9fc;
}

.playing-field-block-heading {
  margin-bottom: 11px;
}

.playing-field-grid {
  gap: 9px;
}

.playing-field-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid #9db2c7;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.playing-field-card.status-running {
  border-left-color: #12b76a;
  background: #f6fef9;
}

.playing-field-card.status-paused {
  border-left-color: #f79009;
  background: #fffcf5;
}

.playing-field-card.status-completed {
  border-left-color: #98a2b3;
  background: #f8fafc;
}

.playing-field-card-topline {
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1f5;
}

.playing-field-teams {
  margin-top: 9px;
}

.playing-field-teams strong {
  font-size: 0.94rem;
}

.admin-schedule-meta {
  margin-top: 9px;
}

/* Schiedsrichter-Auswahl und Spielplan */

.referee-sport-tournament-section {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.referee-sport-section-heading {
  padding-bottom: 13px;
  border-bottom: 1px solid #e7edf3;
}

.referee-date-state {
  border: 1px solid transparent;
}

.referee-match-status-section {
  gap: 14px;
  padding: 18px;
  border-top: 0;
  border-left: 5px solid #98a2b3;
}

.referee-running-section {
  border-left-color: #12b76a;
}

.referee-upcoming-section {
  border-left-color: #2e90fa;
}

.referee-completed-section {
  border-left-color: #98a2b3;
}

.referee-match-grid {
  gap: 10px;
}

.referee-schedule-match-card {
  gap: 12px;
  padding: 14px;
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(23, 59, 99, 0.045);
}

.referee-scoreboard-openable:hover,
.referee-scoreboard-openable:focus-visible {
  border-color: #5cc99a;
  box-shadow: 0 9px 20px rgba(23, 59, 99, 0.11);
  transform: translateY(-1px);
}

.referee-match-card-topline {
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1f5;
}

.referee-match-teams {
  min-height: 48px;
}

.referee-match-result {
  min-width: 68px;
  border-radius: 8px;
  font-size: 1.08rem;
}

.referee-match-scoreboard-link {
  min-height: 48px;
}

/* Scoreboard: klare Reihenfolge, große Trefferflächen */

.app-scoreboard .page {
  width: min(1040px, calc(100% - 32px));
}

.volleyball-game-selection {
  gap: 15px;
}

.volleyball-readonly-select::after {
  display: none;
}

.volleyball-readonly-select {
  padding-right: 16px;
}

.volleyball-selection-team-grid {
  gap: 10px;
}

.volleyball-match-meta span {
  border: 1px solid #e0e7ef;
  color: #475467;
  background: var(--surface-subtle);
}

.scoreboard-panel {
  padding: 22px;
  border-color: #cbd7e3;
  box-shadow: 0 10px 28px rgba(23, 59, 99, 0.095);
}

.volleyball-live-scoreboard {
  border-top: 0;
}

.scoreboard-heading {
  margin-bottom: 17px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e7edf3;
}

.volleyball-score-grid {
  gap: 16px;
}

.volleyball-team-score-card {
  padding: 21px 17px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff, #f4f7fb);
}

.volleyball-team-side {
  font-size: 0.69rem;
  letter-spacing: 0.055em;
}

.volleyball-team-score-card h3 {
  margin-top: 7px;
  font-size: 1.22rem;
}

.score-number {
  margin: 15px 0;
  color: var(--primary);
  font-size: clamp(4.5rem, 12vw, 7.25rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.score-divider {
  color: #98a2b3;
  font-size: 2.35rem;
}

.volleyball-score-controls {
  gap: 8px;
}

.volleyball-score-controls .score-button {
  min-height: 64px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 1.15rem;
  transition: transform 120ms ease, filter 120ms ease;
}

.volleyball-score-controls .score-button:active:not(:disabled) {
  transform: scale(0.98);
}

.score-plus {
  color: white;
  background: var(--accent);
}

.score-minus {
  border-color: #fecdca !important;
  color: var(--danger);
  background: var(--danger-light);
}

.volleyball-game-control-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid #e7edf3;
}

#scoreboard-start {
  grid-column: span 2;
}

#scoreboard-reset {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 180px;
  margin-top: 1px;
}

.football-countdown {
  width: min(100%, 390px);
  margin-bottom: 18px;
  padding: 14px 20px;
  border-width: 1px;
  border-radius: 13px;
  box-shadow: none;
}

.football-countdown strong {
  font-size: clamp(2.8rem, 9vw, 4.7rem);
  letter-spacing: -0.045em;
}

.football-timer-settings {
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.football-timer-settings-toggle {
  padding: 16px 18px;
  background: #f0f5fa;
}

.football-timer-settings-content {
  gap: 15px;
  padding: 17px;
}

.football-phase-settings-grid {
  gap: 10px;
}

.football-phase-time-card {
  padding: 13px;
  border-radius: 11px;
  background: var(--surface-subtle);
}

.football-live-stoppage {
  gap: 11px;
  margin-bottom: 18px;
  padding: 15px;
  border-radius: 12px;
  box-shadow: none;
}

.volleyball-scoreboard-notice {
  padding: 14px 16px;
  border: 1px solid #fedf89;
  border-left: 4px solid #f79009;
  font-size: 0.88rem;
}

/* Kompakte Bildschirmgrößen */

@media (max-width: 940px) {
  .tournament-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playing-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    gap: 16px;
    padding: 20px 16px;
  }

  .site-header .button,
  .header-actions .button {
    width: 100%;
  }

  .page {
    width: min(100% - 20px, var(--content-width));
    padding-top: 14px;
    padding-bottom: 36px;
  }

  .panel,
  .sport-selection,
  .scoreboard-panel,
  .referee-match-status-section {
    padding: 16px;
    border-radius: 13px;
  }

  .section-heading {
    gap: 10px;
  }

  .section-heading .counter {
    max-width: 42%;
    text-align: center;
  }

  .sport-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sport-button {
    min-height: 68px;
    padding: 9px 6px;
    font-size: 0.76rem;
  }

  .sport-icon {
    font-size: 1.35rem;
  }

  .admin-sport-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sport-tab {
    grid-template-columns: auto 1fr auto;
    padding: 9px 10px;
    font-size: 0.84rem;
  }

  .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-item-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
  }

  .tournament-detail-grid,
  .team-form,
  .playing-field-grid {
    grid-template-columns: 1fr;
  }

  .team-list-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .team-list-item .button {
    grid-column: 1 / -1;
  }

  .collapsible-heading-actions {
    gap: 7px;
  }

  .collapsible-title {
    font-size: 1.16rem;
  }

  .ranking-rules-current,
  .pairing-mode-current {
    display: none;
  }

  .referee-match-status-section {
    border-left-width: 4px;
  }

  .volleyball-score-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .score-divider {
    display: none;
  }

  .volleyball-team-score-card {
    padding: 16px 14px;
  }

  .score-number {
    margin: 10px 0 13px;
    font-size: clamp(4rem, 22vw, 6rem);
  }

  .volleyball-game-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #scoreboard-start,
  #scoreboard-reset {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  #scoreboard-reset {
    min-width: 0;
  }

  .football-timer-settings-toggle {
    padding: 14px;
  }

  .football-timer-mode-summary {
    font-size: 0.65rem;
  }

  .football-live-stoppage-heading {
    flex-direction: column;
  }

  .site-footer {
    width: min(100% - 20px, var(--content-width));
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 22px;
    text-align: center;
  }

  .footer-actions,
  .secret-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .footer-action,
  .secret-link {
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .site-header h1 {
    font-size: 1.65rem;
  }

  .sport-button {
    min-height: 62px;
    font-size: 0.69rem;
  }

  .admin-sport-tab span:first-child {
    display: none;
  }

  .admin-item-actions {
    grid-template-columns: 1fr;
  }

  .volleyball-score-controls .score-button {
    min-height: 58px;
  }

  .football-timer-settings-actions {
    align-items: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =====================================================================
   Schritt 2.25 – echte Smartphone-Bedienung
   ===================================================================== */

@media (max-width: 680px) {
  :root {
    --mobile-edge: 7px;
    --mobile-radius: 12px;
    --mobile-touch: 50px;
  }

  html {
    scroll-padding-top: 10px;
  }

  body {
    overflow-x: hidden;
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
  }

  .site-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
    padding:
      calc(13px + env(safe-area-inset-top))
      calc(12px + env(safe-area-inset-right))
      13px
      calc(12px + env(safe-area-inset-left));
  }

  .site-header > div {
    min-width: 0;
  }

  .site-header h1 {
    margin-top: 2px;
    font-size: clamp(1.36rem, 6vw, 1.72rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .site-header .subtitle {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .site-header > .button,
  .site-header .header-actions,
  .site-header .header-actions .button {
    width: 100%;
  }

  .site-header > .button,
  .site-header .header-actions .button {
    min-height: 46px;
    padding: 9px 13px;
  }

  .page,
  .app-scoreboard .page {
    width: calc(100% - (var(--mobile-edge) * 2));
    padding-top: 8px;
    padding-bottom: 30px;
  }

  .panel,
  .sport-selection,
  .scoreboard-panel,
  .referee-match-status-section,
  .referee-sport-tournament-section {
    padding: 12px;
    border-radius: var(--mobile-radius);
  }

  .panel + .panel,
  #tournament-content > section + section,
  .volleyball-scoreboard-content > section + section {
    margin-top: 9px;
  }

  .section-heading,
  .scoreboard-heading,
  .referee-sport-section-heading {
    gap: 8px;
    align-items: flex-start;
  }

  .section-heading h2,
  .scoreboard-heading h2 {
    font-size: 1.18rem;
    line-height: 1.15;
  }

  .eyebrow {
    font-size: 0.64rem;
  }

  .button,
  button,
  select,
  input:not([type="checkbox"]):not([type="radio"]) {
    min-height: var(--mobile-touch);
  }

  .button {
    padding: 11px 13px;
  }

  /* Start- und Adminübersicht */

  .sport-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sport-button {
    min-height: 76px;
    padding: 10px 7px;
  }

  .sport-buttons > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .admin-sport-tabs {
    position: sticky;
    z-index: 10;
    top: 6px;
    gap: 5px;
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(23, 59, 99, 0.12);
  }

  .admin-sport-tab {
    min-height: 48px;
    padding: 7px 8px;
  }

  .admin-item {
    gap: 12px;
    padding: 13px;
  }

  .admin-item-actions {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .admin-item-actions .button {
    width: 100%;
  }

  /* Turnierverwaltung */

  .tournament-admin-layout {
    gap: 9px;
  }

  .tournament-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .detail-box {
    padding: 10px;
    border-radius: 9px;
  }

  .detail-box span {
    font-size: 0.6rem;
  }

  .detail-box strong {
    margin-top: 4px;
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .collapsible-section-toggle,
  .ranking-rules-toggle,
  .pairing-mode-toggle,
  .large-overview-toggle,
  .tournament-tree-toggle,
  .system-section-toggle {
    min-height: 54px;
    padding: 8px 5px;
  }

  .collapsible-heading-copy {
    min-width: 0;
  }

  .collapsible-title {
    font-size: 1.08rem;
    overflow-wrap: anywhere;
  }

  .collapsible-chevron {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .collapsible-section-content {
    margin-top: 12px;
  }

  .collapsible-subsection-separated {
    margin-top: 15px;
    padding-top: 15px;
  }

  .team-form {
    gap: 8px;
  }

  .team-form .button {
    width: 100%;
  }

  .team-list-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px;
  }

  .team-list-item .button {
    grid-column: auto;
    min-width: 78px;
    min-height: 44px;
    padding: 8px 9px;
    font-size: 0.76rem;
  }

  .team-list-number {
    width: 32px;
    height: 32px;
  }

  .team-list-name span {
    display: none;
  }

  .team-list-name strong {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .knockout-settings,
  .group-knockout-settings,
  .wm-system-settings,
  .playing-field-settings,
  .ranking-rules-section,
  .combined-tournament-overview,
  .tournament-tree-section,
  .large-group-overview {
    border-radius: 10px;
  }

  .ranking-rules-grid,
  .football-phase-settings-grid,
  .football-time-input-pair,
  .playing-field-statistics,
  .qualification-summary,
  .first-round-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ranking-rule-field,
  .ranking-direct-comparison-card,
  .pairing-mode-card,
  .wm-rule-card {
    padding: 11px;
  }

  .ranking-rules-order {
    display: grid;
    gap: 2px;
  }

  /* Ranglisten werden auf dem Handy zu lesbaren Karten. */

  .ranking-table-wrapper {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .ranking-table,
  .ranking-table tbody,
  .ranking-table tr,
  .ranking-table td {
    display: block;
    width: 100%;
  }

  .ranking-table thead {
    display: none;
  }

  .ranking-table tbody {
    display: grid;
    gap: 8px;
  }

  .ranking-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface) !important;
    box-shadow: 0 2px 7px rgba(23, 59, 99, 0.05);
  }

  .ranking-table tbody td {
    display: flex;
    min-height: 37px;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 0;
    border-top: 1px solid #edf1f5;
    font-size: 0.8rem;
    text-align: right;
  }

  .ranking-table tbody td:nth-child(even) {
    border-left: 1px solid #edf1f5;
  }

  .ranking-table tbody td::before {
    content: attr(data-short-label);
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-align: left;
    text-transform: uppercase;
  }

  .ranking-table tbody td.ranking-position {
    position: absolute;
    z-index: 1;
    top: 9px;
    left: 9px;
    display: grid;
    width: 30px;
    height: 30px;
    min-height: 0;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: white;
    background: var(--primary);
  }

  .ranking-table tbody td.ranking-position::before {
    display: none;
  }

  .ranking-table tbody td.ranking-team {
    grid-column: 1 / -1;
    min-height: 48px;
    justify-content: flex-start;
    padding: 10px 10px 10px 49px;
    border-top: 0;
    border-left: 0;
    color: var(--primary);
    font-size: 0.94rem;
    font-weight: 900;
    text-align: left;
  }

  .ranking-table tbody td.ranking-team::before {
    display: none;
  }

  .ranking-table tbody td.ranking-points {
    color: var(--primary);
    background: #eff8ff;
    font-size: 0.92rem;
    font-weight: 900;
  }

  .wm-third-table tbody td:last-child {
    grid-column: 1 / -1;
  }

  /* Turnierbaum vertikal statt seitwärts scrollen. */

  .bracket-scroll,
  .group-bracket-scroll {
    overflow: visible;
    padding: 0;
  }

  .tournament-bracket,
  .group-bracket-board {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 0;
    gap: 12px;
    padding: 0;
  }

  .bracket-round,
  .group-bracket-column,
  .group-stage-board-column {
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex-basis: auto;
  }

  .bracket-round > h3,
  .group-bracket-column > h3 {
    position: static;
    margin-bottom: 8px;
    padding: 8px 10px;
    text-align: left;
  }

  .bracket-round-matches,
  .bracket-group-stack,
  .group-board-round-matches {
    gap: 8px;
  }

  .bracket-match,
  .bracket-group-card {
    width: 100%;
  }

  .bracket-group-card::after,
  .group-board-match-wrap::after {
    display: none;
  }

  .bracket-team span {
    white-space: normal;
  }

  /* Spielfeldplan */

  .playing-field-settings {
    padding: 11px;
  }

  .playing-field-block {
    padding: 10px;
  }

  .playing-field-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .playing-field-card {
    padding: 10px;
  }

  .playing-field-card-topline {
    padding-bottom: 6px;
  }

  .playing-field-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
  }

  .playing-field-teams strong {
    font-size: 0.84rem;
    overflow-wrap: anywhere;
  }

  /* Schiedsrichter-Spielplan */

  .referee-match-status-section {
    gap: 10px;
    padding: 11px;
    border-left-width: 4px;
  }

  .referee-match-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .referee-schedule-match-card {
    gap: 9px;
    padding: 11px;
  }

  .referee-match-card-topline {
    padding-bottom: 7px;
  }

  .referee-match-context {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .referee-match-context strong,
  .referee-match-context span {
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--surface-subtle);
    font-size: 0.66rem;
  }

  .referee-match-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
    align-items: center;
  }

  .referee-match-teams > strong {
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  .referee-match-teams > strong:last-child {
    text-align: right;
  }

  .referee-match-result {
    min-width: 58px;
    padding: 8px 7px;
  }

  .referee-match-scoreboard-link {
    width: 100%;
  }

  /* Scoreboard: alles Wichtige bleibt gleichzeitig erreichbar. */

  .app-scoreboard .page {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .volleyball-scoreboard-content {
    gap: 8px;
  }

  .app-scoreboard .volleyball-game-selection {
    padding: 10px 12px;
  }

  .app-scoreboard .volleyball-game-selection .section-heading {
    margin-bottom: 5px;
  }

  .app-scoreboard .volleyball-selection-team-grid,
  .app-scoreboard .volleyball-selection-message {
    display: none;
  }

  .app-scoreboard .volleyball-selection-tournament {
    font-size: 0.67rem;
  }

  .app-scoreboard .volleyball-readonly-control {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 0.78rem;
  }

  .app-scoreboard .volleyball-match-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .app-scoreboard .volleyball-match-meta span {
    min-width: 0;
    padding: 6px 7px;
    font-size: 0.65rem;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .scoreboard-panel {
    padding: 11px;
  }

  .scoreboard-heading {
    margin-bottom: 9px;
    padding-bottom: 8px;
  }

  .football-countdown {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .football-countdown strong {
    font-size: clamp(2.6rem, 15vw, 4.2rem);
  }

  .football-live-stoppage {
    margin-bottom: 10px;
    padding: 11px;
  }

  .football-live-stoppage-heading {
    display: grid;
    gap: 7px;
  }

  .football-live-stoppage-total {
    justify-self: start;
  }

  .football-live-stoppage-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .football-live-stoppage-controls .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .volleyball-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .volleyball-team-score-card {
    min-width: 0;
    padding: 11px 7px;
    border-radius: 11px;
  }

  .volleyball-team-side {
    font-size: 0.57rem;
  }

  .volleyball-team-score-card h3 {
    min-height: 2.5em;
    margin-top: 5px;
    font-size: 0.9rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .score-number {
    margin: 5px 0 8px;
    font-size: clamp(3rem, 20vw, 4.6rem);
  }

  .volleyball-score-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .volleyball-score-controls .score-button {
    min-width: 0;
    min-height: 58px;
    padding: 8px 4px;
    font-size: 1.05rem;
  }

  .volleyball-game-control-grid {
    position: sticky;
    z-index: 30;
    bottom: max(6px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 10px -4px -4px;
    padding: 8px;
    border: 1px solid rgba(157, 178, 199, 0.75);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(23, 59, 99, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .volleyball-game-control-grid .button {
    min-width: 0;
    min-height: 50px;
    padding: 9px 7px;
    font-size: 0.8rem;
  }

  #scoreboard-start {
    grid-column: 1 / -1;
  }

  #scoreboard-reset {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
  }

  .volleyball-scoreboard-notice {
    margin-top: 8px;
    padding: 10px 11px;
    font-size: 0.78rem;
  }

  .football-timer-settings-toggle {
    min-height: 54px;
    padding: 11px;
  }

  .football-timer-settings-title {
    font-size: 1rem;
  }

  .football-timer-settings-actions {
    gap: 5px;
  }

  .football-timer-mode-summary {
    padding: 5px 8px;
    font-size: 0.61rem;
  }

  .football-timer-settings-content {
    padding: 11px;
  }

  .football-phase-time-card {
    padding: 10px;
  }

  .football-time-input-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Footer: zwei klare, große Ziele statt kleiner Textlinks. */

  .site-footer {
    width: calc(100% - 14px);
    gap: 10px;
    padding: 14px 0 calc(16px + env(safe-area-inset-bottom));
  }

  .site-footer p {
    font-size: 0.7rem;
  }

  .footer-actions,
  .secret-links {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .footer-action,
  .secret-link {
    min-height: 46px;
  }
}

@media (max-width: 380px) {
  .tournament-detail-grid {
    grid-template-columns: 1fr;
  }

  .sport-buttons {
    grid-template-columns: 1fr;
  }

  .sport-buttons > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .team-list-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .team-list-item .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .volleyball-team-side {
    font-size: 0.52rem;
  }

  .volleyball-team-score-card h3 {
    font-size: 0.82rem;
  }

  .score-number {
    font-size: clamp(2.7rem, 19vw, 3.8rem);
  }

  .ranking-table tbody tr {
    grid-template-columns: 1fr;
  }

  .ranking-table tbody td:nth-child(even) {
    border-left: 0;
  }
}


/* =====================================================================
   Schritt 2.26 – Smartphone-Querformat
   ===================================================================== */

@media
  (orientation: landscape)
  and (max-height: 560px)
  and (max-width: 1024px)
  and (hover: none)
  and (pointer: coarse) {

  :root {
    --landscape-touch: 42px;
  }

  html {
    scroll-padding-top: 6px;
  }

  body {
    font-size: 0.88rem;
  }

  /* Flache Kopfzeile: mehr nutzbare Höhe. */

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
    align-items: center;
    width: 100%;
    min-height: 0;
    padding:
      7px
      max(10px, env(safe-area-inset-right))
      7px
      max(10px, env(safe-area-inset-left));
    border-radius: 0;
  }

  .site-header > div {
    min-width: 0;
  }

  .site-header .eyebrow {
    display: none;
  }

  .site-header h1 {
    margin: 0;
    font-size: clamp(1.05rem, 3.4vw, 1.45rem);
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header .subtitle {
    max-width: none;
    margin: 3px 0 0;
    font-size: 0.68rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header .button {
    width: auto;
    min-height: var(--landscape-touch);
    padding: 7px 11px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .page {
    width: 100%;
    padding:
      7px
      max(8px, env(safe-area-inset-right))
      10px
      max(8px, env(safe-area-inset-left));
  }

  .panel,
  .scoreboard-panel,
  .referee-match-status-section {
    border-radius: 10px;
  }

  .section-heading,
  .scoreboard-heading {
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 7px;
  }

  .section-heading h2,
  .scoreboard-heading h2 {
    font-size: 1.02rem;
  }

  .button,
  button,
  input,
  select {
    min-height: var(--landscape-touch);
  }

  /* Übersichten: zusätzliche Breite sinnvoll nutzen. */

  .sport-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .sport-button {
    min-height: 48px;
    padding: 7px 9px;
  }

  .admin-sport-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-item-grid,
  .referee-tournament-grid,
  .team-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-item-card,
  .referee-tournament-card,
  .team-list-item {
    min-width: 0;
  }

  .tournament-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .tournament-detail-item {
    min-height: 0;
    padding: 8px;
  }

  .tournament-detail-item span {
    font-size: 0.57rem;
  }

  .tournament-detail-item strong {
    font-size: 0.78rem;
  }

  .ranking-rules-grid,
  .playing-field-statistics,
  .qualification-summary,
  .first-round-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-direct-comparison-card {
    grid-column: 1 / -1;
  }

  /* Ranglisten: kompakte Tabellen statt langer Kartenlisten. */

  .ranking-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    -webkit-overflow-scrolling: touch;
  }

  .ranking-table {
    display: table;
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
  }

  .ranking-table thead {
    display: table-header-group;
  }

  .ranking-table tbody {
    display: table-row-group;
  }

  .ranking-table tr,
  .ranking-table tbody tr {
    position: static;
    display: table-row;
    width: auto;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
  }

  .ranking-table th,
  .ranking-table td,
  .ranking-table tbody td {
    position: static;
    display: table-cell;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 6px 7px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    font-size: 0.69rem;
    line-height: 1.2;
    text-align: center;
  }

  .ranking-table th {
    font-size: 0.62rem;
    white-space: nowrap;
  }

  .ranking-table tbody td::before {
    display: none;
    content: none;
  }

  .ranking-table tbody td:nth-child(even) {
    border-left: 0;
  }

  .ranking-table tbody td.ranking-position {
    position: static;
    display: table-cell;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 6px 7px;
    border-radius: 0;
    color: var(--primary);
    background: transparent;
  }

  .ranking-table tbody td.ranking-team {
    display: table-cell;
    min-height: 0;
    padding: 6px 8px;
    text-align: left;
    white-space: nowrap;
  }

  .ranking-table tbody td.ranking-points {
    color: var(--primary);
    background: #eff8ff;
  }

  /* Spielkarten: zwei Spalten. */

  .playing-field-grid,
  .referee-match-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .playing-field-block,
  .referee-match-status-section {
    padding: 9px;
  }

  .playing-field-card,
  .referee-schedule-match-card {
    padding: 9px;
  }

  .playing-field-teams,
  .referee-match-teams {
    gap: 5px;
  }

  .playing-field-teams strong,
  .referee-match-teams > strong {
    font-size: 0.78rem;
  }

  .referee-match-scoreboard-link {
    min-height: var(--landscape-touch);
  }

  /* Turnierbäume wieder horizontal über mehrere Runden. */

  .bracket-scroll,
  .group-bracket-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 5px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .tournament-bracket,
  .group-bracket-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 28vw);
    width: max-content;
    min-width: 100%;
    min-height: 0;
    gap: 8px;
    padding: 0;
  }

  .bracket-round,
  .group-bracket-column,
  .group-stage-board-column {
    width: auto;
    min-width: 0;
    min-height: 0;
    scroll-snap-align: start;
  }

  .bracket-round > h3,
  .group-bracket-column > h3 {
    position: sticky;
    top: 0;
    z-index: 2;
    margin-bottom: 6px;
    padding: 6px 8px;
    font-size: 0.72rem;
    text-align: center;
  }

  .bracket-round-matches,
  .bracket-group-stack,
  .group-board-round-matches {
    gap: 6px;
  }

  .bracket-match,
  .bracket-group-card {
    padding: 8px;
  }

  .bracket-team {
    min-height: 31px;
    padding: 5px 7px;
    font-size: 0.7rem;
  }

  .bracket-team span {
    white-space: normal;
  }

  /* Scoreboard: Breite statt Höhe nutzen. */

  .app-scoreboard {
    overflow-x: hidden;
  }

  .app-scoreboard .site-header .subtitle {
    display: none;
  }

  .app-scoreboard .page {
    padding-top: 5px;
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }

  .app-scoreboard .volleyball-game-selection {
    display: none;
  }

  .app-scoreboard .volleyball-scoreboard-content {
    gap: 6px;
  }

  .app-scoreboard .football-timer-settings {
    order: 4;
  }

  .app-scoreboard .football-timer-settings-toggle {
    min-height: 42px;
    padding: 7px 10px;
  }

  .app-scoreboard .football-timer-settings-title {
    font-size: 0.84rem;
  }

  .app-scoreboard .football-timer-mode-summary {
    padding: 4px 7px;
    font-size: 0.58rem;
  }

  .app-scoreboard .football-timer-settings-content {
    max-height: calc(100vh - 105px);
    overflow-y: auto;
    padding: 9px;
  }

  .app-scoreboard .football-phase-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .app-scoreboard .football-phase-time-card {
    padding: 8px;
  }

  .app-scoreboard .football-time-input-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .app-scoreboard .football-time-input-pair input {
    min-height: 38px;
  }

  .app-scoreboard .scoreboard-panel {
    min-height: 0;
    padding: 8px;
  }

  .app-scoreboard .scoreboard-heading {
    grid-area: heading;
    margin: 0;
  }

  .app-scoreboard .scoreboard-heading .eyebrow {
    display: none;
  }

  .app-scoreboard .scoreboard-heading h2 {
    font-size: 0.9rem;
  }

  .app-scoreboard .status-badge {
    min-height: 27px;
    padding: 4px 8px;
    font-size: 0.6rem;
  }

  /* Fußball: Timer links, Spielstand mittig, Steuerung rechts. */

  .app-scoreboard.scoreboard-football
    .volleyball-live-scoreboard {
    display: grid;
    grid-template-columns:
      minmax(145px, 0.7fr)
      minmax(300px, 1.65fr)
      minmax(150px, 0.7fr);
    grid-template-areas:
      "heading heading heading"
      "timer score controls"
      "stoppage score controls";
    gap: 7px;
    align-items: stretch;
  }

  .scoreboard-football .football-countdown {
    grid-area: timer;
    width: 100%;
    height: 100%;
    min-height: 112px;
    margin: 0;
    align-content: center;
    padding: 9px;
  }

  .scoreboard-football .football-countdown-label {
    font-size: 0.56rem;
  }

  .scoreboard-football .football-countdown strong {
    font-size: clamp(2rem, 7vw, 3.4rem);
  }

  .scoreboard-football .football-countdown > span:last-child {
    font-size: 0.68rem;
  }

  .scoreboard-football .football-live-stoppage {
    grid-area: stoppage;
    width: 100%;
    max-height: 145px;
    margin: 0;
    overflow-y: auto;
    padding: 8px;
    gap: 6px;
  }

  .scoreboard-football .football-live-stoppage-heading {
    display: flex;
    gap: 6px;
  }

  .scoreboard-football
    .football-live-stoppage-heading
    .eyebrow {
    display: none;
  }

  .scoreboard-football
    .football-live-stoppage-heading
    h3 {
    margin: 0;
    font-size: 0.76rem;
  }

  .scoreboard-football .football-live-stoppage-total {
    min-height: 25px;
    padding: 3px 6px;
    font-size: 0.56rem;
  }

  .scoreboard-football .football-live-stoppage > p {
    display: none;
  }

  .scoreboard-football .football-live-stoppage-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .scoreboard-football
    .football-live-stoppage-controls
    label {
    gap: 3px;
    font-size: 0.55rem;
  }

  .scoreboard-football
    .football-live-stoppage-controls
    input {
    min-height: 36px;
    padding: 0 7px;
  }

  .scoreboard-football
    .football-live-stoppage-controls
    .button {
    grid-column: 1 / -1;
    min-height: 36px;
    padding: 5px;
    font-size: 0.65rem;
  }

  .scoreboard-football .volleyball-score-grid {
    grid-area: score;
  }

  .scoreboard-football .volleyball-game-control-grid {
    grid-area: controls;
  }

  /* Volleyball: Hauptbereich plus kompakte Steuerung rechts. */

  .app-scoreboard.scoreboard-volleyball
    .volleyball-live-scoreboard {
    display: grid;
    grid-template-columns:
      minmax(360px, 1fr)
      minmax(165px, 0.42fr);
    grid-template-areas:
      "heading heading"
      "score controls";
    gap: 8px;
    align-items: stretch;
  }

  .scoreboard-volleyball .volleyball-score-grid {
    grid-area: score;
  }

  .scoreboard-volleyball .volleyball-game-control-grid {
    grid-area: controls;
  }

  .app-scoreboard .volleyball-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    margin: 0;
  }

  .app-scoreboard .volleyball-team-score-card {
    min-width: 0;
    min-height: 0;
    padding: 8px 7px;
  }

  .app-scoreboard .volleyball-team-side {
    font-size: 0.52rem;
  }

  .app-scoreboard .volleyball-team-score-card h3 {
    min-height: 1.3em;
    margin: 3px 0;
    font-size: clamp(0.7rem, 2vw, 0.92rem);
    line-height: 1.1;
  }

  .app-scoreboard .score-number {
    margin: 2px 0 5px;
    font-size: clamp(2.6rem, 10vh, 4.4rem);
    line-height: 0.95;
  }

  .app-scoreboard .volleyball-score-controls {
    gap: 4px;
  }

  .app-scoreboard
    .volleyball-score-controls
    .score-button {
    min-height: 44px;
    padding: 5px;
    font-size: 0.92rem;
  }

  .app-scoreboard .volleyball-game-control-grid {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 5px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .app-scoreboard
    .volleyball-game-control-grid
    .button {
    grid-column: auto;
    width: 100%;
    min-height: 42px;
    padding: 6px 7px;
    font-size: 0.7rem;
  }

  .app-scoreboard #scoreboard-start,
  .app-scoreboard #scoreboard-reset {
    grid-column: auto;
  }

  .app-scoreboard .volleyball-scoreboard-notice {
    margin: 0;
    padding: 7px 9px;
    font-size: 0.68rem;
  }

  .app-scoreboard .site-footer {
    display: none;
  }

  .site-footer {
    width: 100%;
    padding:
      8px
      max(10px, env(safe-area-inset-right))
      max(9px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .site-footer p {
    display: none;
  }

  .footer-actions,
  .secret-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Sehr niedrige Querformatbildschirme, z. B. 667 × 375. */

@media
  (orientation: landscape)
  and (max-height: 410px)
  and (max-width: 850px)
  and (hover: none)
  and (pointer: coarse) {

  .site-header {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .site-header .subtitle {
    display: none;
  }

  .page {
    padding-top: 5px;
    padding-bottom: 6px;
  }

  .app-scoreboard .scoreboard-heading {
    display: none;
  }

  .app-scoreboard.scoreboard-football
    .volleyball-live-scoreboard {
    grid-template-areas:
      "timer score controls"
      "stoppage score controls";
  }

  .app-scoreboard.scoreboard-volleyball
    .volleyball-live-scoreboard {
    grid-template-areas:
      "score controls";
  }

  .scoreboard-football .football-countdown {
    min-height: 94px;
  }

  .app-scoreboard .score-number {
    font-size: clamp(2.3rem, 13vh, 3.7rem);
  }

  .app-scoreboard
    .volleyball-score-controls
    .score-button {
    min-height: 40px;
  }

  .app-scoreboard
    .volleyball-game-control-grid
    .button {
    min-height: 38px;
  }

  .app-scoreboard .volleyball-scoreboard-notice {
    display: none;
  }
}


/* =====================================================================
   Schritt 2.27 – reduziertes Scoreboard-Vollbild
   ===================================================================== */

.scoreboard-heading-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.scoreboard-fullscreen-toggle {
  display: inline-flex;
  width: auto;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  white-space: nowrap;
}

.scoreboard-fullscreen-toggle > span:first-child {
  font-size: 1.05rem;
  line-height: 1;
}

/* Gemeinsame native und simulierte Vollbildfläche. */

.volleyball-live-scoreboard:fullscreen,
.volleyball-live-scoreboard:-webkit-full-screen,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
}

.scoreboard-pseudo-fullscreen {
  overflow: hidden;
}

.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

/* Im Vollbild werden ausschließlich Zeit, Teams, Spielstand,
   Plus/Minus und laufende Spielaktionen gezeigt. */

.volleyball-live-scoreboard:fullscreen
  .scoreboard-heading,
.volleyball-live-scoreboard:-webkit-full-screen
  .scoreboard-heading,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .scoreboard-heading {
  position: static;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.volleyball-live-scoreboard:fullscreen
  .scoreboard-heading > div:first-child,
.volleyball-live-scoreboard:fullscreen
  #scoreboard-status-text,
.volleyball-live-scoreboard:-webkit-full-screen
  .scoreboard-heading > div:first-child,
.volleyball-live-scoreboard:-webkit-full-screen
  #scoreboard-status-text,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .scoreboard-heading > div:first-child,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  #scoreboard-status-text {
  display: none;
}

.volleyball-live-scoreboard:fullscreen
  .scoreboard-heading-actions,
.volleyball-live-scoreboard:-webkit-full-screen
  .scoreboard-heading-actions,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .scoreboard-heading-actions {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 3;
}

.volleyball-live-scoreboard:fullscreen
  .scoreboard-fullscreen-toggle,
.volleyball-live-scoreboard:-webkit-full-screen
  .scoreboard-fullscreen-toggle,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .scoreboard-fullscreen-toggle {
  min-height: 42px;
  padding: 8px 12px;
  border-color: #d0d5dd;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12);
}

.volleyball-live-scoreboard:fullscreen
  .football-live-stoppage,
.volleyball-live-scoreboard:fullscreen
  #scoreboard-reset,
.volleyball-live-scoreboard:-webkit-full-screen
  .football-live-stoppage,
.volleyball-live-scoreboard:-webkit-full-screen
  #scoreboard-reset,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .football-live-stoppage,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  #scoreboard-reset {
  display: none !important;
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-team-side,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-team-side,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-team-side {
  display: none;
}

/* Hochformat-Vollbild: Zeit oben, Spielstand groß, Aktionen unten. */

.volleyball-live-scoreboard:fullscreen,
.volleyball-live-scoreboard:-webkit-full-screen,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "heading"
    "timer"
    "score"
    "controls";
  grid-template-rows:
    auto
    auto
    minmax(0, 1fr)
    auto;
  gap: clamp(10px, 2vh, 22px);
  align-items: stretch;
}

.volleyball-live-scoreboard:fullscreen
  .scoreboard-heading,
.volleyball-live-scoreboard:-webkit-full-screen
  .scoreboard-heading,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .scoreboard-heading {
  grid-area: heading;
  min-height: 42px;
}

.volleyball-live-scoreboard:fullscreen
  .football-countdown,
.volleyball-live-scoreboard:-webkit-full-screen
  .football-countdown,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .football-countdown {
  grid-area: timer;
  width: min(100%, 520px);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(12px, 2vh, 24px);
}

.volleyball-live-scoreboard:fullscreen
  .football-countdown strong,
.volleyball-live-scoreboard:-webkit-full-screen
  .football-countdown strong,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .football-countdown strong {
  font-size: clamp(3.2rem, 12vh, 7.5rem);
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-score-grid,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-score-grid,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-score-grid {
  grid-area: score;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);
  gap: clamp(8px, 2vw, 24px);
  min-height: 0;
  margin: 0;
  align-items: stretch;
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-team-score-card,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-team-score-card,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-team-score-card {
  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto;
  align-items: center;
  min-height: 0;
  padding: clamp(12px, 2vw, 28px);
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-team-score-card h3,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-team-score-card h3,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-team-score-card h3 {
  margin: 0;
  font-size: clamp(1rem, 4vw, 2.4rem);
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

.volleyball-live-scoreboard:fullscreen
  .score-number,
.volleyball-live-scoreboard:-webkit-full-screen
  .score-number,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-number {
  align-self: center;
  margin: 0;
  font-size: clamp(5rem, 24vh, 15rem);
  line-height: 0.9;
}

.volleyball-live-scoreboard:fullscreen
  .score-divider,
.volleyball-live-scoreboard:-webkit-full-screen
  .score-divider,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-divider {
  align-self: center;
  font-size: clamp(2.4rem, 10vh, 6rem);
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-score-controls,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-score-controls,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-score-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 18px);
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-score-controls.hidden,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-score-controls.hidden,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-score-controls.hidden {
  display: none;
}

.volleyball-live-scoreboard:fullscreen
  .score-button,
.volleyball-live-scoreboard:-webkit-full-screen
  .score-button,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-button {
  min-height: clamp(58px, 11vh, 100px);
  font-size: clamp(1.15rem, 4vh, 2.25rem);
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-game-control-grid,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-game-control-grid,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-game-control-grid {
  grid-area: controls;
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 16px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.volleyball-live-scoreboard:fullscreen
  .volleyball-game-control-grid .button,
.volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-game-control-grid .button,
.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-game-control-grid .button {
  grid-column: auto;
  width: 100%;
  min-height: clamp(52px, 8vh, 78px);
  padding: 10px;
  font-size: clamp(0.85rem, 2.2vh, 1.3rem);
}

/* Fußball benötigt im Hochformat den Timer; bei Volleyball wird die
   leere Timerzeile vollständig entfernt. */

.scoreboard-volleyball
  .volleyball-live-scoreboard:fullscreen,
.scoreboard-volleyball
  .volleyball-live-scoreboard:-webkit-full-screen,
.scoreboard-pseudo-fullscreen.scoreboard-volleyball
  .volleyball-live-scoreboard {
  grid-template-areas:
    "heading"
    "score"
    "controls";
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto;
}

/* Querformat-Vollbild: Zeit links, Spielstand mittig, Aktionen rechts. */

@media (orientation: landscape) {
  .scoreboard-football
    .volleyball-live-scoreboard:fullscreen,
  .scoreboard-football
    .volleyball-live-scoreboard:-webkit-full-screen,
  .scoreboard-pseudo-fullscreen.scoreboard-football
    .volleyball-live-scoreboard {
    grid-template-columns:
      minmax(170px, 0.68fr)
      minmax(360px, 1.75fr)
      minmax(150px, 0.62fr);
    grid-template-areas:
      "timer score controls";
    grid-template-rows: minmax(0, 1fr);
    gap: clamp(10px, 1.5vw, 24px);
  }

  .scoreboard-volleyball
    .volleyball-live-scoreboard:fullscreen,
  .scoreboard-volleyball
    .volleyball-live-scoreboard:-webkit-full-screen,
  .scoreboard-pseudo-fullscreen.scoreboard-volleyball
    .volleyball-live-scoreboard {
    grid-template-columns:
      minmax(420px, 1fr)
      minmax(150px, 0.36fr);
    grid-template-areas:
      "score controls";
    grid-template-rows: minmax(0, 1fr);
    gap: clamp(10px, 1.5vw, 22px);
  }

  .volleyball-live-scoreboard:fullscreen
    .scoreboard-heading,
  .volleyball-live-scoreboard:-webkit-full-screen
    .scoreboard-heading,
  .scoreboard-pseudo-fullscreen
    .volleyball-live-scoreboard
    .scoreboard-heading {
    position: absolute;
    min-height: 0;
  }

  .volleyball-live-scoreboard:fullscreen
    .football-countdown,
  .volleyball-live-scoreboard:-webkit-full-screen
    .football-countdown,
  .scoreboard-pseudo-fullscreen
    .volleyball-live-scoreboard
    .football-countdown {
    width: 100%;
    height: 100%;
    min-height: 0;
    align-content: center;
  }

  .volleyball-live-scoreboard:fullscreen
    .football-countdown strong,
  .volleyball-live-scoreboard:-webkit-full-screen
    .football-countdown strong,
  .scoreboard-pseudo-fullscreen
    .volleyball-live-scoreboard
    .football-countdown strong {
    font-size: clamp(3rem, 14vh, 7rem);
  }

  .volleyball-live-scoreboard:fullscreen
    .score-number,
  .volleyball-live-scoreboard:-webkit-full-screen
    .score-number,
  .scoreboard-pseudo-fullscreen
    .volleyball-live-scoreboard
    .score-number {
    font-size: clamp(4rem, 28vh, 12rem);
  }

  .volleyball-live-scoreboard:fullscreen
    .volleyball-game-control-grid,
  .volleyball-live-scoreboard:-webkit-full-screen
    .volleyball-game-control-grid,
  .scoreboard-pseudo-fullscreen
    .volleyball-live-scoreboard
    .volleyball-game-control-grid {
    grid-template-columns: 1fr;
    align-content: center;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .scoreboard-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .scoreboard-fullscreen-toggle {
    flex: 1;
  }

  .volleyball-live-scoreboard:fullscreen,
  .volleyball-live-scoreboard:-webkit-full-screen,
  .scoreboard-pseudo-fullscreen
    .volleyball-live-scoreboard {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .volleyball-live-scoreboard:fullscreen
    .scoreboard-fullscreen-toggle,
  .volleyball-live-scoreboard:-webkit-full-screen
    .scoreboard-fullscreen-toggle,
  .scoreboard-pseudo-fullscreen
    .volleyball-live-scoreboard
    .scoreboard-fullscreen-toggle {
    min-height: 38px;
    padding: 6px 9px;
    font-size: 0.7rem;
  }
}


/* =====================================================================
   Schritt 2.28 – durchgängige Smartphone-Anpassung
   Hochformat und Querformat werden zusätzlich per mobile-layout.js
   erkannt. Die Media Queries bleiben als Rückfallebene bestehen.
   ===================================================================== */

body.is-phone {
  min-height: var(--app-viewport-height, 100dvh);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.is-phone *,
body.is-phone *::before,
body.is-phone *::after {
  box-sizing: border-box;
}

body.is-phone button,
body.is-phone .button,
body.is-phone a,
body.is-phone label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.is-phone
  input:not([type="checkbox"]):not([type="radio"]),
body.is-phone select,
body.is-phone textarea {
  max-width: 100%;
  font-size: 16px;
}

body.is-phone img,
body.is-phone svg,
body.is-phone canvas {
  max-width: 100%;
}

body.is-phone h1,
body.is-phone h2,
body.is-phone h3,
body.is-phone strong,
body.is-phone .collapsible-title,
body.is-phone .playing-field-teams,
body.is-phone .referee-match-teams {
  overflow-wrap: anywhere;
}

body.is-phone .hidden {
  display: none !important;
}

body.is-phone .button:focus-visible,
body.is-phone button:focus-visible,
body.is-phone input:focus-visible,
body.is-phone select:focus-visible {
  outline: 3px solid rgba(46, 144, 250, 0.45);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Smartphone-Hochformat
   --------------------------------------------------------------------- */

body.is-phone-portrait {
  --phone-edge:
    max(7px, env(safe-area-inset-left));
  --phone-touch-size: 50px;
}

body.is-phone-portrait .site-header {
  width: 100%;
  padding:
    calc(11px + env(safe-area-inset-top))
    max(11px, env(safe-area-inset-right))
    11px
    max(11px, env(safe-area-inset-left));
}

body.is-phone-portrait .site-header h1 {
  font-size: clamp(1.28rem, 6.4vw, 1.68rem);
}

body.is-phone-portrait .site-header .subtitle {
  max-width: 100%;
  font-size: 0.76rem;
}

body.is-phone-portrait .header-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 7px;
}

body.is-phone-portrait
  .header-actions > :only-child,
body.is-phone-portrait
  .header-actions > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

body.is-phone-portrait .header-actions .button,
body.is-phone-portrait .site-header > .button {
  width: 100%;
  min-height: 48px;
}

body.is-phone-portrait .page {
  width: 100%;
  max-width: 100%;
  padding:
    8px
    max(7px, env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom))
    max(7px, env(safe-area-inset-left));
}

body.is-phone-portrait .panel,
body.is-phone-portrait .scoreboard-panel,
body.is-phone-portrait
  .referee-match-status-section,
body.is-phone-portrait
  .referee-sport-tournament-section {
  width: 100%;
  min-width: 0;
  padding: 11px;
  border-radius: 12px;
}

body.is-phone-portrait .form-grid,
body.is-phone-portrait .card-grid,
body.is-phone-portrait .admin-item-grid,
body.is-phone-portrait
  .referee-tournament-grid,
body.is-phone-portrait .referee-match-grid,
body.is-phone-portrait .playing-field-grid,
body.is-phone-portrait .team-list,
body.is-phone-portrait
  .football-phase-settings-grid,
body.is-phone-portrait
  .ranking-rules-grid {
  grid-template-columns: 1fr !important;
}

body.is-phone-portrait .tournament-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-phone-portrait .admin-item-actions {
  display: grid;
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .admin-item-actions .button,
body.is-phone-portrait
  .referee-match-scoreboard-link {
  width: 100%;
}

body.is-phone-portrait .team-form {
  grid-template-columns: 1fr;
}

body.is-phone-portrait .team-form .button {
  width: 100%;
}

body.is-phone-portrait .collapsible-section-toggle,
body.is-phone-portrait .ranking-rules-toggle,
body.is-phone-portrait .system-section-toggle,
body.is-phone-portrait .tournament-tree-toggle {
  width: 100%;
  min-width: 0;
}

body.is-phone-portrait
  .collapsible-heading-actions {
  max-width: 45%;
  flex: 0 1 auto;
}

body.is-phone-portrait
  .ranking-rules-current {
  max-width: 145px;
  white-space: normal;
}

/* Ranglisten bleiben im Hochformat als gut antippbare Karten. */

body.is-phone-portrait .ranking-table {
  min-width: 0;
}

body.is-phone-portrait
  .ranking-table tbody tr {
  scroll-margin-top: 8px;
}

/* Turnierbaum im Hochformat konsequent vertikal. */

body.is-phone-portrait .bracket-scroll,
body.is-phone-portrait .group-bracket-scroll {
  overflow: visible;
}

body.is-phone-portrait .tournament-bracket,
body.is-phone-portrait .group-bracket-board {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  width: 100%;
  min-width: 0;
}

body.is-phone-portrait .bracket-round,
body.is-phone-portrait .group-bracket-column,
body.is-phone-portrait
  .group-stage-board-column {
  width: 100%;
  min-width: 0;
}

/* Schiedsrichter-Spielkarten: Status, Teams und Aktion klar getrennt. */

body.is-phone-portrait
  .referee-schedule-match-card {
  display: grid;
  min-width: 0;
  gap: 8px;
}

body.is-phone-portrait
  .referee-match-teams,
body.is-phone-portrait
  .playing-field-teams {
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);
}

body.is-phone-portrait
  .referee-match-teams > strong:last-child,
body.is-phone-portrait
  .playing-field-teams > strong:last-child {
  text-align: right;
}

/* Normales Scoreboard im Hochformat. */

body.is-phone-portrait.app-scoreboard
  .scoreboard-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

body.is-phone-portrait.app-scoreboard
  .scoreboard-heading-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
}

body.is-phone-portrait.app-scoreboard
  .scoreboard-fullscreen-toggle {
  width: 100%;
  min-height: 46px;
}

body.is-phone-portrait.app-scoreboard
  .volleyball-score-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-phone-portrait.app-scoreboard
  .volleyball-score-grid .score-divider {
  display: none;
}

body.is-phone-portrait.app-scoreboard
  .volleyball-team-score-card h3 {
  min-height: 2.4em;
}

body.is-phone-portrait.app-scoreboard
  .volleyball-game-control-grid {
  bottom:
    max(6px, env(safe-area-inset-bottom));
}

body.is-phone-portrait.app-scoreboard
  .football-live-stoppage-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-phone-portrait.app-scoreboard
  .football-live-stoppage-controls .button {
  grid-column: 1 / -1;
}

/* ---------------------------------------------------------------------
   Smartphone-Querformat
   --------------------------------------------------------------------- */

body.is-phone-landscape {
  --phone-landscape-touch: 42px;
}

body.is-phone-landscape .site-header {
  min-height: 0;
  padding:
    6px
    max(10px, env(safe-area-inset-right))
    6px
    max(10px, env(safe-area-inset-left));
}

body.is-phone-landscape .site-header h1 {
  font-size: clamp(1rem, 3.2vw, 1.35rem);
}

body.is-phone-landscape .site-header .subtitle {
  max-width: 100%;
  font-size: 0.66rem;
  -webkit-line-clamp: 1;
}

body.is-phone-landscape .header-actions {
  display: flex;
  width: auto;
  gap: 6px;
}

body.is-phone-landscape .header-actions .button,
body.is-phone-landscape
  .site-header > .button {
  width: auto;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.69rem;
}

body.is-phone-landscape .page {
  width: 100%;
  max-width: 100%;
  padding:
    6px
    max(8px, env(safe-area-inset-right))
    calc(8px + env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
}

body.is-phone-landscape .panel,
body.is-phone-landscape .scoreboard-panel,
body.is-phone-landscape
  .referee-match-status-section {
  padding: 9px;
}

body.is-phone-landscape .form-grid,
body.is-phone-landscape .card-grid,
body.is-phone-landscape .admin-item-grid,
body.is-phone-landscape
  .referee-tournament-grid,
body.is-phone-landscape .referee-match-grid,
body.is-phone-landscape .playing-field-grid,
body.is-phone-landscape .team-list {
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
  gap: 7px;
}

body.is-phone-landscape .tournament-detail-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

body.is-phone-landscape
  .ranking-rules-grid,
body.is-phone-landscape
  .football-phase-settings-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
}

body.is-phone-landscape
  .ranking-direct-comparison-card {
  grid-column: 1 / -1;
}

body.is-phone-landscape .admin-item-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

body.is-phone-landscape
  .admin-item-actions .button {
  width: 100%;
  min-height: 40px;
}

/* Kompakte Ranglisten im Querformat. */

body.is-phone-landscape
  .ranking-table-wrapper {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

body.is-phone-landscape .ranking-table {
  min-width: 540px;
}

/* Turnierbaum horizontal, aber jede Runde bleibt breit genug. */

body.is-phone-landscape .bracket-scroll,
body.is-phone-landscape .group-bracket-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

body.is-phone-landscape .tournament-bracket,
body.is-phone-landscape .group-bracket-board {
  grid-auto-columns:
    minmax(205px, 31vw);
}

/* Schiedsrichterkarten bleiben in zwei lesbaren Spalten. */

body.is-phone-landscape
  .referee-schedule-match-card,
body.is-phone-landscape .playing-field-card {
  min-width: 0;
  padding: 8px;
}

body.is-phone-landscape
  .referee-match-teams > strong,
body.is-phone-landscape
  .playing-field-teams strong {
  font-size: 0.76rem;
}

/* Normales Scoreboard im Querformat. */

body.is-phone-landscape.app-scoreboard
  .scoreboard-heading-actions {
  gap: 6px;
}

body.is-phone-landscape.app-scoreboard
  .scoreboard-fullscreen-toggle {
  min-height: 36px;
  padding: 5px 8px;
  font-size: 0.64rem;
}

body.is-phone-landscape.app-scoreboard
  .volleyball-live-scoreboard {
  max-width: 100%;
}

body.is-phone-landscape.app-scoreboard
  .score-number {
  font-size: clamp(2.4rem, 13vh, 4rem);
}

body.is-phone-landscape.app-scoreboard
  .volleyball-score-controls .score-button {
  min-height: 40px;
}

body.is-phone-landscape.app-scoreboard
  .volleyball-game-control-grid .button {
  min-height: 38px;
}

/* ---------------------------------------------------------------------
   Vollbild – Smartphone-Hochformat
   --------------------------------------------------------------------- */

body.is-phone
  .volleyball-live-scoreboard:fullscreen,
body.is-phone
  .volleyball-live-scoreboard:-webkit-full-screen,
body.is-phone.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard {
  width: 100vw;
  width: var(--app-viewport-width, 100vw);
  height: 100dvh;
  height: var(--app-viewport-height, 100dvh);
  min-height: 0;
  max-height: none;
  padding:
    max(9px, env(safe-area-inset-top))
    max(9px, env(safe-area-inset-right))
    max(9px, env(safe-area-inset-bottom))
    max(9px, env(safe-area-inset-left));
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows:
    40px
    auto
    minmax(0, 1fr)
    auto;
  grid-template-areas:
    "heading"
    "timer"
    "score"
    "controls";
  gap: 8px;
}

body.is-phone-portrait.scoreboard-volleyball
  .volleyball-live-scoreboard:fullscreen,
body.is-phone-portrait.scoreboard-volleyball
  .volleyball-live-scoreboard:-webkit-full-screen,
body.is-phone-portrait.scoreboard-pseudo-fullscreen.scoreboard-volleyball
  .volleyball-live-scoreboard {
  grid-template-rows:
    40px
    minmax(0, 1fr)
    auto;
  grid-template-areas:
    "heading"
    "score"
    "controls";
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .volleyball-score-grid,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-score-grid,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-score-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .score-divider,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .score-divider,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-divider {
  display: none;
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .football-countdown,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .football-countdown,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .football-countdown {
  width: min(100%, 460px);
  max-height: 22vh;
  padding: 8px 12px;
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .football-countdown strong,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .football-countdown strong,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .football-countdown strong {
  font-size: clamp(2.8rem, 11vh, 5.5rem);
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .volleyball-team-score-card,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-team-score-card,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-team-score-card {
  padding: 8px 6px;
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .volleyball-team-score-card h3,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-team-score-card h3,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-team-score-card h3 {
  font-size: clamp(0.82rem, 4.4vw, 1.25rem);
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .score-number,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .score-number,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-number {
  font-size: clamp(4rem, 20vh, 9rem);
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .score-button,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .score-button,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-button {
  min-height: clamp(54px, 9vh, 78px);
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .volleyball-game-control-grid,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-game-control-grid,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-game-control-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 6px;
}

body.is-phone-portrait
  .volleyball-live-scoreboard:fullscreen
  .volleyball-game-control-grid .button,
body.is-phone-portrait
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-game-control-grid .button,
body.is-phone-portrait.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-game-control-grid .button {
  min-height: 48px;
  padding: 7px 4px;
  font-size: 0.72rem;
}

/* ---------------------------------------------------------------------
   Vollbild – Smartphone-Querformat
   --------------------------------------------------------------------- */

body.is-phone-landscape.scoreboard-football
  .volleyball-live-scoreboard:fullscreen,
body.is-phone-landscape.scoreboard-football
  .volleyball-live-scoreboard:-webkit-full-screen,
body.is-phone-landscape.scoreboard-pseudo-fullscreen.scoreboard-football
  .volleyball-live-scoreboard {
  grid-template-columns:
    minmax(112px, 0.56fr)
    minmax(250px, 1.5fr)
    minmax(112px, 0.54fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas:
    "timer score controls";
  gap: 7px;
}

body.is-phone-landscape.scoreboard-volleyball
  .volleyball-live-scoreboard:fullscreen,
body.is-phone-landscape.scoreboard-volleyball
  .volleyball-live-scoreboard:-webkit-full-screen,
body.is-phone-landscape.scoreboard-pseudo-fullscreen.scoreboard-volleyball
  .volleyball-live-scoreboard {
  grid-template-columns:
    minmax(320px, 1fr)
    minmax(112px, 0.36fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas:
    "score controls";
  gap: 7px;
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .scoreboard-heading,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .scoreboard-heading,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .scoreboard-heading {
  position: absolute;
  min-height: 0;
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .football-countdown,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .football-countdown,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .football-countdown {
  width: 100%;
  height: 100%;
  padding: 7px;
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .football-countdown strong,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .football-countdown strong,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .football-countdown strong {
  font-size: clamp(2.5rem, 14vh, 5.8rem);
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .volleyball-team-score-card,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-team-score-card,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-team-score-card {
  padding: 7px 5px;
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .volleyball-team-score-card h3,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-team-score-card h3,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-team-score-card h3 {
  min-height: 1.2em;
  font-size: clamp(0.72rem, 2.4vw, 1.15rem);
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .score-number,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .score-number,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-number {
  font-size: clamp(3.6rem, 27vh, 10rem);
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .score-button,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .score-button,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-button {
  min-height: clamp(40px, 13vh, 68px);
  font-size: clamp(0.9rem, 4vh, 1.55rem);
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .volleyball-game-control-grid,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-game-control-grid,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-game-control-grid {
  grid-template-columns: 1fr;
  align-content: center;
  gap: 5px;
}

body.is-phone-landscape
  .volleyball-live-scoreboard:fullscreen
  .volleyball-game-control-grid .button,
body.is-phone-landscape
  .volleyball-live-scoreboard:-webkit-full-screen
  .volleyball-game-control-grid .button,
body.is-phone-landscape.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .volleyball-game-control-grid .button {
  min-height: clamp(38px, 12vh, 54px);
  padding: 5px 3px;
  font-size: clamp(0.62rem, 2.5vh, 0.82rem);
}

/* Sehr niedrige Handys im Querformat. */

body.is-phone-low-height.app-scoreboard
  .scoreboard-heading,
body.is-phone-low-height.app-scoreboard
  .volleyball-scoreboard-notice {
  display: none;
}

body.is-phone-low-height.scoreboard-football
  .volleyball-live-scoreboard:fullscreen,
body.is-phone-low-height.scoreboard-football
  .volleyball-live-scoreboard:-webkit-full-screen,
body.is-phone-low-height.scoreboard-pseudo-fullscreen.scoreboard-football
  .volleyball-live-scoreboard {
  grid-template-columns:
    minmax(104px, 0.5fr)
    minmax(240px, 1.55fr)
    minmax(104px, 0.5fr);
  padding:
    max(5px, env(safe-area-inset-top))
    max(7px, env(safe-area-inset-right))
    max(5px, env(safe-area-inset-bottom))
    max(7px, env(safe-area-inset-left));
}

body.is-phone-low-height
  .volleyball-live-scoreboard:fullscreen
  .score-number,
body.is-phone-low-height
  .volleyball-live-scoreboard:-webkit-full-screen
  .score-number,
body.is-phone-low-height.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .score-number {
  font-size: clamp(3.2rem, 25vh, 7.5rem);
}

body.is-phone-low-height
  .volleyball-live-scoreboard:fullscreen
  .scoreboard-fullscreen-toggle,
body.is-phone-low-height
  .volleyball-live-scoreboard:-webkit-full-screen
  .scoreboard-fullscreen-toggle,
body.is-phone-low-height.scoreboard-pseudo-fullscreen
  .volleyball-live-scoreboard
  .scoreboard-fullscreen-toggle {
  min-height: 34px;
  padding: 4px 7px;
  font-size: 0.58rem;
}


/* =====================================================================
   Schritt 2.29 – eigenständiges Scoreboard-Vollbild
   Nur diese Bühne wird in den Vollbildmodus versetzt. Die Website ist
   weder Bestandteil der Bühne noch im Hintergrund sichtbar.
   ===================================================================== */

.scoreboard-focus-view[hidden] {
  display: none !important;
}

.scoreboard-focus-view {
  --focus-gap: clamp(10px, 1.6vw, 24px);
  --focus-panel: rgba(255, 255, 255, 0.075);
  --focus-panel-border: rgba(255, 255, 255, 0.15);
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  color: #ffffff;
  background:
    radial-gradient(
      circle at 50% -15%,
      rgba(46, 144, 250, 0.35),
      transparent 44%
    ),
    linear-gradient(155deg, #071525, #0b2743 58%, #071525);
  font-family: inherit;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.scoreboard-focus-view:fullscreen,
.scoreboard-focus-view:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
}

body.scoreboard-focus-fallback {
  overflow: hidden !important;
}

body.scoreboard-focus-fallback
  .scoreboard-focus-view {
  position: fixed;
  inset: 0;
  z-index: 100000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.scoreboard-focus-exit {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 10;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 16, 29, 0.84);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.scoreboard-focus-exit > span:first-child {
  font-size: 1.35rem;
  line-height: 0.8;
}

.scoreboard-focus-exit:focus-visible,
.scoreboard-focus-point-button:focus-visible,
.scoreboard-focus-action:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.92);
  outline-offset: 3px;
}

.scoreboard-focus-timer {
  grid-area: timer;
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 2vw, 26px);
  border: 1px solid var(--focus-panel-border);
  border-radius: clamp(18px, 2vw, 30px);
  background: var(--focus-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 42px rgba(0, 0, 0, 0.2);
}

.scoreboard-focus-timer[hidden] {
  display: none !important;
}

.scoreboard-focus-timer-phase,
.scoreboard-focus-timer-state {
  font-size: clamp(0.7rem, 1.8vw, 1.15rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.scoreboard-focus-timer-phase {
  color: #9fd3ff;
}

.scoreboard-focus-timer-state {
  color: rgba(255, 255, 255, 0.76);
}

.scoreboard-focus-timer strong {
  margin: clamp(4px, 1vh, 12px) 0;
  font-size: clamp(4rem, 13vh, 9rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.scoreboard-focus-timer-expired {
  border-color: rgba(255, 115, 115, 0.7);
  background: rgba(126, 26, 26, 0.44);
}

.scoreboard-focus-timer-halftime {
  border-color: rgba(255, 199, 82, 0.72);
  background: rgba(112, 72, 8, 0.42);
}

.scoreboard-focus-score {
  grid-area: score;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);
  gap: var(--focus-gap);
  align-items: stretch;
  min-width: 0;
  min-height: 0;
}

.scoreboard-focus-team {
  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto;
  gap: clamp(6px, 1vh, 14px);
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 2vw, 28px);
  border: 1px solid var(--focus-panel-border);
  border-radius: clamp(18px, 2vw, 30px);
  background: var(--focus-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 42px rgba(0, 0, 0, 0.2);
}

.scoreboard-focus-team h2 {
  max-width: 100%;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

.scoreboard-focus-score-number {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  color: #ffffff;
  font-size: clamp(6rem, 25vh, 16rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
  line-height: 0.78;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.scoreboard-focus-divider {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(3rem, 10vh, 7rem);
  font-weight: 900;
}

.scoreboard-focus-point-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
}

.scoreboard-focus-point-button {
  min-width: 0;
  min-height: clamp(62px, 10vh, 104px);
  padding: 10px;
  border: 0;
  border-radius: clamp(13px, 1.5vw, 22px);
  color: #ffffff;
  font: inherit;
  font-size: clamp(1.2rem, 4vh, 2.4rem);
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    opacity 120ms ease;
}

.scoreboard-focus-point-button:active:not(:disabled),
.scoreboard-focus-action:active:not(:disabled) {
  transform: scale(0.97);
}

.scoreboard-focus-minus {
  background: linear-gradient(145deg, #88414c, #b64b5b);
}

.scoreboard-focus-plus {
  background: linear-gradient(145deg, #087c65, #0ba57f);
}

.scoreboard-focus-point-button:disabled,
.scoreboard-focus-action:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.scoreboard-focus-game-controls {
  grid-area: controls;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
  min-width: 0;
}

.scoreboard-focus-action {
  min-width: 0;
  min-height: clamp(56px, 8vh, 82px);
  padding: 9px;
  border: 0;
  border-radius: clamp(12px, 1.25vw, 19px);
  color: #ffffff;
  font: inherit;
  font-size: clamp(0.82rem, 2.2vh, 1.25rem);
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.scoreboard-focus-start {
  background: linear-gradient(145deg, #1268c4, #2e90fa);
}

.scoreboard-focus-pause {
  background: linear-gradient(145deg, #a76707, #d9901c);
}

.scoreboard-focus-end {
  background: linear-gradient(145deg, #334155, #111827);
}

/* Standard und Hochformat. */

.scoreboard-focus-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto;
  grid-template-areas:
    "timer"
    "score"
    "controls";
  gap: var(--focus-gap);
}

.scoreboard-focus-volleyball {
  grid-template-rows:
    minmax(0, 1fr)
    auto;
  grid-template-areas:
    "score"
    "controls";
}

/* Smartphone-Hochformat. */

body.is-phone-portrait
  .scoreboard-focus-view {
  --focus-gap: 8px;
  padding:
    max(8px, env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  grid-template-rows:
    minmax(80px, 19vh)
    minmax(0, 1fr)
    auto;
}

body.is-phone-portrait
  .scoreboard-focus-volleyball {
  grid-template-rows:
    minmax(0, 1fr)
    auto;
}

body.is-phone-portrait
  .scoreboard-focus-exit {
  top: max(7px, env(safe-area-inset-top));
  right: max(7px, env(safe-area-inset-right));
  min-height: 36px;
  padding: 5px 9px;
  font-size: 0.64rem;
}

body.is-phone-portrait
  .scoreboard-focus-timer {
  padding: 8px 10px;
  border-radius: 15px;
}

body.is-phone-portrait
  .scoreboard-focus-timer strong {
  font-size: clamp(2.8rem, 10vh, 5rem);
}

body.is-phone-portrait
  .scoreboard-focus-score {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body.is-phone-portrait
  .scoreboard-focus-divider {
  display: none;
}

body.is-phone-portrait
  .scoreboard-focus-team {
  padding: 9px 6px;
  border-radius: 15px;
}

body.is-phone-portrait
  .scoreboard-focus-team h2 {
  padding-right: 0;
  font-size: clamp(0.78rem, 4.3vw, 1.25rem);
}

body.is-phone-portrait
  .scoreboard-focus-score-number {
  font-size: clamp(4rem, 19vh, 8.5rem);
}

body.is-phone-portrait
  .scoreboard-focus-point-controls {
  gap: 6px;
}

body.is-phone-portrait
  .scoreboard-focus-point-button {
  min-height: clamp(54px, 8.5vh, 72px);
  border-radius: 12px;
  font-size: clamp(1rem, 3.5vh, 1.55rem);
}

body.is-phone-portrait
  .scoreboard-focus-game-controls {
  gap: 6px;
}

body.is-phone-portrait
  .scoreboard-focus-action {
  min-height: 48px;
  padding: 6px 3px;
  border-radius: 11px;
  font-size: 0.68rem;
}

/* Smartphone-Querformat. */

body.is-phone-landscape
  .scoreboard-focus-view {
  --focus-gap: 7px;
  padding:
    max(6px, env(safe-area-inset-top))
    max(7px, env(safe-area-inset-right))
    max(6px, env(safe-area-inset-bottom))
    max(7px, env(safe-area-inset-left));
}

body.is-phone-landscape
  .scoreboard-focus-football {
  grid-template-columns:
    minmax(118px, 0.52fr)
    minmax(300px, 1.65fr)
    minmax(112px, 0.5fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas:
    "timer score controls";
}

body.is-phone-landscape
  .scoreboard-focus-volleyball {
  grid-template-columns:
    minmax(360px, 1fr)
    minmax(112px, 0.34fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas:
    "score controls";
}

body.is-phone-landscape
  .scoreboard-focus-exit {
  top: max(6px, env(safe-area-inset-top));
  right: max(6px, env(safe-area-inset-right));
  min-height: 32px;
  padding: 4px 7px;
  font-size: 0.58rem;
}

body.is-phone-landscape
  .scoreboard-focus-timer {
  height: 100%;
  padding: 7px;
  border-radius: 14px;
}

body.is-phone-landscape
  .scoreboard-focus-timer-phase,
body.is-phone-landscape
  .scoreboard-focus-timer-state {
  font-size: clamp(0.52rem, 1.7vh, 0.72rem);
}

body.is-phone-landscape
  .scoreboard-focus-timer strong {
  font-size: clamp(2.45rem, 14vh, 5.5rem);
}

body.is-phone-landscape
  .scoreboard-focus-score {
  gap: 6px;
}

body.is-phone-landscape
  .scoreboard-focus-divider {
  display: none;
}

body.is-phone-landscape
  .scoreboard-focus-team {
  padding: 7px 5px;
  border-radius: 14px;
}

body.is-phone-landscape
  .scoreboard-focus-team h2 {
  min-height: 1.05em;
  font-size: clamp(0.68rem, 2.25vw, 1.1rem);
}

body.is-phone-landscape
  .scoreboard-focus-score-number {
  font-size: clamp(3.8rem, 27vh, 10rem);
}

body.is-phone-landscape
  .scoreboard-focus-point-controls {
  gap: 5px;
}

body.is-phone-landscape
  .scoreboard-focus-point-button {
  min-height: clamp(40px, 12vh, 66px);
  padding: 5px;
  border-radius: 11px;
  font-size: clamp(0.85rem, 3.8vh, 1.4rem);
}

body.is-phone-landscape
  .scoreboard-focus-game-controls {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 5px;
  padding-top: 38px;
}

body.is-phone-landscape
  .scoreboard-focus-action {
  min-height: clamp(38px, 11.5vh, 53px);
  padding: 4px 2px;
  border-radius: 10px;
  font-size: clamp(0.58rem, 2.4vh, 0.78rem);
}

/* Besonders niedrige Querformatgeräte. */

body.is-phone-low-height
  .scoreboard-focus-view {
  --focus-gap: 5px;
  padding:
    max(4px, env(safe-area-inset-top))
    max(6px, env(safe-area-inset-right))
    max(4px, env(safe-area-inset-bottom))
    max(6px, env(safe-area-inset-left));
}

body.is-phone-low-height
  .scoreboard-focus-football {
  grid-template-columns:
    minmax(102px, 0.47fr)
    minmax(260px, 1.68fr)
    minmax(102px, 0.47fr);
}

body.is-phone-low-height
  .scoreboard-focus-score-number {
  font-size: clamp(3.4rem, 25vh, 7.7rem);
}

body.is-phone-low-height
  .scoreboard-focus-point-button {
  min-height: clamp(36px, 11vh, 52px);
}

body.is-phone-low-height
  .scoreboard-focus-action {
  min-height: clamp(34px, 10.5vh, 46px);
}

@media (min-width: 1025px) and (orientation: landscape) {
  .scoreboard-focus-football {
    grid-template-columns:
      minmax(240px, 0.7fr)
      minmax(560px, 1.8fr)
      minmax(190px, 0.55fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas:
      "timer score controls";
  }

  .scoreboard-focus-volleyball {
    grid-template-columns:
      minmax(640px, 1fr)
      minmax(190px, 0.32fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas:
      "score controls";
  }

  .scoreboard-focus-game-controls {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    padding-top: 56px;
  }
}


/* =====================================================================
   Schritt 2.30 – korrigiertes Scoreboard im Smartphone-Querformat
   ===================================================================== */

.volleyball-live-scoreboard {
  position: relative;
}

.scoreboard-fullscreen-launcher {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 12px auto;
  align-items: center;
  justify-content: center;
}

body.scoreboard-fullscreen-active
  .scoreboard-fullscreen-launcher,
body.scoreboard-focus-fallback
  .scoreboard-fullscreen-launcher {
  visibility: hidden;
  pointer-events: none;
}

body.is-phone-portrait.app-scoreboard
  .scoreboard-fullscreen-launcher {
  width: 100%;
  min-height: 48px;
  margin: 0 0 8px;
}

/* Im Querformat bleibt der Öffnen-Button auch ohne Überschrift sichtbar. */

body.is-phone-landscape.app-scoreboard
  .scoreboard-fullscreen-launcher {
  position: absolute;
  top: 7px;
  right: max(7px, env(safe-area-inset-right));
  z-index: 12;
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 6px 10px;
  border-color: #b9d4ed;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(16, 24, 40, 0.16);
  font-size: 0.68rem;
}

body.is-phone-landscape.app-scoreboard
  .scoreboard-heading {
  padding-right: 158px;
}

body.is-phone-landscape.app-scoreboard
  .scoreboard-heading-actions {
  display: none;
}

body.is-phone-low-height.app-scoreboard
  .volleyball-live-scoreboard {
  padding-top: 52px;
}

body.is-phone-low-height.app-scoreboard
  .scoreboard-fullscreen-launcher {
  top: 7px;
}

/* Reines Vollbild: Timer ohne Umbruch, Teamkarten exakt gleich breit. */

.scoreboard-focus-timer strong {
  max-width: 100%;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.scoreboard-focus-score {
  width: 100%;
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
}

.scoreboard-focus-divider {
  display: none !important;
}

.scoreboard-focus-team {
  width: 100%;
  max-width: none;
}

.scoreboard-focus-team h2 {
  width: 100%;
  min-height: 1.15em;
}

/* Smartphone-Querformat: Timer links, zwei symmetrische Teams mittig,
   kompakte Bedienung rechts. */

body.is-phone-landscape
  .scoreboard-focus-football {
  grid-template-columns:
    clamp(132px, 22vw, 210px)
    minmax(0, 1fr)
    clamp(126px, 19vw, 188px);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas:
    "timer score controls";
}

body.is-phone-landscape
  .scoreboard-focus-volleyball {
  grid-template-columns:
    minmax(0, 1fr)
    clamp(126px, 19vw, 188px);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas:
    "score controls";
}

body.is-phone-landscape
  .scoreboard-focus-timer {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 9px 7px;
}

body.is-phone-landscape
  .scoreboard-focus-timer strong {
  font-size: clamp(2.25rem, 6vw, 4.15rem);
  letter-spacing: -0.075em;
  line-height: 0.94;
}

body.is-phone-landscape
  .scoreboard-focus-timer-phase,
body.is-phone-landscape
  .scoreboard-focus-timer-state {
  max-width: 100%;
  font-size: clamp(0.55rem, 1.7vh, 0.76rem);
  line-height: 1.15;
  white-space: normal;
}

body.is-phone-landscape
  .scoreboard-focus-score {
  min-width: 0;
  height: 100%;
  gap: 7px;
}

body.is-phone-landscape
  .scoreboard-focus-team {
  min-width: 0;
  height: 100%;
  padding: 9px 8px;
}

body.is-phone-landscape
  .scoreboard-focus-team h2 {
  display: grid;
  place-items: center;
  min-height: 1.4em;
  padding: 0 4px;
  font-size: clamp(0.82rem, 2.45vw, 1.3rem);
  line-height: 1.08;
}

body.is-phone-landscape
  .scoreboard-focus-score-number {
  font-size: clamp(4rem, 22vh, 8.7rem);
  letter-spacing: -0.055em;
}

body.is-phone-landscape
  .scoreboard-focus-point-controls {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 7px;
}

body.is-phone-landscape
  .scoreboard-focus-point-button {
  width: 100%;
  min-width: 0;
  min-height: clamp(44px, 12vh, 64px);
  padding: 6px 4px;
  font-size: clamp(0.95rem, 3.8vh, 1.45rem);
}

/* Die Steuerung steht in einer eigenen klaren Spalte. */

body.is-phone-landscape
  .scoreboard-focus-game-controls {
  height: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(46px, 66px);
  align-content: center;
  gap: 9px;
  padding: 52px 9px 12px;
  border: 1px solid var(--focus-panel-border);
  border-radius: 15px;
  background: var(--focus-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 42px rgba(0, 0, 0, 0.2);
}

body.is-phone-landscape
  .scoreboard-focus-action {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 7px 5px;
  font-size: clamp(0.64rem, 2.5vh, 0.86rem);
  line-height: 1.15;
}

body.is-phone-landscape
  .scoreboard-focus-exit {
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  min-height: 36px;
  padding: 5px 9px;
  font-size: 0.64rem;
}

/* Besonders niedrige Querformatgeräte. */

body.is-phone-low-height
  .scoreboard-focus-football {
  grid-template-columns:
    clamp(118px, 21vw, 175px)
    minmax(0, 1fr)
    clamp(112px, 18vw, 158px);
}

body.is-phone-low-height
  .scoreboard-focus-volleyball {
  grid-template-columns:
    minmax(0, 1fr)
    clamp(112px, 18vw, 158px);
}

body.is-phone-low-height
  .scoreboard-focus-timer strong {
  font-size: clamp(2.1rem, 5.8vw, 3.6rem);
}

body.is-phone-low-height
  .scoreboard-focus-game-controls {
  grid-auto-rows: minmax(40px, 54px);
  gap: 6px;
  padding: 43px 7px 8px;
}

body.is-phone-low-height
  .scoreboard-focus-action {
  min-height: 40px;
}

body.is-phone-low-height
  .scoreboard-focus-exit {
  min-height: 32px;
  padding: 4px 7px;
  font-size: 0.57rem;
}

/* Größere Querformatbildschirme erhalten ebenfalls gleiche Teamkarten. */

@media (min-width: 1025px) and (orientation: landscape) {
  .scoreboard-focus-football {
    grid-template-columns:
      clamp(220px, 22vw, 350px)
      minmax(0, 1fr)
      clamp(190px, 18vw, 290px);
  }

  .scoreboard-focus-volleyball {
    grid-template-columns:
      minmax(0, 1fr)
      clamp(190px, 18vw, 290px);
  }

  .scoreboard-focus-game-controls {
    height: 100%;
    grid-auto-rows: minmax(62px, 88px);
    align-content: center;
    padding: 66px 14px 16px;
    border: 1px solid var(--focus-panel-border);
    border-radius: 22px;
    background: var(--focus-panel);
  }
}


/* =====================================================================
   Schritt 2.31 – Ranglistenkarten im Smartphone-Hochformat
   Identisches Layout in Admin- und Schiedsrichteransicht.
   ===================================================================== */

body.is-phone-portrait
  .ranking-table-wrapper {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table),
body.is-phone-portrait
  .ranking-table:not(.wm-third-table) tbody {
  display: block;
  width: 100%;
  min-width: 0;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table) thead {
  display: none;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table) tbody {
  display: grid;
  gap: 10px;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table) tbody tr {
  position: relative;
  display: grid;
  grid-template-columns:
    42px
    repeat(6, minmax(0, 1fr))
    minmax(76px, 0.9fr);
  grid-template-rows:
    minmax(58px, auto)
    minmax(42px, auto)
    minmax(44px, auto);
  width: 100%;
  min-width: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d8e2ee;
  border-radius: 14px;
  background: var(--surface) !important;
  box-shadow: 0 3px 10px rgba(23, 59, 99, 0.06);
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table) tbody td {
  position: static;
  display: flex;
  width: auto;
  min-width: 0;
  min-height: 0;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 9px;
  border: 0;
  border-top: 1px solid #e7edf4;
  border-left: 1px solid #e7edf4;
  color: var(--text);
  background: #ffffff;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table) tbody td::before {
  content: attr(data-short-label);
  flex: 0 1 auto;
  min-width: 0;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-align: left;
  text-transform: uppercase;
  white-space: normal;
}

/* Kopfzeile der Karte: Platz, vollständiger Teamname, Tabellenpunkte. */

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-position {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  display: grid;
  width: 32px;
  height: 32px;
  min-height: 0;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-position::before {
  display: none;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-team {
  grid-column: 2 / 8;
  grid-row: 1;
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: flex-start;
  padding: 9px 10px;
  border: 0;
  color: var(--primary);
  background: #ffffff;
  font-size: clamp(0.92rem, 4.1vw, 1.08rem);
  font-weight: 900;
  line-height: 1.17;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-team::before {
  display: none;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-points {
  grid-column: 8;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  min-width: 0;
  min-height: 58px;
  align-content: center;
  align-items: center;
  justify-content: stretch;
  padding: 8px 9px;
  border: 0;
  border-left: 1px solid #dce9f5;
  color: var(--primary);
  background: #eff7ff;
  font-size: 1rem;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-points::before {
  color: #52647b;
  font-size: 0.6rem;
  line-height: 1.05;
}

/* Zweite Zeile: Spiele, Siege, Unentschieden, Niederlagen. */

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-games {
  grid-column: 1 / 3;
  grid-row: 2;
  border-left: 0;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-wins {
  grid-column: 3 / 5;
  grid-row: 2;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-draws {
  grid-column: 5 / 7;
  grid-row: 2;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-losses {
  grid-column: 7 / 9;
  grid-row: 2;
}

/* Dritte Zeile: Tore/Punkteverhältnis und Differenz. */

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-score-ratio {
  grid-column: 1 / 5;
  grid-row: 3;
  border-left: 0;
  background: #f8fafc;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td.ranking-difference {
  grid-column: 5 / 9;
  grid-row: 3;
  background: #f8fafc;
}

/* Frühere nth-child-Positionierungen vollständig neutralisieren. */

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td:nth-child(n) {
  height: auto;
}

body.is-phone-portrait
  .ranking-table:not(.wm-third-table)
  tbody td:nth-child(even) {
  border-left-color: #e7edf4;
}

/* Sehr schmale Smartphones: Kopf erhält mehr Platz für den Teamnamen. */

@media (max-width: 370px) and (orientation: portrait) {
  body.is-phone-portrait
    .ranking-table:not(.wm-third-table) tbody tr {
    grid-template-columns:
      38px
      repeat(6, minmax(0, 1fr))
      minmax(68px, 0.85fr);
  }

  body.is-phone-portrait
    .ranking-table:not(.wm-third-table)
    tbody td.ranking-position {
    width: 29px;
    height: 29px;
  }

  body.is-phone-portrait
    .ranking-table:not(.wm-third-table)
    tbody td.ranking-team {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 0.88rem;
  }

  body.is-phone-portrait
    .ranking-table:not(.wm-third-table)
    tbody td.ranking-points {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 0.92rem;
  }

  body.is-phone-portrait
    .ranking-table:not(.wm-third-table)
    tbody td {
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* Querformat bleibt eine kompakte Tabelle und wird nicht vom
   Hochformat-Kartenlayout beeinflusst. */

body.is-phone-landscape
  .ranking-table:not(.wm-third-table)
  .ranking-team {
  white-space: nowrap;
  overflow: visible;
}


/* =====================================================================
   Schritt 2.32 – Fußballtimer hoch- oder runterzählen
   ===================================================================== */

.football-timer-direction {
  margin: 0;
  padding: 13px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #f8fafc;
}

.football-timer-direction legend {
  padding: 0 6px;
  color: var(--primary);
  font-weight: 900;
}

.football-timer-direction-options {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.football-timer-direction-options label {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: flex-start;
  padding: 11px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
}

.football-timer-direction-options input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  accent-color: var(--primary);
}

.football-timer-direction-options span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.football-timer-direction-options strong {
  color: var(--primary);
  font-size: 0.82rem;
}

.football-timer-direction-options small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.football-timer-direction-options
  label:has(input:checked) {
  border-color: #2e90fa;
  background: #eff8ff;
  box-shadow: 0 0 0 2px rgba(46, 144, 250, 0.1);
}

.football-countdown-target {
  display: block;
  color: #475467;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.football-countdown-count-up strong {
  white-space: nowrap;
}

.football-countdown-count-up
  .football-countdown-target {
  margin-top: 2px;
}

.scoreboard-focus-timer-target {
  color: #9fd3ff;
  font-size: clamp(0.68rem, 1.6vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.scoreboard-focus-timer-target[hidden] {
  display: none !important;
}

.scoreboard-focus-timer-count-up strong {
  white-space: nowrap;
}

.admin-football-timer-reading,
.referee-football-timer-reading {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.admin-football-timer-target,
.referee-football-timer-target {
  color: currentColor;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
  opacity: 0.78;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-football-timer-count-up
  .admin-football-timer-value,
.referee-football-timer-count-up
  .referee-football-timer-value {
  white-space: nowrap;
}

.referee-football-timer {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid #b2ddff;
  border-radius: 9px;
  color: #184f86;
  background: #eff8ff;
}

.referee-football-timer-label {
  min-width: 0;
  color: currentColor;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.15;
  text-transform: uppercase;
}

.referee-football-timer-value {
  color: currentColor;
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.referee-schedule-match-card.status-running
  .referee-football-timer,
.referee-progress-bracket-match
  .referee-football-timer {
  border-color: #6ce9a6;
  color: #067647;
  background: #ecfdf3;
}

.bracket-match .referee-football-timer {
  margin-top: 7px;
  padding: 6px 7px;
}

.bracket-match
  .referee-football-timer-label {
  font-size: 0.56rem;
}

.bracket-match
  .referee-football-timer-value {
  font-size: 0.82rem;
}

/* Smartphone-Hochformat */

body.is-phone-portrait
  .football-timer-direction-options {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .football-timer-direction-options label {
  min-height: 52px;
}

body.is-phone-portrait
  .football-countdown-count-up strong {
  font-size: clamp(2.35rem, 13vw, 4.4rem);
}

body.is-phone-portrait
  .scoreboard-focus-timer-count-up strong {
  font-size: clamp(2.35rem, 10vh, 4.6rem);
}

body.is-phone-portrait
  .admin-football-timer,
body.is-phone-portrait
  .referee-football-timer {
  align-items: center;
}

body.is-phone-portrait
  .admin-football-timer-label,
body.is-phone-portrait
  .referee-football-timer-label {
  max-width: 48%;
}

/* Smartphone-Querformat */

body.is-phone-landscape
  .football-timer-direction {
  padding: 9px;
}

body.is-phone-landscape
  .football-timer-direction-options {
  gap: 6px;
}

body.is-phone-landscape
  .football-timer-direction-options label {
  min-height: 42px;
  padding: 7px;
}

body.is-phone-landscape
  .football-timer-direction-options small {
  display: none;
}

body.is-phone-landscape
  .football-countdown-target {
  font-size: 0.55rem;
}

body.is-phone-landscape
  .scoreboard-focus-timer-target {
  font-size: clamp(0.5rem, 1.7vh, 0.7rem);
}

body.is-phone-landscape
  .scoreboard-focus-timer-count-up strong {
  font-size: clamp(1.95rem, 5.3vw, 3.55rem);
}

body.is-phone-landscape
  .admin-football-timer,
body.is-phone-landscape
  .referee-football-timer {
  padding: 6px 7px;
}

body.is-phone-landscape
  .admin-football-timer-target,
body.is-phone-landscape
  .referee-football-timer-target {
  font-size: 0.5rem;
}

/* Besonders niedrige Querformatgeräte */

body.is-phone-low-height
  .scoreboard-focus-timer-count-up strong {
  font-size: clamp(1.85rem, 5vw, 3rem);
}

body.is-phone-low-height
  .scoreboard-focus-timer-target {
  font-size: 0.48rem;
}


/* =====================================================================
   Schritt 2.33 – überlaufsicherer Fußballtimer
   ===================================================================== */

/* Die Timerkarte wird selbst zum Größenbezug für den Timerwert. */

.app-scoreboard.scoreboard-football
  .football-countdown {
  container-type: inline-size;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.app-scoreboard.scoreboard-football
  .football-countdown strong {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-inline: auto;
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-size: clamp(2rem, 22cqi, 3.15rem);
  letter-spacing: -0.075em;
  line-height: 0.96;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-long {
  font-size: clamp(1.85rem, 4.6vw, 2.85rem);
  font-size: clamp(1.85rem, 20cqi, 2.85rem);
}

.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-very-long {
  font-size: clamp(1.65rem, 4.1vw, 2.55rem);
  font-size: clamp(1.65rem, 18cqi, 2.55rem);
}

.app-scoreboard.scoreboard-football
  .football-countdown-label,
.app-scoreboard.scoreboard-football
  .football-countdown-target,
.app-scoreboard.scoreboard-football
  .football-countdown > span:last-child {
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.app-scoreboard.scoreboard-football
  .football-countdown-target {
  font-size: clamp(0.56rem, 1.8cqi, 0.7rem);
  line-height: 1.08;
}

/* Smartphone-Querformat: mehr Breite für den Timer, ohne die beiden
   Teamkarten unterschiedlich groß zu machen. */

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .volleyball-live-scoreboard {
  grid-template-columns:
    clamp(176px, 23vw, 238px)
    minmax(0, 1fr)
    clamp(164px, 20vw, 220px);
}

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .football-countdown {
  width: 100%;
  min-width: 0;
  padding: 10px 7px;
}

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .football-countdown strong {
  font-size: clamp(2rem, 5vw, 3rem);
  font-size: clamp(2rem, 22cqi, 3rem);
}

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-long {
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  font-size: clamp(1.8rem, 20cqi, 2.7rem);
}

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-very-long {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-size: clamp(1.6rem, 18cqi, 2.4rem);
}

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .football-countdown-label {
  font-size: clamp(0.54rem, 1.8cqi, 0.67rem);
  line-height: 1.12;
}

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .football-countdown-target {
  font-size: clamp(0.5rem, 1.6cqi, 0.61rem);
}

body.is-phone-landscape.app-scoreboard.scoreboard-football
  .football-countdown > span:last-child {
  font-size: clamp(0.58rem, 1.8cqi, 0.68rem);
  line-height: 1.12;
}

/* Sehr niedrige Querformatgeräte erhalten etwas kompaktere Außenbereiche. */

body.is-phone-low-height.app-scoreboard.scoreboard-football
  .volleyball-live-scoreboard {
  grid-template-columns:
    clamp(168px, 22vw, 220px)
    minmax(0, 1fr)
    clamp(150px, 19vw, 200px);
}

body.is-phone-low-height.app-scoreboard.scoreboard-football
  .football-countdown {
  padding: 8px 6px;
}

body.is-phone-low-height.app-scoreboard.scoreboard-football
  .football-countdown strong {
  font-size: clamp(1.85rem, 4.7vw, 2.75rem);
  font-size: clamp(1.85rem, 21cqi, 2.75rem);
}

body.is-phone-low-height.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-long {
  font-size: clamp(1.7rem, 4.25vw, 2.45rem);
  font-size: clamp(1.7rem, 19cqi, 2.45rem);
}

body.is-phone-low-height.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-very-long {
  font-size: clamp(1.5rem, 3.8vw, 2.2rem);
  font-size: clamp(1.5rem, 17cqi, 2.2rem);
}

/* Hochformat: lange Hochzählwerte bleiben ebenfalls innerhalb der Karte. */

body.is-phone-portrait.app-scoreboard.scoreboard-football
  .football-countdown {
  width: min(100%, 390px);
  padding-inline: 12px;
}

body.is-phone-portrait.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-long {
  font-size: clamp(2.2rem, 11vw, 3.8rem);
  font-size: clamp(2.2rem, 21cqi, 3.8rem);
}

body.is-phone-portrait.app-scoreboard.scoreboard-football
  .football-countdown strong.football-timer-value-very-long {
  font-size: clamp(2rem, 10vw, 3.4rem);
  font-size: clamp(2rem, 18.5cqi, 3.4rem);
}

/* Das reine Scoreboard-Vollbild verwendet dieselbe Sicherheitslogik. */

.scoreboard-focus-timer {
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
}

.scoreboard-focus-timer strong {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.scoreboard-focus-timer
  strong.football-timer-value-long {
  font-size: clamp(2.2rem, 20cqi, 5.3rem);
}

.scoreboard-focus-timer
  strong.football-timer-value-very-long {
  font-size: clamp(2rem, 17.5cqi, 4.7rem);
}

body.is-phone-landscape
  .scoreboard-focus-timer
  strong.football-timer-value-long {
  font-size: clamp(1.8rem, 19cqi, 3.25rem);
}

body.is-phone-landscape
  .scoreboard-focus-timer
  strong.football-timer-value-very-long {
  font-size: clamp(1.6rem, 17cqi, 2.9rem);
}


/* =====================================================================
   Schritt 2.34 – Einfach- und Profi-Erlebnis
   ===================================================================== */

.experience-simple .pro-only,
.experience-simple .advanced-feature,
.experience-simple .pro-secondary-section,
.experience-simple .pro-detail-panel {
  display: none !important;
}

.experience-pro .simple-only {
  display: none !important;
}

.section-support-copy {
  max-width: 650px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Ruhige Startseite */

.home-layout {
  display: grid;
  gap: 18px;
}

.home-action-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-action-card {
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr) auto;
  min-width: 0;
  gap: 13px;
  align-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px solid #d8e2ee;
  border-radius: 18px;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(23, 59, 99, 0.08);
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.home-action-card:hover {
  transform: translateY(-2px);
  border-color: #84caff;
  box-shadow: 0 12px 32px rgba(23, 59, 99, 0.12);
}

.home-action-primary {
  color: #ffffff;
  border-color: transparent;
  background:
    linear-gradient(145deg, #123a63, #1769aa);
}

.home-action-primary small {
  color: rgba(255, 255, 255, 0.82);
}

.home-action-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: rgba(46, 144, 250, 0.12);
  font-size: 1.55rem;
}

.home-action-primary .home-action-icon {
  background: rgba(255, 255, 255, 0.14);
}

.home-action-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.home-action-copy strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

.home-action-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.home-action-arrow {
  font-size: 1.4rem;
  font-weight: 900;
}

.home-explanation,
.experience-guide {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4eaf1;
  border-radius: 14px;
  background: #f8fafc;
}

.home-explanation > div,
.experience-guide > div {
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
}

.home-explanation span,
.experience-guide span,
.tournament-workflow span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 0.72rem;
  font-weight: 900;
}

.home-explanation strong,
.experience-guide strong {
  font-size: 0.8rem;
}

.experience-guide small {
  color: var(--muted);
  font-size: 0.66rem;
}

.home-tournament-browser {
  overflow: hidden;
  border: 1px solid #d8e2ee;
  border-radius: 16px;
  background: #ffffff;
}

.home-tournament-browser > summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.home-tournament-browser > summary::-webkit-details-marker {
  display: none;
}

.home-tournament-browser > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.home-tournament-browser > summary small {
  color: var(--muted);
  font-size: 0.7rem;
}

.home-tournament-browser-content {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  border-top: 1px solid #edf1f5;
}

.compact-sport-buttons {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  padding-top: 14px;
}

.compact-sport-buttons .sport-button {
  min-height: 45px;
}

.home-tournament-card .button {
  width: 100%;
}

/* Einfach-/Profi-Schalter */

.experience-switch {
  display: inline-grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f2f4f7;
}

.experience-switch a {
  min-width: 78px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #475467;
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.experience-switch a.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(18, 58, 99, 0.22);
}

/* Admin-Einstieg */

.admin-create-panel {
  border-color: #b2ddff;
}

.admin-save-button {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
}

.experience-simple .admin-layout {
  max-width: 980px;
  margin-inline: auto;
}

.experience-simple .admin-item {
  grid-template-columns:
    minmax(0, 1fr) auto;
}

.experience-simple .admin-item-actions {
  align-self: center;
}

.experience-simple .tournament-type-line {
  display: none;
}

.experience-simple
  .admin-item-actions .button {
  min-width: 150px;
}

.experience-pro .admin-layout {
  max-width: 1120px;
  margin-inline: auto;
}

/* Turnierseite: klarer Arbeitsablauf */

.tournament-workflow {
  position: sticky;
  top: 6px;
  z-index: 25;
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
  padding: 7px;
  border: 1px solid #b2ddff;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(23, 59, 99, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tournament-workflow a {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--primary);
  background: #f5faff;
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
}

.tournament-workflow span {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.experience-simple .tournament-admin-layout {
  max-width: 1050px;
  margin-inline: auto;
}

.experience-simple .tournament-overview-panel {
  padding-block: 12px;
}

.experience-simple
  .tournament-details-extension,
.experience-simple
  .system-description {
  display: none !important;
}

.experience-simple
  .tournament-system-panel
  > .section-heading {
  margin-bottom: 5px;
}

.experience-pro .advanced-feature {
  position: relative;
  border-color: #c7d7e8;
}

.experience-pro .advanced-feature::before {
  content: "PROFI";
  position: absolute;
  top: 9px;
  right: 10px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 999px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.experience-pro .tournament-system-panel {
  display: grid;
  gap: 10px;
}

/* Schiedsrichter: aktive Aufgaben zuerst */

.referee-guide {
  margin-bottom: 4px;
}

.experience-simple
  .referee-tournament-catalogue {
  display: grid;
  gap: 13px;
}

.experience-simple
  .referee-sport-tournament-section {
  padding: 12px;
}

.experience-simple
  .referee-tournament-card
  .card-content {
  gap: 9px;
}

.experience-simple
  .referee-tournament-card
  .meta-list {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

.experience-simple
  .referee-schedule-link {
  width: 100%;
  min-height: 48px;
}

.referee-quick-nav {
  position: sticky;
  top: 6px;
  z-index: 20;
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
  padding: 7px;
  border: 1px solid #b2ddff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 20px rgba(23, 59, 99, 0.1);
}

.referee-quick-nav a {
  min-height: 42px;
  padding: 9px;
  border-radius: 9px;
  color: var(--primary);
  background: #eff8ff;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.experience-simple
  .referee-match-status-section {
  padding: 12px;
}

.experience-simple
  .referee-running-section {
  border-color: #6ce9a6;
}

/* Im einfachen Scoreboard sind die Profi-Zeiteinstellungen verborgen.
   Der konfigurierte Timer selbst bleibt vollständig sichtbar. */

.experience-simple.app-scoreboard
  .football-timer-settings,
.experience-simple.app-scoreboard
  .football-live-stoppage {
  display: none !important;
}

/* Smartphone-Hochformat */

body.is-phone-portrait .home-action-grid {
  grid-template-columns: 1fr;
}

body.is-phone-portrait .home-action-card {
  min-height: 112px;
  padding: 15px;
}

body.is-phone-portrait
  .home-explanation,
body.is-phone-portrait
  .experience-guide {
  grid-template-columns: 1fr;
  gap: 1px;
}

body.is-phone-portrait
  .home-explanation > div,
body.is-phone-portrait
  .experience-guide > div {
  min-height: 42px;
  padding-block: 5px;
}

body.is-phone-portrait
  .compact-sport-buttons {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .experience-switch {
  width: 100%;
}

body.is-phone-portrait
  .experience-switch a {
  min-height: 42px;
  align-content: center;
}

body.is-phone-portrait
  .tournament-header-actions {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

body.is-phone-portrait
  .tournament-workflow a {
  flex-direction: column;
  gap: 3px;
  font-size: 0.62rem;
}

body.is-phone-portrait.experience-simple
  .tournament-detail-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

body.is-phone-portrait.experience-simple
  .admin-item {
  grid-template-columns: 1fr;
}

body.is-phone-portrait.experience-simple
  .admin-item-actions .button {
  width: 100%;
}

body.is-phone-portrait.experience-simple
  .referee-tournament-card
  .meta-list {
  grid-template-columns: 1fr;
}

/* Smartphone-Querformat */

body.is-phone-landscape .home-action-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

body.is-phone-landscape .home-action-card {
  grid-template-columns: 1fr;
  min-height: 116px;
  gap: 6px;
  padding: 12px;
}

body.is-phone-landscape
  .home-action-icon {
  width: 36px;
  height: 36px;
}

body.is-phone-landscape
  .home-action-arrow {
  display: none;
}

body.is-phone-landscape
  .home-action-copy strong {
  font-size: 0.84rem;
}

body.is-phone-landscape
  .home-action-copy small {
  font-size: 0.64rem;
}

body.is-phone-landscape
  .home-explanation,
body.is-phone-landscape
  .experience-guide {
  padding: 6px;
}

body.is-phone-landscape
  .home-explanation > div,
body.is-phone-landscape
  .experience-guide > div {
  padding: 4px;
}

body.is-phone-landscape
  .experience-switch a {
  min-width: 64px;
  padding: 6px 9px;
  font-size: 0.63rem;
}

body.is-phone-landscape
  .tournament-workflow,
body.is-phone-landscape
  .referee-quick-nav {
  position: static;
}

body.is-phone-landscape.experience-simple
  .tournament-detail-grid {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
}


/* =====================================================================
   Schritt 2.35 – Zuschauerübersicht und verstecktes Zugangsmenü
   ===================================================================== */

.spectator-header {
  position: relative;
  align-items: flex-start;
}

.viewer-access-menu {
  position: relative;
  z-index: 80;
  flex: 0 0 auto;
}

.viewer-access-menu > summary {
  display: inline-flex;
  min-width: 92px;
  min-height: 44px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.viewer-access-menu > summary::-webkit-details-marker {
  display: none;
}

.viewer-access-menu[open] > summary {
  color: var(--primary);
  background: #ffffff;
}

.viewer-access-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(920px, calc(100vw - 30px));
  padding: 16px;
  border: 1px solid #d8e2ee;
  border-radius: 18px;
  background: #ffffff;
  box-shadow:
    0 22px 60px rgba(15, 35, 60, 0.28);
}

.viewer-access-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  color: var(--text);
}

.viewer-access-heading small {
  color: var(--muted);
  font-size: 0.68rem;
}

.viewer-access-panel .home-action-card {
  min-height: 124px;
  padding: 15px;
}

.spectator-home-layout,
.spectator-detail-layout {
  display: grid;
  gap: 16px;
}

.spectator-selection-panel {
  display: grid;
  grid-template-columns:
    minmax(250px, 0.8fr)
    minmax(0, 1.2fr);
  gap: 12px 18px;
  align-items: end;
  border-color: #b2ddff;
}

.spectator-selection-heading {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.spectator-tournament-select-label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #344054;
  font-size: 0.72rem;
  font-weight: 900;
}

.spectator-tournament-select-label select {
  width: 100%;
  min-height: 48px;
  font-size: 0.88rem;
}

.spectator-tournament-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e4eaf1;
  border-radius: 11px;
  background: #f8fafc;
}

.spectator-tournament-meta strong {
  color: var(--primary);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.spectator-tournament-meta span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.spectator-overview {
  display: grid;
  gap: 14px;
}

.spectator-overview-columns {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.spectator-status-section,
.spectator-detail-section {
  display: grid;
  min-width: 0;
  gap: 11px;
  padding: 15px;
  border: 1px solid #d8e2ee;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(23, 59, 99, 0.06);
}

.spectator-live-section {
  border-color: #75e0a7;
  background:
    linear-gradient(
      180deg,
      #f1fff7 0,
      #ffffff 74px
    );
}

.spectator-status-heading,
.spectator-schedule-block-heading {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.spectator-status-heading > div {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.spectator-status-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.spectator-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #12b76a;
  box-shadow:
    0 0 0 5px rgba(18, 183, 106, 0.13);
  animation:
    spectator-live-pulse 1.8s ease-in-out infinite;
}

@keyframes spectator-live-pulse {
  50% {
    box-shadow:
      0 0 0 9px rgba(18, 183, 106, 0.04);
  }
}

.spectator-limit-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.spectator-match-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.spectator-match-list {
  display: grid;
  gap: 8px;
}

.spectator-match-card,
.spectator-detail-match {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce4ec;
  border-radius: 13px;
  background: #ffffff;
}

.spectator-match-card.status-running,
.spectator-detail-match.status-running {
  border-color: #6ce9a6;
  box-shadow:
    inset 4px 0 0 #12b76a;
}

.spectator-match-card.status-paused,
.spectator-detail-match.status-paused {
  border-color: #fec84b;
  box-shadow:
    inset 4px 0 0 #f79009;
}

.spectator-match-card.status-completed,
.spectator-detail-match.status-completed {
  background: #f8fafc;
}

.spectator-match-card-compact {
  gap: 7px;
  padding: 10px;
}

.spectator-match-topline {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.spectator-match-topline small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.2;
  text-align: right;
  overflow-wrap: anywhere;
}

.spectator-match-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #344054;
  background: #eaecf0;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-running .spectator-match-status {
  color: #067647;
  background: #dcfae6;
}

.status-paused .spectator-match-status {
  color: #93370d;
  background: #fef0c7;
}

.status-completed .spectator-match-status {
  color: #475467;
  background: #eaecf0;
}

.spectator-match-teams {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.spectator-match-teams strong {
  min-width: 0;
  color: var(--primary);
  font-size: 0.85rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.spectator-match-teams strong:last-child {
  text-align: right;
}

.spectator-match-score {
  min-width: 58px;
  color: var(--primary);
  font-size: 1.18rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.spectator-match-versus {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.spectator-match-timer {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  border-radius: 9px;
  color: #175cd3;
  background: #eff8ff;
}

.spectator-match-timer strong {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spectator-match-timer small {
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.spectator-status-empty {
  padding: 14px;
  border: 1px dashed #d0d5dd;
  border-radius: 11px;
  color: var(--muted);
  background: #f9fafb;
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

.spectator-details-link {
  width: min(100%, 420px);
  min-height: 50px;
  margin-inline: auto;
}

/* Read-only Detailseite */

.spectator-detail-summary {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.spectator-detail-summary h2 {
  margin: 7px 0 4px;
}

.spectator-detail-summary p {
  margin: 0;
  color: var(--muted);
}

.spectator-detail-nav {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.spectator-detail-nav a {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: #eff8ff;
  font-size: 0.68rem;
  font-weight: 900;
  text-decoration: none;
}

.spectator-full-schedule {
  display: grid;
  gap: 13px;
}

.spectator-schedule-block {
  overflow: hidden;
  border: 1px solid #d8e2ee;
  border-radius: 14px;
  background: #ffffff;
}

.spectator-schedule-block-heading {
  padding: 11px 13px;
  border-bottom: 1px solid #e4eaf1;
  background: #f8fafc;
}

.spectator-schedule-block-heading > div {
  display: grid;
  gap: 2px;
}

.spectator-schedule-block-heading span,
.spectator-schedule-block-heading small {
  color: var(--muted);
  font-size: 0.6rem;
}

.spectator-schedule-block-heading strong {
  color: var(--primary);
  font-size: 0.86rem;
}

.spectator-schedule-block-matches {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(250px, 1fr));
  gap: 9px;
  padding: 10px;
}

.spectator-detail-match {
  box-shadow: none;
}

.spectator-match-context {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: center;
}

.spectator-ranking-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.spectator-ranking-section:last-child {
  margin-bottom: 0;
}

.spectator-ranking-section h3 {
  margin: 0;
  color: var(--primary);
}

/* Löschen in der einfachen Verwaltung */

.admin-more-options {
  width: 100%;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #f8fafc;
}

.admin-more-options > summary {
  min-height: 42px;
  padding: 10px 12px;
  color: #475467;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.admin-more-options-content {
  display: grid;
  gap: 9px;
  padding: 0 11px 11px;
  border-top: 1px solid #e4e7ec;
}

.admin-more-options-content p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.admin-more-options-content .button {
  width: 100%;
}

/* Smartphone-Hochformat */

body.is-phone-portrait
  .spectator-header {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto;
  gap: 9px;
}

body.is-phone-portrait
  .spectator-header > div {
  min-width: 0;
}

body.is-phone-portrait
  .viewer-access-menu > summary {
  min-width: 44px;
  width: 44px;
  padding-inline: 0;
}

body.is-phone-portrait
  .viewer-access-menu > summary span:last-child {
  display: none;
}

body.is-phone-portrait
  .viewer-access-panel {
  position: fixed;
  top: max(
    66px,
    calc(env(safe-area-inset-top) + 58px)
  );
  right: max(
    10px,
    env(safe-area-inset-right)
  );
  left: max(
    10px,
    env(safe-area-inset-left)
  );
  width: auto;
  max-height: calc(
    100dvh -
    env(safe-area-inset-top) -
    82px
  );
  overflow-y: auto;
}

body.is-phone-portrait
  .viewer-access-panel
  .home-action-grid {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .viewer-access-panel
  .home-action-card {
  min-height: 98px;
}

body.is-phone-portrait
  .spectator-selection-panel,
body.is-phone-portrait
  .spectator-overview-columns {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .spectator-match-grid,
body.is-phone-portrait
  .spectator-schedule-block-matches {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .spectator-detail-summary {
  display: grid;
}

body.is-phone-portrait
  .spectator-detail-nav {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  width: 100%;
}

body.is-phone-portrait
  .spectator-detail-nav a {
  text-align: center;
}

/* Smartphone-Querformat */

body.is-phone-landscape
  .spectator-header {
  align-items: center;
}

body.is-phone-landscape
  .viewer-access-panel {
  position: fixed;
  top: max(
    58px,
    calc(env(safe-area-inset-top) + 48px)
  );
  right: max(
    8px,
    env(safe-area-inset-right)
  );
  left: max(
    8px,
    env(safe-area-inset-left)
  );
  width: auto;
  max-height: calc(
    100dvh -
    env(safe-area-inset-top) -
    68px
  );
  overflow-y: auto;
}

body.is-phone-landscape
  .viewer-access-panel
  .home-action-card {
  min-height: 98px;
}

body.is-phone-landscape
  .spectator-selection-panel {
  grid-template-columns:
    minmax(220px, 0.85fr)
    minmax(0, 1.15fr);
  padding: 11px;
}

body.is-phone-landscape
  .spectator-status-section,
body.is-phone-landscape
  .spectator-detail-section {
  padding: 11px;
}

body.is-phone-landscape
  .spectator-match-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

body.is-phone-landscape
  .spectator-match-card {
  padding: 9px;
}

body.is-phone-landscape
  .spectator-schedule-block-matches {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

/* Größere Bildschirme */

@media (min-width: 1180px) {
  .spectator-home-layout,
  .spectator-detail-layout {
    max-width: 1180px;
    margin-inline: auto;
  }
}


/* =====================================================================
   Schritt 2.36 – deutliche Zuschauerinfos und Profi-Bearbeitung
   ===================================================================== */

.spectator-match-facts {
  display: grid;
  grid-template-columns:
    minmax(104px, auto)
    minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.spectator-field-badge,
.spectator-round-badge,
.spectator-order-badge {
  display: flex;
  min-width: 0;
  align-items: center;
  border-radius: 10px;
  font-weight: 900;
}

.spectator-field-badge {
  gap: 7px;
  justify-content: center;
  min-height: 42px;
  padding: 8px 11px;
  color: #ffffff;
  background: #175cd3;
  box-shadow: 0 5px 12px rgba(23, 92, 211, 0.2);
}

.spectator-field-badge strong {
  font-size: 0.78rem;
  white-space: nowrap;
}

.spectator-round-badge {
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid #b2ddff;
  color: #1849a9;
  background: #eff8ff;
}

.spectator-round-badge strong,
.spectator-round-badge small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.spectator-round-badge strong {
  font-size: 0.7rem;
}

.spectator-round-badge small {
  color: #475467;
  font-size: 0.58rem;
  font-weight: 800;
}

.spectator-order-badge {
  min-height: 30px;
  padding: 6px 9px;
  color: #93370d;
  background: #fef0c7;
  font-size: 0.62rem;
  white-space: nowrap;
}

.spectator-match-card .spectator-match-score {
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #f2f4f7;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.spectator-live-section
  .spectator-match-card
  .spectator-match-score {
  color: #067647;
  background: #dcfae6;
}

.spectator-match-card .spectator-match-timer {
  min-height: 44px;
}

.spectator-match-card .spectator-match-timer strong {
  font-size: 1.12rem;
}

/* Profi-Grunddateneditor */

.professional-edit-panel {
  display: grid;
  gap: 13px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #b2ddff;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #f5fbff, #ffffff);
}

.professional-edit-heading {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.professional-edit-heading h3 {
  margin: 2px 0 0;
  color: var(--primary);
}

.professional-edit-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  color: #067647;
  background: #dcfae6;
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
}

.professional-edit-status.is-locked {
  color: #93370d;
  background: #fef0c7;
}

.professional-edit-form {
  display: grid;
  gap: 12px;
}

.professional-edit-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.professional-edit-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #344054;
  font-size: 0.7rem;
  font-weight: 900;
}

.professional-edit-form input,
.professional-edit-form select,
.professional-edit-form textarea {
  width: 100%;
}

.professional-structure-note,
.team-structure-lock {
  padding: 10px 12px;
  border: 1px solid #b2ddff;
  border-radius: 10px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 0.68rem;
  line-height: 1.4;
}

.professional-structure-note.is-locked,
.team-structure-lock {
  border-color: #fec84b;
  color: #93370d;
  background: #fffaeb;
}

.tournament-structure-locked
  .advanced-feature {
  opacity: 0.8;
}

.tournament-structure-locked
  .advanced-feature input:disabled,
.tournament-structure-locked
  .advanced-feature select:disabled,
.tournament-structure-locked
  [data-playing-field-count]:disabled {
  cursor: not-allowed;
}

/* Einfach bleibt nach dem Anlegen auf Durchführung beschränkt. */

.experience-simple .professional-edit-panel {
  display: none !important;
}

/* Smartphone-Hochformat */

body.is-phone-portrait
  .spectator-match-facts,
body.is-phone-portrait
  .professional-edit-grid {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .spectator-field-badge {
  justify-content: flex-start;
}

body.is-phone-portrait
  .professional-edit-heading {
  align-items: flex-start;
}

body.is-phone-portrait
  .professional-edit-status {
  max-width: 42%;
  text-align: center;
  white-space: normal;
}

/* Smartphone-Querformat */

body.is-phone-landscape
  .spectator-match-facts {
  grid-template-columns:
    minmax(96px, auto)
    minmax(0, 1fr);
}

body.is-phone-landscape
  .spectator-field-badge {
  min-height: 38px;
  padding: 6px 9px;
}

body.is-phone-landscape
  .professional-edit-panel {
  padding: 11px;
}

body.is-phone-landscape
  .professional-edit-grid {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
}


/* =====================================================================
   Schritt 2.37 – vorläufige Qualifikation im K.-o.-Baum
   ===================================================================== */

.bracket-match-heading,
.playing-field-match-label,
.referee-match-card-badges {
  display: flex;
  min-width: 0;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.playing-field-match-label {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.qualification-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.53rem;
  font-weight: 950;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.qualification-badge-provisional {
  color: #93370d;
  border-color: #fedf89;
  background: #fffaeb;
}

.qualification-badge-open {
  color: #475467;
  border-color: #d0d5dd;
  background: #f2f4f7;
}

.qualification-match-locked {
  border-style: dashed !important;
  background-image:
    linear-gradient(
      135deg,
      rgba(71, 84, 103, 0.025) 25%,
      transparent 25%,
      transparent 50%,
      rgba(71, 84, 103, 0.025) 50%,
      rgba(71, 84, 103, 0.025) 75%,
      transparent 75%,
      transparent
    );
  background-size: 16px 16px;
}

.qualification-match-provisional {
  border-color: #fec84b !important;
}

.qualification-status-locked {
  color: #93370d !important;
  background: #fef0c7 !important;
}

.qualification-lock-note {
  padding: 9px 11px;
  border: 1px solid #fedf89;
  border-radius: 10px;
  color: #93370d;
  background: #fffaeb;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.referee-match-card-badges {
  justify-content: flex-end;
}

.spectator-match-topline .qualification-badge {
  margin-inline-start: auto;
}

body.is-phone-portrait .bracket-match-heading,
body.is-phone-portrait .playing-field-match-label {
  align-items: flex-start;
}

body.is-phone-portrait .qualification-badge {
  min-height: 20px;
  padding-inline: 6px;
  font-size: 0.48rem;
}

body.is-phone-landscape .qualification-lock-note {
  padding: 7px 9px;
  font-size: 0.58rem;
}


/* =====================================================================
   Schritt 2.38 – Volleyball-Satzmodus und Satzanzeige
   ===================================================================== */

.volleyball-set-settings {
  display: grid;
  gap: 13px;
  border-color: #b9d9ff;
  background:
    linear-gradient(145deg, #f4f9ff, #ffffff);
}

.volleyball-set-settings.hidden,
.volleyball-set-status.hidden {
  display: none !important;
}

.volleyball-set-settings-heading {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.volleyball-set-settings-heading h2 {
  margin-bottom: 0;
}

.volleyball-set-settings-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #175cd3;
  background: #dbeeff;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.volleyball-set-settings-controls {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.volleyball-set-mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 66px;
  padding: 11px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  color: #344054;
  background: #ffffff;
  cursor: pointer;
}

.volleyball-set-mode-option:has(input:checked) {
  border-color: #2e90fa;
  box-shadow: inset 0 0 0 1px #2e90fa;
  background: #eff8ff;
}

.volleyball-set-mode-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.72;
}

.volleyball-set-mode-option input {
  width: 19px;
  height: 19px;
  margin: 0;
}

.volleyball-set-mode-option span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.volleyball-set-mode-option strong {
  color: var(--primary);
  font-size: 0.8rem;
}

.volleyball-set-mode-option small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.3;
}

.volleyball-set-settings-controls > .button {
  grid-column: 1 / -1;
  min-height: 46px;
}

.volleyball-set-status {
  display: grid;
  grid-template-columns:
    minmax(120px, 0.8fr)
    minmax(120px, 0.7fr)
    minmax(220px, 1.5fr);
  gap: 8px;
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid #b2ddff;
  border-radius: 13px;
  background: #f5faff;
}

.volleyball-current-set,
.volleyball-match-set-score,
.volleyball-set-history-wrap {
  display: grid;
  min-width: 0;
  gap: 4px;
  align-content: center;
  padding: 8px 10px;
  border-radius: 9px;
  background: #ffffff;
}

.volleyball-current-set > span,
.volleyball-match-set-score > span,
.volleyball-set-history-wrap > span {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.volleyball-current-set strong {
  color: var(--primary);
  font-size: 0.82rem;
}

.volleyball-match-set-score strong {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--primary);
  font-size: 1.22rem;
  font-variant-numeric: tabular-nums;
}

.volleyball-set-history {
  display: flex;
  min-width: 0;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.64rem;
}

.volleyball-set-history-chip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 999px;
  color: #344054;
  background: #f2f4f7;
}

.volleyball-set-history-chip small {
  font-size: 0.54rem;
}

.volleyball-set-history-chip strong {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.volleyball-set-history-chip.winner-home {
  box-shadow: inset 3px 0 0 #2e90fa;
}

.volleyball-set-history-chip.winner-away {
  box-shadow: inset -3px 0 0 #7f56d9;
}

.scoreboard-focus-volleyball-set {
  display: grid;
  grid-template-columns:
    minmax(0, 0.8fr)
    auto
    minmax(0, 1.4fr);
  gap: clamp(8px, 1.5vw, 20px);
  align-items: center;
  width: min(94vw, 1100px);
  padding: clamp(8px, 1.2vw, 14px)
    clamp(12px, 2vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  text-align: center;
}

.scoreboard-focus-volleyball-set[hidden] {
  display: none !important;
}

.scoreboard-focus-volleyball-set > span:first-child {
  font-size: clamp(0.8rem, 1.5vw, 1.15rem);
  font-weight: 900;
}

.scoreboard-focus-volleyball-set strong {
  display: flex;
  gap: 7px;
  align-items: baseline;
  justify-content: center;
  font-size: clamp(1rem, 2.2vw, 1.7rem);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.scoreboard-focus-volleyball-set > span:last-child {
  min-width: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.6rem, 1.15vw, 0.86rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.spectator-volleyball-set-score,
.referee-volleyball-set-result {
  display: grid;
  gap: 1px;
  justify-items: center;
}

.spectator-volleyball-set-score small,
.referee-volleyball-set-result small {
  color: var(--muted);
  font-size: 0.47rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.spectator-volleyball-current-points {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 9px;
  color: #344054;
  background: #f2f4f7;
  font-size: 0.6rem;
  font-weight: 800;
}

.spectator-volleyball-current-points strong {
  color: var(--primary);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

body.is-phone-portrait
  .volleyball-set-settings-controls,
body.is-phone-portrait
  .volleyball-set-status {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .volleyball-set-mode-option {
  min-height: 56px;
}

body.is-phone-portrait
  .volleyball-set-history {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 2px;
}

body.is-phone-portrait
  .volleyball-set-history-chip {
  flex: 0 0 auto;
}

body.is-phone-portrait
  .scoreboard-focus-volleyball-set {
  grid-template-columns: auto auto;
  width: min(94vw, 520px);
}

body.is-phone-portrait
  .scoreboard-focus-volleyball-set > span:last-child {
  grid-column: 1 / -1;
}

body.is-phone-landscape
  .volleyball-set-settings {
  padding: 10px;
}

body.is-phone-landscape
  .volleyball-set-settings-controls {
  grid-template-columns:
    repeat(3, minmax(0, 1fr)) auto;
}

body.is-phone-landscape
  .volleyball-set-settings-controls > .button {
  grid-column: auto;
  min-height: 54px;
}

body.is-phone-landscape
  .volleyball-set-mode-option {
  min-height: 54px;
  padding: 7px;
}

body.is-phone-landscape
  .volleyball-set-mode-option small {
  display: none;
}

body.is-phone-landscape
  .volleyball-set-status {
  grid-template-columns:
    minmax(110px, 0.75fr)
    minmax(100px, 0.65fr)
    minmax(210px, 1.6fr);
  margin-bottom: 7px;
  padding: 6px;
}

body.is-phone-landscape
  .volleyball-current-set,
body.is-phone-landscape
  .volleyball-match-set-score,
body.is-phone-landscape
  .volleyball-set-history-wrap {
  padding: 5px 7px;
}

body.is-phone-landscape
  .scoreboard-focus-volleyball-set {
  grid-template-columns:
    minmax(0, 0.65fr)
    auto
    minmax(0, 1.4fr);
  padding-block: 6px;
}

body.is-phone-low-height
  .volleyball-set-status {
  margin-bottom: 5px;
}

body.is-phone-low-height
  .volleyball-set-history-chip {
  padding-block: 3px;
}


/* =====================================================================
   Schritt 3.2 – öffentliche Zuschaueransicht und getrennte Rollen
   ===================================================================== */

html.access-pending body {
  visibility: hidden;
}

html.access-ready body {
  visibility: visible;
}

[data-role-visible][hidden] {
  display: none !important;
}

.public-role-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.public-role-nav .button {
  min-height: 44px;
  white-space: nowrap;
}

.access-notice {
  width: min(
    calc(100% - 32px),
    1180px
  );
  margin:
    max(12px, env(safe-area-inset-top))
    auto
    0;
  padding: 12px 16px;
  border: 1px solid #f2c94c;
  border-radius: 12px;
  background: #fff8db;
  color: #694d00;
  font-size: 0.9rem;
  font-weight: 700;
}

.referee-assignment-status {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted-text, #5f6b7a);
  line-height: 1.45;
}

.app-referee .referee-tournament-card
  .card-content {
  gap: 12px;
}

.app-referee .referee-tournament-card
  .meta-list {
  margin-block: 0 4px;
}

.app-referee .referee-schedule-link {
  width: 100%;
  justify-content: center;
}

.app-referee-tournament.experience-simple
  .referee-quick-nav {
  display: flex;
}

body.is-phone-portrait
  .public-role-nav {
  width: 100%;
  justify-content: stretch;
}

body.is-phone-portrait
  .public-role-nav .button {
  width: 100%;
  justify-content: center;
}

body.is-phone-portrait
  .access-notice {
  width: min(
    calc(100% - 20px),
    1180px
  );
  padding: 10px 12px;
  font-size: 0.82rem;
}

body.is-phone-landscape
  .public-role-nav .button {
  min-height: 40px;
}


/* =====================================================================
   Schritt 3.3 – lokaler Rollen-Testmodus
   ===================================================================== */

.test-role-switcher {
  position: sticky;
  z-index: 10000;
  top: 0;
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto
    auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding:
    max(8px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    8px
    max(12px, env(safe-area-inset-left));
  border-bottom: 2px solid #f4b942;
  background: #111827;
  color: #ffffff;
  box-shadow:
    0 8px 20px
    rgba(15, 23, 42, 0.2);
}

.test-role-switcher-header {
  display: grid;
  gap: 1px;
  min-width: 112px;
}

.test-role-switcher-header strong {
  color: #f8c451;
  font-size: 0.82rem;
  line-height: 1.1;
}

.test-role-switcher-header span {
  color: #d6deea;
  font-size: 0.68rem;
  line-height: 1.2;
}

.test-role-switcher-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.test-role-switcher-button,
.test-role-switcher-exit {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #475569;
  border-radius: 9px;
  background: #1e293b;
  color: #ffffff;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.test-role-switcher-button:hover,
.test-role-switcher-button:focus-visible,
.test-role-switcher-exit:hover,
.test-role-switcher-exit:focus-visible {
  border-color: #f8c451;
  outline: 2px solid #f8c451;
  outline-offset: 1px;
}

.test-role-switcher-button.is-active {
  border-color: #f8c451;
  background: #c88316;
}

.test-role-switcher-admin-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.test-role-switcher-admin-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 8px;
  background: #334155;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.test-role-switcher-admin-links a:hover,
.test-role-switcher-admin-links a:focus-visible {
  background: #475569;
  outline: 2px solid #f8c451;
  outline-offset: 1px;
}

.test-role-switcher-exit {
  border-color: #7f1d1d;
  background: #991b1b;
}

body.is-phone-portrait
  .test-role-switcher {
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 7px;
  padding:
    max(7px, env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right))
    7px
    max(8px, env(safe-area-inset-left));
}

body.is-phone-portrait
  .test-role-switcher-header {
  min-width: 0;
}

body.is-phone-portrait
  .test-role-switcher-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  order: 3;
}

body.is-phone-portrait
  .test-role-switcher-button {
  width: 100%;
  min-width: 0;
  padding-inline: 5px;
  white-space: normal;
}

body.is-phone-portrait
  .test-role-switcher-admin-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  order: 4;
}

body.is-phone-portrait
  .test-role-switcher-admin-links a {
  width: 100%;
}

body.is-phone-portrait
  .test-role-switcher-exit {
  align-self: center;
  padding-inline: 8px;
  font-size: 0.67rem;
}

body.is-phone-landscape
  .test-role-switcher {
  gap: 6px;
  padding-block:
    max(5px, env(safe-area-inset-top))
    5px;
}

body.is-phone-landscape
  .test-role-switcher-button,
body.is-phone-landscape
  .test-role-switcher-exit {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.66rem;
}

body.is-phone-low-height
  .test-role-switcher-header span {
  display: none;
}


/* =====================================================================
   Schritt 3.4 – einheitlicher Turnier-Assistent
   ===================================================================== */

.admin-wizard-page .admin-layout {
  display: grid;
  gap: 22px;
}

.wizard-shell {
  display: grid;
  gap: 14px;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.wizard-progress button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #ffffff;
  color: #667085;
  text-align: left;
}

.wizard-progress button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef2f6;
  font-size: 0.76rem;
  font-weight: 900;
}

.wizard-progress button strong {
  font-size: 0.76rem;
}

.wizard-progress button.active {
  border-color: #1d5d91;
  background: #eef7ff;
  color: #123a63;
}

.wizard-progress button.active span,
.wizard-progress button.completed span {
  background: #123a63;
  color: #ffffff;
}

.wizard-step {
  min-height: 360px;
}

.admin-sport-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-sport-choice label,
.wizard-option-card {
  position: relative;
  cursor: pointer;
}

.admin-sport-choice input,
.wizard-option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-sport-choice label > span,
.wizard-option-card > span {
  display: grid;
  gap: 5px;
  min-height: 82px;
  align-content: center;
  padding: 14px;
  border: 2px solid #d0d5dd;
  border-radius: 14px;
  background: #ffffff;
}

.admin-sport-choice input:checked + span,
.wizard-option-card input:checked + span {
  border-color: #1d5d91;
  background: #eef7ff;
  box-shadow: 0 0 0 3px rgba(29, 93, 145, 0.12);
}

.admin-sport-choice label > span {
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
}

.wizard-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wizard-option-card strong {
  color: #123a63;
  font-size: 0.96rem;
}

.wizard-option-card small {
  color: #667085;
  line-height: 1.35;
}

.wizard-inline-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 14px;
}

.wizard-inline-actions label {
  min-width: 180px;
}

.wizard-conditional-settings {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d8e1ea;
  border-radius: 14px;
  background: #f8fafc;
}

.wizard-conditional-settings h3 {
  margin-top: 0;
}

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
}

.checkbox-line input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.wizard-summary {
  display: grid;
  gap: 16px;
}

.wizard-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.wizard-summary dl div {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.wizard-summary dt {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 800;
}

.wizard-summary dd {
  margin: 4px 0 0;
  color: #123a63;
  font-weight: 900;
}

.wizard-summary-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.wizard-summary-teams span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eaf2f8;
  color: #123a63;
  font-size: 0.76rem;
  font-weight: 800;
}

.wizard-confirmation {
  padding: 14px;
  border: 1px solid #b7d6c4;
  border-radius: 12px;
  background: #effaf3;
}

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.wizard-navigation .button {
  min-width: 130px;
}

body.is-phone-portrait .wizard-progress {
  grid-template-columns: repeat(5, 42px);
  overflow-x: auto;
  justify-content: start;
  padding-bottom: 4px;
}

body.is-phone-portrait .wizard-progress button {
  grid-template-columns: 1fr;
  justify-items: center;
  min-width: 42px;
  min-height: 44px;
  padding: 6px;
}

body.is-phone-portrait .wizard-progress button strong {
  display: none;
}

body.is-phone-portrait .admin-sport-choice,
body.is-phone-portrait .wizard-option-grid,
body.is-phone-portrait .wizard-summary dl {
  grid-template-columns: 1fr;
}

body.is-phone-portrait .wizard-step {
  min-height: 0;
}

body.is-phone-portrait .wizard-navigation {
  position: sticky;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 10;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
}

body.is-phone-portrait .wizard-navigation .button {
  flex: 1;
  min-width: 0;
}

body.is-phone-landscape .wizard-step {
  min-height: 250px;
}


/* =====================================================================
   Schritt 3.5 – einfache Zuschauerwahl und zentrale Einstellungen
   ===================================================================== */

.spectator-catalogue-layout {
  display: grid;
  gap: 24px;
  max-width: 1120px;
  margin-inline: auto;
}

.spectator-catalogue-heading {
  margin-bottom: 14px;
}

.spectator-tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.spectator-tournament-card {
  display: grid;
  gap: 13px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid #d7e0e9;
  border-radius: 17px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(16, 42, 67, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.spectator-tournament-card:hover,
.spectator-tournament-card:focus-visible {
  transform: translateY(-2px);
  border-color: #1d5d91;
  box-shadow: 0 13px 28px rgba(16, 42, 67, 0.14);
  outline: 3px solid rgba(29, 93, 145, 0.15);
  outline-offset: 2px;
}

.spectator-tournament-card.state-running {
  border-color: #66b48b;
  background: linear-gradient(145deg, #ffffff, #f1fbf5);
}

.spectator-tournament-card-topline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.spectator-tournament-state {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: #344054;
  font-size: 0.68rem;
  font-weight: 900;
}

.state-running .spectator-tournament-state {
  background: #dff5e8;
  color: #067647;
}

.spectator-tournament-card h2 {
  margin: 0;
  color: #123a63;
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  line-height: 1.15;
}

.spectator-tournament-basics {
  display: grid;
  gap: 9px;
  margin: 0;
}

.spectator-tournament-basics div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
}

.spectator-tournament-basics dt {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 800;
}

.spectator-tournament-basics dd {
  margin: 0;
  color: #1d2939;
  font-size: 0.86rem;
  font-weight: 800;
}

.spectator-tournament-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e5eaf0;
  color: #175cd3;
  font-size: 0.82rem;
  font-weight: 900;
}

.past-tournaments-section {
  padding: 14px;
  border: 1px solid #d7e0e9;
  border-radius: 15px;
  background: #f8fafc;
}

.past-tournaments-section > summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: #344054;
  font-weight: 900;
}

.spectator-past-grid {
  margin-top: 14px;
}

.spectator-past-grid .spectator-tournament-card {
  min-height: 190px;
  box-shadow: none;
}

.tournament-settings-layout {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin-inline: auto;
}

#tournament-settings-form {
  display: grid;
  gap: 18px;
}

.settings-more-details {
  margin-top: 18px;
  border: 1px solid #d7e0e9;
  border-radius: 13px;
  background: #f8fafc;
}

.settings-more-details > summary {
  padding: 14px 16px;
  cursor: pointer;
  color: #123a63;
  font-weight: 900;
}

.settings-more-content {
  display: grid;
  gap: 18px;
  padding: 0 16px 16px;
}

.settings-more-content section + section {
  padding-top: 16px;
  border-top: 1px solid #dce4ec;
}

.settings-conditional,
.sport-default-settings {
  display: grid;
  gap: 14px;
}

.time-default-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.settings-set-mode-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-set-mode-fieldset legend {
  margin-bottom: 10px;
  font-weight: 900;
}

.settings-set-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.settings-set-mode-grid label {
  position: relative;
}

.settings-set-mode-grid input {
  position: absolute;
  opacity: 0;
}

.settings-set-mode-grid span {
  display: grid;
  place-items: center;
  min-height: 60px;
  padding: 10px;
  border: 2px solid #d0d5dd;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.settings-set-mode-grid input:checked + span {
  border-color: #1d5d91;
  background: #eef7ff;
  color: #123a63;
}

.settings-save-bar {
  position: sticky;
  z-index: 20;
  bottom: max(8px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  border: 1px solid #d7e0e9;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.14);
}

.settings-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #f3b6b6;
  background: #fff8f8;
}

.playing-field-settings-readonly .playing-field-select-field {
  display: grid;
  gap: 4px;
}

.playing-field-settings-readonly .playing-field-select-field strong {
  color: #123a63;
  font-size: 1.25rem;
}

.playing-field-settings-readonly .playing-field-select-field a {
  color: #175cd3;
  font-size: 0.72rem;
  font-weight: 800;
}

body.is-phone-portrait .spectator-tournament-grid,
body.is-phone-portrait .settings-set-mode-grid {
  grid-template-columns: 1fr;
}

body.is-phone-portrait .spectator-tournament-card {
  min-height: 190px;
  padding: 15px;
}

body.is-phone-portrait .settings-danger-zone {
  align-items: stretch;
  flex-direction: column;
}

body.is-phone-portrait .settings-save-bar .button {
  width: 100%;
}


/* =====================================================================
   Schritt 3.6 – kompakte Zuschauer-Turnierübersicht
   ===================================================================== */

.spectator-overview-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d8e1ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow:
    0 8px 22px
    rgba(15, 42, 66, 0.06);
}

.spectator-overview-section.spectator-live-section {
  border-color: #9fd8b9;
  background:
    linear-gradient(
      180deg,
      #f2fbf6 0%,
      #ffffff 100%
    );
}

.spectator-overview-match-list {
  display: grid;
  gap: 10px;
}

.spectator-overview-match {
  margin: 0;
}

.spectator-full-plan-toggle-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 10px;
}

.spectator-full-plan-toggle {
  width: min(100%, 520px);
  min-height: 52px;
  justify-content: center;
  font-size: 0.95rem;
}

.spectator-full-plan {
  display: grid;
  gap: 24px;
  scroll-margin-top: 20px;
}

.spectator-full-plan.hidden {
  display: none;
}

#volleyball-referee-note {
  margin: 0;
}

body.is-phone-portrait
  .spectator-overview-section {
  gap: 10px;
  padding: 13px;
  border-radius: 14px;
}

body.is-phone-portrait
  .spectator-overview-section
  .section-heading {
  align-items: flex-start;
}

body.is-phone-portrait
  .spectator-overview-match-list {
  gap: 8px;
}

body.is-phone-portrait
  .spectator-full-plan-toggle {
  min-height: 48px;
  padding-inline: 12px;
  white-space: normal;
  text-align: center;
}

body.is-phone-landscape
  .spectator-overview-section {
  padding: 12px 14px;
}

body.is-phone-low-height
  .spectator-full-plan-toggle {
  min-height: 42px;
}


/* =====================================================================
   Schritt 3.8 – Tabelle oder Turnierbaum vor dem Spielplan
   ===================================================================== */

.spectator-progress-section {
  display: grid;
  gap: 16px;
  border-color: #b8cfe2;
  background:
    linear-gradient(
      180deg,
      #f6faff 0%,
      #ffffff 150px
    );
}

.spectator-progress-group-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 16px;
}

.spectator-progress-subsection {
  display: grid;
  gap: 12px;
}

.spectator-progress-subsection
  + .spectator-progress-subsection {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #d8e1ea;
}

.spectator-progress-subsection > h3 {
  margin: 0;
  color: #123a63;
  font-size: 1.08rem;
}

.spectator-bracket-scroll {
  margin-inline: -2px;
}

.spectator-tournament-bracket {
  padding-bottom: 4px;
}

.spectator-bracket-phase {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.spectator-bracket-match {
  min-width: 0;
}

.spectator-bracket-match.status-running {
  border-color: #32d583;
  background: #f0fdf4;
}

.spectator-bracket-match.status-completed {
  border-color: #c8d2dc;
  background: #f8fafc;
}

.spectator-bracket-status {
  display: block;
  margin-top: 7px;
  color: #667085;
  font-size: 0.67rem;
  font-weight: 800;
  text-align: right;
}

.spectator-tournament-bracket.loser-bracket
  .bracket-round h3 {
  color: #934f00;
  background: #fef0c7;
}

#complete-schedule {
  scroll-margin-top: 20px;
}

body.is-phone-portrait
  .spectator-progress-group-grid {
  grid-template-columns: 1fr;
}

body.is-phone-portrait
  .spectator-progress-section {
  gap: 12px;
}

body.is-phone-portrait
  .spectator-progress-section
  .section-heading {
  align-items: flex-start;
}

body.is-phone-portrait
  .spectator-progress-subsection
  + .spectator-progress-subsection {
  margin-top: 14px;
  padding-top: 14px;
}

body.is-phone-portrait
  .spectator-tournament-bracket
  .bracket-round {
  width: min(78vw, 230px);
  flex-basis: min(78vw, 230px);
}

body.is-phone-landscape
  .spectator-progress-group-grid {
  grid-template-columns:
    repeat(
      2,
      minmax(260px, 1fr)
    );
  overflow-x: auto;
}


/* =====================================================================
   Schritt 3.9 – Personen, Trainer/Kapitäne und persönliche Teamseite
   ===================================================================== */

.feature-switch {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 210px;
  padding: 10px 12px;
  border: 1px solid #cbd5df;
  border-radius: 13px;
  background: #f8fafc;
  cursor: pointer;
}

.feature-switch input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.feature-switch span {
  display: grid;
  gap: 2px;
}

.feature-switch strong {
  color: #123a63;
  font-size: 0.84rem;
}

.feature-switch small {
  color: #667085;
  font-size: 0.68rem;
}

.people-admin-panel {
  display: grid;
  gap: 16px;
}

.people-admin-team-list {
  display: grid;
  gap: 14px;
}

.people-admin-team-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d8e1ea;
  border-radius: 15px;
  background: #f8fafc;
}

.people-admin-team-heading h4 {
  margin: 2px 0 0;
  color: #123a63;
  font-size: 1rem;
}

.people-role-list {
  display: grid;
  gap: 8px;
}

.people-role-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #d8e1ea;
  border-radius: 11px;
  background: #ffffff;
}

.people-role-row > div {
  display: grid;
  gap: 2px;
}

.people-role-row strong {
  color: #123a63;
  font-size: 0.8rem;
}

.people-role-row span {
  color: #667085;
  font-size: 0.72rem;
}

.people-role-row.is-pending {
  border-color: #f0c36b;
  background: #fffaf0;
}

.people-role-empty,
.people-search-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef2f6;
  color: #667085;
  font-size: 0.76rem;
}

.people-admin-search,
.personal-member-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.people-search-results {
  display: grid;
  gap: 8px;
}

.people-search-result {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border: 1px solid #d8e1ea;
  border-radius: 11px;
  background: #ffffff;
}

.people-search-result > div:first-child {
  display: grid;
  gap: 1px;
}

.people-search-result strong {
  color: #123a63;
}

.people-search-result span,
.people-search-result small {
  color: #667085;
  font-size: 0.72rem;
}

.people-search-result-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button.button-small {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 0.7rem;
}

.person-registration-layout,
.personal-team-layout {
  display: grid;
  gap: 20px;
}

.person-registration-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.person-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.local-person-list-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #d8e1ea;
}

.local-person-list-wrap h3 {
  margin: 0 0 10px;
  color: #123a63;
}

.local-person-list {
  display: grid;
  gap: 8px;
}

.local-person-button {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid #d8e1ea;
  border-radius: 11px;
  background: #ffffff;
  color: #123a63;
  text-align: left;
  cursor: pointer;
}

.local-person-button:hover,
.local-person-button:focus-visible {
  border-color: #1d5d91;
  outline: 2px solid rgba(29, 93, 145, 0.18);
  outline-offset: 1px;
}

.local-person-button span,
.local-person-button small {
  color: #667085;
  font-size: 0.72rem;
}

.personal-profile-card {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.personal-profile-card h2 {
  margin: 3px 0;
  color: #123a63;
}

.personal-profile-card p {
  margin: 0;
  color: #667085;
}

.personal-invitation-list,
.personal-team-list {
  display: grid;
  gap: 14px;
}

.personal-invitation-card {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid #f0c36b;
  border-radius: 14px;
  background: #fffaf0;
}

.personal-invitation-card h3 {
  margin: 7px 0 4px;
  color: #123a63;
}

.personal-invitation-card p {
  margin: 0;
  color: #475467;
}

.personal-invitation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.personal-team-card {
  display: grid;
  gap: 16px;
}

.personal-team-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.personal-team-heading h2 {
  margin: 7px 0 3px;
  color: #123a63;
}

.personal-team-heading p {
  margin: 0;
  color: #667085;
}

.personal-team-role-badges,
.personal-member-roles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.personal-team-role-badges span,
.personal-member-roles span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf2f8;
  color: #123a63;
  font-size: 0.68rem;
  font-weight: 900;
}

.personal-next-match-card,
.personal-placement-card {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 15px;
}

.personal-next-match-card {
  border: 1px solid #b8cfe2;
  background: #f2f8fd;
}

.personal-next-match-card.is-next {
  border-color: #f0b84b;
  background: #fff8e8;
}

.personal-next-match-card.is-running {
  border-color: #32d583;
  background: #effcf4;
}

.personal-next-match-card span,
.personal-placement-card span {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.personal-next-match-card strong {
  color: #123a63;
  font-size: 1rem;
}

.personal-placement-card {
  place-items: center;
  min-height: 150px;
  text-align: center;
}

.personal-placement-card.is-eliminated {
  border: 2px solid #f97066;
  background: #fff1f0;
  color: #912018;
}

.personal-placement-card.is-finished {
  border: 2px solid #32d583;
  background: #effcf4;
  color: #05603a;
}

.personal-placement-card strong {
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1;
}

.personal-placement-card small {
  font-size: 0.78rem;
}

.personal-team-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.personal-members-details {
  border: 1px solid #d8e1ea;
  border-radius: 12px;
  background: #ffffff;
}

.personal-members-details summary {
  padding: 12px 14px;
  color: #123a63;
  font-weight: 900;
  cursor: pointer;
}

.personal-member-list {
  display: grid;
  gap: 7px;
  padding: 0 14px 14px;
}

.personal-member-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

.personal-member-row > div:first-child {
  display: grid;
}

.personal-member-row span {
  color: #667085;
  font-size: 0.72rem;
}

.personal-team-management {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #b8cfe2;
  border-radius: 14px;
  background: #f6faff;
}

.personal-team-management h3 {
  margin: 3px 0;
  color: #123a63;
}

.personal-team-management p {
  margin: 0;
  color: #667085;
}

.team-call-popup {
  position: fixed;
  z-index: 20000;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(15, 23, 42, 0.76);
}

.team-call-popup.hidden {
  display: none;
}

.team-call-popup-card {
  display: grid;
  justify-items: center;
  width: min(100%, 480px);
  padding: 26px;
  border: 3px solid #f4b942;
  border-radius: 20px;
  background: #ffffff;
  box-shadow:
    0 24px 70px
    rgba(15, 23, 42, 0.35);
  text-align: center;
}

.team-call-popup-icon {
  font-size: 3rem;
}

.team-call-popup-card h2 {
  margin: 4px 0 8px;
  color: #b54708;
  font-size: clamp(1.6rem, 6vw, 2.5rem);
}

.team-call-popup-card p:not(.eyebrow) {
  margin: 0 0 18px;
  color: #344054;
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .person-registration-grid {
    grid-template-columns: 1fr;
  }

  .feature-switch {
    width: 100%;
    min-width: 0;
  }

  .people-admin-search,
  .personal-member-search {
    grid-template-columns: 1fr;
  }

  .people-search-result,
  .people-role-row,
  .personal-invitation-card,
  .personal-team-heading,
  .personal-profile-card {
    align-items: stretch;
    flex-direction: column;
  }

  .people-search-result-actions,
  .personal-invitation-actions,
  .personal-team-role-badges,
  .personal-member-roles {
    justify-content: flex-start;
  }

  .people-search-result-actions .button,
  .personal-invitation-actions .button {
    flex: 1;
  }

  .local-person-button {
    grid-template-columns: 1fr auto;
  }

  .local-person-button span {
    grid-column: 1 / -1;
    order: 3;
  }

  .personal-member-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.is-phone-portrait
  .team-call-popup-card {
  padding: 20px 16px;
}

body.is-phone-landscape
  .team-call-popup-card {
  max-height: calc(
    100vh -
    env(safe-area-inset-top) -
    env(safe-area-inset-bottom) -
    16px
  );
  overflow-y: auto;
}


/* =====================================================================
   Schritt 3.10 – Satzpunktzahl vor jedem Volleyballsatz
   ===================================================================== */

.volleyball-set-target-settings {
  display: grid;
  gap: 11px;
  margin-top: 4px;
  padding: 14px;
  border: 2px solid #f0b84b;
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      #fff9e9,
      #ffffff
    );
}

.volleyball-set-target-settings.is-locked {
  border-color: #d0d5dd;
  background: #f8fafc;
}

.volleyball-set-target-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.volleyball-set-target-heading h3 {
  margin: 2px 0 3px;
  color: var(--primary);
  font-size: 0.98rem;
}

.volleyball-set-target-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

#volleyball-set-target-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#volleyball-set-target-badge.is-required {
  color: #93370d;
  background: #ffead5;
}

#volleyball-set-target-badge.is-selected {
  color: #05603a;
  background: #d1fadf;
}

.volleyball-set-target-options {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.volleyball-set-target-option {
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 66px;
  padding: 11px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.volleyball-set-target-option:has(input:checked) {
  border-color: #f79009;
  background: #fff6e5;
  box-shadow:
    inset 0 0 0 1px #f79009;
}

.volleyball-set-target-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.7;
}

.volleyball-set-target-option input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.volleyball-set-target-option span {
  display: grid;
  gap: 3px;
}

.volleyball-set-target-option strong {
  color: var(--primary);
  font-size: 0.82rem;
}

.volleyball-set-target-option small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.3;
}

.volleyball-set-target-options > .button {
  grid-column: 1 / -1;
  min-height: 46px;
}

.volleyball-current-set-target {
  padding: 4px 7px;
  border-radius: 999px;
  color: #05603a;
  background: #d1fadf;
  font-size: 0.57rem;
  font-weight: 900;
  white-space: nowrap;
}

.volleyball-current-set-target.is-required {
  color: #93370d;
  background: #ffead5;
}

@media (max-width: 760px) {
  .volleyball-set-target-heading {
    align-items: stretch;
    flex-direction: column;
  }

  #volleyball-set-target-badge {
    align-self: flex-start;
  }

  .volleyball-set-target-options {
    grid-template-columns: 1fr;
  }

  .volleyball-set-target-options > .button {
    grid-column: auto;
  }

  .volleyball-current-set-line {
    flex-wrap: wrap;
  }
}

body.is-phone-landscape
  .volleyball-set-target-settings {
  padding: 10px;
}

body.is-phone-landscape
  .volleyball-set-target-option {
  min-height: 54px;
  padding: 8px;
}


/* =====================================================================
   Schritt 3.11 – zweistufige Team-Benachrichtigungen
   ===================================================================== */

.team-call-popup[data-notification-type="soon"]
  .team-call-popup-card {
  border-color: #f0b84b;
  background:
    linear-gradient(
      180deg,
      #fff9e8 0%,
      #ffffff 45%
    );
}

.team-call-popup[data-notification-type="soon"]
  .team-call-popup-card h2 {
  color: #b54708;
}

.team-call-popup[data-notification-type="now"]
  .team-call-popup-card {
  border-color: #32d583;
  background:
    linear-gradient(
      180deg,
      #effcf4 0%,
      #ffffff 45%
    );
}

.team-call-popup[data-notification-type="now"]
  .team-call-popup-card h2 {
  color: #05603a;
}

.team-call-popup[data-notification-type="now"]
  .team-call-popup-icon {
  animation:
    team-call-pulse
    1.1s ease-in-out
    infinite;
}

@keyframes team-call-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-call-popup[data-notification-type="now"]
    .team-call-popup-icon {
    animation: none;
  }
}


.personal-next-match-card.is-soon {
  border-color: #f0b84b;
  background: #fff8e8;
}

.personal-next-match-card.is-soon span {
  color: #b54708;
}


/* =====================================================================
   Schritt 3.12 – abgeschlossene Spiele korrigieren oder wiederholen
   ===================================================================== */

.referee-completed-help {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.referee-completed-match-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.referee-completed-match-actions
  .button {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 0.72rem;
}

.referee-completed-match-actions
  .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.referee-result-edit-hint {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}

.referee-result-protection-note {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #f0b84b;
  border-radius: 11px;
  background: #fff8e8;
}

.referee-result-protection-note strong {
  color: #b54708;
  font-size: 0.74rem;
}

.referee-result-protection-note span {
  color: #7a2e0e;
  font-size: 0.68rem;
  line-height: 1.4;
}

.referee-result-editor {
  position: fixed;
  z-index: 25000;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(15, 23, 42, 0.76);
  overflow-y: auto;
}

.referee-result-editor.hidden {
  display: none;
}

body.referee-result-editor-open {
  overflow: hidden;
}

.referee-result-editor-card {
  display: grid;
  gap: 18px;
  width: min(100%, 690px);
  max-height: calc(
    100vh -
    env(safe-area-inset-top) -
    env(safe-area-inset-bottom) -
    32px
  );
  padding: 22px;
  border: 1px solid #d0d5dd;
  border-radius: 20px;
  background: #ffffff;
  box-shadow:
    0 24px 70px
    rgba(15, 23, 42, 0.36);
  overflow-y: auto;
}

.referee-result-editor-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.referee-result-editor-heading h2 {
  margin: 3px 0 0;
  color: var(--primary);
}

.referee-result-editor-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #344054;
  background: #ffffff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.referee-result-editor-close:hover,
.referee-result-editor-close:focus-visible {
  border-color: #98a2b3;
  background: #f2f4f7;
}

#referee-result-editor-form {
  display: grid;
  gap: 16px;
}

.referee-result-score-inputs {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.referee-result-score-inputs label {
  display: grid;
  gap: 7px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.referee-result-score-inputs input {
  width: 100%;
  min-height: 70px;
  font-size: 2rem;
  font-weight: 950;
  text-align: center;
}

.referee-result-score-divider {
  padding-bottom: 17px;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 950;
}

.referee-volleyball-result-editor {
  display: grid;
  gap: 13px;
}

.referee-volleyball-editor-summary {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #f2f8fd;
}

.referee-volleyball-editor-summary strong {
  color: var(--primary);
}

.referee-volleyball-editor-summary span {
  color: var(--muted);
  font-size: 0.7rem;
}

.referee-volleyball-set-editor-list {
  display: grid;
  gap: 10px;
}

.referee-volleyball-set-editor-row {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid #d8e1ea;
  border-radius: 13px;
  background: #f8fafc;
}

.referee-volleyball-set-editor-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.referee-volleyball-set-editor-heading
  strong {
  color: var(--primary);
}

.referee-volleyball-remove-set {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #fda29b;
  border-radius: 9px;
  color: #b42318;
  background: #fff1f0;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.referee-volleyball-remove-set:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.referee-volleyball-set-editor-row
  > label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 0.72rem;
  font-weight: 800;
}

.referee-volleyball-set-score-inputs {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.referee-volleyball-set-score-inputs
  label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #344054;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.referee-volleyball-set-score-inputs
  input {
  min-height: 52px;
  font-size: 1.3rem;
  font-weight: 950;
  text-align: center;
}

.referee-volleyball-set-score-inputs
  > span {
  padding-bottom: 13px;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 950;
}

.referee-result-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 4px;
}

@media (max-width: 760px) {
  .referee-completed-match-actions {
    grid-template-columns: 1fr;
  }

  .referee-result-editor {
    align-items: start;
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .referee-result-editor-card {
    max-height: none;
    padding: 16px;
    border-radius: 16px;
  }

  .referee-result-score-inputs,
  .referee-volleyball-set-score-inputs {
    gap: 7px;
  }

  .referee-result-score-inputs input {
    min-height: 62px;
    font-size: 1.6rem;
  }

  .referee-result-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .referee-result-editor-actions
    .button {
    width: 100%;
  }
}

body.is-phone-landscape
  .referee-result-editor {
  align-items: start;
}

body.is-phone-landscape
  .referee-result-editor-card {
  width: min(100%, 760px);
  max-height: none;
  padding: 14px;
}

body.is-phone-landscape
  .referee-volleyball-set-editor-row {
  grid-template-columns:
    minmax(120px, 0.7fr)
    minmax(200px, 1.3fr);
  align-items: end;
}

body.is-phone-landscape
  .referee-volleyball-set-editor-heading {
  grid-column: 1 / -1;
}


/* =====================================================================
   Schritt 3.13 – sichere Team-Benachrichtigungen mit Countdown
   ===================================================================== */

.team-alert-referee-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 2px solid #f0b84b;
  border-radius: 15px;
  background:
    linear-gradient(
      145deg,
      #fff9e8,
      #ffffff
    );
}

.team-alert-referee-panel.hidden {
  display: none;
}

.team-alert-referee-panel[
  data-alert-type="now"
] {
  border-color: #32d583;
  background:
    linear-gradient(
      145deg,
      #effcf4,
      #ffffff
    );
}

.team-alert-referee-panel[
  data-alert-type="retracted"
] {
  border-color: #98a2b3;
  background: #f8fafc;
}

.team-alert-referee-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.team-alert-referee-heading h2 {
  margin: 3px 0 5px;
  color: var(--primary);
  font-size: 1.1rem;
}

.team-alert-referee-heading p:not(
  .eyebrow
) {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.team-alert-referee-countdown {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #93370d;
  background: #ffead5;
  font-size: 1.45rem;
  font-weight: 950;
}

.team-alert-referee-panel[
  data-alert-type="now"
]
  .team-alert-referee-countdown {
  color: #05603a;
  background: #d1fadf;
}

.team-alert-referee-progress {
  height: 8px;
  border-radius: 999px;
  background: #e4e7ec;
  overflow: hidden;
}

.team-alert-referee-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #f79009;
  transition: width 180ms linear;
}

.team-alert-referee-panel[
  data-alert-type="now"
]
  .team-alert-referee-progress span {
  background: #12b76a;
}

.team-alert-referee-help {
  margin: 0;
  color: #475467;
  font-size: 0.72rem;
  line-height: 1.45;
}

#team-alert-referee-retract {
  justify-self: start;
}

.team-call-popup[
  data-notification-type="retracted"
]
  .team-call-popup-card {
  border-color: #98a2b3;
  background:
    linear-gradient(
      180deg,
      #f2f4f7 0%,
      #ffffff 45%
    );
}

.team-call-popup[
  data-notification-type="retracted"
]
  .team-call-popup-card h2 {
  color: #344054;
}

@media (max-width: 760px) {
  .team-alert-referee-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .team-alert-referee-countdown {
    width: 52px;
    height: 52px;
  }

  #team-alert-referee-retract {
    width: 100%;
  }
}

body.is-phone-landscape
  .team-alert-referee-panel {
  padding: 11px;
}

body.is-phone-landscape
  .team-alert-referee-heading {
  flex-direction: row;
}


/* =====================================================================
   Schritt 3.15 – Mein Profil, persönliche Einstellungen und Dark Mode
   ===================================================================== */

.personal-profile-layout {
  display: grid;
  gap: 22px;
}

.profile-section-nav {
  position: sticky;
  z-index: 40;
  top: 8px;
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: color-mix(
    in srgb,
    var(--surface) 94%,
    transparent
  );
  box-shadow: var(--shadow);
  overflow-x: auto;
  backdrop-filter: blur(12px);
}

.profile-section-nav a {
  min-width: max-content;
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.74rem;
  font-weight: 900;
  text-decoration: none;
}

.profile-section-nav a:hover,
.profile-section-nav a:focus-visible {
  color: #ffffff;
  background: var(--primary);
}

.profile-settings-section {
  margin-bottom: 0;
  scroll-margin-top: 90px;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-overview-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--background);
}

.profile-overview-grid span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.profile-overview-grid strong {
  color: var(--primary);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.profile-form-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form-grid label,
.profile-choice-list fieldset {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
}

.profile-form-grid input,
.profile-choice-card,
.profile-switch-row {
  min-height: 48px;
}

.profile-form-actions,
.profile-form-grid .form-message {
  grid-column: 1 / -1;
}

.profile-choice-list,
.profile-notification-options {
  display: grid;
  gap: 11px;
}

.profile-choice-list fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-choice-list legend {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.82rem;
}

.profile-choice-card,
.profile-switch-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: var(--background);
  cursor: pointer;
}

.profile-choice-card:has(input:checked),
.profile-switch-row:has(input:checked) {
  border-color: var(--accent);
  background:
    color-mix(
      in srgb,
      var(--accent) 10%,
      var(--surface)
    );
}

.profile-choice-card input,
.profile-switch-row input {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.profile-choice-card span,
.profile-switch-row span {
  display: grid;
  gap: 3px;
}

.profile-choice-card strong,
.profile-switch-row strong {
  color: var(--primary);
  font-size: 0.8rem;
}

.profile-choice-card small,
.profile-switch-row small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.profile-notification-actions,
.profile-management-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.profile-teams-section {
  display: grid;
  gap: 16px;
  padding-top: 4px;
  scroll-margin-top: 90px;
}

.profile-danger-section {
  border-color: #fda29b;
}

.profile-danger-section
  .section-heading h2 {
  color: var(--danger);
}

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

@media (max-width: 620px) {
  .profile-section-nav {
    top: 4px;
    margin-inline: -5px;
    border-radius: 12px;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .profile-management-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-management-actions
    .button {
    width: 100%;
  }
}

body.is-phone-landscape
  .profile-section-nav {
  position: static;
}

body.is-phone-landscape
  .profile-overview-grid {
  grid-template-columns:
    repeat(4, minmax(130px, 1fr));
  overflow-x: auto;
}

/* Profilbezogener Dark Mode für die gesamte App. */

html[data-theme="dark"] {
  color-scheme: dark;
  --background: #0b1220;
  --surface: #111c2e;
  --primary: #d6e9ff;
  --primary-light: #1b3350;
  --accent: #47d7a0;
  --accent-dark: #2dbb87;
  --text: #eef4ff;
  --muted: #a9b8cc;
  --border: #30435b;
  --danger: #ff8d85;
  --danger-light: #4a2023;
  --shadow:
    0 14px 34px
    rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] body {
  color: var(--text);
  background: var(--background);
}

html[data-theme="dark"]
  .site-header {
  background:
    radial-gradient(
      circle at top right,
      rgba(103, 183, 255, 0.16),
      transparent 36%
    ),
    linear-gradient(
      135deg,
      #0b1a2b,
      #153a5a
    );
}

html[data-theme="dark"]
  :is(
    .panel,
    .sport-selection,
    .referee-match-status-section,
    .home-action-card,
    .admin-item,
    .tournament-card,
    .personal-team-card,
    .personal-invitation-card,
    .registration-profile-card,
    .people-search-result,
    .bracket-match,
    .referee-schedule-match-card,
    .referee-progress-group-card,
    .scoreboard-panel,
    .team-alert-referee-panel,
    .referee-result-editor-card,
    .team-call-popup-card,
    .modal-card
  ) {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

html[data-theme="dark"]
  :is(
    input,
    select,
    textarea
  ) {
  color: var(--text);
  border-color: var(--border);
  background: #0d1727;
}

html[data-theme="dark"]
  :is(
    input,
    textarea
  )::placeholder {
  color: #8191a7;
}

html[data-theme="dark"]
  :is(
    .notice,
    .referee-status-empty,
    .empty-state,
    .qualification-lock-note,
    .referee-progress-note,
    .section-support-copy,
    .profile-overview-grid article,
    .profile-choice-card,
    .profile-switch-row,
    .personal-next-match-card,
    .personal-members-details,
    .personal-team-management,
    .volleyball-set-history-item,
    .ranking-table-wrapper
  ) {
  color: var(--text);
  border-color: var(--border);
  background: #101b2c;
}

html[data-theme="dark"]
  :is(
    table,
    thead,
    tbody,
    tr,
    th,
    td
  ) {
  border-color: var(--border);
}

html[data-theme="dark"]
  :is(
    th,
    .ranking-table thead
  ) {
  color: var(--text);
  background: #1a2a40;
}

html[data-theme="dark"]
  :is(
    td,
    .ranking-table tbody tr
  ) {
  color: var(--text);
  background: var(--surface);
}

html[data-theme="dark"]
  :is(
    .button-secondary,
    .button-danger-light
  ) {
  color: var(--text);
  border-color: var(--border);
  background: #1a2940;
}

html[data-theme="dark"]
  :is(
    .button-secondary,
    .button-danger-light
  ):hover {
  background: #243a58;
}

html[data-theme="dark"]
  :is(
    .counter,
    .sport-badge,
    .referee-match-field,
    .qualification-badge,
    .personal-team-role-badges span
  ) {
  color: var(--text);
  border-color: var(--border);
  background: #21344d;
}

html[data-theme="dark"]
  .profile-danger-section {
  border-color: #7a3437;
}

html[data-theme="dark"]
  .profile-section-nav {
  background:
    rgba(17, 28, 46, 0.94);
}

html[data-theme="dark"]
  a:not(.button):not(.home-action-card) {
  color: #8dc8ff;
}

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}


/* =====================================================================
   Schritt 3.16 – Profil als App-Einstellungsansicht
   ===================================================================== */

.profile-app-shell {
  display: grid;
  grid-template-columns:
    minmax(280px, 340px)
    minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.profile-app-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.profile-app-identity {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-app-identity h2 {
  margin: 3px 0 5px;
  color: var(--primary);
  overflow-wrap: anywhere;
}

.profile-app-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.profile-settings-menu {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-settings-row {
  display: grid;
  grid-template-columns:
    42px
    minmax(0, 1fr)
    auto
    18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.profile-settings-row:last-child {
  border-bottom: 0;
}

.profile-settings-row:hover,
.profile-settings-row:focus-visible {
  background: var(--primary-light);
}

.profile-settings-row.is-active {
  background:
    color-mix(
      in srgb,
      var(--primary-light) 82%,
      var(--surface)
    );
}

.profile-settings-row.is-active
  .profile-settings-copy strong {
  color: var(--accent-dark);
}

.profile-settings-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 1.05rem;
  font-weight: 950;
}

.profile-settings-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-settings-copy strong {
  color: var(--primary);
  font-size: 0.8rem;
}

.profile-settings-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-chevron {
  color: var(--muted);
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-settings-badge {
  display: grid;
  min-width: 25px;
  height: 25px;
  padding-inline: 7px;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.68rem;
  font-weight: 950;
}

.profile-settings-badge.has-invitations {
  color: #ffffff;
  background: var(--danger);
}

.profile-settings-row-danger
  .profile-settings-icon {
  color: var(--danger);
  background: var(--danger-light);
}

.profile-app-local-note {
  margin: 0;
  padding-inline: 8px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
  text-align: center;
}

.profile-app-detail {
  min-width: 0;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-app-detail-header {
  display: none;
}

.profile-app-detail-content {
  padding: 24px;
}

.profile-content-panel[hidden] {
  display: none !important;
}

.profile-content-panel {
  min-width: 0;
}

.profile-content-panel.is-active {
  animation:
    profile-detail-enter
    180ms ease-out;
}

.profile-content-panel
  > .section-heading {
  margin-bottom: 20px;
}

.profile-team-subsection {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #f0b84b;
  border-radius: 15px;
  background: #fff9e8;
}

.profile-team-subsection.hidden {
  display: none;
}

.profile-subsection-heading {
  margin-bottom: 0;
}

.profile-subsection-heading h3 {
  margin: 0;
  color: var(--primary);
}

.profile-overview-hint {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #f0b84b;
  border-radius: 14px;
  background: #fff9e8;
}

.profile-overview-hint.hidden {
  display: none;
}

.profile-overview-hint div {
  display: grid;
  gap: 3px;
}

.profile-overview-hint strong {
  color: #93370d;
}

.profile-overview-hint span {
  color: #7a2e0e;
  font-size: 0.72rem;
  line-height: 1.4;
}

.profile-overview-notice,
.profile-management-note {
  margin-top: 18px;
}

@keyframes profile-detail-enter {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 899px) {
  .profile-app-header {
    min-height: auto;
  }

  .profile-app-shell {
    display: block;
    width: min(
      760px,
      calc(
        100% -
        max(
          20px,
          env(safe-area-inset-left)
        ) -
        max(
          20px,
          env(safe-area-inset-right)
        )
      )
    );
    padding-top: 18px;
  }

  .profile-app-sidebar {
    position: static;
  }

  .profile-settings-row {
    grid-template-columns:
      42px
      minmax(0, 1fr)
      auto
      18px;
    min-height: 72px;
  }

  .profile-settings-row.is-active {
    background: transparent;
  }

  .profile-settings-row.is-active:hover,
  .profile-settings-row.is-active:focus-visible {
    background: var(--primary-light);
  }

  .profile-app-detail {
    display: none;
    min-height: 0;
    border-radius: 17px;
  }

  body.profile-detail-open
    .profile-app-sidebar {
    display: none;
  }

  body.profile-detail-open
    .profile-app-detail {
    display: block;
    animation:
      profile-mobile-view-enter
      190ms ease-out;
  }

  .profile-app-detail-header {
    position: sticky;
    z-index: 25;
    top: 0;
    display: grid;
    grid-template-columns:
      auto
      minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding:
      10px
      14px;
    border-bottom: 1px solid var(--border);
    background:
      color-mix(
        in srgb,
        var(--surface) 94%,
        transparent
      );
    backdrop-filter: blur(12px);
  }

  .profile-app-detail-header
    .eyebrow {
    margin-bottom: 2px;
    font-size: 0.62rem;
  }

  .profile-app-detail-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1rem;
  }

  .profile-app-back {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 0.72rem;
    font-weight: 900;
    cursor: pointer;
  }

  .profile-app-back span {
    font-size: 1.5rem;
    line-height: 0;
  }

  .profile-app-detail-content {
    padding: 18px;
  }

  .profile-content-panel
    > .section-heading
    .eyebrow,
  .profile-content-panel
    > .section-heading h2 {
    display: none;
  }

  .profile-content-panel
    > .section-heading {
    margin-bottom: 16px;
  }

  .profile-content-panel
    > .section-heading
    .section-support-copy {
    margin-top: 0;
  }

  .profile-overview-hint {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-overview-hint
    .button {
    width: 100%;
  }

  @keyframes profile-mobile-view-enter {
    from {
      opacity: 0;
      transform: translateX(18px);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

@media (max-width: 560px) {
  .profile-app-header
    .subtitle {
    display: none;
  }

  .profile-app-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-settings-copy small {
    max-width: 230px;
  }

  .profile-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .profile-app-detail-content {
    padding: 15px;
  }

  .profile-team-subsection {
    padding: 13px;
  }
}

body.is-phone-landscape
  .profile-app-shell {
  width: min(
    900px,
    calc(
      100% -
      max(
        16px,
        env(safe-area-inset-left)
      ) -
      max(
        16px,
        env(safe-area-inset-right)
      )
    )
  );
}

body.is-phone-landscape
  .profile-settings-menu {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

body.is-phone-landscape
  .profile-settings-row {
  border-right: 1px solid var(--border);
}

body.is-phone-landscape
  .profile-app-detail-header {
  min-height: 58px;
}

body.is-phone-landscape
  .profile-app-detail-content {
  padding: 13px;
}


/* =====================================================================
   Schritt 3.17 – Premium-Profil mit Wow-Effekt
   ===================================================================== */

.personal-profile-page {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(
      circle at 8% 8%,
      rgba(48, 171, 255, 0.13),
      transparent 28rem
    ),
    radial-gradient(
      circle at 92% 30%,
      rgba(71, 215, 160, 0.12),
      transparent 28rem
    ),
    linear-gradient(
      180deg,
      #eef5fb 0,
      var(--background) 420px
    );
}

.personal-profile-page::before,
.personal-profile-page::after {
  position: fixed;
  z-index: -1;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  content: "";
  filter: blur(70px);
  pointer-events: none;
}

.personal-profile-page::before {
  top: 120px;
  left: -150px;
  background: rgba(36, 135, 208, 0.13);
}

.personal-profile-page::after {
  right: -150px;
  bottom: 60px;
  background: rgba(24, 160, 107, 0.12);
}

.profile-app-header {
  position: relative;
  min-height: 190px;
  padding-top:
    max(
      34px,
      env(safe-area-inset-top)
    );
  overflow: hidden;
  background:
    radial-gradient(
      circle at 80% -40%,
      rgba(255, 255, 255, 0.42),
      transparent 46%
    ),
    radial-gradient(
      circle at 15% 130%,
      rgba(71, 215, 160, 0.34),
      transparent 48%
    ),
    linear-gradient(
      125deg,
      #0b2947 0%,
      #124e78 46%,
      #08765a 115%
    );
}

.profile-app-header::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.055) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.055) 1px,
      transparent 1px
    );
  background-size: 34px 34px;
  content: "";
  mask-image:
    linear-gradient(
      to bottom,
      black,
      transparent 90%
    );
  pointer-events: none;
}

.profile-app-header > * {
  position: relative;
  z-index: 1;
}

.profile-app-header h1 {
  font-size:
    clamp(
      2rem,
      5vw,
      3.25rem
    );
  letter-spacing: -0.045em;
}

.profile-app-header .subtitle {
  max-width: 520px;
  font-size: 0.92rem;
}

.profile-app-shell {
  position: relative;
  z-index: 4;
  grid-template-columns:
    minmax(310px, 370px)
    minmax(0, 1fr);
  gap: 26px;
  margin-top: -62px;
  padding-top: 0;
}

.profile-app-sidebar {
  gap: 16px;
}

.profile-app-identity {
  position: relative;
  display: grid;
  gap: 20px;
  min-height: 245px;
  padding: 22px;
  border: 1px solid
    rgba(255, 255, 255, 0.28);
  border-radius: 25px;
  color: #ffffff;
  background:
    linear-gradient(
      145deg,
      rgba(16, 55, 87, 0.98),
      rgba(13, 111, 83, 0.94)
    );
  box-shadow:
    0 28px 60px
      rgba(8, 42, 70, 0.27),
    inset 0 1px 0
      rgba(255, 255, 255, 0.16);
  overflow: hidden;
  animation:
    profile-hero-arrive
    560ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    )
    both;
}

.profile-hero-glow {
  position: absolute;
  top: -110px;
  right: -90px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background:
    radial-gradient(
      circle,
      rgba(109, 235, 195, 0.4),
      transparent 68%
    );
  pointer-events: none;
}

.profile-app-identity::after {
  position: absolute;
  right: -22px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 1px solid
    rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  content: "";
  box-shadow:
    0 0 0 28px
      rgba(255, 255, 255, 0.035),
    0 0 0 58px
      rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.profile-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 15px;
  align-items: center;
}

.profile-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid
    rgba(255, 255, 255, 0.3);
  border-radius: 23px;
  color: #0d3d39;
  background:
    linear-gradient(
      145deg,
      #d7fff1,
      #73e6bd
    );
  box-shadow:
    0 14px 28px
      rgba(0, 0, 0, 0.19),
    inset 0 1px 0 #ffffff;
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.profile-hero-copy {
  min-width: 0;
}

.profile-online-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
  color:
    rgba(255, 255, 255, 0.72);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-online-label i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #65f4bc;
  box-shadow:
    0 0 0 4px
      rgba(101, 244, 188, 0.14);
}

.profile-app-identity h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.42rem;
  letter-spacing: -0.025em;
}

.profile-app-identity p {
  margin-top: 5px;
  color:
    rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}

.profile-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  border: 1px solid
    rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  background:
    rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.profile-hero-stats > div {
  display: grid;
  gap: 3px;
  padding: 13px 10px;
  text-align: center;
}

.profile-hero-stats > div
  + div {
  border-left: 1px solid
    rgba(255, 255, 255, 0.12);
}

.profile-hero-stats span {
  color:
    rgba(255, 255, 255, 0.58);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-hero-stats strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.profile-hero-stats
  strong.has-open-items {
  color: #ffd27a;
}

.profile-role-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: start;
  padding: 7px 11px;
  border: 1px solid
    rgba(255, 214, 117, 0.3);
  border-radius: 999px;
  color: #ffe3a2;
  background:
    rgba(255, 186, 59, 0.12);
  font-size: 0.64rem;
  font-weight: 900;
}

.profile-role-badge.hidden {
  display: none;
}

.profile-settings-menu {
  gap: 0;
  padding: 8px;
  border: 1px solid
    rgba(18, 58, 99, 0.08);
  border-radius: 24px;
  background:
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 22px 54px
      rgba(18, 58, 99, 0.12);
  backdrop-filter: blur(18px);
  overflow: visible;
  animation:
    profile-menu-arrive
    500ms
    100ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    )
    both;
}

.profile-menu-group {
  padding: 6px;
}

.profile-menu-group
  + .profile-menu-group {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid
    rgba(18, 58, 99, 0.08);
}

.profile-menu-group-label {
  margin: 0;
  padding: 2px 10px 7px;
  color: #8491a5;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.profile-settings-row {
  position: relative;
  grid-template-columns:
    44px
    minmax(0, 1fr)
    auto
    18px;
  min-height: 68px;
  margin: 2px 0;
  padding: 10px 11px;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.profile-settings-row:hover,
.profile-settings-row:focus-visible {
  z-index: 1;
  transform: translateX(3px);
  background: #f0f7fc;
  box-shadow:
    0 9px 20px
      rgba(18, 58, 99, 0.08);
}

.profile-settings-row.is-active {
  color: #ffffff;
  background:
    linear-gradient(
      125deg,
      #124f7d,
      #08775a
    );
  box-shadow:
    0 12px 25px
      rgba(15, 89, 104, 0.2);
}

.profile-settings-row.is-active
  .profile-settings-copy strong,
.profile-settings-row.is-active
  .profile-settings-copy small,
.profile-settings-row.is-active
  .profile-settings-chevron {
  color: #ffffff;
}

.profile-settings-row.is-active
  .profile-settings-copy small {
  opacity: 0.68;
}

.profile-settings-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.profile-settings-row:hover
  .profile-settings-icon {
  transform:
    rotate(-3deg)
    scale(1.04);
}

.icon-overview {
  color: #175cd3;
  background: #eaf2ff;
}

.icon-data {
  color: #7a5af8;
  background: #f0edff;
}

.icon-appearance {
  color: #c75000;
  background: #fff0e5;
}

.icon-notifications {
  color: #08775a;
  background: #e3fbf2;
}

.icon-teams {
  color: #026aa2;
  background: #e5f5ff;
}

.icon-management {
  color: #b42318;
  background: #feeceb;
}

.profile-settings-row.is-active
  .profile-settings-icon {
  color: #ffffff;
  background:
    rgba(255, 255, 255, 0.16);
}

.profile-settings-copy strong {
  font-size: 0.78rem;
  letter-spacing: -0.005em;
}

.profile-settings-copy small {
  color: #7a8799;
  font-size: 0.64rem;
}

.profile-settings-chevron {
  transition:
    transform 160ms ease;
}

.profile-settings-row:hover
  .profile-settings-chevron {
  transform: translateX(2px);
}

.profile-settings-badge {
  min-width: 26px;
  height: 26px;
  box-shadow:
    inset 0 0 0 1px
      rgba(18, 58, 99, 0.08);
}

.profile-app-local-note {
  color: #8793a3;
}

.profile-app-detail {
  min-height: 650px;
  border: 1px solid
    rgba(18, 58, 99, 0.08);
  border-radius: 28px;
  background:
    rgba(255, 255, 255, 0.94);
  box-shadow:
    0 30px 75px
      rgba(18, 58, 99, 0.14);
  backdrop-filter: blur(18px);
  animation:
    profile-detail-shell-arrive
    540ms
    120ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    )
    both;
}

.profile-app-detail-content {
  padding:
    clamp(
      24px,
      4vw,
      38px
    );
}

.profile-content-panel
  > .section-heading {
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid
    rgba(18, 58, 99, 0.08);
}

.profile-content-panel
  > .section-heading h2 {
  color: #17324d;
  font-size:
    clamp(
      1.35rem,
      3vw,
      1.9rem
    );
  letter-spacing: -0.035em;
}

.profile-content-panel
  > .section-heading
  .section-support-copy {
  max-width: 620px;
}

.profile-next-spotlight {
  position: relative;
  display: grid;
  gap: 22px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid
    rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(
      circle at 92% 5%,
      rgba(255, 255, 255, 0.2),
      transparent 28%
    ),
    linear-gradient(
      130deg,
      #0d3152,
      #11688a 52%,
      #0c8463
    );
  box-shadow:
    0 24px 52px
      rgba(11, 75, 97, 0.24);
  overflow: hidden;
}

.profile-next-spotlight::after {
  position: absolute;
  right: -42px;
  bottom: -90px;
  width: 200px;
  height: 200px;
  border: 25px solid
    rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.profile-next-spotlight.is-running {
  background:
    radial-gradient(
      circle at 92% 5%,
      rgba(255, 255, 255, 0.23),
      transparent 28%
    ),
    linear-gradient(
      130deg,
      #712f00,
      #d05b0a 56%,
      #e7921a
    );
}

.profile-next-spotlight.is-next,
.profile-next-spotlight.is-soon {
  background:
    radial-gradient(
      circle at 92% 5%,
      rgba(255, 255, 255, 0.23),
      transparent 28%
    ),
    linear-gradient(
      130deg,
      #0b4b3a,
      #07956c 56%,
      #34c795
    );
}

.profile-next-spotlight.is-finished,
.profile-next-spotlight.is-eliminated {
  background:
    linear-gradient(
      130deg,
      #303846,
      #536174
    );
}

.profile-next-spotlight-top,
.profile-next-spotlight-body {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.profile-live-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid
    rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    rgba(255, 255, 255, 0.1);
  font-size: 0.62rem;
  font-weight: 900;
}

.profile-live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #71f6c3;
  box-shadow:
    0 0 0 4px
      rgba(113, 246, 195, 0.15);
}

.profile-next-spotlight.is-running
  .profile-live-pill i {
  background: #fff1a3;
  box-shadow:
    0 0 0 4px
      rgba(255, 241, 163, 0.18);
  animation:
    profile-live-pulse
    1.4s infinite;
}

.profile-next-sport {
  max-width: 50%;
  color:
    rgba(255, 255, 255, 0.72);
  font-size: 0.65rem;
  font-weight: 800;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-next-spotlight-body {
  align-items: flex-end;
}

.profile-next-spotlight-body
  > div:first-child {
  min-width: 0;
}

.profile-next-spotlight-body p {
  margin: 0;
}

.profile-next-kicker,
#profile-next-kicker {
  margin-bottom: 6px;
  color:
    rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-next-spotlight h3 {
  max-width: 600px;
  margin: 0;
  font-size:
    clamp(
      1.25rem,
      3.5vw,
      2rem
    );
  letter-spacing: -0.035em;
}

#profile-next-detail {
  max-width: 620px;
  margin-top: 8px;
  color:
    rgba(255, 255, 255, 0.74);
  font-size: 0.73rem;
  line-height: 1.5;
}

.profile-next-field {
  display: grid;
  min-width: 78px;
  height: 78px;
  flex: 0 0 auto;
  place-items: center;
  align-content: center;
  border: 1px solid
    rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background:
    rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.profile-next-field span {
  color:
    rgba(255, 255, 255, 0.62);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-next-field strong {
  font-size: 1.55rem;
}

.profile-spotlight-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-self: start;
  padding: 10px 13px;
  border: 1px solid
    rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #ffffff;
  background:
    rgba(255, 255, 255, 0.1);
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.profile-spotlight-action:hover {
  background:
    rgba(255, 255, 255, 0.18);
}

.profile-overview-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-stat-card {
  display: flex !important;
  gap: 12px !important;
  align-items: center;
  padding: 14px !important;
  border: 1px solid
    rgba(18, 58, 99, 0.08) !important;
  border-radius: 17px !important;
  background: #f8fbfd !important;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 25px
      rgba(18, 58, 99, 0.08);
}

.profile-stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  font-size: 0.9rem;
  font-weight: 950;
}

.stat-profile .profile-stat-icon {
  color: #175cd3;
  background: #eaf2ff;
}

.stat-number .profile-stat-icon {
  color: #7a5af8;
  background: #f0edff;
}

.stat-teams .profile-stat-icon {
  color: #08775a;
  background: #e3fbf2;
}

.stat-invitations
  .profile-stat-icon {
  color: #c4320a;
  background: #fff0e9;
}

.profile-stat-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-stat-card > div span {
  color: #7a8799;
  font-size: 0.62rem;
  font-weight: 800;
}

.profile-stat-card > div strong {
  color: #17324d;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.profile-quick-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.profile-quick-actions button {
  display: grid;
  grid-template-columns:
    42px
    minmax(0, 1fr);
  column-gap: 11px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid
    rgba(18, 58, 99, 0.08);
  border-radius: 17px;
  color: #17324d;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.profile-quick-actions button:hover {
  transform: translateY(-2px);
  border-color:
    rgba(18, 110, 135, 0.25);
  box-shadow:
    0 14px 28px
      rgba(18, 58, 99, 0.09);
}

.profile-quick-actions
  button > span {
  grid-row: 1 / 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #08775a;
  background: #e3fbf2;
  font-size: 1rem;
  font-weight: 950;
}

.profile-quick-actions strong {
  align-self: end;
  font-size: 0.75rem;
}

.profile-quick-actions small {
  align-self: start;
  color: #8491a4;
  font-size: 0.61rem;
}

.profile-overview-hint {
  border: 0;
  border-radius: 17px;
  background:
    linear-gradient(
      135deg,
      #fff6df,
      #fffaf0
    );
  box-shadow:
    inset 0 0 0 1px
      rgba(224, 151, 0, 0.18);
}

.profile-overview-notice {
  border-radius: 16px;
}

/* Hochwertige Formulare */

.profile-form-grid {
  gap: 17px;
}

.profile-form-grid label {
  gap: 8px;
  color: #45566a;
  font-size: 0.68rem;
  letter-spacing: 0.025em;
}

.profile-form-grid input,
.personal-member-search input {
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #d8e1ea;
  border-radius: 14px;
  color: #17324d;
  background: #f8fbfd;
  box-shadow:
    inset 0 1px 2px
      rgba(18, 58, 99, 0.035);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.profile-form-grid input:focus,
.personal-member-search input:focus {
  border-color: #17836b;
  background: #ffffff;
  box-shadow:
    0 0 0 4px
      rgba(23, 131, 107, 0.11);
}

.profile-form-actions
  .button-primary {
  min-height: 48px;
  padding-inline: 20px;
  border-radius: 14px;
  box-shadow:
    0 11px 22px
      rgba(14, 121, 80, 0.2);
}

/* Theme-Vorschauen */

.profile-choice-list fieldset {
  gap: 10px;
}

.profile-theme-choice {
  position: relative;
  display: grid;
  grid-template-columns:
    auto
    70px
    minmax(0, 1fr)
    30px;
  gap: 13px;
  min-height: 82px;
  padding: 12px;
  border-radius: 17px;
  background: #f8fbfd;
}

.profile-theme-choice
  > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-preview {
  position: relative;
  display: block !important;
  width: 70px;
  height: 50px;
  border: 1px solid
    rgba(18, 58, 99, 0.12);
  border-radius: 11px;
  box-shadow:
    0 7px 15px
      rgba(18, 58, 99, 0.1);
  overflow: hidden;
}

.theme-preview i {
  position: absolute;
  display: block;
  border-radius: 4px;
}

.theme-preview i:nth-child(1) {
  inset:
    7px
    7px
    auto;
  height: 8px;
}

.theme-preview i:nth-child(2) {
  top: 20px;
  left: 7px;
  width: 20px;
  height: 22px;
}

.theme-preview i:nth-child(3) {
  top: 20px;
  right: 7px;
  width: 29px;
  height: 22px;
}

.preview-light {
  background: #f5f7fa;
}

.preview-light i {
  background: #ffffff;
}

.preview-light i:first-child {
  background: #1a5d91;
}

.preview-dark {
  background: #101828;
}

.preview-dark i {
  background: #24364f;
}

.preview-dark i:first-child {
  background: #3fa582;
}

.preview-system {
  background:
    linear-gradient(
      90deg,
      #f5f7fa 0 50%,
      #101828 50%
    );
}

.preview-system i {
  background:
    linear-gradient(
      90deg,
      #ffffff 0 50%,
      #24364f 50%
    );
}

.preview-system i:first-child {
  background:
    linear-gradient(
      90deg,
      #1a5d91 0 50%,
      #3fa582 50%
    );
}

.profile-theme-choice
  > b {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  color: transparent;
  font-size: 0.7rem;
}

.profile-theme-choice:has(
  input:checked
) {
  border-color: #17836b;
  background:
    linear-gradient(
      135deg,
      #effcf7,
      #f8fffc
    );
  box-shadow:
    0 10px 24px
      rgba(23, 131, 107, 0.1);
}

.profile-theme-choice:has(
  input:checked
) > b {
  color: #ffffff;
  border-color: #17836b;
  background: #17836b;
}

/* App-Schalter */

.profile-switch-row {
  position: relative;
  min-height: 66px;
  padding: 13px 14px;
  border-radius: 17px;
  background: #f8fbfd;
}

.profile-switch-row
  > input[type="checkbox"] {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: #bdc8d5;
  appearance: none;
  cursor: pointer;
  transition:
    background 180ms ease;
}

.profile-switch-row
  > input[type="checkbox"]::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 2px 6px
      rgba(0, 0, 0, 0.2);
  content: "";
  transition:
    transform 180ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    );
}

.profile-switch-row
  > input[type="checkbox"]:checked {
  background:
    linear-gradient(
      90deg,
      #16836b,
      #24a97f
    );
}

.profile-switch-row
  > input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.profile-switch-row:has(
  input:checked
) {
  border-color:
    rgba(23, 131, 107, 0.25);
  background: #f1fbf7;
}

/* Teams */

.personal-team-list {
  display: grid;
  gap: 18px;
}

.personal-team-card {
  position: relative;
  display: grid;
  gap: 17px;
  margin: 0;
  padding: 21px;
  border: 1px solid
    rgba(18, 58, 99, 0.09);
  border-radius: 23px;
  background:
    linear-gradient(
      180deg,
      #ffffff,
      #fbfdff
    );
  box-shadow:
    0 18px 44px
      rgba(18, 58, 99, 0.1);
  overflow: hidden;
}

.team-card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background:
    linear-gradient(
      to bottom,
      #1986bc,
      #18a06b
    );
}

.team-card-running
  .team-card-accent {
  background:
    linear-gradient(
      to bottom,
      #e77712,
      #f0b429
    );
}

.team-card-next
  .team-card-accent,
.team-card-soon
  .team-card-accent {
  background:
    linear-gradient(
      to bottom,
      #0e9f6e,
      #51d6a4
    );
}

.personal-team-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.team-card-identity {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
}

.team-card-sport-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid
    rgba(18, 58, 99, 0.08);
  border-radius: 15px;
  background:
    linear-gradient(
      145deg,
      #eef8ff,
      #e5f8f0
    );
  box-shadow:
    0 8px 18px
      rgba(18, 58, 99, 0.08);
  font-size: 1.25rem;
}

.team-card-overline {
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  margin-bottom: 4px;
  color: #8190a3;
  font-size: 0.6rem;
  font-weight: 750;
  overflow: hidden;
  white-space: nowrap;
}

.team-card-overline span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.personal-team-heading h2 {
  margin: 0;
  color: #17324d;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.team-card-primary-role {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid
    rgba(23, 131, 107, 0.18);
  border-radius: 999px;
  color: #08775a;
  background: #ebfaf4;
  font-size: 0.61rem;
  font-weight: 900;
}

.team-card-status-shell
  .personal-next-match-card,
.team-card-status-shell
  .personal-placement-card {
  margin: 0;
  border-radius: 17px;
  box-shadow: none;
}

.team-card-facts {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  border: 1px solid
    rgba(18, 58, 99, 0.08);
  border-radius: 16px;
  background: #f8fbfd;
  overflow: hidden;
}

.team-card-facts > div {
  display: grid;
  grid-template-columns:
    auto auto;
  column-gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  text-align: center;
}

.team-card-facts > div
  + div {
  border-left: 1px solid
    rgba(18, 58, 99, 0.08);
}

.team-card-facts span {
  grid-row: 1 / 3;
  color: #7290a8;
  font-size: 0.76rem;
}

.team-card-facts strong {
  color: #17324d;
  font-size: 0.83rem;
}

.team-card-facts small {
  color: #8793a3;
  font-size: 0.54rem;
}

.team-card-open-button {
  gap: 9px;
  border-radius: 13px;
}

.personal-members-details {
  border: 1px solid
    rgba(18, 58, 99, 0.08);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.personal-members-details summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}

.personal-members-details summary::-webkit-details-marker {
  display: none;
}

.personal-members-details
  summary > span {
  display: grid;
  gap: 3px;
}

.personal-members-details
  summary strong {
  color: #17324d;
  font-size: 0.7rem;
}

.personal-members-details
  summary small {
  color: #8793a3;
  font-size: 0.59rem;
}

.personal-members-details
  summary i {
  color: #718096;
  font-style: normal;
  transition:
    transform 180ms ease;
}

.personal-members-details[open]
  summary i {
  transform: rotate(180deg);
}

.personal-member-list {
  padding: 0 14px 14px;
}

.personal-team-management {
  display: grid;
  gap: 15px;
  padding: 16px;
  border: 1px solid
    rgba(122, 90, 248, 0.15);
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      #f8f6ff,
      #ffffff
    );
}

.team-management-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.team-management-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #6941c6;
  background: #eee9ff;
  font-size: 1rem;
  font-weight: 950;
}

.team-management-heading h3 {
  margin: 2px 0 4px;
  color: #372875;
  font-size: 0.86rem;
}

.team-management-heading p {
  margin: 0;
  color: #756c91;
  font-size: 0.65rem;
  line-height: 1.45;
}

.personal-member-search {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 9px;
}

/* Einladungen */

.profile-team-subsection {
  border: 0;
  border-radius: 20px;
  background:
    linear-gradient(
      145deg,
      #fff8e8,
      #fffdf7
    );
  box-shadow:
    inset 0 0 0 1px
      rgba(224, 151, 0, 0.18);
}

.personal-invitation-card {
  border: 1px solid
    rgba(224, 151, 0, 0.15);
  border-radius: 17px;
  background: #ffffff;
  box-shadow:
    0 10px 22px
      rgba(125, 84, 0, 0.07);
}

/* Verwaltung */

.profile-danger-section
  .profile-management-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

.profile-danger-section
  #profile-delete {
  grid-column: 1 / -1;
  justify-self: start;
}

.profile-management-note {
  border-radius: 16px;
}

/* Startanimationen */

@keyframes profile-hero-arrive {
  from {
    opacity: 0;
    transform:
      translateY(18px)
      scale(0.98);
  }

  to {
    opacity: 1;
    transform:
      translateY(0)
      scale(1);
  }
}

@keyframes profile-menu-arrive {
  from {
    opacity: 0;
    transform:
      translateY(22px);
  }

  to {
    opacity: 1;
    transform:
      translateY(0);
  }
}

@keyframes profile-detail-shell-arrive {
  from {
    opacity: 0;
    transform:
      translateY(18px)
      scale(0.992);
  }

  to {
    opacity: 1;
    transform:
      translateY(0)
      scale(1);
  }
}

@keyframes profile-live-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.28);
  }
}

/* Tablet und Smartphone */

@media (max-width: 1040px) {
  .profile-app-shell {
    grid-template-columns:
      minmax(285px, 330px)
      minmax(0, 1fr);
    gap: 18px;
  }

  .profile-app-detail-content {
    padding: 24px;
  }

  .profile-next-spotlight {
    padding: 20px;
  }
}

@media (max-width: 899px) {
  .personal-profile-page {
    background:
      linear-gradient(
        180deg,
        #e9f4fb 0,
        var(--background) 340px
      );
  }

  .profile-app-header {
    min-height: 155px;
    padding-bottom: 58px;
  }

  .profile-app-header h1 {
    font-size: 2rem;
  }

  .profile-app-shell {
    margin-top: -45px;
  }

  .profile-app-sidebar {
    gap: 13px;
  }

  .profile-app-identity {
    min-height: 0;
    border-radius: 23px;
  }

  .profile-settings-menu {
    border-radius: 23px;
  }

  .profile-settings-row {
    min-height: 72px;
  }

  .profile-settings-row.is-active {
    color: var(--text);
    background: transparent;
    box-shadow: none;
  }

  .profile-settings-row.is-active
    .profile-settings-copy strong {
    color: var(--primary);
  }

  .profile-settings-row.is-active
    .profile-settings-copy small {
    color: var(--muted);
    opacity: 1;
  }

  .profile-settings-row.is-active
    .profile-settings-chevron {
    color: var(--muted);
  }

  .profile-settings-row.is-active
    .profile-settings-icon {
    color: inherit;
  }

  .profile-app-detail {
    border-radius: 23px;
  }

  .profile-app-detail-header {
    min-height: 70px;
    padding:
      max(
        9px,
        env(safe-area-inset-top)
      )
      max(
        13px,
        env(safe-area-inset-right)
      )
      9px
      max(
        13px,
        env(safe-area-inset-left)
      );
  }

  .profile-app-detail-content {
    padding: 18px;
  }

  .profile-next-spotlight {
    border-radius: 21px;
  }
}

@media (max-width: 600px) {
  .profile-app-header {
    min-height: 125px;
    padding-top:
      max(
        22px,
        env(safe-area-inset-top)
      );
  }

  .profile-app-header
    .eyebrow {
    font-size: 0.64rem;
  }

  .profile-app-header h1 {
    font-size: 1.72rem;
  }

  .profile-app-shell {
    width: min(
      100% - 20px,
      760px
    );
  }

  .profile-app-identity {
    gap: 16px;
    padding: 18px;
  }

  .profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    font-size: 1.35rem;
  }

  .profile-app-identity h2 {
    font-size: 1.2rem;
  }

  .profile-menu-group {
    padding: 5px;
  }

  .profile-menu-group-label {
    padding-left: 9px;
  }

  .profile-settings-row {
    grid-template-columns:
      43px
      minmax(0, 1fr)
      auto
      16px;
    padding-inline: 9px;
  }

  .profile-settings-copy small {
    max-width: none;
  }

  .profile-next-spotlight {
    gap: 18px;
    padding: 17px;
  }

  .profile-next-spotlight-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .profile-next-sport {
    max-width: 100%;
    text-align: left;
  }

  .profile-next-spotlight-body {
    align-items: flex-start;
  }

  .profile-next-field {
    min-width: 68px;
    width: 68px;
    height: 68px;
    border-radius: 17px;
  }

  .profile-overview-grid,
  .profile-quick-actions {
    grid-template-columns: 1fr;
  }

  .profile-theme-choice {
    grid-template-columns:
      auto
      60px
      minmax(0, 1fr)
      28px;
  }

  .theme-preview {
    width: 60px;
  }

  .personal-team-card {
    padding: 17px;
    border-radius: 20px;
  }

  .personal-team-heading {
    align-items: flex-start;
  }

  .team-card-primary-role {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .team-card-facts
    > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .team-card-facts span {
    grid-row: auto;
  }

  .personal-member-search {
    grid-template-columns: 1fr;
  }

  .profile-danger-section
    .profile-management-actions {
    grid-template-columns: 1fr;
  }

  .profile-danger-section
    #profile-delete {
    grid-column: auto;
    justify-self: stretch;
  }
}

body.is-phone-landscape
  .profile-app-header {
  display: none;
}

body.is-phone-landscape
  .profile-app-shell {
  margin-top: 0;
  padding-top:
    max(
      10px,
      env(safe-area-inset-top)
    );
}

body.is-phone-landscape
  .profile-app-identity {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(180px, 0.7fr);
  align-items: center;
}

body.is-phone-landscape
  .profile-hero-stats {
  grid-column: 2;
  grid-row: 1;
}

body.is-phone-landscape
  .profile-role-badge {
  position: absolute;
  bottom: 14px;
  left: 18px;
}

body.is-phone-landscape
  .profile-settings-menu {
  grid-template-columns: 1fr 1fr;
}

body.is-phone-landscape
  .profile-menu-group {
  min-width: 0;
}

body.is-phone-landscape
  .profile-menu-group
  + .profile-menu-group {
  margin-top: 0;
  border-top: 0;
}

body.is-phone-landscape
  .profile-settings-row {
  min-height: 62px;
}

body.is-phone-landscape
  .profile-next-spotlight {
  grid-template-columns:
    minmax(0, 1fr)
    auto;
}

body.is-phone-landscape
  .profile-next-spotlight-top,
body.is-phone-landscape
  .profile-next-spotlight-body {
  grid-column: 1;
}

body.is-phone-landscape
  .profile-spotlight-action {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
}


.profile-menu-group {
  animation:
    profile-menu-group-arrive
    420ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    )
    both;
}

.profile-menu-group:nth-child(1) {
  animation-delay: 150ms;
}

.profile-menu-group:nth-child(2) {
  animation-delay: 210ms;
}

.profile-menu-group:nth-child(3) {
  animation-delay: 270ms;
}

.profile-menu-group:nth-child(4) {
  animation-delay: 330ms;
}

@keyframes profile-menu-group-arrive {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#profile-browser-notification-status {
  border: 1px solid
    rgba(18, 58, 99, 0.1);
  color: #56677b;
  background: #f3f7fa;
}

#profile-browser-notification-status[
  data-status="granted"
] {
  color: #08775a;
  border-color:
    rgba(23, 131, 107, 0.2);
  background: #e9faf3;
}

#profile-browser-notification-status[
  data-status="denied"
] {
  color: #b42318;
  border-color:
    rgba(180, 35, 24, 0.18);
  background: #fff0ef;
}


.team-card-role-stack {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 180px;
}

@media (max-width: 600px) {
  .team-card-role-stack {
    max-width: 120px;
  }
}
