/* style.css
   Gemeinsames Stylesheet für alle drei Seiten.
   Dark Mode als einziges Theme. Farben zentral als CSS-Variablen -> hier anpassen. */

:root {
  --color-bg: #1c221b;
  --color-bg-elevated: #242c24;
  --color-bg-elevated-2: #2b362b;
  --color-border: #394338;
  --color-text: #eef2ec;
  --color-text-muted: #9db09a;
  --color-accent: #6cb521;
  --color-accent-hover: #7dd931;
  --color-accent-text: #0b1a06;
  --color-danger: #d9534f;
  --color-danger-hover: #e57470;

  --color-track: rgba(255, 255, 255, 0.08);   /* Spur hinter Ringen/Balken */
  --color-soft: rgba(255, 255, 255, 0.05);    /* dezente Fläche auf Karten */

  --radius: 12px;
  --gap: 12px;
  --max-width: 720px;
  color-scheme: dark;
}

/* Hell-Modus (Runde 8 B): zweiter Wertesatz der Design-Variablen. Dunkel bleibt der Standard. Die Teamfarbe
   (applyTeamAccent in teams.js) überschreibt Akzent/Akzent-Hover/Akzent-Text auch hier. */
:root[data-theme="hell"] {
  --color-bg: #eef2ec;
  --color-bg-elevated: #ffffff;
  --color-bg-elevated-2: #e4eae1;
  --color-border: #c9d3c5;
  --color-text: #1b231a;
  --color-text-muted: #55654f;
  --color-accent: #3d8a22;
  --color-accent-hover: #2d6f17;
  --color-accent-text: #ffffff;
  --color-danger: #c0392b;
  --color-danger-hover: #a52d20;
  --color-track: rgba(0, 0, 0, 0.09);
  --color-soft: rgba(0, 0, 0, 0.04);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

/* Randlos (installierte App / Notch): Hintergrund auch hinter Statusleiste und Home-Indikator */
html {
  background: var(--color-bg);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent-hover);
}

/* ---- Layout ---- */

header.app-header {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}

.app-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Spieler-Konto: nur das eigene Profil, keine Trainer/Team-Bereiche (das Menü zeigt nur Profil und Meine Woche, siehe app-nav.js) */
body.player-mode .sub-nav,
body.player-mode #team-page-header,
body.player-mode #team-photo-area,
body.player-mode #team-overview,
body.player-mode #team-staff-area,
body.player-mode .backup-links {
  display: none !important;
}

body.player-mode .app-logo-link {
  pointer-events: none;
  cursor: default;
}

.app-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.app-logo {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-accent-hover);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-profile {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: auto;
  overflow: hidden;
}

.app-profile-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-profile-large {
  width: 88px;
  height: 88px;
  font-size: 1.8rem;
  cursor: default;
  margin: 0 auto;
}

.profile-avatar-wrap {
  display: flex;
  justify-content: center;
}

/* ---- Profil-Dropdown (klappt unter dem Profil-Icon auf) ---- */

.profile-dropdown {
  position: fixed;
  width: 240px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  padding: 14px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.profile-dropdown-header .app-profile {
  width: 44px;
  height: 44px;
  font-size: 1rem;
  cursor: default;
  margin-left: 0;
  flex-shrink: 0;
}

.profile-dropdown-photo-btn {
  background: none;
  border: none;
  color: var(--color-accent-hover);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.profile-dropdown-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 8px 0;
}

.profile-dropdown-label {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: normal;
  margin: 2px 0 4px;
}

.profile-team-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--color-text);
  font-size: 0.88rem;
}

.profile-team-row:hover,
.profile-team-row:focus-visible {
  background: var(--color-bg-elevated-2);
  outline: none;
}

.profile-team-row.selected {
  box-shadow: inset 0 0 0 1px var(--team-color, var(--color-accent));
}

/* Touren pro Bereich (Runde 16 F): aufklappbare Liste im Profilmenü */
.profile-tour-details { margin: 0; }
.profile-tour-details summary { list-style: none; }
.profile-tour-details summary::-webkit-details-marker { display: none; }
.profile-tour-area-row { padding-left: 26px; font-size: 0.84rem; }

.profile-team-row img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.profile-dropdown-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

nav.app-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav.app-nav.main-nav {
  justify-content: flex-start;
}

nav.app-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
}

nav.app-nav a.active {
  color: var(--color-accent-text);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* Hauptnavigation mit Untermenüs (siehe app-nav.js): Hover am Desktop,
   Tap-to-toggle auf Touch-Geräten (Klasse .open). */
.nav-group {
  position: relative;
}

nav.app-nav .nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

/* unsichtbare Brücke, damit das Menü beim Überfahren der Lücke nicht zuklappt */
nav.app-nav .nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

nav.app-nav .nav-dropdown a {
  background: none;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.9rem;
  white-space: nowrap;
}

nav.app-nav .nav-dropdown a:hover,
nav.app-nav .nav-dropdown a:focus-visible {
  background: var(--color-bg-elevated-2);
  color: var(--color-text);
}

nav.app-nav .nav-dropdown a.active {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

/* Anzeige der Untermenüs (Fenster in mittel, aufgeklappt in breit): layout.css */

/* Die Ausrichtung des Untermenüs (links/rechts, nie über den Bildrand) setzt app-nav.js (positionDropdown). */

nav.app-nav.sub-nav {
  margin-top: 6px;
}

nav.app-nav.sub-nav a {
  font-size: 0.85rem;
  padding: 6px 12px;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px;
}

main.wide {
  max-width: 1400px;
}

main.wide.video-page {
  max-width: 2200px;
}

footer.app-footer {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  padding: 16px;
}

/* ---- Formular-Elemente ---- */

label {
  display: block;
  font-weight: 600;
  margin: 18px 0 6px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
}

label:first-of-type {
  margin-top: 0;
}

select,
input[type="text"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea {
  width: 100%;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border: 1px solid var(--control-border, var(--color-border));
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1rem;
  min-height: 48px;
  font-family: inherit;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.theme-level {
  margin-bottom: 10px;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-bg-elevated-2);
  color: var(--color-text);
  border: 1px solid var(--control-border, var(--color-border));
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 600;
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
}

button:hover, .btn:hover {
  border-color: var(--color-accent);
}

button.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
  width: 100%;
  min-height: 52px;
  font-size: 1.1rem;
}

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

button.danger {
  background: transparent;
  border-color: var(--color-danger);
  color: var(--color-danger-hover);
}

button.danger:hover {
  background: var(--color-danger);
  color: #fff;
}

button.small {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Für kompakte "aktiv"-Zustände (z.B. gewähltes Drittel, aktive Linie) -
   bewusst NICHT button.primary wiederverwendet, weil dessen width:100% und
   grössere Massse für einen prominenten CTA-Button gedacht sind, nicht für
   eine dezente Tab-Hervorhebung. */
button.small.tab-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- Breadcrumb ---- */

.breadcrumb {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

/* ---- Team-Auswahl (Logos) ---- */

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 0 4px;
}

.team-card {
  flex: 1 1 200px;
  max-width: 240px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  padding: 18px 10px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.team-card img {
  max-width: 78%;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.team-card .team-name {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.team-card:hover,
.team-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--team-color, var(--color-accent)), 0 8px 20px rgba(0, 0, 0, 0.35);
  outline: none;
}

.team-card.selected {
  box-shadow: 0 0 0 2px var(--team-color, var(--color-accent));
}

.team-card-add {
  border: 1px dashed var(--color-border);
}

.team-card-add:hover,
.team-card-add:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.team-card-add-icon {
  font-size: 2rem;
  color: var(--color-accent-hover);
  line-height: 1;
}

.welcome-block {
  text-align: center;
  margin: 4px 0 24px;
}

.welcome-title {
  margin: 0 0 6px;
}

.welcome-subtitle {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.active-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.active-team-label {
  font-weight: 700;
  color: var(--color-accent-hover);
}

.link-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
}

.link-btn:hover {
  color: var(--color-text);
}

/* ---- PIN-Dialog (Team-Auswahl) ---- */

.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.pin-overlay[hidden] {
  display: none;
}

.pin-dialog {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pin-team-logo {
  max-width: 60%;
  max-height: 56px;
  object-fit: contain;
}

/* Markenlogo (weisse Schrift) auf dunklem Grund, gross und ohne Rahmen */
.brand-logo-box {
  max-width: 94%;
  max-height: 84px;
}

.pin-team-name {
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 6px;
}

.pin-input {
  width: 100%;
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 0.3em;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.pin-error {
  color: var(--color-danger);
  font-size: 0.82rem;
  text-align: center;
}

.pin-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.pin-actions button {
  flex: 1;
}

/* ---- Logo-Sammlung (Auswahl-Dialog, siehe logo-picker.js) ---- */

.logo-picker-dialog {
  max-width: 420px;
}

.logo-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
}

.logo-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
  color: var(--color-text);
}

.logo-picker-item:hover,
.logo-picker-item:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.logo-picker-item img {
  width: 100%;
  height: 56px;
  object-fit: contain;
}

.logo-picker-item span {
  font-size: 0.72rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ---- Login-Seite ---- */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-dialog {
  max-width: 340px;
}

.login-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.login-field[hidden] {
  display: none;
}

.login-field label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.login-field input {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
}

.login-password-wrap {
  position: relative;
  width: 100%;
}

.login-password-wrap input {
  padding-right: 40px;
}

.login-password-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 6px 8px;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.login-password-toggle:hover {
  opacity: 1;
}

/* ---- Foto-Ausschnitt-Dialog (Spielerprofil, siehe monitoring.js) ---- */

.crop-box {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  margin: 4px auto 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.crop-box:active {
  cursor: grabbing;
}

.crop-img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  pointer-events: none;
}

.crop-circle-guide {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.crop-zoom {
  width: 100%;
  margin-top: 12px;
}

/* ---- Toast ---- */

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-accent);
  color: var(--color-accent-text);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.offline {
  background: var(--color-bg-elevated-2);
  color: var(--color-text);
  border: 1px solid var(--color-accent);
}

/* ---- Cards / Sections ---- */

.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.card h2 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--color-accent-hover);
}

.card > h2 {
  text-align: center;
}

.hint {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ---- Kachel-Navigation (Auswertung & Verwaltung) ---- */

.drill-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.drill-breadcrumb button {
  background: none;
  border: none;
  color: var(--color-accent-hover);
  padding: 4px 6px;
  min-height: 44px;   /* Design-CI: Tippfläche mind. 44 px */
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.drill-breadcrumb button:disabled {
  color: var(--color-text);
  cursor: default;
  opacity: 1;
}

/* Ersetzt die frühere mehrstufige Breadcrumb: ein einzelner Zurück-Link statt
   einer Pfadkette. Auch ausserhalb von .drill-breadcrumb nutzbar (Hub-/
   Platzhalterseiten ohne Drilldown-Container). */
/* Checkup 2 A: «Zurück» ist ein Button (wie die übrigen Knöpfe), kein Text-Link */
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  padding: 6px 14px;
  min-height: 36px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 12px;
}

.back-button:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

.drill-breadcrumb .sep {
  color: var(--color-text-muted);
}

.tile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 52px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.tile:hover {
  border-color: var(--color-accent);
}

.tile .tile-name {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}

.tile .tile-count {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.tile .tile-chevron {
  color: var(--color-text-muted);
  font-size: 1.2rem;
}

.tile.tile-add {
  border-style: dashed;
  color: var(--color-accent-hover);
  font-weight: 600;
  justify-content: center;
}

.tile-actions {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
}

.tile-actions button {
  min-height: 44px;
  min-width: 44px;
  padding: 4px 8px;
  font-size: 0.85rem;
}

.entry-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.entry-card .entry-date {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-transform: none;
  margin-bottom: 4px;
}

.entry-card .entry-notiz {
  font-size: 0.95rem;
}

/* ---- Häufigkeitsübersicht (eingeklappt, kompakt) ---- */

.freq-summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 4px 0;
}

.freq-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.freq-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  padding: 3px 0;
  border-bottom: 1px solid var(--color-border);
}

.freq-row .count {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.inline-edit {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.inline-edit input {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
}

/* ---- Utility ---- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.backup-links {
  margin-top: 20px;
  text-align: right;
}

.empty-state {
  color: var(--color-text-muted);
  text-align: center;
  padding: 30px 10px;
}

/* ---- Dashboard-Module ---- */

.module-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.module-card[hidden] {
  display: none;
}

.module-card {
  flex: 1 1 260px;
  max-width: 320px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 18px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.module-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.module-card.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.dashboard-mini {
  margin-bottom: 20px;
}

.module-card .module-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.module-icon-logo {
  height: 48px;
  width: auto;
}

.team-page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin: 8px 0 18px;
}

.team-page-header img {
  height: 110px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-page-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.1;
}

/* ---- Teamfoto (Teamseite, oberhalb Staff/Kader) ---- */

.team-photo-wrap {
  position: relative;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
}

.team-photo-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
}

.team-photo-change-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.team-photo-placeholder {
  margin-bottom: 16px;
  padding: 26px 10px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--color-text-muted);
  cursor: pointer;
}

.team-photo-placeholder:hover,
.team-photo-placeholder:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-text);
  outline: none;
}

/* ---- Team-Staff (eigener Bereich, wiederverwendet .player-grid/-tile) ---- */

.team-staff-area {
  margin-top: 26px;
  margin-bottom: 16px;
}

.team-staff-area:empty {
  margin-bottom: 0;
}

.module-card .module-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.module-card .module-desc {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.3;
}

.module-card .module-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: none;
  letter-spacing: normal;
}

/* ---- Platzhalter-Seiten (Module im Aufbau) ---- */

.placeholder-card {
  text-align: center;
  padding: 40px 20px;
}

.placeholder-card .placeholder-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 10px;
}

/* ---- Spieler-Kacheln (Monitoring) ---- */

.player-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.player-tile {
  flex: 1 1 170px;
  max-width: 210px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 24px 14px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  color: var(--color-text);
}

.player-tile:hover {
  border-color: var(--color-accent);
}

.player-tile.tile-add {
  border-style: dashed;
  color: var(--color-accent-hover);
  font-weight: 600;
  background: transparent;
}

.player-tile .player-name {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
}

.player-tile-nummer {
  color: var(--color-accent-hover);
  font-weight: 700;
  font-size: 0.85rem;
}

.position-section {
  margin-bottom: 20px;
}

.position-heading {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 10px;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.player-avatar-large {
  width: 88px;
  height: 88px;
  font-size: 1.7rem;
}

.player-avatar-photo {
  object-fit: cover;
  background: var(--color-bg-elevated-2);
  border: 3px solid var(--color-accent);
}

/* ---- Spielerprofil (4 Ebenen) ---- */

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin: 6px 0 22px;
}

.player-avatar-hero {
  width: 150px;
  height: 150px;
  font-size: 3.2rem;
}

.profile-hero-name {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.1;
}

.profile-hero-meta .tag-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
}

.profile-stats {
  margin: 0 0 24px;
}

.stat-circles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 22px;
}

.stat-circle {
  width: 132px;
  text-align: center;
}

.stat-circle-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 4px;
  /* Fehlerkorrektur 1 K: Beschriftungen sind unterschiedlich lang ("SPIELSTÄRKE" vs. "MINUTEN") und brechen
     dadurch mal ein-, mal zweizeilig um - ohne feste Mindesthöhe + Unten-Ausrichtung würde der Ring darunter
     dann je nach Zeilenzahl auf unterschiedlicher Höhe starten (genau das war die Rückmeldung: Ringe wirken
     "uneinheitlich zentriert"). Gilt jetzt für JEDE Verwendung des Ringmodells, nicht nur einzelne Stellen. */
  min-height: 2.1em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}

.stat-circle-svg {
  width: 100%;
  height: auto;
  display: block;
}

.stat-circle-value {
  fill: var(--color-text);
  font-size: 30px;
  font-weight: 800;
}

/* Keine Vergleichsgruppe (z.B. Spieler-Konto): nur der graue Grundring mit der Zahl, keine leeren Vergleichsringe */
.stat-circles-nocompare .stat-circle-svg circle:nth-of-type(n+2) { display: none; }

/* Team-Statistikübersicht: Board + Spieler-Karten mit Kreisen */
.stat-board {
  margin: 0 0 16px;
  max-width: 640px;
}

.stat-board h3 {
  margin: 0 0 8px;
}

.stat-board-row {
  display: grid;
  grid-template-columns: 28px minmax(90px, 1fr) minmax(80px, 2fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin-bottom: 4px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  text-decoration: none;
}

.stat-board-row:hover {
  border-color: var(--color-accent);
}

.stat-board-rank {
  font-weight: 800;
  color: var(--color-text-muted);
}

.stat-board-name {
  font-weight: 600;
}

.stat-board-bar {
  display: block;
  height: 8px;
  background: var(--color-track);
  border-radius: 4px;
  overflow: hidden;
}

.stat-board-bar span {
  display: block;
  height: 100%;
  background: var(--color-accent);
}

.stat-board-value {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stat-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}

.stat-team-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
}

.stat-team-name {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text);
}

.stat-team-name:hover {
  color: var(--color-accent-hover);
}

/* Physistests: Notenringe, Versuche, Eingabetabellen */
.physis-circle .physis-unit {
  fill: var(--color-text-muted);
  font-size: 11px;
}

.physis-note {
  font-weight: 800;
  font-size: 0.85rem;
  margin-top: 2px;
}

.physis-attempts {
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

.physis-circle {
  width: 150px;
}

.physis-team-table td:first-child,
.physis-team-table th:first-child {
  position: sticky;
  left: 0;
  background: var(--color-bg-elevated);
  white-space: nowrap;
  z-index: 1;
}

.stat-circles-small {
  gap: 8px 10px;
}

.stat-circles-small .stat-circle {
  width: 92px;
}

.stat-circles-small .stat-circle-label {
  font-size: 0.66rem;
}

.stat-circles-small .stat-circle-value {
  font-size: 32px;
}

.stat-circle-performance .stat-circle-label {
  color: var(--color-accent-hover);
}

.stat-circles-legend {
  text-align: center;
  margin: 12px 0 0;
  font-size: 0.75rem;
}

.profile-tools {
  gap: 8px;
}

.profile-tools .module-card {
  flex: 1 1 130px;
  max-width: 170px;
  min-height: 0;
  padding: 10px 12px;
  gap: 4px;
  border-radius: 10px;
}

.profile-tools .module-card .module-icon {
  font-size: 1.2rem;
}

.profile-tools .module-card .module-title {
  font-size: 0.85rem;
}

.profile-tools .module-card .module-desc {
  font-size: 0.875rem;
}

.profile-actions {
  justify-content: center;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.player-detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 16px;
}

.player-detail-actions {
  justify-content: flex-start;
  margin-top: 14px;
}

.player-detail-info {
  flex: 1;
  min-width: 160px;
}

.player-detail-info h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--color-text);
}

.player-meta-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.player-stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}

.player-stat {
  display: flex;
  flex-direction: column;
}

.player-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent-hover);
}

.player-stat-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: normal;
}

/* ---- Spieltag: Team-vs-Gegner-Kopfzeile (Aufstellung/Aufgebot/Druck) ---- */

.matchup-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
}

.matchup-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-weight: 700;
  max-width: 140px;
}

.matchup-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  /* Unten statt mittig ausrichten - sonst "schweben" unterschiedlich
     geformte (breite/hohe) Logos innerhalb der gleich grossen Box auf
     verschiedener Höhe, statt auf einer gemeinsamen Standlinie zu sitzen. */
  object-position: center bottom;
}

.matchup-vs {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

/* ---- Tags / Videoszenen ---- */

.tag-pill {
  display: inline-block;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin: 2px 4px 2px 0;
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 14px;
}

.tag-picker label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  color: var(--color-text-muted);
  cursor: pointer;
  margin: 0;
}

.tag-picker input[type="checkbox"] {
  accent-color: var(--color-accent);
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-row select {
  min-height: 40px;
  width: auto;
  flex: 1;
  min-width: 140px;
}

.scene-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
}

.scene-card .scene-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.scene-card .scene-desc {
  margin: 6px 0;
}

.scene-card .scene-meta {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
}

/* ---- Videoplayer (Videoanalyse) ---- */

.video-embed {
  position: relative;
  width: 100%;
  max-width: min(100%, calc((100vh - 200px) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.video-embed:fullscreen {
  max-width: none;
  border-radius: 0;
}

.video-embed:-webkit-full-screen {
  max-width: none;
  border-radius: 0;
}

/* ---- Video-Embed mit angedockter Touch-Leiste (Live-Tagging, video-tagger.js) ----
   .video-visual trägt das 16:9-Bild samt der Mini-Bedienleiste (video-controls); die Touch-Leiste
   (.vc-touchbar) liegt als ECHTER Streifen DARUNTER, nicht als Overlay auf dem Bild - sonst würde
   sie Pinch-Zoom blockieren (Touch-Vorgabe). Im Vollbild schrumpft .video-visual entsprechend,
   damit die Leiste weiterhin sichtbar bleibt, ohne das Bild zu verdecken. */
.video-embed.vc-has-touchbar {
  display: flex;
  flex-direction: column;
  aspect-ratio: auto;
}

.video-embed.vc-has-touchbar .video-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}

.video-embed.vc-has-touchbar:fullscreen .video-visual,
.video-embed.vc-has-touchbar.vc-pseudo-fs .video-visual {
  aspect-ratio: auto;
  flex: 1 1 auto;
}

.vc-touchbar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: var(--color-bg-elevated-2);
  border-top: 1px solid var(--color-border);
}

.video-embed.vc-has-touchbar:fullscreen .vc-touchbar,
.video-embed.vc-has-touchbar.vc-pseudo-fs .vc-touchbar {
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}

/* Zeile 1: grosse, immer sichtbare Tipp-Knöpfe (L1/L2/L3/Tor/Tag) - zusätzlich zu den
   Tastenkürzeln, nicht statt ihnen (Touch-Vorgabe A). */
.vc-touch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vc-touch-btn {
  flex: 1 1 64px;
  min-height: 44px;
  padding: 8px 6px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  white-space: nowrap;
}

.vc-touch-btn.active {
  background: #c0392b;
  border-color: #e74c3c;
  color: #fff;
}

/* Zeile 2: Schuss-/Chancen-Tagging, aus dem früheren Video-Overlay hierher verschoben und ca.
   2.5x grösser (Runde 9 C) - je Team-Logo aussen am Cluster. */
.vc-touch-shots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vc-shot-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 220px;
  min-width: 0;
}

.vc-shot-cluster-gegen { flex-direction: row-reverse; }

.vc-shot-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.vc-shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.vc-shot-btn {
  min-height: 46px;
  padding: 2px;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.vc-shot-btn.flash { background: var(--color-accent); border-color: var(--color-accent); }

.vc-shot-correction {
  padding: 4px 2px 0;
  font-size: 0.82rem;
  color: var(--color-text);
}

.vc-shot-correction-head { font-weight: 700; margin-bottom: 4px; }

.vc-shot-correction-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }

.vc-shot-chip {
  min-height: 40px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.vc-shot-chip.selected { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-text); }

/* Zusatzknöpfe (z.B. Vor/Zurück im Einsatz-Viewer): nur im Vollbild sichtbar,
   rechts in der Bedienleiste. */
.vc-extra {
  display: none;
  gap: 6px;
  flex: 0 0 auto;
}

.video-embed.vc-is-fullscreen .vc-extra {
  display: flex;
}

.vc-extra .vc-btn {
  min-height: 0;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  white-space: nowrap;
}

/* "Tag setzen"-Overlay im Player (spieler-videos.js) - liegt im Player-Element,
   damit es auch im Vollbild sichtbar ist. */
.vc-tag-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(10, 14, 9, 0.95);
  color: var(--color-text);
  overflow: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vc-tag-overlay h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-accent-hover);
}

.vc-tag-overlay .drill-breadcrumb {
  margin: 0;
}

.vc-tag-overlay textarea {
  min-height: 80px;
}

/* Live-Tagging-Leiste in der Bedienleiste der Videoanalyse (video-tagger.js) */
.vc-live {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.vc-live-btn {
  min-height: 0;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: var(--color-text);
  white-space: nowrap;
}

.vc-live-btn.active {
  background: #c0392b;
  border-color: #e74c3c;
  color: #fff;
}

.vc-score {
  font-weight: 700;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
  color: var(--color-text);
}

.vc-toast {
  display: none;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  background: rgba(10, 14, 9, 0.92);
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  pointer-events: none;
}

.vc-tag-overlay .toggle-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

.vc-extra .vc-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Tastenkürzel-Legende der Live-Tagging-Leiste (liegt im Player, damit sie auch im Vollbild sichtbar ist) */
.vc-legend {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 4;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  pointer-events: none;
}
.vc-legend-row { display: flex; gap: 8px; align-items: baseline; }
.vc-legend kbd {
  display: inline-block;
  min-width: 2.2em;
  text-align: center;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  font-family: inherit;
  font-weight: 700;
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  /* Der Iframe darf nie Maus/Fokus bekommen - sonst blendet YouTube seine eigene
     Verdunkelung samt Play/Pause- und Vor/Zurück-Symbolen ein (siehe sealYouTubeIframe). */
  pointer-events: none;
}

.video-embed-small {
  max-width: 480px;
  margin: 10px 0;
}

/* Eigene, schlanke Bedienleiste anstelle des nativen YouTube-Chroms (siehe
   videoanalyse.js renderGameDetail) - bleibt bewusst dezent statt das Video
   beim Bewegen der Maus/Springen abzudunkeln. */
.video-click-catcher {
  position: absolute;
  inset: 0;
  bottom: 40px;
  cursor: pointer;
  z-index: 2;
}

/* Ersetzt YouTubes eigenen (nicht unterdrückbaren) abgedunkelten Pause-
   Bildschirm durch ein eigenes, schlichtes Pause-Symbol. */
.video-paused-overlay {
  position: absolute;
  inset: 0;
  bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

/* Der schwarze Obere-Streifen (.vc-top-shield) ist entfernt (04.10.2026) - er blieb beim Spulen mit den Pfeiltasten stehen. */

.video-paused-overlay .vc-play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: rgba(10, 14, 9, 0.72);
  z-index: 3;
}

.vc-icon-pause {
  display: inline-block;
  position: relative;
  width: 10px;
  height: 12px;
}

.vc-icon-pause::before,
.vc-icon-pause::after {
  content: "";
  position: absolute;
  top: 0;
  width: 3px;
  height: 12px;
  background: currentColor;
}

.vc-icon-pause::before { left: 0; }
.vc-icon-pause::after { right: 0; }

.vc-btn {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

.vc-btn:hover {
  color: var(--color-accent-hover);
}

.vc-time {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.vc-progress {
  flex: 1 1 auto;
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  /* Videoplayer Mobile: Neugestaltung C - über die Leiste ziehen statt nur zu tippen (youtube.js);
     touch-action:none verhindert, dass ein Ziehen auf der (schmalen) Leiste stattdessen die Seite scrollt. */
  touch-action: none;
}

.vc-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
}

/* ---- Einklappbare Videoszenen-Karte ---- */

.scene-collapsible {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
}

.scene-collapsible summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.scene-collapsible[open] summary {
  margin-bottom: 10px;
  color: var(--color-accent-hover);
}

.scene-comment {
  color: var(--color-text);
  font-size: 0.88rem;
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.scene-collapsible .scene-meta {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
}

/* ---- Ordner-Kacheln (Teamclips / Spieler-Videosammlung) ---- */

.folder-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.folder-tile {
  flex: 1 1 150px;
  max-width: 190px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  color: var(--color-text);
}

.folder-tile:hover {
  border-color: var(--color-accent);
}

.folder-tile .folder-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 6px;
}

.folder-tile .folder-name {
  font-weight: 700;
  font-size: 0.9rem;
  display: block;
}

.folder-tile .folder-count {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

/* ---- Zweispaltige Spieler-Videosammlung ---- */

.videos-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.videos-layout .videos-side {
  flex: 0 0 280px;
}

.videos-layout .videos-main {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 800px) {
  .videos-layout {
    flex-direction: column;
  }

  .videos-layout .videos-side {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* Einsatz-Viewer (Spielerprofil > Videosammlung > Meine Spiele > Einsätze):
   grosses Video rechts, Einsatz-Liste links, Vor/Zurück-Knöpfe unter dem Video. */
.videos-layout.einsatz-mode .videos-side,
.videos-layout.einsatz-mode .videos-main > .card > label,
.videos-layout.einsatz-mode .videos-main > .card > input[type="search"] {
  display: none;
}

.videos-layout.einsatz-mode .videos-main > .card > div:last-child {
  margin-top: 0 !important;
}

.einsatz-viewer {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.einsatz-list {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.einsatz-item {
  text-align: left;
  width: 100%;
}

.einsatz-item.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
  font-weight: 700;
}

.einsatz-stage {
  flex: 1 1 auto;
  min-width: 0;
}

/* So gross wie möglich, aber Video + Titel + Knöpfe sollen ohne Scrollen auf den Bildschirm passen. */
.einsatz-stage .video-embed {
  max-width: min(100%, calc((100vh - 200px) * 16 / 9));
  margin-bottom: 8px;
}

/* Seiten mit Clip-Ansicht: volle Fensterbreite und weniger Rand, damit das Video möglichst gross wird. */
main.wide:has(.einsatz-viewer) {
  max-width: none;
  padding: 8px 10px;
}

.card:has(.einsatz-viewer) {
  padding: 10px;
}

.einsatz-info {
  font-weight: 700;
  margin-bottom: 8px;
}

/* Thementitel, Trainer-Kommentar und Herkunfts-Zeile unter dem Clip */
.clip-title {
  font-size: 1.25rem;
  margin: 6px 0 10px;
}

.clip-comment {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: var(--color-bg-elevated-2);
  border-left: 5px solid var(--color-accent);
  border-radius: 10px;
}

.clip-comment-head {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-accent-hover);
  margin-bottom: 6px;
}

.clip-comment-body {
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.clip-meta {
  margin-top: 14px;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  opacity: 0.8;
}

.einsatz-nav {
  display: flex;
  gap: 10px;
}

.einsatz-nav button {
  flex: 1 1 0;
  width: auto;
}

@media (max-width: 800px) {
  .einsatz-viewer {
    flex-direction: column;
  }

  .einsatz-stage {
    order: -1;
    width: 100%;
  }

  .einsatz-list {
    flex: 1 1 auto;
    width: 100%;
  }
}

.toggle-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

.game-tile {
  display: block;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--color-text);
}

.game-tile:hover {
  border-color: var(--color-accent);
}

.game-tile .game-title {
  font-weight: 700;
}

.game-tile .game-meta {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ---- Spieltag: Sammel-Erfassung (mehrere Spiele auf einmal) ---- */

.batch-entry-row {
  display: grid;
  grid-template-columns: 130px 90px 1fr 1fr 1fr auto;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

@media (max-width: 640px) {
  .batch-entry-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Spieltag: Aufgebot ---- */

.aufgebot-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2px 10px;
  margin-bottom: 12px;
}

.aufgebot-check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 0.88rem;
}

/* ---- Spieltag: Aufgebot-Druckansicht ---- */

/* Das Aufgebot ist so gebaut, dass es IMMER auf eine A4-Seite passt: höchstens 3 Goalis und 20 Feldspieler*innen (je 10 pro Spalte),
   Stammdaten in 3 Spalten, kompakte Abstände. Die Breite entspricht der bedruckbaren Breite (A4 minus 2 x 12 mm Rand), damit die Bildschirm-
   Vorschau dem Ausdruck entspricht. Wird der Inhalt trotzdem zu lang (z. B. sehr viel Text bei «Besonderes»), verkleinert
   spieltag-aufgebot-print.js beim Drucken automatisch. */
.aufgebot-print-sheet {
  box-sizing: content-box;
  width: 186mm;
  max-width: 100%;
  height: 272mm;          /* festes Blatt: A4 minus Rand; Abschnitte haben feste Mindestgrössen, die Fusszeile steht immer unten */
  margin: 0 auto;
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
}
.aufgebot-print-sheet > * { flex: 0 0 auto; }
.aufgebot-print-sheet > .hint { margin: 0 0 4px; }

/* Feste Grössen je Abschnitt (mm): Platz, der nicht gebraucht wird, bleibt weiss */
.aufgebot-print-title { min-height: 9mm; }
.aufgebot-print-sheet .matchup-headline { min-height: 27mm; }
.aufgebot-print-art { min-height: 7mm; }
.aufgebot-print-meta { min-height: 19mm; align-content: start; }
.aufgebot-print-mitnehmen { min-height: 15mm; box-sizing: border-box; }
.aufgebot-print-mitnehmen.leer { background: none !important; }
.sec-goalis { min-height: 22mm; }
.sec-spieler { min-height: 62mm; }
.sec-staff { min-height: 32mm; }
.sec-pikett { min-height: 14mm; }
.sec-besonderes { min-height: 16mm; }
.aufgebot-print-sheet > .aufgebot-print-footer { margin-top: auto; }

@media screen {
  .aufgebot-print-sheet.card { padding: 14px; }
}

.aufgebot-print-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 18px;
  margin: 6px 0;
}

.aufgebot-print-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.aufgebot-print-art {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin: 0 0 4px;
}

.aufgebot-print-sheet .matchup-headline { margin-bottom: 6px; gap: 14px; }
.aufgebot-print-sheet .matchup-logo { width: 52px; height: 52px; }
.aufgebot-print-sheet .matchup-side { gap: 3px; font-size: 0.88rem; }

.aufgebot-print-meta-label {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
}

.aufgebot-print-mitnehmen {
  background: #fff7cc;
  color: #1c1c1c;
  border-radius: var(--radius);
  padding: 6px 12px;
  margin: 6px 0;
  white-space: pre-line; /* mehrzeiliger Standardtext */
}

/* Jeder Abschnitt (Goalis/Spieler*innen/Staff/Pikett) mit eigener,
   bei 1 neu startender Nummerierung und sichtbarem Abstand dazwischen -
   genau wie im echten Vereins-Aufgebot. Kompakt gehalten, damit ein
   normales Aufgebot auf eine Druckseite passt. */
.aufgebot-print-section {
  margin-top: 8px;
}

.aufgebot-print-section h3 {
  margin: 0 0 2px;
  font-size: 0.92rem;
}

.aufgebot-print-section p {
  margin: 0;
}

.aufgebot-print-playerlist,
.aufgebot-print-stafflist {
  padding-left: 20px;
  margin: 0;
}

.aufgebot-print-playerlist li,
.aufgebot-print-stafflist li {
  line-height: 1.28;
}

/* Spalten: je 10 Namen untereinander, dann rechts daneben weiter (aufgebot-print-cols wird in spieltag-aufgebot-print.js gebaut) */
.aufgebot-print-cols {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.aufgebot-print-cols > ol {
  flex: 0 1 calc(50% - 12px);
  min-width: 0;
}

.aufgebot-print-playerlist li::marker,
.aufgebot-print-stafflist li::marker {
  color: var(--color-accent);
  font-weight: 700;
}

.aufgebot-print-footer {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 4px solid var(--color-accent);
  font-weight: 700;
  white-space: pre-line;
}

@page {
  margin: 12mm;
}

@media print {
  .no-print {
    display: none !important;
  }
  body, main {
    background: #fff !important;
    color: #000 !important;
  }
  /* Seitenrand 0 (spieltag-aufgebot-print.html): der Rand entsteht über das Blatt (12 mm oben, 12 mm links/rechts) */
  html, body, main, main.wide { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .aufgebot-print-sheet {
    color: #000 !important;
    margin: 12mm auto 0 !important;
  }
  .aufgebot-print-sheet.card {
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    padding: 0 !important;
  }
  .aufgebot-print-mitnehmen {
    background: #fff7cc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .matchup-vs, .aufgebot-print-meta-label, .aufgebot-print-art {
    color: #444 !important;
  }
  .aufgebot-print-playerlist li::marker,
  .aufgebot-print-stafflist li::marker {
    color: var(--color-accent) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .aufgebot-print-footer {
    border-top-color: var(--color-accent) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    margin-top: auto !important;
  }
}

/* ---- Spieltag: Aufstellung ---- */

.aufstellung-goalie-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.aufstellung-goalie-row > div {
  flex: 1 1 200px;
}

.aufstellung-controls-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.aufstellung-controls-row > div {
  flex: 1 1 150px;
}

/* Formation als 3-Zeilen-Grid: Flügel oben, Center Mitte, Verteidiger unten,
   Spalten = Linien - zusammengehörige Slots stehen so untereinander, wie bei
   einer echten taktischen Formation (siehe spieltag.js renderAufstellung). */
.formation-grid {
  display: grid;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.formation-linie-header {
  font-weight: 700;
  color: var(--color-accent-hover);
  text-align: center;
  padding-bottom: 4px;
}

.formation-cell {
  display: flex;
  flex-direction: row;
  gap: 6px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px;
}

/* Mehrere Slots derselben Position (z.B. 2 Flügel) sitzen nebeneinander -
   wie in einer echten Formationsgrafik - statt untereinander. */
.formation-cell > div {
  flex: 1 1 0;
  min-width: 0;
}

.formation-cell label {
  font-size: 0.78rem;
}

.formation-row-fluegel { border-top: 3px solid var(--color-accent); }
.formation-row-center { border-top: 3px solid var(--color-border); }
.formation-row-verteidiger { border-top: 3px solid var(--color-text-muted); }

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.9rem;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.stats-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: none;
  font-size: 0.75rem;
  letter-spacing: normal;
}

.stats-table tbody tr:hover {
  background: var(--color-bg-elevated);
}

.stats-table td:first-child {
  font-weight: 600;
}

.spieltag-score {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent-hover);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

/* ---- Gesamtauswertung (Spielerprofil-PDF) ---- */
/* Bildschirm UND Druck als helles Dokument, unabhängig vom dunklen App-Design. */
body.gesamt-body { background: #fff; color: #111; }
.gesamt-body main { background: #fff; color: #111; }
.gesamt-body .hint { color: #555; }
.gesamt-body a { color: #1a5fb4; }

#gesamt-sheet { max-width: 900px; margin: 0 auto; padding-bottom: 40px; }

.gesamt-confidential {
  border: 2px solid #b00020;
  background: #fdecee;
  color: #7a0015;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.gesamt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.gesamt-head h1 { font-size: 1.6rem; margin: 0; color: #111; }
.gesamt-sub { color: #555; font-size: 0.9rem; }
.gesamt-team-logo { width: 56px; height: 56px; object-fit: contain; }

.gesamt-section { margin-top: 20px; }
.gesamt-section h2 { font-size: 1.15rem; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 2px solid #333; color: #111; break-after: avoid; }
.gesamt-section h3 { font-size: 0.98rem; margin: 14px 0 6px; color: #111; break-after: avoid; }

.gesamt-stamm { display: flex; gap: 16px; align-items: flex-start; }
.gesamt-foto { width: 110px; height: 140px; object-fit: cover; border-radius: 4px; border: 1px solid #ccc; }

.gesamt-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 6px; }
@media screen and (max-width: 767px) { .gesamt-table { display: block; overflow-x: auto; } }   /* Handy: breite Tabelle scrollt statt die Seite zu verbreitern */
.gesamt-table th { text-align: left; background: #eee; color: #111; padding: 5px 8px; border: 1px solid #ccc; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.gesamt-table td { padding: 5px 8px; border: 1px solid #ccc; vertical-align: top; color: #111; }
.gesamt-table tr { break-inside: avoid; }

.gesamt-empty { color: #666; font-style: italic; }

.gesamt-entry { border: 1px solid #ccc; border-radius: 4px; padding: 8px 12px; margin-bottom: 8px; break-inside: avoid; }
.gesamt-entry-head { font-weight: 700; margin-bottom: 4px; }
.gesamt-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #555; margin-top: 6px; }
.gesamt-text { white-space: pre-line; margin: 2px 0 4px; }
.gesamt-meta { font-size: 0.8rem; color: #555; }
.gesamt-shots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gesamt-shots img { max-width: 220px; max-height: 260px; border: 1px solid #ccc; }

/* Schlichte Fusszeile (ohne Wasserzeichen): fixiert, wiederholt sich auf jeder gedruckten Seite */
.gesamt-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-size: 0.72rem;
  color: #55654f;
  background: #fff;
  padding: 3px 8px;
  border-top: 1px solid #c9d3c5;
  z-index: 1;
}

@media print {
  body.gesamt-body { background: #fff !important; color: #111 !important; display: block; }
  .gesamt-body .app-header, .gesamt-body .no-print { display: none !important; }
  #gesamt-sheet { padding-bottom: 28px; }
}

body:not(.gesamt-body) .gesamt-footer { display: none; }

/* Spieler-Sicht: einfache vertikale Kachelliste mit grossen Touch-Zielen (mobile-first) */
.module-grid.tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.module-grid.tools-list .module-card {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-areas: "icon title" "icon desc";
  align-items: center;
  column-gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  text-align: left;
}
.module-grid.tools-list .module-card .module-icon { grid-area: icon; font-size: 2rem; text-align: center; }
.module-grid.tools-list .module-card .module-title { grid-area: title; font-size: 1.05rem; }
.module-grid.tools-list .module-card .module-desc { grid-area: desc; }
.module-grid.tools-list .module-card .module-badge { position: static; grid-area: desc; justify-self: start; }

/* Kacheln "Linien & Special Teams" im Game Report */
.shift-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}
.shift-stat-card { padding: 10px 12px; }
.shift-stat-title { font-weight: 700; margin-bottom: 4px; }

/* ---- Game Report: Kopf, Drittel, Ereigniszeilen ---- */
.report-head {
  text-align: center;
  margin-bottom: 10px;
}

.report-score {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--color-accent-hover);
  margin-bottom: 8px;
}

.report-legend {
  margin: 0 0 8px;
}

.report-drittel {
  margin-bottom: 14px;
}

.report-drittel-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 10px;
  font-weight: 700;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius) var(--radius) 0 0;
}

.report-table {
  width: 100%;
  min-width: 560px;
  table-layout: fixed;   /* gleiche Spaltenbreiten in allen Dritteln */
  border-collapse: collapse;
  font-size: 0.9rem;
}

.report-table th:nth-child(1) { width: 10px; padding: 0; }
.report-table th:nth-child(2) { width: 19%; }
.report-table th:nth-child(3) { width: 9%; }
.report-table th:nth-child(4) { width: 9%; }
.report-table th:nth-child(5) { width: 30%; }

.report-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-text-muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--color-border);
}

.report-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-row .report-dot {
  width: 10px;
  padding: 0;
  background: var(--event-color);
}

.report-row .report-typ {
  font-weight: 700;
  color: var(--event-color);
}

.report-row-tor,
.report-row-gegentor,
.report-row-strafe {
  background: var(--color-bg-elevated);
}

.game-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* ---- Benachrichtigungen (Glocke) ---- */
.app-bell {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
  min-height: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  background: var(--color-bg-elevated-2);
}

.app-bell + .app-profile {
  margin-left: 0;
}

.app-chat-btn + .app-bell {
  margin-left: 6px;
}

.app-bell-badge,
.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.notif-dropdown {
  position: fixed;
  width: min(360px, calc(100vw - 16px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  z-index: 210;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}

.notif-list {
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: none;
  text-align: left;
  font-weight: 400;
  font-size: 0.9rem;
}

.notif-item:hover {
  background: var(--color-bg-elevated-2);
}

.notif-item.unread {
  background: var(--color-soft);
  border-left: 4px solid var(--color-accent);
}

.notif-icon {
  font-size: 1.2rem;
  line-height: 1.2;
}

.notif-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.notif-title {
  font-weight: 700;
}

.notif-text {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-time {
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

/* ---- Chat ---- */
.chat-open-btn {
  position: relative;
}

.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.chat-panel {
  width: min(520px, 100%);
  height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}

.chat-title {
  flex: 1;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-list-row {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: var(--color-bg-elevated-2);
  font-weight: 400;
}

.chat-list-name {
  font-weight: 700;
}

/* Checkup 1 B: Chat-Kacheln mit Profilbild (Rahmen) links und Team-Kürzel rechts, Suche, Nachricht löschen */
.notif-item { position: relative; }
.notif-del { flex-shrink: 0; align-self: flex-start; margin-left: 6px; padding: 2px 7px; border-radius: 6px; font-size: 0.8rem; color: var(--color-text-muted); cursor: pointer; }
.notif-del:hover { background: var(--color-bg-elevated-2); color: var(--color-danger-hover); }
.chat-list-row-flex { display: flex; align-items: center; gap: 12px; }
.chat-list-text { flex: 1; min-width: 0; }
.chat-avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--color-accent); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--color-bg-elevated-2); font-size: 0.8rem; font-weight: 800; color: var(--color-text); }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-team-tag { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 0.74rem; font-weight: 700; color: var(--color-text-muted); }
.chat-team-tag img { width: 22px; height: 22px; object-fit: contain; }
.chat-head .chat-avatar { width: 34px; height: 34px; }
.chat-search { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--color-border); }
.chat-search input { flex: 1; min-height: auto; padding: 6px 10px; }
.chat-msg { position: relative; }
/* Werkzeuge einer Nachricht (Antworten, Reagieren, Löschen): kleine Leiste an der oberen Ecke; am Computer beim Darüberfahren, auf dem Handy nach Antippen */
.chat-msg-tools { position: absolute; top: -14px; right: 8px; display: none; gap: 2px; padding: 2px 4px; background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); z-index: 2; }
.chat-msg-tools button { width: auto; min-height: auto; padding: 1px 6px; font-size: 0.9rem; line-height: 1.4; background: transparent; border: none; color: var(--color-text); cursor: pointer; }
.chat-msg-tools button:hover, .chat-msg-tools button:focus-visible { background: var(--color-bg-elevated-2); border-radius: 999px; }
.chat-msg:hover .chat-msg-tools, .chat-msg:focus-within .chat-msg-tools, .chat-msg-active .chat-msg-tools { display: flex; }
.chat-msg-flash { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* Zitat bei einer Antwort */
.chat-quote { margin-bottom: 5px; padding: 4px 8px; border-left: 3px solid currentColor; border-radius: 6px; background: rgba(0, 0, 0, 0.18); font-size: 0.78rem; cursor: pointer; }
.chat-quote-who { font-weight: 700; opacity: 0.85; }
.chat-quote-text { opacity: 0.85; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.chat-quote-weg { cursor: default; font-style: italic; opacity: 0.75; }
/* Emoji-Reaktionen */
.chat-reacts { display: none; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chat-react { width: auto; min-height: auto; padding: 1px 8px; border-radius: 999px; font-size: 0.82rem; line-height: 1.5; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(0, 0, 0, 0.18); color: inherit; cursor: pointer; }
.chat-react-mine { border-color: currentColor; background: rgba(255, 255, 255, 0.22); font-weight: 700; }
.chat-emoji-pop { position: absolute; top: 14px; right: 8px; display: flex; flex-wrap: wrap; gap: 2px; max-width: 230px; padding: 5px 6px; background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); z-index: 3; }
.chat-emoji-pop button { width: auto; min-height: auto; padding: 3px 6px; font-size: 1.25rem; line-height: 1.2; background: transparent; border: none; border-radius: 8px; cursor: pointer; }
.chat-emoji-pop button:hover { background: var(--color-bg-elevated-2); }
.chat-reply-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.chat-list-last {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-badge-inline {
  top: 12px;
  right: 12px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 14px;
  line-height: 1.35;
}

.chat-msg-mine {
  align-self: flex-end;
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-bottom-right-radius: 4px;
}

.chat-msg-theirs {
  align-self: flex-start;
  background: var(--color-bg-elevated-2);
  border-bottom-left-radius: 4px;
}

.chat-msg-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg-time {
  margin-top: 2px;
  font-size: 0.68rem;
  opacity: 0.7;
  text-align: right;
}

.chat-bezug {
  display: block;
  margin-bottom: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.chat-bezug-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--color-border);
}

.chat-compose textarea {
  min-height: 48px;
  resize: none;
}

.chat-compose button {
  width: auto;
}

/* Chat-Knopf oben rechts im Spielerprofil (Ebene 1) */
.profile-hero {
  position: relative;
}

.profile-chat-btn {
  position: absolute;
  top: 0;
  right: 0;
}

/* Benachrichtigungs-Knopf (neue Clips/Aufgaben) links oben im eigenen Spielerprofil */
.profile-todo-btn {
  position: absolute;
  top: 0;
  left: 0;
}

/* Elternkommunikation: Screenshot-Raster */
.eltern-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.eltern-shots img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-elevated-2);
}

/* ---- Sicherheitsabstände für echtes Vollbild (Notch / Home-Indikator / Querformat) ---- */
body {
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
header.app-header {
  margin-left: calc(-1 * env(safe-area-inset-left));
  margin-right: calc(-1 * env(safe-area-inset-right));
}

/* ---- Bewertung 1-10 mit klickbaren Zahlen (Selbsteinschätzung) ---- */
.monitoring-form { max-width: 640px; margin: 0 auto; }
.rating-field {
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}
.rating-field.rating-missing { border-color: var(--color-danger); background: rgba(217, 83, 79, 0.08); }
.rating-question { font-weight: 700; margin-bottom: 8px; }
.rating-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.rating-btn {
  min-height: 52px;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 10px;
  background: var(--color-bg-elevated-2);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
}
.rating-btn.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}
.rating-ends { display: flex; justify-content: space-between; margin-top: 6px; }
.yesno-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rating-field textarea { margin-top: 8px; width: 100%; }
.form-error { color: var(--color-danger-hover); font-weight: 600; margin-top: 8px; }
.big-submit { width: 100%; min-height: 54px; font-size: 1.05rem; }

/* ---- Monitoring-Übersicht (Spieler): Reiter + Kacheln im Spieltag-Stil ---- */
.monitoring-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.monitoring-tab {
  position: relative;
  min-height: 52px;
  border-radius: 10px;
  font-weight: 700;
  background: var(--color-bg-elevated-2);
  border: 2px solid var(--color-border);
  color: var(--color-text);
}
.monitoring-tab.active { border-color: var(--color-accent); background: var(--color-bg-elevated); }
.tab-badge, .tile-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.tab-badge { margin-left: 8px; display: inline-block; }
.tile-badge { position: absolute; top: 8px; left: 8px; z-index: 1; }
.module-card { position: relative; }
.monitoring-tile { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.monitoring-tile-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.monitoring-tile-icon { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.monitoring-tile-body { flex: 1; min-width: 0; }
.monitoring-tile-go { font-size: 1.6rem; color: var(--color-text-muted); }

/* Video-Clip: kleiner "Frage stellen"-Knopf beim Trainer-Kommentar */
.clip-comment-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.clip-ask-inline { min-height: 0; padding: 3px 10px; font-size: 0.78rem; }

/* Chat: Hinweis unter dem Eingabefeld */
.chat-compose-hint { font-size: 0.72rem; color: var(--color-text-muted); padding: 2px 12px 8px; }

/* Spielerprofil (eigenes): Knopfzeile über dem Profilbild, damit nichts überlappt */
.profile-hero:has(.profile-todo-btn) { padding-top: 50px; }

/* ---- Scheinvollbild für Videos (iPhone & Co., wo die Fullscreen-API fehlt) ---- */
body.pseudo-fs-open { overflow: hidden; }
.video-embed.vc-pseudo-fs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  aspect-ratio: auto;
  margin: 0;
  border-radius: 0;
  z-index: 2000;
}
.video-embed.vc-pseudo-fs .vc-controls,
.video-embed.vc-pseudo-fs .video-controls {
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}
.vc-pseudo-close {
  display: none;
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: calc(10px + env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 5;
}
.video-embed.vc-pseudo-fs .vc-pseudo-close { display: block; }

/* Im Scheinvollbild das Video im 16:9-Format zentrieren (sonst zoomt YouTube im Hochformat) */
.video-embed.vc-pseudo-fs iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100vw, calc(100dvh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
}

/* ---- Clip-Bewertung (Trainer) ---- */
.clip-rating { margin: 10px 0; }
.clip-rating-row { display: flex; flex-wrap: wrap; gap: 4px; }
.clip-rating-btn {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-weight: 700;
  border-radius: 8px;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
}
.clip-rating-btn.selected { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-text); }

/* ---- Umschalter Dunkel/Hell im Profilmenü ---- */
.theme-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 8px 8px; }
.theme-toggle-btn {
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 10px;
  font-weight: 600;
  background: var(--color-bg-elevated-2);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
}
.theme-toggle-btn.active { border-color: var(--color-accent); }

/* ---- Teameinstellungen: Funktions-Regler (Runde 12 B) ---- */
.ts-abschnitt { max-width: 520px; margin-top: 12px; padding: 0; }
.ts-abschnitt > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1rem; color: var(--color-text); }
.ts-abschnitt > summary::-webkit-details-marker { display: none; }
.ts-abschnitt > summary::after { content: ""; flex-shrink: 0; width: 9px; height: 9px; border-right: 2px solid var(--text-muted, var(--color-text-muted)); border-bottom: 2px solid var(--text-muted, var(--color-text-muted)); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
.ts-abschnitt[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ts-abschnitt > summary:focus-visible { outline: 2px solid var(--text, var(--color-accent)); outline-offset: -2px; border-radius: var(--radius); }
.ts-abschnitt[open] > summary { border-bottom: 1px solid var(--color-border); }
.ts-inhalt { padding: 12px 16px 16px; }
.ts-inhalt > .hint:first-child { margin-top: 0; }
.ts-inhalt h4 { margin: 14px 0 4px; font-size: 0.95rem; }
/* Kalender-Farben: Standardpalette als Klickoptionen plus eigene Farbe */
.ts-farbzeile { margin: 8px 0 12px; }
.ts-farbname { font-size: 0.95rem; color: var(--color-text); margin-bottom: 2px; }
.ts-palette { display: flex; flex-wrap: wrap; gap: 0 2px; align-items: center; }
.ts-farbe { position: relative; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; border-radius: 50%; cursor: pointer; }
.ts-farbe::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.ts-farbe.aktiv::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--text, var(--color-text)); }
.ts-eigene { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; font-size: 0.875rem; color: var(--color-text-muted); }
.ts-eigene-farbe { width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.ts-eigene-farbe::-webkit-color-swatch-wrapper { padding: 8px; }
.ts-eigene-farbe::-webkit-color-swatch { border: 1px solid var(--control-line, var(--color-border)); border-radius: 50%; }
.ts-eigene-farbe::-moz-color-swatch { border: 1px solid var(--control-line, var(--color-border)); border-radius: 50%; }
.ts-eigene-farbe.aktiv { box-shadow: 0 0 0 2px var(--text, var(--color-text)) inset; }
.feature-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  color: var(--color-text);
}
.feature-toggle-row:last-of-type { border-bottom: none; }
.feature-toggle-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border-radius: 14px;
  background: var(--surface-2, var(--color-bg-elevated-2));
  border: 1px solid var(--control-line, var(--color-border));
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.feature-toggle-row input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted, #fff);
  transition: transform 0.15s, background 0.15s;
}
.feature-toggle-row input[type="checkbox"]:checked { background: var(--text-muted, var(--color-accent)); }
.feature-toggle-row input[type="checkbox"]:checked::before { transform: translateX(18px); background: var(--surface, #fff); box-shadow: 0 0 0 1px var(--control-line, transparent); }
.feature-toggle-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--text, var(--color-accent)); outline-offset: 2px; }

/* ---- Regler (Design-CI, Block 1): Klasse .ctl-range. Spur Fläche 2 mit Rahmen, gefüllter Teil gedämpft, Knopf heller mit Rahmen, nie grün.
   Der gefüllte Teil kommt in Firefox aus ::-moz-range-progress, sonst aus --ctl-fill (Prozent; setCtlRangeFill in layout.js). ---- */
input[type="range"].ctl-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"].ctl-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  border: 1px solid var(--control-line);
  background: linear-gradient(to right, var(--text-muted) 0 var(--ctl-fill, 0%), var(--surface-2) var(--ctl-fill, 0%) 100%);
}
input[type="range"].ctl-range::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  border: 1px solid var(--control-line);
  background: var(--surface-2);
}
input[type="range"].ctl-range::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--text-muted); }
input[type="range"].ctl-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--control-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
input[type="range"].ctl-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--control-line);
}
input[type="range"].ctl-range:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---- Ansichtsmodus (Runde 12 C): blendet Hochladen-/Bearbeiten-Buttons aus ----
   .edit-only lässt sich gezielt an einzelne Elemente setzen; zusätzlich blendet dieselbe Regel
   .tile-add aus ("+ ... hinzufügen"-Kacheln, app-weit dieselbe Klasse) - das deckt "mehrere
   Monitoring-Seiten" ab, ohne jede Seite einzeln anfassen zu müssen. Bewusst NICHT .danger:
   die Klasse ist rein visuell (rot) und wird auch für "Abmelden" verwendet - das darf im
   Ansichtsmodus nicht verschwinden. Reine Bearbeiten-Stift-Knöpfe ohne eigene Klasse sowie
   Excel-/Logo-Uploads sind (noch) nicht erfasst - offener Punkt. */
body.view-mode .edit-only,
body.view-mode .tile-add {
  display: none !important;
}

/* Game Report: Kreise "Abschlüsse" (Wir/Gegner in einem Kreis) und "Effizienz" pro Linie/Formation */
.shift-stat-dual-ring .stat-circle-value { font-size: 1.1rem; }

/* Game Report: Schuss-/Chancen-Tabelle (Team-Kopf und pro Linie/Formation) */
.schuss-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 8px; }
.schuss-table th, .schuss-table td { padding: 4px 8px; text-align: center; border-bottom: 1px solid var(--color-border); }
.schuss-table th:first-child, .schuss-table td:first-child { text-align: left; }
.schuss-table th { color: var(--color-text-muted); font-weight: 600; }

/* Spieler-Checkbox in Tor-/Special-Teams-Dialogen (video-tagger.js) - als Klasse statt Inline-Style,
   damit @media (pointer: coarse) unten die Fläche vergrössern kann. */
.player-check-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
  text-transform: none;
  font-size: 0.85rem;
  margin: 0;
  cursor: pointer;
  color: var(--color-text);
}

/* ---- Touch-Vorgabe B: grössere Tipp-Flächen bei berührungsbasierter Eingabe (Tablet/Handy) -
   (pointer: coarse) erkennt Touch-als-Haupteingabe (auch bei Tablets), Maus bleibt unverändert. ---- */
@media (pointer: coarse) {
  .player-check-label {
    min-height: 40px;
    padding: 4px 2px;
    font-size: 0.92rem;
  }
  .player-check-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }
  .game-event-row {
    padding: 10px 8px;
  }
  .game-event-row button {
    min-height: 40px;
    min-width: 40px;
  }
  .vc-live-btn {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  .vc-tag-overlay .toggle-btn,
  .vc-tag-overlay .small {
    min-height: 44px;
  }
  .video-embed:not(.vc-is-fullscreen):not(:fullscreen):not(.vc-pseudo-fs) .vc-fullscreen {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.3rem;
  }
}

/* ---- Runde 9 (Nachbesserung): Vollbild im Tagging-Player ---- */
/* Scheinvollbild mit angedockter Leiste: Video füllt den verbleibenden Platz, YouTube passt sich der Box an */
.video-embed.vc-has-touchbar.vc-pseudo-fs .video-visual { container-type: size; }
.video-embed.vc-has-touchbar.vc-pseudo-fs .video-visual iframe {
  /* 16:9 innerhalb der verbleibenden Box (Container-Einheiten): kein Zuschneiden, Ränder statt Zoom */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  aspect-ratio: auto;
}
.video-embed.vc-has-touchbar.vc-pseudo-fs .vc-pseudo-close { z-index: 12; }

/* "Vollbild starten" (nur Touch, nur ausserhalb des Vollbilds) */
.vc-fs-start { display: none; }
@media (pointer: coarse) {
  .video-embed.vc-has-touchbar:not(.vc-pseudo-fs) .vc-fs-start {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 0;
    background: var(--color-accent);
    color: var(--color-accent-text);
    border: 0;
  }
}

/* Spielstand/Verlauf im Vollbild eingeklappt, kleines Symbol klappt sie auf */
.vc-live-expander { display: none; }
.video-embed.vc-pseudo-fs .vc-live-expander { display: inline-flex; }
.video-embed.vc-pseudo-fs .vc-live:not(.expanded) > .vc-live-secondary { display: none; }

/* Ansichtsmodus: per Beschriftung erkannte Bearbeiten-/Hochladen-Bedienelemente (auth-guard.js) */
body.view-mode .view-hidden { display: none !important; }
body.view-mode main .danger { display: none !important; }
body.view-mode .vc-touchbar, body.view-mode .vc-live, body.view-mode .vc-fs-start { display: none !important; }


/* ---- Runde 13 A: Team-Übersicht (Spiele, Rang/Punkte/Tordifferenz, Tabelle) ---- */
.team-overview { margin: 6px 0 18px; }
.team-ov-games { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 12px; margin: 8px 0 14px; }
@media (max-width: 640px) { .team-ov-games { grid-template-columns: 1fr; } }
.team-ov-game { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px; background: var(--color-bg-elevated-2); }
.team-ov-game-title { font-weight: 700; margin-bottom: 8px; color: var(--color-accent-hover); }
.team-ov-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.team-ov-side { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.team-ov-logo { width: 46px; height: 46px; object-fit: contain; }
.team-ov-logo-empty { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; opacity: 0.5; }
.team-ov-name { font-size: 0.8rem; line-height: 1.15; overflow-wrap: anywhere; }
.team-ov-name.own { font-weight: 700; }
.team-ov-vs { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.team-ov-meta { text-align: center; margin-top: 8px; }
.team-ov-rings { justify-content: center; margin-bottom: 10px; }
.team-ov-table > summary { cursor: pointer; font-weight: 700; margin-bottom: 6px; }
.team-ov-own-row td { font-weight: 700; background: rgba(255, 255, 255, 0.06); color: var(--color-accent-hover); }


/* ---- Kopfzeile im Team-Bereich (Runde 13 B, Runde 15 überarbeitet): normale Grundfarben der Seite, ganz links das
   EDS-Coachingskills-Logo (mit dem Menü daneben), Team-Logo + Team-Name in der Mitte, rechts Chat, Glocke, Profilbild ---- */
header.team-header .app-title-row { flex-wrap: nowrap; align-items: center; }
header.team-header .app-team-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  color: var(--color-text);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
}
header.team-header .app-team-badge span { overflow: hidden; text-overflow: ellipsis; }
header.team-header .app-team-badge img { height: 44px; width: auto; max-width: 66px; object-fit: contain; }
header.team-header .app-title-row > .app-profile { margin-left: 0; }
header.team-header .app-title-row > .app-chat-btn { margin-left: 0; }
/* Kopf und Navigation je Stufe (kompakt/mittel/breit): siehe layout.css (Auftrag 01b). Die früheren Umbrüche bei 420, 560 und 1024 px sind dort aufgegangen. */


/* ---- Runde 14 A: "Dein nächstes Training" prominent, offene Aufgabe ---- */
.next-training-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--color-bg-elevated-2);
}
.next-training-card:hover { border-color: var(--color-accent-hover); }
.next-training-head { font-size: 0.85rem; font-weight: 700; text-transform: none; letter-spacing: normal; color: var(--color-text-muted); margin-bottom: 6px; }
.next-training-when { font-size: 1.7rem; font-weight: 800; line-height: 1.15; color: var(--color-accent-hover); }
.next-training-what { font-size: 1.2rem; font-weight: 700; margin-top: 4px; }
.next-training-where { font-size: 1rem; margin-top: 4px; color: var(--color-text-muted); }
.open-task-box {
  border: 2px solid var(--color-warning, #e0a020);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--color-bg-elevated-2);
}
.open-task-head { font-weight: 800; margin-bottom: 6px; }
.open-task-row { display: block; padding: 8px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--color-border); font-weight: 600; }
.open-task-row:first-of-type { border-top: none; }
.open-task-row:hover { color: var(--color-accent-hover); }


/* ---- Runde 14 I: Einführungs-Tour ---- */
.tour-overlay { position: fixed; inset: 0; z-index: 900; }
.tour-overlay.tour-dim { background: rgba(0, 0, 0, 0.6); }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6); border: 2px solid var(--color-accent); pointer-events: none; transition: all 0.2s; }
.tour-card {
  position: fixed;
  max-width: calc(100vw - 24px);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.tour-card.tour-card-center { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 24px)); }
.tour-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }
.tour-text { line-height: 1.4; }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-foot .hint { margin-right: auto; }
.tour-foot .hint { white-space: nowrap; margin: 0 auto 0 0; }

/* ---- Zusatzauftrag 1: Zeichentool / Präsentation (zeichentool-core.js) ---- */
.zt-root { max-width: 1100px; margin: 0 auto; }
.zt-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: var(--radius); user-select: none; -webkit-user-select: none; }
.zt-zoomer { position: absolute; inset: 0; transform-origin: 0 0; }
.zt-video-host, .zt-video-host .video-embed { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; aspect-ratio: auto; }
.zt-stage .video-controls, .zt-stage .video-click-catcher, .zt-stage .video-paused-overlay { display: none !important; }
.zt-canvas { position: absolute; left: 0; top: 0; z-index: 3; }
.zt-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; z-index: 5; pointer-events: none; }
.zt-badge { background: rgba(0, 0, 0, 0.65); color: #fff; padding: 3px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.zt-rec { background: #d9534f; }
/* Trainer-Kommentar des Clips (Runde 16 A) - unterhalb der Abzeichen, damit er nicht übersehen wird */
.zt-comment { position: absolute; top: 40px; left: 8px; right: 8px; z-index: 5; pointer-events: none; background: rgba(0, 0, 0, 0.68); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 0.85rem; max-width: calc(100% - 16px); }
.zt-comment:empty { display: none; }
.zt-transport, .zt-tools, .zt-recbar, .zt-playlist { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.zt-controls-band { display: block; }
.zt-btn { min-width: 40px; padding: 8px 10px; font-size: 0.95rem; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-bg-elevated-2); color: var(--color-text); cursor: pointer; width: auto; }
.zt-btn.active { background: var(--color-accent); color: var(--color-accent-text); border-color: var(--color-accent); }
.zt-btn.zt-play { min-width: 52px; font-weight: 800; }
.zt-recbtn { background: var(--color-danger); border-color: var(--color-danger); color: #fff; font-weight: 700; }
.zt-recbtn.recording { animation: zt-pulse 1.2s infinite; }
@keyframes zt-pulse { 50% { opacity: 0.6; } }
.zt-time { font-variant-numeric: tabular-nums; font-size: 0.85rem; min-width: 130px; }
.zt-scrub { flex: 1 1 200px; min-width: 140px; }
.zt-select { width: auto; padding: 6px 8px; font-size: 0.85rem; }
.zt-colors { display: inline-flex; gap: 4px; margin: 0 6px; }
.zt-color { width: 28px; height: 28px; min-width: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--color-border); cursor: pointer; }
.zt-color.active { border-color: var(--color-text); box-shadow: 0 0 0 2px var(--color-accent); }
.zt-audio-opt { font-size: 0.85rem; display: inline-flex; align-items: center; gap: 4px; }
.zt-audio-opt input { width: auto; }
/* Vollbild (Runde 16 D, wie die Touch-Leiste der Videoanalyse): Video füllt den ganzen Bildschirm, die
   Werkzeugleiste wird zu einem fest angedockten, halbtransparenten Band am unteren Rand statt Platz zu reservieren -
   sie blockiert dabei nur ihren eigenen schmalen Streifen, nicht Zoom/Interaktion mit dem restlichen Video. */
.zt-root.zt-full { position: fixed; inset: 0; z-index: 850; max-width: none; background: #000; padding: 0; overflow: hidden; }
.zt-root.zt-full .zt-stage { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; margin: 0; }
.zt-root.zt-full .zt-controls-band {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(10, 12, 10, 0.85); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); max-height: 46vh; max-height: 46dvh; overflow-y: auto;
}
.zt-root.zt-full .zt-transport, .zt-root.zt-full .zt-tools, .zt-root.zt-full .zt-recbar, .zt-root.zt-full .zt-playlist { margin-top: 6px; }
/* Im Vollbild ist die Bühne nicht mehr 16:9 (sie füllt den ganzen, meist breiteren Bildschirm). Ein früherer
   Versuch liess den Iframe bewusst GRÖSSER als die Bühne rendern und mittig zuschneiden (wie object-fit: cover),
   damit keine schwarzen Ränder entstehen - das schnitt bei echten Spielaufnahmen (oft kein sauberes 16:9, z.B.
   Weitwinkel-/Hallenkameras) reale Bildinhalte ab (Rückmeldung nach Live-Test). Jetzt bewusst umgekehrt: der
   Iframe bleibt bei width/height:100% (Basisregel oben) - YouTube passt das Video darin selbst im Originalformat
   ein (object-fit: contain) und zeigt nötigenfalls schmale Ränder oben/unten oder links/rechts, schneidet aber
   nie etwas vom Bild ab. */

/* ---- Videoplayer Mobile: Neugestaltung (Coaches-Eye-Vorbild) - nur auf Touch-Geräten UND nur im Vollbild des
   Zeichentools: "Video maximiert" (Abschnitt A) ist technisch nur im Vollbild wirklich erreichbar (ausserhalb
   ist die Bühne immer nur eine 16:9-Vorschau in der Seite) - ausserhalb des Vollbilds/auf Geräten mit Maus bleibt
   alles wie zuvor (Runde 16 D), der Vollbild-Knopf in der (dort unveränderten) .zt-controls-band führt hinein.
   B: die bisherige, aus dem Desktop übernommene .zt-controls-band (zwei volle Zeilen unten) wird zu einer
   schmalen, halbtransparenten Randleiste rechts (.zt-tools + .zt-recbar, per flex-Spalte rechtsbündig
   übereinander) plus einer eigenen, dicken Scrub-Leiste unten (.zt-transport) - dieselben Knöpfe/Funktionen wie
   am Desktop, nur anders angeordnet (keine Dopplung, kein eigener Zustand). Die Clip-Liste (.zt-playlist, nur
   bei mehreren ausgewählten Clips vorhanden) liegt oben links, ausserhalb der Randleiste.
   Zonentrennung fürs Pinch-Zoom (wie im bestehenden Touch-Prompt der Taggingoberfläche): die Randleiste liegt
   zwar sichtbar ÜBER dem Video, aber nur ihr eigener schmaler Bereich fängt Berührungen ab (per DOM-Reihenfolge/
   z-index) - eine Geste, die daneben auf dem Video beginnt, erreicht weiterhin die Zeichenfläche darunter. */
@media (pointer: coarse) {
  .zt-root.zt-full .zt-controls-band {
    position: absolute; inset: 0; z-index: 20;
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
    padding: 8px; margin: 0; max-height: none; overflow: visible;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    pointer-events: none; /* nur die einzelnen Bereiche unten (tools/recbar/playlist/transport) nehmen Berührungen an */
  }
  .zt-root.zt-full .zt-controls-band > * { pointer-events: auto; margin-top: 0; }

  /* Werkzeug-Randleiste: schmal, halbtransparent, scrollbar falls nicht alles auf einmal passt.
     margin-top schafft Platz für den Ein-/Ausklapp-Pfeil (.zt-rail-collapse), der sonst über der
     ersten Zeile schweben würde. */
  .zt-root.zt-full .zt-tools {
    order: 1; width: 54px; max-height: calc(100% - 36px); margin-top: 36px;
    overflow-y: auto; overscroll-behavior: contain;
    /* flex-wrap:nowrap überschreibt die allgemeine .zt-tools-Basisregel (flex-wrap:wrap, für die normale
       mehrzeilige Werkzeugleiste am Desktop gedacht) - ohne das würde eine einspaltige Randleiste, sobald ihr
       Inhalt die max-height übersteigt, in eine ZWEITE Spalte rechts daneben "umbrechen" statt einfach vertikal
       scrollbar zu bleiben (genau das ist passiert: Zoom-Knöpfe/Vollbild landeten in einer unsichtbaren
       zweiten Spalte ausserhalb des Bildschirms). */
    display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px;
    background: rgba(10, 12, 10, 0.55); border-radius: 12px; padding: 6px 4px;
  }
  /* Absicherung: ein Flex-Kind mit breiterem Eigen-Inhalt als die Spalte (z.B. ein <select>, siehe unten) würde
     sonst die ganze Randleiste seitlich aufsprengen (min-width:auto ist der Flexbox-Standard) - mit min-width:0
     hält sich jedes Kind an die Spaltenbreite, unabhängig vom Elementtyp. */
  .zt-root.zt-full .zt-tools > * { min-width: 0; }
  .zt-root.zt-full .zt-tools .zt-btn { width: 100%; min-width: 0; min-height: 44px; padding: 6px 2px; font-size: 1.15rem; }
  /* min-width:0 ist Pflicht: ein natives <select> will sich sonst auf die Breite seiner längsten Option
     (z.B. "Sichtbar: 3 s") aufblasen und sprengt die schmale Randleiste seitlich - mit min-width:0 hält es
     sich an die 46px des Spaltenrahmens (Text wird dabei abgeschnitten dargestellt, bleibt aber antippbar/
     öffnet die volle native Auswahlliste). */
  .zt-root.zt-full .zt-tools .zt-select { width: 100%; min-width: 0; padding: 4px 2px; font-size: 0.65rem; }

  /* Videoplayer Mobile: Neugestaltung B (Nachbesserung) - "der Aufnahmeknopf müsste besser erreicht werden
     können, dafür braucht es nicht die ganze Farbpalette so offen": auf Touch ersetzt ein einzelner Knopf (zeigt
     die aktuell gewählte Farbe) die 5 permanent sichtbaren Farb-Kreise - ein Tipp klappt sie als kleines
     Dropdown darunter auf. */
  .zt-root.zt-full .zt-tools .zt-color-toggle {
    display: block; width: 34px; height: 34px; min-height: 34px; align-self: center;
    border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.55); padding: 0; margin: 2px 0;
  }
  .zt-root.zt-full .zt-tools .zt-colors {
    display: none; flex-direction: column; align-items: center; margin: 2px 0;
    background: rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 6px 0;
  }
  .zt-root.zt-full .zt-tools .zt-colors.zt-colors-open { display: flex; }

  /* Aufnahme/Voiceover: eigene kleine Gruppe direkt unter der Werkzeug-Randleiste (wirkt wie ein Teil davon) -
     Aufnahme-Start und Voiceover-Toggle bleiben so gut erreichbar (Prompt), nur ohne den langen Text. */
  .zt-root.zt-full .zt-recbar {
    order: 2; width: 54px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px;
    background: rgba(10, 12, 10, 0.55); border-radius: 12px; padding: 6px 4px;
  }
  .zt-root.zt-full .zt-recbar .zt-btn { width: 100%; min-width: 0; min-height: 44px; padding: 6px 2px; font-size: 1.1rem; }
  .zt-root.zt-full .zt-recbar .zt-audio-text,
  .zt-root.zt-full .zt-recbar .hint { display: none; }
  .zt-root.zt-full .zt-recbar .zt-audio-opt { justify-content: center; min-height: 36px; }

  /* Clip-Liste (nur bei mehreren Clips vorhanden): oben links, ausserhalb der Randleiste */
  .zt-root.zt-full .zt-playlist {
    position: absolute; top: 8px; left: 8px; right: 66px; max-height: 96px;
    flex-wrap: wrap; overflow-y: auto; margin: 0; justify-content: flex-end;
  }

  /* Dicke Scrub-/Transportleiste unten, eigener Streifen (Abschnitt C) */
  .zt-root.zt-full .zt-transport {
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0; flex-wrap: wrap;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 12, 10, 0.72);
  }
  .zt-root.zt-full .zt-scrub { order: -1; flex: 1 1 100%; margin-bottom: 4px; }

  /* Kommentar-Anzeige (Runde 16 A) weicht der Randleiste aus */
  .zt-root.zt-full .zt-comment { right: 66px; }

  /* Dicke, fein bedienbare Scrub-Leiste mit Strichmarkierungen (Abschnitt C) - gilt für die native
     Zeitleiste (<input type="range">) sowohl beim Vorbereiten/Aufnehmen als auch beim Ansehen einer
     fertigen Aufnahme (mountRecordingPlayer nutzt dieselbe .zt-scrub-Klasse). */
  .zt-root.zt-full .zt-scrub {
    -webkit-appearance: none; appearance: none; height: 30px; background: transparent; cursor: pointer;
    /* verhindert, dass ein Ziehen auf der Leiste stattdessen die Seite verschiebt (das eigene Rad-Dragging
       aus zeichentool-core.js übernimmt die Geste komplett selbst, siehe dort) */
    touch-action: none;
  }
  .zt-root.zt-full .zt-scrub::-webkit-slider-runnable-track {
    height: 30px; border-radius: 8px;
    background: repeating-linear-gradient(to right, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px 14px), rgba(255, 255, 255, 0.14);
  }
  .zt-root.zt-full .zt-scrub::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 34px; margin-top: -2px;
    border-radius: 5px; background: var(--color-accent); border: 2px solid #fff;
  }
  .zt-root.zt-full .zt-scrub::-moz-range-track {
    height: 30px; border-radius: 8px;
    background: repeating-linear-gradient(to right, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px 14px), rgba(255, 255, 255, 0.14);
  }
  .zt-root.zt-full .zt-scrub::-moz-range-thumb {
    width: 18px; height: 34px; border-radius: 5px; background: var(--color-accent); border: 2px solid #fff;
  }

  /* Ein-/Ausklappen (Abschnitt D) - je ein kleiner, permanent sichtbarer Pfeil (auf Geräten mit Maus per
     .zt-rail-collapse/.zt-transport-collapse { display: none; } unten immer unsichtbar) */
  .zt-root.zt-full .zt-rail-collapse {
    display: block; position: absolute; top: 8px; right: 8px; z-index: 22;
    width: 28px; height: 28px; min-width: 0; padding: 0; border-radius: 8px;
    background: rgba(10, 12, 10, 0.7); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3);
  }
  /* "ESC"-Ersatz (Nachbesserung): fest sichtbarer Vollbild-Beenden-Knopf direkt neben dem Ein-/Ausklapp-Pfeil,
     unabhängig vom Scroll-/Einklapp-Zustand der Randleiste erreichbar - Touch-Geräte haben keine Escape-Taste. */
  .zt-root.zt-full .zt-fs-exit {
    display: block; position: absolute; top: 8px; right: 44px; z-index: 22;
    width: 28px; height: 28px; min-width: 0; padding: 0; border-radius: 8px;
    background: rgba(10, 12, 10, 0.7); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3);
  }
  .zt-root.zt-full.zt-rail-collapsed .zt-tools,
  .zt-root.zt-full.zt-rail-collapsed .zt-recbar,
  .zt-root.zt-full.zt-rail-collapsed .zt-playlist { display: none; }
  .zt-root.zt-full .zt-transport-collapse {
    display: block; position: absolute; left: 8px; bottom: 122px; z-index: 22;
    width: 28px; height: 28px; min-width: 0; padding: 0; border-radius: 8px;
    background: rgba(10, 12, 10, 0.7); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3);
  }
  /* Ausgeklappt: Pfeil knapp OBERHALB der (grosszügig geschätzten) Höhe der Leiste, damit er sie nicht
     verdeckt; eingeklappt (Leiste weg): direkt am unteren Rand. */
  .zt-root.zt-full.zt-transport-collapsed .zt-transport-collapse { bottom: 8px; }
  .zt-root.zt-full.zt-transport-collapsed .zt-transport { display: none; }
}
/* Ausserhalb von Touch-Geräten (Maus) bleiben diese Knöpfe unsichtbar - reine Touch-Funktion (die Bühne hat dort
   ohnehin weiterhin die volle, unveränderte .zt-controls-band mit sichtbarem Vollbild-Knopf und Farbreihe) */
.zt-rail-collapse, .zt-transport-collapse, .zt-fs-exit, .zt-color-toggle { display: none; }
.zt-follower { max-width: none; }
.zt-follower .zt-stage { width: min(100vw, 100vh * 16 / 9); border-radius: 0; margin: 0 auto; }
.zt-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 800px) { .zt-pick-grid { grid-template-columns: 1fr; } }
.zt-pick-list { max-height: 460px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
.zt-pick-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--color-border); cursor: pointer; }
.zt-pick-row:last-child { border-bottom: none; }
.zt-pick-row input { width: auto; }
.zt-pick-title { font-weight: 600; font-size: 0.9rem; }
.zt-pick-meta { font-size: 0.78rem; color: var(--color-text-muted); }
.zt-sel-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--color-border); }

/* ---- Zusatzauftrag 2: Zweitbildschirm (Beamer) ---- */
body.zt-beamer { background: #000; color: #fff; margin: 0; }
.zb-connect { max-width: 420px; margin: 12vh auto 0; text-align: center; padding: 20px; }
.zb-logo { height: 70px; margin-bottom: 8px; }
.zb-connect .hint { color: #aab7a6; }
.zb-code { font-size: 2rem; text-align: center; letter-spacing: 0.3em; text-transform: uppercase; margin: 12px 0; }
.zb-stage { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.zb-stage .zt-root { width: 100%; }
.zb-status { position: fixed; left: 10px; bottom: 10px; background: rgba(0, 0, 0, 0.7); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; z-index: 20; }
.zb-status.bad { background: #b03030; }


/* ---- Runde 15: kleines Profilbild in Listen, Physis-Rangliste ---- */
.player-avatar-small { width: 34px; height: 34px; font-size: 0.8rem; }
.player-avatar-photo.player-avatar-small { border-width: 2px; }
.name-with-avatar { display: inline-flex; align-items: center; gap: 10px; }
.physis-rank-table td { vertical-align: middle; }
.physis-team-rings { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 6px 0 14px; }

/* ---- Runde 15: einheitliches PDF-Design (export-shared.js pdfHead/pdfFoot) ---- */
.pdf-head { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--color-text); padding-bottom: 10px; margin-bottom: 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pdf-logo { height: 52px; width: auto; max-width: 110px; object-fit: contain; flex-shrink: 0; }
.pdf-logo-team { min-width: 52px; }
.pdf-head-mid { flex: 1; text-align: center; min-width: 0; }
.pdf-title { font-size: 1.4rem; font-weight: 800; color: var(--color-text); line-height: 1.15; } /* im Ausdruck/Hellmodus dunkel, am dunklen Bildschirm hell (lesbar) */
.pdf-sub { font-size: 0.85rem; color: #55654f; margin-top: 2px; }
.pdf-foot { margin-top: 18px; padding-top: 6px; border-top: 1px solid #c9d3c5; font-size: 0.72rem; color: #55654f; text-align: center; }
.pdf-print-only { display: none; }

@media print {
  /* Ausdruck immer im hellen Design (auch wenn die App im Dunkel-Modus läuft), ohne Kopfzeile der App */
  html:root[data-theme] {
    --color-bg: #ffffff; --color-bg-elevated: #ffffff; --color-bg-elevated-2: #f3f5f2; --color-border: #c9d3c5;
    --color-text: #1b231a; --color-text-muted: #55654f; --color-track: rgba(0, 0, 0, 0.09); --color-soft: rgba(0, 0, 0, 0.04);
    --color-danger-hover: #a52d20; color-scheme: light;
  }
  header.app-header, .app-nav, .back-button, .drill-breadcrumb { display: none !important; }
  .pdf-print-only { display: block; }
  .card { box-shadow: none !important; }
  main, main.wide { max-width: none !important; padding: 0 !important; }
}
.zb-stage[hidden], .zb-status[hidden], .zb-connect[hidden] { display: none !important; }


/* ---- Runde 15: Spielpaarung im Video, Legende neben dem Player, Layout der Videoanalyse ---- */
.vc-match-overlay {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
  max-width: 92%;
  white-space: nowrap;
}
.vc-match-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vc-match-side img { height: 24px; width: auto; max-width: 34px; object-fit: contain; }
.vc-match-name { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.vc-match-score { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .vc-match-name { display: none; } }

/* Videoanalyse: Player links, Tastenkürzel-Karte rechts daneben (statt im Video) */
.va-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.va-layout > .va-main { min-width: 0; }
.va-side { position: sticky; top: 12px; }
/* Videoanalyse einspaltig bis zur Stufe breit: siehe layout.css (Abschnitt 9) */
.va-legend {
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--color-text);
}
.va-legend-title { font-weight: 800; margin-bottom: 8px; color: var(--color-accent-hover); }
.va-legend-row { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; font-size: 0.95rem; line-height: 1.3; }
.va-legend kbd {
  flex: 0 0 auto;
  min-width: 3.2em;
  text-align: center;
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--color-bg-elevated);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
}


/* ---- Runde 15: Videoanalyse - Bedienleiste unter dem Bild, Knöpfe über der Zeitleiste, echtes Vollbild ---- */
.video-embed.vc-has-touchbar .video-click-catcher,
.video-embed.vc-has-touchbar .video-paused-overlay { bottom: 0; }
.video-embed.vc-has-touchbar .video-controls {
  position: static;
  flex: 0 0 auto;
  height: auto;
  min-height: 44px;
  flex-wrap: wrap;
  row-gap: 6px;
  padding: 6px 10px;
  background: var(--color-bg-elevated-2);
  border-top: 1px solid var(--color-border);
}
/* Knöpfe (Drittel, Linien, Tor, Tag ...) in der ersten Zeile, Zeitleiste darunter */
.video-embed.vc-has-touchbar .video-controls > .vc-live { order: -1; flex: 1 0 100%; flex-wrap: wrap; gap: 6px; }
.video-embed.vc-has-touchbar .video-controls > .vc-progress { flex: 1 1 120px; }
.video-embed.vc-has-touchbar .vc-live-btn { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; }
@media (pointer: coarse) {
  .video-embed.vc-has-touchbar .vc-live-btn { min-height: 42px; min-width: 44px; padding: 8px 12px; font-size: 0.9rem; }
  .video-embed.vc-has-touchbar .video-controls .vc-btn { min-height: 40px; min-width: 40px; }
}

/* ---- Videoplayer Mobile: Neugestaltung, Abschnitt C+D - dickere Zeitleiste mit Strichmarkierungen
   (wirkt wie ein Lineal, leichter zu treffen/ziehen als der bisherige dünne Strich) in der normalen
   Videoanalyse/Taggingoberfläche; dazu ein kleiner Pfeil, der sie bei Bedarf ein-/ausklappt, um kurzzeitig
   mehr Videofläche zu sehen. Das Ziehen selbst (mit feiner Auflösung statt nur grober Sprünge) steckt in
   youtube.js (vc-progress ist für alle Player gemeinsam) - hier nur das Aussehen, bewusst nur in der
   Touch-Taggingoberfläche (vc-has-touchbar), nicht in jeder kleinen Videokarte im restlichen Tool. */
@media (pointer: coarse) {
  .video-embed.vc-has-touchbar .vc-progress {
    height: 26px;
    border-radius: 6px;
    background:
      repeating-linear-gradient(to right, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px 14px),
      rgba(255, 255, 255, 0.14);
  }
  .video-embed.vc-has-touchbar .vc-progress-fill { background: var(--color-accent); opacity: 0.55; }
  .vc-scrub-toggle { display: none; }
  .video-embed.vc-has-touchbar .vc-scrub-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .video-embed.vc-has-touchbar .video-controls.vc-scrub-collapsed .vc-progress,
  .video-embed.vc-has-touchbar .video-controls.vc-scrub-collapsed .vc-time { display: none; }
}

/* Echtes Vollbild: Video füllt den Rest, darunter Tipp-Leiste, zuunterst die Bedienleiste (Knöpfe über der Zeitleiste) */
.video-embed.vc-has-touchbar:fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; background: #000; }
.video-embed.vc-has-touchbar:fullscreen .video-visual { container-type: size; }
.video-embed.vc-has-touchbar:fullscreen .video-visual iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
}
.video-embed.vc-has-touchbar:fullscreen .video-controls { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
/* Im Vollbild sind Spielstand/Verlauf/Aufstellung zunächst eingeklappt (wie im Scheinvollbild) */
.video-embed:fullscreen .vc-live-expander { display: inline-flex; }
.video-embed:fullscreen .vc-live:not(.expanded) > .vc-live-secondary { display: none; }
.video-embed:fullscreen .vc-fs-start { display: none !important; }

/* Vollbild-Knopf im Bild (oben rechts) - auf schmalen Bildschirmen/Touch gross, sonst dezent */
.vc-fs-corner {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.video-embed:hover .vc-fs-corner { opacity: 1; }
@media (pointer: coarse), (max-width: 760px) { .vc-fs-corner { opacity: 1; } }
.video-embed:fullscreen .vc-fs-corner, .video-embed.vc-pseudo-fs .vc-fs-corner { display: none; }

/* Handy (Hochformat): Player über die volle Breite, nicht in der Karte eingeengt */
@media (max-width: 760px) {
  .va-layout .video-embed.vc-has-touchbar {
    width: calc(100% + 24px);
    max-width: none;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
  }
}


/* ---- Runde 15b: Game Report - Kopf Logo : Resultat : Logo auf einer Höhe, PDF in drei Seiten ---- */
.report-vs { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 40px); margin-bottom: 6px; }
.report-vs-logo { flex: 1 1 0; display: flex; justify-content: center; align-items: center; height: 110px; max-width: 200px; }
.report-vs-logo img { max-height: 100%; max-width: 100%; object-fit: contain; }
.report-vs .report-score { margin: 0; flex: 0 0 auto; }

@media print {
  .gr-page { break-inside: auto; }
  .gr-page + .gr-page { break-before: page; page-break-before: always; }
  .gr-page .report-table td, .gr-page .report-table th { padding-top: 3px; padding-bottom: 3px; font-size: 0.78rem; }
  .gr-page .report-drittel { margin-bottom: 8px; }
  .gr-page .pdf-head { margin-bottom: 8px; }
  .report-vs-logo { height: 80px; }
  .report-score { font-size: 2.4rem; }
  .shift-stat-grid { break-inside: avoid; }
  .shift-stat-card { break-inside: avoid; }
}

/* ---- Runde 15b: Videoanalyse - Bedienband (Schuss-Knöpfe, Drittel/Linien/Tor/ST/Tag, Zeitleiste) über dem unteren
   Bildrand, das Video behält die volle Grösse (der untere Rand ist meist ausserhalb des Spielfelds) ---- */
.video-embed { container-type: inline-size; }
.video-embed.vc-has-touchbar { display: block; aspect-ratio: 16 / 9; }
.video-embed.vc-has-touchbar .video-visual { position: absolute; inset: 0; aspect-ratio: auto; flex: none; }
.video-embed.vc-has-touchbar .video-click-catcher,
.video-embed.vc-has-touchbar .video-paused-overlay { bottom: 0; }
.video-embed.vc-has-touchbar .video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 26px 10px 5px;
  row-gap: 4px;
  min-height: 0;
  border-top: 0;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.6) 65%, rgba(0, 0, 0, 0) 100%);
}
.video-embed.vc-has-touchbar .video-controls .vc-btn,
.video-embed.vc-has-touchbar .video-controls .vc-time { color: #fff; }
.video-embed.vc-has-touchbar .vc-live-btn { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); color: #fff; padding: 4px 10px; font-size: 0.8rem; }
.video-embed.vc-has-touchbar .vc-live-btn.active { background: #c0392b; border-color: #e74c3c; }
.video-embed.vc-has-touchbar .vc-score { color: #fff; }
.video-embed.vc-has-touchbar .vc-touchbar { order: -2; flex: 1 0 100%; background: transparent; border: 0; padding: 0; gap: 4px; }
.video-embed.vc-has-touchbar .vc-shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-embed.vc-has-touchbar .vc-touch-shots { flex-wrap: nowrap; gap: 10px; }
.video-embed.vc-has-touchbar .vc-shot-cluster { flex: 1 1 0; }
.video-embed.vc-has-touchbar .vc-shot-btn { min-height: 34px; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.video-embed.vc-has-touchbar .vc-shot-logo { width: 26px; height: 26px; }
.video-embed.vc-has-touchbar .vc-shot-correction { background: rgba(0, 0, 0, 0.78); color: #fff; border-radius: 8px; padding: 6px 8px; }
.video-embed.vc-has-touchbar .vc-shot-chip { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.video-embed.vc-has-touchbar .vc-shot-chip.selected { background: var(--color-accent); color: var(--color-accent-text); }
@media (pointer: coarse) {
  .video-embed.vc-has-touchbar .vc-shot-btn { min-height: 42px; }
  .video-embed.vc-has-touchbar .vc-live-btn { min-height: 38px; }
}
.video-embed.vc-has-touchbar:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; background: #000; }
.video-embed.vc-has-touchbar:fullscreen .video-visual,
.video-embed.vc-has-touchbar.vc-pseudo-fs .video-visual { flex: none; }
.vc-fs-start { display: none !important; }

/* Spielpaarung im Video: nur Logos und Resultat, mittig - auf Elias Wunsch (28.09./01.10.2026) von der
   ursprünglichen "ca. 3x"-Grösse (Runde 15b) auf die Hälfte verkleinert. */
.vc-match-overlay { top: 6px; gap: clamp(6px, 1.5cqw, 17px); padding: 4px clamp(7px, 1.5cqw, 17px); }
.vc-match-name { display: none !important; }
.vc-match-side img { height: clamp(17px, 4cqw, 45px); max-width: clamp(25px, 5.5cqw, 65px); }
.vc-match-score { font-size: clamp(0.8rem, 3.25cqw, 1.9rem); line-height: 1; font-weight: 800; }

/* Team-Logo und Name stehen in Kopf (kompakt) bzw. Seitenleiste (mittel, breit): siehe layout.css */

/* ---- Runde 15b: Physis-Team-Ringmodell - alle Ringe nebeneinander auf gleicher Höhe mit gleichem Abstand ---- */
.physis-team-rings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px 8px;
  align-items: start;
  justify-items: center;
}
.physis-team-rings .stat-circle { width: 100%; max-width: 132px; }
.physis-team-rings .stat-circle-label { min-height: 3.6em; display: flex; align-items: flex-end; justify-content: center; text-align: center; }
.physis-team-rings .hint { min-height: 1.2em; }

/* ---- Runde 15b: Teamstatistik als Rangliste, Ringe auf einer Linie ---- */
.stat-rank-list { display: flex; flex-direction: column; gap: 6px; }
/* Ranglisten-Auswahl (Design-CI, Block 5): oberhalb der Liste, beschriftet, mit Abstand zur ersten Zeile */
.stat-rank-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 var(--pf-gap, 16px); }
.stat-rank-switch-label { font-size: var(--pf-fs-small, 0.875rem); font-weight: 600; color: var(--color-text-muted); margin-right: 4px; }
.stat-info-line { margin: 0 0 var(--pf-gap, 16px); }
.stat-rank-row { display: grid; grid-template-columns: 30px 210px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-elevated-2); }
.stat-rank-nr { font-weight: 800; text-align: center; color: var(--color-accent-hover); }
.stat-rank-name { text-decoration: none; color: var(--color-text); font-weight: 700; min-width: 0; }
.stat-rank-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-rank-rings { overflow-x: auto; }
.stat-rank-rings .stat-circles { flex-wrap: nowrap; justify-content: flex-start; gap: 6px; }
.stat-rank-rings .stat-circle { flex: 0 0 auto; }
@media (max-width: 760px) { .stat-rank-row { grid-template-columns: 26px minmax(0, 1fr); } .stat-rank-rings { grid-column: 1 / -1; } }
@media print { .stat-rank-row { break-inside: avoid; } }
.zt-pick-grid .zt-pick-list { max-height: 70vh; max-height: 70dvh; }

/* Techniktest: Testanleitung (Info-Box) */
.technik-anleitung { margin: 6px 0 10px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-elevated-2); }
.technik-anleitung > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; }
.technik-anleitung-body { padding: 0 14px 12px; font-size: 0.9rem; }
.technik-anleitung-body h4 { margin: 12px 0 4px; }
.technik-anleitung-body p, .technik-anleitung-body ol { margin: 0 0 6px; }
.technik-scales { display: flex; flex-wrap: wrap; gap: 18px; margin: 8px 0; }
.technik-scale { border-collapse: collapse; margin-top: 4px; }
.technik-scale th, .technik-scale td { border: 1px solid var(--color-border); padding: 2px 10px; text-align: center; font-size: 0.82rem; }
.technik-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.technik-skizze { display: block; max-width: 340px; width: 100%; height: auto; background: #fff; border-radius: 8px; padding: 6px; margin: 4px 0 8px; }

/* Spielwert-Badge (einheitliche Farbskala, siehe spielbewertung.js) und grafische Aufstellung im Game Report */
.spielwert-badge { display: inline-block; min-width: 2.4em; text-align: center; border-radius: 999px; padding: 1px 10px; font-weight: 800; font-size: 0.9rem; line-height: 1.4; white-space: nowrap; }
.spielwert-badge-klein { font-size: 0.72rem; padding: 0 7px; min-width: 2.2em; }

/* Aufstellung: Torhüter | Linie 1 | Linie 2 | Linie 3 | Ersatzspieler - linksbündig nebeneinander, transparent, Felder nur als Linien */
.ag-layout { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; justify-content: flex-start; }
.ag-goal { display: flex; flex-direction: column; align-items: center; gap: 6px; align-self: center; }
.ag-lines { display: flex; gap: 12px; align-items: flex-start; }
.ag-bench { min-width: 190px; }
.ag-label { font-weight: 800; font-size: 0.82rem; letter-spacing: normal; text-transform: none; color: var(--color-text-muted); text-align: center; margin-bottom: 6px; }
.ag-bench .ag-label { text-align: left; }
.ag-crease { border: 2px solid var(--color-text-muted); border-left-width: 5px; border-radius: 8px; padding: 12px 10px; }
.ag-linebox { width: 236px; flex: 0 0 auto; }
.ag-field { position: relative; width: 100%; height: 350px; color: var(--color-text-muted); }
.ag-field-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.75; }
.ag-cross { position: absolute; transform: translate(-50%, -50%); font-size: 0.9rem; font-weight: 700; opacity: 0.55; pointer-events: none; }
.ag-rows { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-evenly; padding: 12% 3% 7%; }
.ag-row { display: flex; justify-content: space-evenly; align-items: flex-start; gap: 4px; }
.ag-token { display: flex; flex-direction: column; align-items: center; width: 92px; text-align: center; color: var(--color-text); }
.ag-photo { position: relative; flex-shrink: 0; }
.ag-token .player-avatar { width: 66px; height: 66px; font-size: 1.15rem; }
.ag-badge { position: absolute; right: -14px; bottom: -4px; font-size: 0.82rem; padding: 0 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.ag-name { font-size: 0.86rem; font-weight: 700; line-height: 1.15; margin-top: 5px; word-break: break-word; }
.ag-sub { font-size: 0.7rem; color: var(--color-text-muted); }
.ag-token-empty { color: var(--color-text-muted); height: 66px; justify-content: center; opacity: 0.6; }
.ag-benchlist { display: flex; flex-direction: column; gap: 10px; }
.ag-token-row { flex-direction: row; width: auto; text-align: left; gap: 12px; }
.ag-token-row .player-avatar { width: 56px; height: 56px; }
.ag-token-row .ag-name { margin-top: 0; font-size: 0.92rem; }
.ag-token-row .ag-sub { font-size: 0.75rem; }
@media (max-width: 700px) {
  /* Handy: die drei Linien bleiben nebeneinander (verkleinert, kein Scrollen); Torhüter und Ersatz darunter */
  .ag-layout { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "lines lines" "goal bench"; gap: 14px; }
  .ag-lines { grid-area: lines; width: 100%; gap: 6px; }
  .ag-goal { grid-area: goal; align-self: start; }
  .ag-bench { grid-area: bench; min-width: 0; }
  .ag-linebox { width: auto; flex: 1 1 0; min-width: 0; }
  .ag-field { height: auto; min-height: 0; aspect-ratio: 1 / 2.1; }
  .ag-rows { padding: 12% 2% 7%; }
  .ag-row { gap: 0; }
  .ag-token { width: 44px; }
  .ag-token .player-avatar { width: 34px; height: 34px; font-size: 0.7rem; }
  .ag-badge { right: -9px; bottom: -3px; font-size: 0.6rem; padding: 0 4px; min-width: 1.9em; }
  .ag-name { font-size: 0.56rem; margin-top: 2px; }
  .ag-sub { display: none; }
  .ag-label { font-size: 0.66rem; }
  .ag-token.ag-token-row { width: auto; }
  .ag-token-row .ag-name { font-size: 0.75rem; }
  .ag-token-row .player-avatar { width: 38px; height: 38px; }
}

/* Spielerprofil › Statistik (Checkup 1 F4): Spiel-Kacheln mit Gegner-Logo und Ringen */
.game-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 8px; }
.game-stat-tile { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-elevated-2); padding: 12px; }
.game-stat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.game-stat-logo { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.game-stat-logo-empty { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--color-border); font-weight: 800; font-size: 0.85rem; color: var(--color-text-muted); }
.game-stat-name { font-weight: 800; }
.game-stat-tile .stat-circles-small { justify-content: flex-start; }
.game-stat-details { margin-top: 8px; }
.game-stat-details summary { cursor: pointer; font-size: 0.82rem; color: var(--color-accent-hover); }
@media (max-width: 700px) { .game-stat-grid { grid-template-columns: 1fr; } }

/* Checkup 1b: Chat-Suche in «Alle Chats» - ausgeblendete Zeilen wirklich verstecken */
.chat-list-row[hidden] { display: none !important; }

/* Checkup 1b: Spiel-Kacheln der Spielerstatistik = nur Logo + Titel (Link auf die Detailseite) */
.game-stat-tile-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; cursor: pointer; }
.game-stat-tile-link:hover { border-color: var(--color-accent); }
.game-stat-tile-link .game-stat-head { flex: 1; margin-bottom: 0; }
.game-stat-arrow { font-size: 1.6rem; color: var(--color-accent-hover); line-height: 1; }
.game-stat-detail { max-width: 720px; }

/* ---- Trainingsplanung: Trainingskalender und Trainingslager ---- */
.kal-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 8px 0; }
.kal-period { min-width: 150px; text-align: center; }
.kal-seg { display: inline-flex; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.kal-seg button { border-radius: 0; border: none; margin: 0; }
.kal-seg button.active { background: var(--color-accent); color: #fff; }
.kal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0; }
.kal-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.kal-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.kal-legend-lager { margin: 2px 0; }
.kal-legend-lager summary { cursor: pointer; }
.kal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--color-border); border-left: 1px solid var(--color-border); }
.kal-month-head { text-align: center; font-weight: 700; font-size: 0.8rem; padding: 4px 0; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); background: var(--color-bg-elevated-2); }
.kal-day { min-height: 96px; padding: 3px; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kal-day.other { opacity: 0.45; }
.kal-day.today { background: rgba(59, 127, 212, 0.12); }
.kal-day.clickable { cursor: pointer; }
.kal-day.clickable:hover { background: var(--color-bg-elevated-2); }
.kal-day-num { font-size: 0.78rem; font-weight: 700; text-align: right; padding-right: 2px; }
.kal-day.today .kal-day-num { color: var(--color-accent-hover); }
.kal-chip { color: #fff; font-size: 0.72rem; line-height: 1.25; padding: 1px 5px; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.kal-chip.cancelled { opacity: 0.5; text-decoration: line-through; }
.kal-more { font-size: 0.72rem; color: var(--color-accent-hover); cursor: pointer; padding-left: 3px; }
.kal-lager-band { display: block; color: #fff; font-size: 0.7rem; line-height: 1.3; padding: 1px 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; margin: 0 -3px; }
.kal-lager-band.start { border-radius: 4px 0 0 4px; margin-left: 0; }
.kal-lager-band.end { border-radius: 0 4px 4px 0; margin-right: 0; }
.kal-allday { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.kal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.kal-modal { background: var(--color-bg-elevated, #222a21); color: var(--color-text); border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; width: 100%; max-width: 520px; }
.kal-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.kal-field { margin: 6px 0; flex: 1; min-width: 120px; }
.kal-field label { display: block; margin-bottom: 2px; }
.kal-detail-bar { color: #fff; font-weight: 700; padding: 4px 10px; border-radius: 6px; display: inline-block; }
.kal-wd.active { background: var(--color-accent); color: #fff; }
.kal-repeat { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
@media (max-width: 640px) {
  .kal-day { min-height: 70px; }
  .kal-chip { font-size: 0.65rem; padding: 0 3px; }
}

/* ---- Checkup 2: Game Report - Kapiteltitel, Schuss-Auswertung gross, PDF ein Kapitel pro Seite (Verlauf Hoch-, Rest Querformat) ---- */
.gr-chapter-title { font-size: 1.8rem; font-weight: 800; line-height: 1.15; margin: 30px 0 12px; padding-bottom: 6px; border-bottom: 3px solid var(--color-accent); color: var(--color-text); }
.gr-page:first-of-type .gr-chapter-title { margin-top: 18px; }
.schuss-table-big { font-size: 1rem; max-width: 560px; margin: 6px 0 0; }
.schuss-table-big th { font-size: 0.8rem; text-transform: none; letter-spacing: normal; }
.schuss-table-big td { padding: 8px 10px; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.schuss-table-big td:first-child { font-size: 1.05rem; font-weight: 600; }
.schuss-table-big .schuss-row-total td { border-top: 2px solid var(--color-text-muted); }
.schuss-table-big .schuss-row-eff td { border-bottom: none; }
.schuss-table-big .schuss-row-total td:first-child, .schuss-table-big .schuss-row-eff td:first-child { font-weight: 800; }
.spielwert-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@page gr-portrait { size: A4 portrait; margin: 12mm; }
@page gr-landscape { size: A4 landscape; margin: 10mm; }
@media print {
  .gr-portrait { page: gr-portrait; }
  .gr-landscape { page: gr-landscape; }
  .gr-landscape .shift-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gr-landscape .schuss-table-big { max-width: 420px; }
  .gr-landscape .schuss-table-big td { padding: 3px 8px; font-size: 1.3rem; }
  .gr-landscape .ag-field { height: 300px; }
  .ag-badge, .spielwert-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print {
  /* Statistik-Kapitel auf einer Querformat-Seite: Schüsse links, Linien & Special Teams rechts, kompaktere Ringe */
  .gr-stat { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .gr-stat > .pdf-print-only { grid-column: 1 / -1; }
  .gr-stat .gr-chapter-title { grid-column: 1 / -1; }
  .gr-landscape .shift-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .gr-landscape .shift-stat-card { padding: 6px 8px; }
  .gr-landscape .stat-circles-small { gap: 4px 4px; }
  .gr-landscape .stat-circles-small .stat-circle { width: 66px; }
  .gr-landscape .stat-circles-small .stat-circle-label { font-size: 0.55rem; }
  .gr-landscape .schuss-table-big td { font-size: 1.15rem; }
}

/* ---- Checkup 2 E: Physis-Rangliste - gleich breite Disziplin-Spalten, Ringe mittig auf einer Linie, Titel dürfen umbrechen ---- */
.physis-rank-table { table-layout: fixed; width: 100%; min-width: 860px; }   /* Auftrag 01b: vorher 1146 px; die Spalten teilen sich die Breite, darunter scrollt die Tabelle im Rahmen */
.physis-rank-table th:nth-child(1) { width: 34px; }
.physis-rank-table th:nth-child(2) { width: 170px; }
.physis-rank-table th:last-child { width: 72px; }
.physis-rank-table th { vertical-align: bottom; text-align: center; white-space: normal; overflow-wrap: break-word; line-height: 1.15; padding-left: 3px; padding-right: 3px; }
.physis-rank-table th:nth-child(n+3):not(:last-child) { width: auto; }
.physis-rank-table th:nth-child(2) { text-align: left; }
.physis-rank-table td { text-align: center; }
.physis-rank-table td:nth-child(2) { text-align: left; }
.physis-rank-table .name-with-avatar { white-space: normal; }

/* Checkup 2 A: Uhrzeit-Felder im gleichen Stil wie die übrigen Eingabefelder (Rahmen, Höhe, Rundung, Schrift) */
input[type="time"], input[type="date"], input[type="datetime-local"] { color-scheme: light dark; line-height: 1.2; }
input[type="time"]::-webkit-calendar-picker-indicator, input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.8; }
:root[data-theme="dunkel"] input[type="time"], :root[data-theme="dunkel"] input[type="date"] { color-scheme: dark; }

/* ---- Trainingsplanung: Gegnerlogo auf Spiel-Kacheln, Detailseite eines Trainings/Special Events ---- */
.kal-chip-logo { width: 13px; height: 13px; object-fit: contain; background: rgba(255,255,255,0.9); border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.td-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.td-section { margin-top: 18px; }
.td-section > h3 { margin: 0 0 8px; padding: 6px 10px; border-left: 5px solid var(--color-accent); background: var(--color-bg-elevated-2); border-radius: 6px; }
.td-form { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; background: var(--color-bg-elevated); }
.td-form textarea { min-height: 80px; }
.td-files { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.td-file { position: relative; width: 120px; text-align: center; font-size: 0.75rem; }
.td-file img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--color-border); display: block; }
.td-file .td-pdf { display: flex; align-items: center; justify-content: center; width: 120px; height: 90px; border-radius: 6px; border: 1px solid var(--color-border); font-size: 2rem; background: var(--color-bg-elevated-2); }
.td-file .td-file-del { position: absolute; top: 2px; right: 2px; min-height: 0; padding: 0 6px; font-size: 0.8rem; line-height: 1.4; }
.td-file a { color: var(--color-text); word-break: break-all; }
.td-save-hint { font-size: 0.8rem; color: var(--color-text-muted); }
/* Trainings-PDF */
.tp-form { break-inside: avoid; margin: 6px 0 12px; }
.tp-form h4 { margin: 0 0 2px; }
.tp-form p { margin: 2px 0 6px; white-space: pre-line; }
.tp-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-imgs img { max-width: 100%; max-height: 90mm; object-fit: contain; border: 1px solid #c9d3c5; border-radius: 4px; }
.tp-block { margin: 8px 0; }
.tp-block h3 { margin: 0 0 3px; }
.tp-section-title { background: #1b231a; color: #fff; padding: 4px 10px; border-radius: 4px; font-weight: 700; margin: 14px 0 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.td-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
@media (max-width: 640px) { .td-list { grid-template-columns: 1fr; } }

/* Das schwarze EDS-Logo der PDFs bleibt auch am dunklen Bildschirm lesbar (weisser Untergrund), im Ausdruck ohne */
@media screen { .pdf-logo-eds { background: #fff; padding: 3px 8px; border-radius: 6px; } }

/* Anwesenheitskontrolle: Klickoption Anwesend (grün) / Abwesend (rot) */
.toggle-btn.att-anwesend.active { background: var(--own); border-color: var(--own); color: #fff; }
.toggle-btn.att-abwesend.active { background: var(--data-rot); border-color: var(--data-rot); color: #fff; }
/* Trainingslager-Wochenplan als PDF: eine Querformat-Seite je Woche, Farben immer mitdrucken */
.tl-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print { .tl-sheet + .tl-sheet { break-before: page; page-break-before: always; } .tl-sheet { break-inside: avoid; } }

/* Detailplanung: Speichern-Leiste (bleibt am unteren Rand sichtbar) */
.td-savebar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; margin: 18px -16px -16px; padding: 10px 16px; background: var(--color-bg-elevated-2); border-top: 1px solid var(--color-border); border-radius: 0 0 var(--radius) var(--radius); }
.td-save-state { font-size: 0.9rem; font-weight: 600; }

/* Trainingslager-PDF straffer: kleiner Kopf, Legende in einer Zeile, schmale Fusszeile - mehr Platz für die Blöcke */
.tl-sheet.card { padding: 8px 12px; }
.tl-sheet .pdf-head { padding-bottom: 4px; margin-bottom: 6px; gap: 10px; border-bottom-width: 2px; }
.tl-sheet .pdf-logo { height: 32px; min-width: 0; }
.tl-sheet .pdf-title { font-size: 1.1rem; }
.tl-sheet .pdf-sub { font-size: 0.72rem; margin-top: 0; }
.tl-sheet .kal-legend { gap: 2px 10px; margin-top: 5px !important; }
.tl-sheet .kal-legend-item { font-size: 0.66rem; gap: 4px; }
.tl-sheet .kal-dot { width: 9px; height: 9px; }
.tl-sheet .pdf-foot { margin-top: 4px; padding-top: 3px; font-size: 0.62rem; }
@media print { .tl-sheet.card { padding: 0; border: none !important; } }

/* Videoqualität: Zahnrad-Menü in der Bedienleiste */
.vc-quality { position: relative; display: inline-flex; }
.vc-quality-menu { position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 30; min-width: 150px; padding: 4px; background: var(--color-bg-elevated-2, #222); border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.vc-quality-menu[hidden] { display: none; }
.vc-quality-item { display: block; width: 100%; text-align: left; padding: 8px 10px; background: none; border: 0; border-radius: 6px; color: var(--color-text); font-size: 0.9rem; cursor: pointer; white-space: nowrap; min-height: 36px; }
.vc-quality-item:hover { background: rgba(255,255,255,0.1); }
.vc-quality-item.active { font-weight: 700; color: var(--color-accent, #6fd36f); }
.vc-quality-head { padding: 6px 10px 4px; font-size: 0.75rem; opacity: 0.7; white-space: nowrap; }

/* Checkup Runde 3 A: Auswahlkästchen app-weit grösser und besser klickbar (die Schalter der Teameinstellungen und
   die Spielerlisten haben eigene, spezifischere Regeln und bleiben davon unberührt) */
input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin: 0 6px 0 0;
  accent-color: var(--color-accent);
  cursor: pointer;
  vertical-align: middle;
  flex: none;
}
@media (pointer: coarse) {
  input[type="checkbox"] { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
}
table input[type="checkbox"] { margin: 4px; }
label:has(> input[type="checkbox"]) { cursor: pointer; }

/* Checkup Runde 3 C: Hinweis beim Doppeltipp-Spulen (◀◀ 2 s / 2 s ▶▶) */
.vc-seek-flash {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  padding: 10px 18px; border-radius: 40px; background: rgba(0, 0, 0, 0.6); color: #fff;
  font-weight: 700; font-size: 1.1rem; pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.vc-seek-flash.left { left: 8%; }
.vc-seek-flash.right { right: 8%; }
.vc-seek-flash.show { opacity: 1; transition: opacity 0.05s; }

/* Checkup Runde 3 D: Datei-Ansicht (PDF/Foto) einer Trainingsform mit Schliessen-Knopf */
.kal-viewer { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; background: #111; }
.kal-viewer-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); background: var(--color-bg-elevated-2, #222); border-bottom: 1px solid var(--color-border); }
.kal-viewer-close { min-height: 48px; padding: 0 18px; font-size: 1.05rem; font-weight: 700; border-radius: 10px; border: 0; background: var(--color-accent); color: var(--color-accent-text, #fff); cursor: pointer; flex: none; }
.kal-viewer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.kal-viewer-ext { flex: none; font-size: 0.85rem; }
.kal-viewer-body { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; color: #ccc; -webkit-overflow-scrolling: touch; }
.kal-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.kal-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
body.kal-viewer-open { overflow: hidden; }

/* Checkup Runde 3 F: Notiz mit Fett + Farben (youtube.js: createNoteEditor / renderNote) */
.note-editor { margin: 4px 0 8px; }
.note-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.note-btn { min-width: 36px; min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-bg-elevated-2); color: var(--color-text); font-size: 1rem; cursor: pointer; line-height: 1; }
.note-btn-bold { font-weight: 800; }
.note-swatch { min-width: 36px; padding: 0; }
.note-editable { min-height: 80px; max-height: 40vh; max-height: 40dvh; overflow: auto; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-bg-elevated); color: var(--color-text); white-space: pre-wrap; word-break: break-word; outline: none; }
.note-editable:focus { border-color: var(--color-accent); }
.note-editable:empty::before { content: attr(data-placeholder); opacity: 0.55; pointer-events: none; }
.note-b { font-weight: 800; }
.note-c-rot, .note-editable [data-c="rot"] { color: #e5484d; }
.note-c-gelb, .note-editable [data-c="gelb"] { color: #f5c518; }
.note-c-gruen, .note-editable [data-c="gruen"] { color: #30c060; }
.note-c-blau, .note-editable [data-c="blau"] { color: #4d9dff; }
.note-c-weiss, .note-editable [data-c="weiss"] { color: var(--color-text); }
.note-editable b, .note-editable strong { font-weight: 800; }
.note-c-bg-rot { background: #e5484d; }
.note-c-bg-gelb { background: #f5c518; }
.note-c-bg-gruen { background: #30c060; }
.note-c-bg-blau { background: #4d9dff; }
.note-c-bg-weiss { background: var(--color-text); }
:root[data-theme="light"] .note-c-gelb, :root[data-theme="light"] .note-editable [data-c="gelb"] { color: #b58900; }

/* Öffentliche Startseite / Kids Liga: Kopfzeile mit Login-Knopf rechts (bleibt auch auf dem Handy in einer Zeile) */
.landing-title-row { flex-wrap: nowrap; justify-content: space-between; }
.landing-title-row .app-title-left { flex: 1 1 auto; }
.landing-login-btn { flex: none; width: auto; margin: 0; white-space: nowrap; text-decoration: none; }


/* =====================================================================================================================
   Profil-Design (Pilot Spielerprofil, 22.10.2026)
   Ruhig, professionell, schnell lesbar: neutrale Flächen, EINE Textfarbe in drei Graustufen, Farbe nur für Status (Grün / Gelb-Orange / Rot).
   Die Teamfarbe erscheint nur als dünner Rahmen um das Team-Logo. Gilt nur für Seiten mit <body class="pf-page"> (Spielerprofil und seine
   vier Tab-Seiten); alle anderen Seiten behalten das bisherige Aussehen. Dunkel und Hell sind beide definiert.
   Aufbau: 1. Variablen  2. Seite (überschreibt die Grundvariablen neutral)  3. Kopf  4. Menü  5. Tabs  6. Hinweisleiste  7. Abschnitte, Listen
           8. Ringe und Kennzahlen  9. kleine Bildschirme
   ===================================================================================================================== */

/* 1. Variablen ----------------------------------------------------------------------------------------------------- */
/* Design-CI (Auftrag 01d, Block 1, 28.10.2026): Namen und Werte aus docs/konzepte/design-ci-coachingtool.md. Die bisherigen --pf-*-Namen
   weiter unten sind Alias auf diese Variablen, damit Dunkel und Hell nur an einer Stelle stehen. Datenfarben (--own, --team, --data-*,
   --series-*) nur für Daten (Ringe, Diagramme), nie für Flächen, Knöpfe oder Regler. Kontrast: Text auf Fläche mind. 4,5:1, --control-line
   gegen Fläche und Fläche 2 mind. 3:1 (Bericht docs/analyse/design-bestand-2026-10-28.md, Abschnitt 6). */
:root {
  --bg: #0E1116;
  --surface: #161B22;
  --surface-2: #1F2630;
  --line: #2A313C;           /* feine Linie: Karten und Trennlinien */
  --control-line: #61718a;   /* Rahmen von Knöpfen, Eingaben und Reglern (mind. 3:1) */
  --text: #E6EDF3;
  --text-muted: #8B949E;     /* Beschriftungen, Hinweise, Zeitangaben */
  --ok: #2EA043;
  --warn: #D29922;
  --danger: #F85149;
  --own: #2f9e4f;            /* Datenfarbe: eigener Wert (Ring aussen) */
  --team: #3b7fd4;           /* Datenfarbe: Teamdurchschnitt (Ring innen) */
  --data-rot: #d05050;       /* Gegentor, Note 1 */
  --data-gelb: #d4a72c;      /* Strafe, Anstrengung */
  --data-orange: #f0932b;    /* Note 2 */
  --data-lime: #2ee65c;      /* Note 4 */
  --data-grau: #7a8478;      /* unbekannt */
  --series-1: #3b7fd4;       /* Palette der 8 Reihenfarben (Trainingsmonitoring, Kalender) */
  --series-2: #2f9e4f;
  --series-3: #d4a72c;
  --series-4: #d0505a;
  --series-5: #8e5bd4;
  --series-6: #2ca6a4;
  --series-7: #d4762c;
  --series-8: #6a7480;
}
:root[data-theme="hell"] {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #EEF1F5;
  --line: #D0D7DE;
  --control-line: #798da1;
  --text: #1F2328;
  --text-muted: #656D76;
  --ok: #1A7F37;
  --warn: #9A6700;
  --danger: #CF222E;
  /* --own, --team, --data-rot, --data-grau und die Reihenfarben 1, 2, 4, 5, 7, 8 bestehen auf Weiss (mind. 3:1) und bleiben gleich */
  --data-gelb: #b38d24;
  --data-orange: #dd7c10;
  --data-lime: #14a939;
  --series-3: #b38d24;
  --series-6: #2ba2a0;
}
:root {
  --pf-bg: var(--bg);
  --pf-surface: var(--surface);
  --pf-surface-2: var(--surface-2);
  --pf-line: var(--line);
  --pf-text: var(--text);        /* Haupttext, Zahlen */
  --pf-text-2: var(--text-muted);  /* Beschriftungen (seit 01d wie --pf-text-3: die CI kennt nur eine gedämpfte Stufe) */
  --pf-text-3: var(--text-muted);  /* Zusatzinfos, Kleingedrucktes */
  --pf-ok: var(--ok);          /* Status: gut */
  --pf-warn: var(--warn);      /* Status: aufpassen */
  --pf-bad: var(--danger);     /* Status: schlecht */
  --team-accent: #6cb521;      /* Teamfarbe (teams.js überschreibt sie je Team); seit 01d nur noch Logo-Rand und Teamkennzeichnung */
  --team-accent-hover: #7dd931;
  --team-accent-text: #0b1a06;
  --pf-radius: 10px;
  --pf-gap: 16px;            /* Abstand zwischen Abschnitten */
  --pf-fs-title: 1.55rem;    /* Seitentitel (Spielername) */
  --pf-fs-section: 0.875rem; /* Abschnittstitel (seit 01d 14 px, normale Schreibweise) */
  --pf-fs-body: 0.95rem;     /* Fliesstext */
  --pf-fs-small: 0.875rem;   /* Kleingedrucktes und Beschreibungen (mind. 14 px) */
  --pf-fs-figure: 1.9rem;    /* Kennzahlen */
}

/* 2. Seite: die Grundvariablen der alten Oberfläche werden hier neutral überschrieben, damit auch Kopfzeile und bestehende Inhalte der
   Tab-Seiten zu den neutralen Flächen passen. Seit dem Design-Rollout (22.10.2026) gilt das für alle Coachingtool-Seiten
   (theme.js setzt «esc-neutral» auf <html>; nicht auf Startseite, Druckseiten und Kids Liga). Nur am Bildschirm, nie im Druck.
   Die Akzentfarbe ist grau (Auswahl, aktive Reiter, Links); die Teamfarbe steckt in --team-accent* und färbt nur Primärknöpfe und den Logo-Rand. */
@media screen {
html.esc-neutral body, body.pf-page {
  --color-bg: var(--pf-bg);
  --color-bg-elevated: var(--pf-surface);
  --color-bg-elevated-2: var(--pf-surface-2);
  --color-border: var(--pf-line);
  --color-text: var(--pf-text);
  --color-text-muted: var(--pf-text-2);
  --color-track: color-mix(in srgb, var(--pf-text) 10%, transparent);
  --color-soft: color-mix(in srgb, var(--pf-text) 5%, transparent);
  --color-accent: var(--pf-text);
  --color-accent-hover: var(--pf-text);
  --color-accent-text: var(--pf-bg);
  --color-danger: var(--danger);
  --color-danger-hover: var(--danger);
  --control-border: var(--control-line);   /* Knöpfe, Eingaben, Regler (Design-CI, Block 1) */
  background: var(--pf-bg);
}
html.esc-neutral, html:has(body.pf-page) { background: var(--pf-bg); }
html.esc-neutral body nav.app-nav a { background: var(--pf-surface); color: var(--pf-text-2); border-color: var(--pf-line); }
html.esc-neutral body nav.app-nav a.active, html.esc-neutral body nav.app-nav .nav-dropdown a.active { background: var(--pf-surface-2); color: var(--pf-text); border-color: var(--pf-text-3); }
html.esc-neutral body .app-profile:not(:has(img)) { background: var(--pf-surface-2); color: var(--pf-text); border: 1px solid var(--pf-line); }
html.esc-neutral body .back-button { background: var(--pf-surface); border-color: var(--pf-line); color: var(--pf-text-2); }
/* Primärknöpfe (Speichern, Abschicken ...) sind neutral (Design-CI: Akzent hellgrau-weiss im Dunkel, anthrazit im Hell; die Teamfarbe färbt sie nicht mehr) */
html.esc-neutral body button.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-text); }
html.esc-neutral body button.primary:hover { filter: brightness(0.92); }
/* Druckseiten (Aufgebot, Trainingsplan ...): Rahmen und Knöpfe neutral, das Blatt selbst bleibt in der Teamfarbe (Nummern, Fusszeilen-Balken, Titelzeile) */
html.esc-neutral #print-sheet, html.esc-neutral .aufgebot-print-sheet {
  --color-accent: var(--team-accent);
  --color-accent-hover: var(--team-accent-hover);
  --color-accent-text: var(--team-accent-text);
}
}
body.pf-page main > .card { background: transparent; border: 0; padding: 0; margin: 0; border-radius: 0; }
body.pf-page nav.app-nav a { background: var(--pf-surface); color: var(--pf-text-2); border-color: var(--pf-line); }
body.pf-page nav.app-nav a.active { background: var(--pf-surface-2); color: var(--pf-text); border-color: var(--pf-text-3); }
body.pf-page .app-profile:not(:has(img)) { background: var(--pf-surface-2); color: var(--pf-text); border: 1px solid var(--pf-line); }
body.pf-page .back-button { background: var(--pf-surface); border-color: var(--pf-line); color: var(--pf-text-2); }
body.pf-page .drill-breadcrumb { margin-bottom: var(--pf-gap); }

.pf { display: block; color: var(--pf-text); font-size: var(--pf-fs-body); line-height: 1.45; }
.pf * { box-sizing: border-box; }
.pf .pf-icon { display: inline-flex; flex-shrink: 0; line-height: 0; }

/* 3. Kopf ---------------------------------------------------------------------------------------------------------- */
.pf-head { display: flex; align-items: center; gap: 16px; padding: 16px 0 12px; }
.pf-head-text { flex: 1; min-width: 0; }
.pf .pf-name { margin: 0; font-size: var(--pf-fs-title); font-weight: 700; line-height: 1.15; color: var(--pf-text); text-align: left; }
.pf-name-link { display: block; text-decoration: none; }
.pf-name-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pf-meta { margin-top: 4px; color: var(--pf-text-2); }
.pf-team { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--pf-text-3); font-size: var(--pf-fs-small); }
.pf-team-logo { width: 22px; height: 22px; object-fit: contain; border-radius: 50%; padding: 5px; box-sizing: border-box; background: var(--pf-surface); box-shadow: 0 0 0 2px var(--pf-team, var(--pf-line)); }
.pf-team-dot { width: 10px; height: 10px; border-radius: 50%; }
.pf-avatar { width: 72px; height: 72px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--pf-surface-2); border: 1px solid var(--pf-line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3rem; color: var(--pf-text-2); }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-avatar-sm { width: 44px; height: 44px; font-size: 0.95rem; }
.pf-head-compact { padding: 8px 0 8px; gap: 12px; }
.pf-head-compact .pf-name { font-size: 1.15rem; }
.pf-head-compact .pf-meta { margin-top: 2px; font-size: 0.85rem; }
.pf-head-compact .pf-team { margin-top: 3px; }
.pf-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }

.pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: var(--pf-radius); border: 1px solid var(--control-line); background: var(--pf-surface); color: var(--pf-text); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; text-decoration: none; position: relative; width: auto; }
.pf-btn:hover { background: var(--pf-surface-2); border-color: var(--pf-text-3); }
.pf-btn-icon { padding: 8px; min-width: 40px; }
.pf-btn:focus-visible, .pf-tab:focus-visible, .pf-menu-item:focus-visible, .pf-row:focus-visible, .pf-note:focus-visible { outline: 2px solid var(--pf-text-2); outline-offset: 2px; }
.pf-btn .chat-badge { position: absolute; top: -6px; right: -6px; }

/* 4. Menü ---------------------------------------------------------------------------------------------------------- */
.pf-menu { position: relative; }
.pf-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 230px; padding: 6px; background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
.pf-menu-pop[hidden] { display: none; }
.pf-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--pf-text); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer; min-height: 40px; }
.pf-menu-item:hover { background: var(--pf-surface-2); }
.pf-menu-item:disabled { color: var(--pf-text-3); cursor: not-allowed; }
.pf-menu-item:disabled:hover { background: transparent; }
.pf-menu-sep { height: 1px; margin: 6px 4px; background: var(--pf-line); }
.pf-menu-danger { color: var(--pf-bad); }

/* 5. Tabs ---------------------------------------------------------------------------------------------------------- */
.pf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pf-line); margin: 4px 0 var(--pf-gap); overflow-x: auto; scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--pf-text-3); text-decoration: none; font-weight: 600; font-size: 0.92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pf-tab:hover { color: var(--pf-text); }
.pf-tab-active { color: var(--pf-text); border-bottom-color: var(--pf-text); }
.pf-badge { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--pf-warn); color: #1b1e21; font-size: 0.7rem; font-weight: 700; line-height: 18px; text-align: center; }

/* 6. Hinweisleiste ------------------------------------------------------------------------------------------------- */
.pf-notes { display: flex; flex-direction: column; gap: 1px; margin-bottom: var(--pf-gap); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); overflow: hidden; background: var(--pf-line); }
.pf-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--pf-surface); color: var(--pf-text-2); text-decoration: none; font-size: 0.9rem; }
a.pf-note:hover { background: var(--pf-surface-2); color: var(--pf-text); }
.pf-note-warn .pf-icon { color: var(--pf-warn); }
.pf-note-text { flex: 1; min-width: 0; }
.pf-note-link { color: var(--pf-text); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }

/* 7. Abschnitte und Listen ------------------------------------------------------------------------------------------ */
.pf-section { margin-bottom: calc(var(--pf-gap) + 6px); }
.pf .pf-section-title { margin: 0 0 10px; font-size: var(--pf-fs-section); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--pf-text-3); text-align: left; }
.pf-panel { background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); }
.pf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pf-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); color: var(--pf-text); text-decoration: none; min-height: 52px; }
.pf-row:hover { background: var(--pf-surface-2); border-color: var(--pf-text-3); }
.pf-row > .pf-icon { color: var(--pf-text-2); }
.pf-row-text { flex: 1; min-width: 0; }
.pf-row-title { font-weight: 600; font-size: 0.92rem; }
.pf-row-sub { color: var(--pf-text-3); font-size: var(--pf-fs-small); margin-top: 1px; }
.pf-row-chevron { color: var(--pf-text-3); transform: rotate(-90deg); }
.pf-empty { padding: 14px; color: var(--pf-text-3); font-size: 0.9rem; }
.pf-kv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px; }
.pf-kv-figure { font-size: var(--pf-fs-figure); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pf-kv-sub { color: var(--pf-text-2); font-size: 0.88rem; }
.pf-small { color: var(--pf-text-3); font-size: var(--pf-fs-small); }
.pf-small a { color: var(--pf-text-2); text-underline-offset: 3px; }
.pf-small a:hover { color: var(--pf-text); }
.pf-section > .pf-small { margin-top: 8px; }
.pf-ok { color: var(--pf-ok); }
.pf-warn { color: var(--pf-warn); }
.pf-bad { color: var(--pf-bad); }

/* 8. Ringe und Kennzahlen ------------------------------------------------------------------------------------------- */
.pf-rings { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: flex-start; }
.pf-ring { width: 104px; text-align: center; }
.pf-ring-label { font-size: var(--pf-fs-small); font-weight: 600; color: var(--pf-text-3); letter-spacing: normal; text-transform: none; margin-bottom: 4px; }
.pf-ring-svg { width: 100%; height: auto; display: block; }
.pf-ring-track { fill: none; stroke: var(--pf-line); stroke-width: 7; }
.pf-ring-own, .pf-ring-team { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }   /* Farben: RING_OWN_COLOR / RING_TEAM_COLOR (stat-circles.js) */
.pf-ring-value { fill: var(--pf-text); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-ring-sub { min-height: 1.3em; margin-top: 4px; font-size: var(--pf-fs-small); color: var(--pf-text-3); }
.pf-legend { margin: 10px 0 0; font-size: var(--pf-fs-small); color: var(--pf-text-3); }
.pf-legend[hidden] { display: none; }

.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pf-stat { padding: 14px; background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); }
.pf-stat-label { font-size: var(--pf-fs-small); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--pf-text-3); }
.pf-stat-value { margin-top: 6px; font-size: var(--pf-fs-figure); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pf-stat-trend { margin-top: 6px; min-height: 1.2em; font-size: var(--pf-fs-small); color: var(--pf-text-3); }
.pf-stat-trend.pf-ok { color: var(--pf-ok); }
.pf-stat-trend.pf-bad { color: var(--pf-bad); }

/* 9. Kleine Bildschirme -------------------------------------------------------------------------------------------- */
@media (max-width: 560px) {
  :root { --pf-fs-title: 1.3rem; }
  .pf-head { gap: 12px; flex-wrap: wrap; }
  .pf-avatar { width: 56px; height: 56px; font-size: 1.1rem; }
  .pf-head-actions { margin-left: auto; }
  .pf-btn-label { display: none; }
  .pf-rings { gap: 14px 10px; }
  .pf-ring { width: calc((100% - 20px) / 3); min-width: 84px; }
  .pf-tab { padding: 10px 6px; gap: 4px; font-size: 0.8rem; }
  .pf-list { grid-template-columns: 1fr; }
}

/* =====================================================================================================================
   Design-Rollout Block 3 (22.10.2026): Team-Startseite, Teamauswahl, Willkommensseite im Profil-Design.
   Nur am Bildschirm; gilt für alle Coachingtool-Seiten mit html.esc-neutral (nicht Kids Liga, Startseite index.html, Druckseiten).
   ===================================================================================================================== */
.pf-team-logo-lg { width: 64px; height: 64px; padding: 15px; box-sizing: border-box; flex-shrink: 0; }
.pf-row[role="button"], button.pf-row { cursor: pointer; font: inherit; text-align: left; width: 100%; }
.pf-row .pf-avatar-sm { flex-shrink: 0; }
.pf-row .pf-row-sub { display: flex; align-items: center; gap: 4px; }
.pf-list { margin-bottom: 4px; }
@media screen {
  /* Übersicht (Spiele, Rang, Tabelle) */
  html.esc-neutral .team-overview { margin: 0 0 var(--pf-gap); }
  html.esc-neutral .team-ov-game { background: var(--pf-surface); border-color: var(--pf-line); border-radius: var(--pf-radius); }
  html.esc-neutral a.team-ov-game-link { display: block; color: inherit; text-decoration: none; }
  html.esc-neutral a.team-ov-game-link:hover { background: var(--pf-surface-2); border-color: var(--control-line); }
  html.esc-neutral a.team-ov-game-link:focus-visible { outline: 2px solid var(--pf-text); outline-offset: 2px; }
  html.esc-neutral .team-ov-more { margin-top: 8px; text-align: center; font-size: var(--pf-fs-small); font-weight: 600; color: var(--pf-text-2); }
  html.esc-neutral .team-ov-game-title { margin-bottom: 10px; font-size: var(--pf-fs-small); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--pf-text-3); }
  html.esc-neutral .team-ov-logo-empty { color: var(--pf-text-3); opacity: 1; }
  html.esc-neutral .team-ov-rings { justify-content: flex-start; gap: 14px 18px; }
  html.esc-neutral .team-ov-ring { width: 104px; }
  html.esc-neutral .team-ov-ring .stat-circle-label { font-size: var(--pf-fs-small); font-weight: 600; letter-spacing: 0.04em; color: var(--pf-text-3); }
  html.esc-neutral .team-ov-table > summary { font-size: var(--pf-fs-small); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--pf-text-3); }
  html.esc-neutral .team-ov-own-row td { color: var(--pf-text); background: var(--pf-surface-2); }
  html.esc-neutral .team-overview .hint a { color: var(--pf-text); }

  /* Willkommensseite und Teamauswahl */
  html.esc-neutral .welcome-block { text-align: left; max-width: none; margin: 8px 0 18px; }   /* Auftrag 01b: 760-px-Grenze entfällt */
  html.esc-neutral .welcome-title { margin: 0; font-size: var(--pf-fs-title); font-weight: 700; line-height: 1.15; color: var(--pf-text); }
  html.esc-neutral .module-grid, html.esc-neutral .team-grid { max-width: none; margin-left: 0; margin-right: 0; justify-content: flex-start; gap: 8px; }
  /* Kachel-Raster (Design-CI, Block 4): alle Kacheln gleich gross, Symbol links, Titel über der Beschreibung, Beschreibung eine Zeile (gekürzt, voller Text im Tooltip) */
  html.esc-neutral .module-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon title" "icon desc"; column-gap: 14px; row-gap: 2px; align-items: center; align-content: center; justify-items: start; flex: none; max-width: none; min-height: 64px; padding: 12px 14px; background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); }
  html.esc-neutral .module-card:hover { transform: none; background: var(--pf-surface-2); border-color: var(--pf-text-3); }
  html.esc-neutral .module-card .module-icon { flex-shrink: 0; width: 40px; height: 40px; background: var(--pf-surface-2); border-color: var(--pf-line); color: var(--pf-text-2); }
  html.esc-neutral .module-icon-logo { height: 40px !important; flex-shrink: 0; }
  html.esc-neutral .module-card[hidden] { display: none; }   /* ausgeblendete Kacheln (z. B. Turniere, Benutzerverwaltung ohne Recht) bleiben ausgeblendet */
  html.esc-neutral .module-card > .module-icon, html.esc-neutral .module-card > .module-icon-logo, html.esc-neutral .module-card > img { grid-area: icon; }
  html.esc-neutral .module-card .module-title { grid-area: title; min-width: 0; max-width: 100%; font-size: 0.95rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
  html.esc-neutral .module-card .module-desc { grid-area: desc; min-width: 0; max-width: 100%; font-size: var(--pf-fs-small); line-height: 1.3; color: var(--pf-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.esc-neutral .module-grid.gegner-grid .module-desc { white-space: normal; overflow: visible; }   /* Gegneranalyse: Anzahl Videos und Clips soll lesbar bleiben */
  html.esc-neutral .team-card { flex: 1 1 260px; max-width: none; min-height: 0; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 14px; background: var(--pf-surface); border: 1px solid var(--pf-line); border-left: 3px solid var(--team-color, var(--pf-line)); border-radius: var(--pf-radius); text-align: left; }
  html.esc-neutral .team-card img { width: 44px; height: 44px; max-width: none; max-height: none; flex-shrink: 0; filter: none; }
  html.esc-neutral .team-card .team-name { font-size: 0.95rem; font-weight: 600; text-align: left; }
  html.esc-neutral .team-card:hover, html.esc-neutral .team-card:focus-visible { transform: none; box-shadow: none; background: var(--pf-surface-2); border-color: var(--pf-text-3); border-left-color: var(--team-color, var(--pf-text-3)); }
  html.esc-neutral .team-card-add { border: 1px dashed var(--pf-line); border-left: 1px dashed var(--pf-line); background: transparent; }
  html.esc-neutral .team-card-add-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--pf-text-2); }
}

/* Spieler und Staff als grosse Kacheln mit Foto (Team-Startseite), neutral gestaltet */
@media screen {
  html.esc-neutral .pf-tiles, html.esc-neutral .player-grid { display: grid; grid-template-columns: repeat(auto-fill, 190px); grid-auto-rows: 1fr; justify-content: start; gap: 10px; }
  @media (max-width: 479px) { html.esc-neutral .pf-tiles, html.esc-neutral .player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  html.esc-neutral .pf-tiles .player-tile, html.esc-neutral .player-grid .player-tile { max-width: none; flex: none; }
  html.esc-neutral .stat-circle-label { min-height: 2.8em; }   /* zwei Zeilen reserviert: alle Ringe einer Reihe beginnen auf gleicher Höhe */
  html.esc-neutral .pf-tiles .player-tile { background: var(--pf-surface); border-color: var(--pf-line); border-radius: var(--pf-radius); min-height: 0; padding: 18px 12px; font: inherit; }
  html.esc-neutral .pf-tiles .player-tile:hover { background: var(--pf-surface-2); border-color: var(--pf-text-3); }
  html.esc-neutral .pf-tiles .player-tile .player-name { font-weight: 600; }
  html.esc-neutral .pf-tiles .player-tile-nummer { color: var(--pf-text-3); font-weight: 600; }
  html.esc-neutral .pf-tiles .pf-tile-flag { display: inline-flex; align-items: center; gap: 4px; }
  html.esc-neutral .player-avatar { background: var(--pf-surface-2); color: var(--pf-text-2); border: 1px solid var(--pf-line); }
  html.esc-neutral .player-avatar-photo { border: 2px solid var(--pf-line); }
}

/* Design-Rollout Block 4: Team-Monitoring */
.pf-icon-inline { display: inline-flex; vertical-align: -3px; margin-right: 6px; }
button > .pf-icon-inline, a.btn > .pf-icon-inline { vertical-align: middle; }
.pf .pf-section-title.pf-gap { margin-top: 26px; }
.pf-head-page { padding: 4px 0 10px; }
.placeholder-card .placeholder-icon { display: inline-flex; color: var(--pf-text-3, var(--color-text-muted)); }

/* Feedback-Bericht-Import (Phase 2) */
.fb-import .pf-import-pick { margin: 6px 0 8px; }
.pf-import-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.pf-import-aktionen button { width: auto; }
.pf-import-scroll { overflow-x: auto; margin-top: 8px; }
.pf-import-table td, .pf-import-table th { vertical-align: top; }
.pf-import-table select { width: auto; min-width: 170px; max-width: 240px; }
.pf-st { font-weight: 600; white-space: nowrap; }
.pf-st-ok { color: var(--pf-ok, #58b774); } .pf-st-warn { color: var(--pf-warn, #e5aa45); } .pf-st-fehler { color: var(--pf-bad, #e5655e); } .pf-st-grau { color: var(--pf-text-3, #858c94); }

/* Spielerprofil > Feedback (Berichte der Sportschule Erlen) */
.fb-perioden { margin: 0 0 10px; }
.fb-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 var(--pf-gap); }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.fb-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--pf-line); background: var(--pf-surface); color: var(--pf-text-2); font-size: var(--pf-fs-small); font-weight: 600; }
.fb-chip-frei { border-color: var(--pf-ok); color: var(--pf-ok); }
.fb-label { margin-top: 2px; }
.fb-kv { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.fb-kv-wert { font-weight: 700; font-size: 1.05rem; }
.fb-skill-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.fb-skala-hinweis { margin-left: auto; }
.fb-skill-zeile { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 64px; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--pf-line); }
.fb-skill-kopf { border-top: 0; padding: 0 0 2px; }
.fb-skill-name { font-size: 0.9rem; font-weight: 600; }
.fb-skill-skala, .fb-skill-spur { position: relative; height: 20px; margin: 0 8px; }
.fb-skill-skala { height: 14px; }
.fb-tick { position: absolute; transform: translateX(-50%); font-size: 0.72rem; color: var(--pf-text-3); }
.fb-skill-spur::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--pf-line); border-radius: 2px; }
.fb-marke { position: absolute; top: 50%; width: 1px; height: 8px; margin-top: -4px; background: var(--pf-text-3); opacity: .5; }
.fb-punkt { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; box-sizing: border-box; }
.fb-punkt-trainer { background: var(--pf-text); border: 2px solid var(--pf-surface); }
.fb-punkt-selbst { background: transparent; border: 2px solid var(--pf-text-2); }
.fb-skill-legende .fb-punkt { position: static; display: inline-block; margin: 0 0 0 6px; vertical-align: -3px; }
.fb-skill-delta { text-align: right; font-size: 0.85rem; font-variant-numeric: tabular-nums; color: var(--pf-text-2); }
.fb-gross { font-weight: 800; }
.fb-text { padding: 12px 14px; margin-bottom: 8px; }
.fb-text-titel { font-size: var(--pf-fs-small); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--pf-text-3); margin-bottom: 6px; }
.fb-text-body { white-space: pre-line; line-height: 1.45; }
.fb-text-body.fb-klein { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fb-mehr { width: auto; margin-top: 6px; padding: 2px 0; border: 0; background: transparent; color: var(--pf-text-2); font-size: var(--pf-fs-small); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 0; }
.fb-ziel { padding: 16px 18px; border-color: var(--pf-text-3); background: var(--pf-surface-2); }
.fb-ziel-text { font-size: 1.05rem; font-weight: 600; line-height: 1.4; white-space: pre-line; }
.fb-selbst { padding: 10px 14px; }
.fb-selbst > summary { cursor: pointer; font-weight: 600; }
.fb-selbst-feld { margin-top: 12px; }
.fb-selbst-text { white-space: pre-line; }
.fb-selbst textarea { width: 100%; }
.fb-original { margin: 18px 0 6px; }
.fb-verlauf { display: flex; flex-wrap: wrap; gap: 14px 26px; }
.fb-spark { min-width: 150px; color: var(--pf-text-2); }
.fb-spark-svg { width: 140px; height: 40px; display: block; margin: 4px 0; }
@media (max-width: 560px) { .fb-skill-zeile { grid-template-columns: 90px 1fr 52px; gap: 6px; } .fb-skala-hinweis { margin-left: 0; flex-basis: 100%; } }
.fb-skill-delta.pf-warn { color: var(--pf-warn); }

/* Feedback: Team-Übersicht */
.fb-steuer { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; }
.fb-filter { width: auto; padding: 4px 12px; border-radius: 999px; font-size: var(--pf-fs-small); font-weight: 600; background: var(--pf-surface); border: 1px solid var(--pf-line); color: var(--pf-text-2); cursor: pointer; min-height: 0; }
.fb-filter-aktiv { background: var(--pf-surface-2); border-color: var(--pf-text); color: var(--pf-text); }
.fb-scroll { overflow-x: auto; }
.fb-tabelle td, .fb-tabelle th { white-space: nowrap; }
.fb-tabelle td.fb-ziel-zelle { white-space: normal; min-width: 180px; max-width: 280px; }
.fb-sort { cursor: pointer; user-select: none; }
.fb-sort-aktiv { color: var(--pf-text); }
.fb-heat { border-collapse: separate; border-spacing: 2px; font-size: 0.82rem; }
.fb-heat th { font-weight: 600; color: var(--pf-text-3); text-align: center; padding: 2px 6px; white-space: nowrap; font-size: 0.74rem; text-transform: none; letter-spacing: normal; }
.fb-heat tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: 0.85rem; color: var(--pf-text); }
.fb-heat tbody th a { color: inherit; text-decoration: none; }
.fb-heat-zelle { text-align: center; min-width: 56px; padding: 6px 4px; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pf-text); }

/* Meine Woche (Trainingsmodell Block D) ----------------------------------------------------------------------------- */
.we-nav { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; flex-wrap: wrap; }
.we-woche { font-weight: 700; min-width: 150px; text-align: center; }
.we-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.we-filter-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--pf-line, var(--color-border)); background: var(--pf-surface, var(--color-bg-elevated)); color: var(--pf-text-2, var(--color-text)); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; width: auto; }
.we-filter-btn.aktiv { color: var(--pf-text, var(--color-text)); border-color: var(--pf-text, var(--color-text)); background: var(--pf-surface-2, var(--color-bg-elevated-2)); }
.we-tag { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; font-size: 0.95rem; }
.we-heute { font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--pf-text-3, var(--color-border)); color: var(--pf-text-2, var(--color-text)); }
.we-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 6px; min-height: 52px; border-radius: var(--pf-radius, 10px); border: 1px solid var(--pf-line, var(--color-border)); background: var(--pf-surface, var(--color-bg-elevated)); color: var(--pf-text, var(--color-text)); text-decoration: none; }
a.we-zeile:hover { background: var(--pf-surface-2, var(--color-bg-elevated-2)); border-color: var(--pf-text-3, var(--color-border)); }
.we-vorschau { border-style: dashed; opacity: 0.8; }
.we-art { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; min-width: 46px; justify-content: center; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--pf-line, var(--color-border)); color: var(--pf-text-2, var(--color-text)); font-size: 0.8rem; font-weight: 700; }
.we-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.we-titel { font-weight: 600; overflow-wrap: anywhere; }
.we-meta { font-size: 0.82rem; color: var(--pf-text-3, var(--color-text-muted)); }
.we-status { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 0.82rem; color: var(--pf-text-3, var(--color-text-muted)); }
.we-status.we-offen { color: var(--pf-warn, var(--color-warning)); font-weight: 700; }
.we-status.we-ausgewertet { color: var(--pf-ok, var(--color-success)); }
.we-weiter { color: var(--pf-text-3, var(--color-text-muted)); font-size: 1.3rem; }
.we-legende { margin-top: 14px; }
@media (max-width: 520px) { .we-zeile { flex-wrap: wrap; } .we-status { margin-left: 58px; } }

/* Wochenmatrix und Kennzahlen (Trainingsmodell Block E/F) ------------------------------------------------------------- */
.wm-scroll { overflow-x: auto; margin: 0 0 6px; }
.wm-tabelle { min-width: 640px; }
.wm-tabelle th, .wm-tabelle td { text-align: center; padding: 6px 8px; }
.wm-tabelle th.wm-name { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--pf-surface, var(--color-bg-elevated)); z-index: 1; }
.wm-tabelle th.wm-name a { color: inherit; text-decoration: none; font-weight: 600; }
.wm-tabelle th.wm-name a:hover { text-decoration: underline; }
.wm-tag { white-space: nowrap; }
.wm-datum { display: block; font-size: 0.72rem; font-weight: 400; color: var(--pf-text-3, var(--color-text-muted)); }
.wm-heute { box-shadow: inset 0 -2px 0 var(--pf-text-2, var(--color-text)); }
.wm-zelle-td { min-width: 62px; }
.wm-zelle { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 36px; min-width: 44px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--pf-line, var(--color-border)); background: var(--pf-surface-2, var(--color-bg-elevated-2)); color: var(--pf-text, var(--color-text)); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; width: auto; align-items: center; }
.wm-zelle:hover { border-color: var(--pf-text-3, var(--color-border)); }
.wm-zelle.aktiv { border-color: var(--pf-text, var(--color-text)); }
.wm-chip { padding: 0 4px; white-space: nowrap; }
.wm-zahl { white-space: nowrap; font-weight: 600; }
.wm-detail { margin-top: 8px; }
.wm-aktionen { display: inline-flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; }
.kz-tabelle th, .kz-tabelle td { text-align: left; }
.kz-leer { color: var(--pf-text-3, var(--color-text-muted)); font-weight: 400; font-style: italic; }
.kz-zeile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 8px 0 0; }
.kz-titel { font-weight: 600; }
.kz-wert { font-weight: 700; font-size: 1.05rem; }
