/* ──────────────────────────────────────────────────────────────────
   Meine Mannschaft – Release Polish Layer
   Fügt visuelle Verfeinerungen, Animationen, Micro-Interaktionen
   und neue Komponenten (Profil-Menü, Command-Palette, Scroll-Top) hinzu.
   Wird zusätzlich zu style.css und pages.css geladen.
   ────────────────────────────────────────────────────────────────── */

/* ── Globale Token-Verfeinerungen ───────────────────────────────── */
:root {
  --polish-shadow-card: 0 1px 0 rgba(255,255,255,.04) inset, 0 8px 24px rgba(0,0,0,.30);
  --polish-shadow-pop:  0 24px 48px rgba(0,0,0,.55);
  --polish-ring:        0 0 0 3px rgba(45, 210, 119, .35);
  --polish-glow:        0 0 0 1px rgba(45,210,119,.45), 0 8px 22px rgba(45,210,119,.18);
  --polish-easing:      cubic-bezier(.32, .72, 0, 1);
}

/* ── Scrollbars (Webkit) ────────────────────────────────────────── */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--border-strong) 100%);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--border-strong) 0%, var(--text-subtle) 100%);
}
* { scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }

/* ── Smooth scrolling & Reduced-Motion ──────────────────────────── */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Skip-Link für Tastatur-User ────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: .5rem;
  background: var(--primary);
  color: var(--text-on-primary);
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 10000;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus {
  top: calc(var(--header-h) + .35rem);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Header-Polish ──────────────────────────────────────────────── */
.app-header {
  /* TODO CSS cleanup:
     Temporärer globaler Override gegen Header-Regeln in assets/style.css.
     Langfristig dort zentralisieren, um !important-Last zu reduzieren. */
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 55%),
    linear-gradient(90deg, #0a0a0d 0%, #18181d 50%, #0a0a0d 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 10px 28px rgba(0, 0, 0, .45);
}
.logo {
  transition: transform .18s var(--polish-easing), opacity .18s ease;
}
.logo:hover { transform: translateY(-1px); opacity: .92; }
.logo:active { transform: translateY(0); }

.header-right { gap: .35rem; }

/* ── User-Menü (Profil-Dropdown) ────────────────────────────────── */
.user-menu { position: relative; }
.user-menu-toggle {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .25rem .7rem .25rem .35rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .9);
  font-size: .82rem; font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
  font-family: inherit;
}
.user-menu-toggle:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .14);
}
.user-menu-toggle[aria-expanded="true"] {
  background: rgba(45, 210, 119, .14);
  border-color: rgba(45, 210, 119, .35);
  color: #d8fbe6;
}
.user-menu-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: var(--text-on-primary);
  font-weight: 800; font-size: .78rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 4px rgba(0,0,0,.35);
  flex-shrink: 0;
}
.user-menu-name {
  max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu-caret {
  font-size: .65rem;
  opacity: .7;
  transition: transform .18s ease;
}
.user-menu-toggle[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }

.user-menu-pop {
  position: absolute;
  right: 0; top: calc(100% + .55rem);
  min-width: 240px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--polish-shadow-pop);
  padding: .5rem;
  display: none;
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .16s ease, transform .16s var(--polish-easing);
}
.user-menu-pop[data-open="true"] {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}
.user-menu-pop__head {
  padding: .65rem .75rem .55rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: .35rem;
  display: flex; align-items: center; gap: .65rem;
}
.user-menu-pop__head-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: var(--text-on-primary);
  font-weight: 800; font-size: .9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 4px rgba(0,0,0,.35);
  flex-shrink: 0;
}
.user-menu-pop__head-text { min-width: 0; }
.user-menu-pop__head-name {
  font-size: .92rem; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu-pop__head-role {
  font-size: .76rem; color: var(--text-muted);
  margin-top: .1rem;
}

.user-menu-pop__list {
  list-style: none; padding: 0; margin: 0;
}
.user-menu-pop__item a,
.user-menu-pop__item button {
  display: flex; align-items: center; gap: .65rem;
  width: 100%;
  padding: .55rem .75rem;
  font-size: .88rem;
  color: var(--text);
  background: transparent;
  border: 0; border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit; text-align: left;
  transition: background .12s ease, color .12s ease;
}
.user-menu-pop__item a:hover,
.user-menu-pop__item button:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.user-menu-pop__item-icon {
  width: 20px; flex-shrink: 0;
  font-size: 1rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.user-menu-pop__item--danger a,
.user-menu-pop__item--danger button { color: var(--danger-fg); }
.user-menu-pop__item--danger a:hover,
.user-menu-pop__item--danger button:hover {
  background: rgba(239,93,106,.12);
  color: #ffb7be;
}
.user-menu-pop__item-icon--danger { color: var(--danger-fg); }
.user-menu-pop__shortcut {
  margin-left: auto;
  font-size: .7rem; font-weight: 600;
  color: var(--text-subtle);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: .1rem .35rem;
  border-radius: 4px;
  letter-spacing: .04em;
}
.user-menu-pop__sep {
  height: 1px; background: var(--border-soft);
  margin: .35rem .25rem;
}

@media (max-width: 560px) {
  .user-menu-name { display: none; }
  .user-menu-toggle { padding: .25rem .35rem; }
}

/* ── Command-Palette / Quick-Search ─────────────────────────────── */
.cmdk-trigger {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .7rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-pill);
  color: rgba(255,255,255,.7);
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
}
.cmdk-trigger:hover {
  background: rgba(255,255,255,.10);
  color: #fff;
  border-color: rgba(255,255,255,.18);
}
.cmdk-trigger__icon { font-size: .9rem; opacity: .8; }
.cmdk-trigger__shortcut {
  margin-left: .35rem;
  padding: .05rem .35rem;
  font-size: .7rem; font-weight: 700;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 4px;
  letter-spacing: .04em;
}
@media (max-width: 760px) {
  .cmdk-trigger__shortcut { display: none; }
  .cmdk-trigger__label { display: none; }
  .cmdk-trigger { padding: .35rem .55rem; }
}

.cmdk-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start; justify-content: center;
  z-index: 1000;
  padding: 8vh 1rem 1rem;
  opacity: 0;
  transition: opacity .18s ease;
}
.cmdk-overlay[data-open="true"] {
  display: flex;
  opacity: 1;
  animation: cmdkFadeIn .18s ease both;
}
@keyframes cmdkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cmdk-shell {
  width: 100%; max-width: 580px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--polish-shadow-pop);
  overflow: hidden;
  transform: translateY(-8px) scale(.98);
  animation: cmdkZoomIn .22s var(--polish-easing) both;
}
@keyframes cmdkZoomIn {
  from { transform: translateY(-12px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.cmdk-search {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.cmdk-search__icon { color: var(--text-muted); font-size: 1.05rem; }
.cmdk-search__input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  padding: .25rem 0;
  font-family: inherit;
  min-height: 0;
}
.cmdk-search__input::placeholder { color: var(--text-subtle); }
.cmdk-search__esc {
  font-size: .7rem; font-weight: 700;
  color: var(--text-subtle);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: .15rem .4rem;
  border-radius: 4px;
}

.cmdk-list {
  list-style: none;
  padding: .35rem;
  max-height: min(60vh, 460px);
  overflow-y: auto;
}
.cmdk-section-label {
  font-size: .7rem; font-weight: 800;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .55rem .8rem .35rem;
}
.cmdk-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem .65rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  width: 100%;
  font-family: inherit;
  text-align: left;
  font-size: .92rem;
  transition: background .1s ease, color .1s ease;
}
.cmdk-item__icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--text-muted);
}
.cmdk-item__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item__hint {
  font-size: .76rem; color: var(--text-muted);
  flex-shrink: 0;
}
.cmdk-item:hover,
.cmdk-item.is-active {
  background: var(--primary-soft);
  color: var(--text);
}
.cmdk-item:hover .cmdk-item__icon,
.cmdk-item.is-active .cmdk-item__icon {
  background: rgba(45,210,119,.18);
  color: var(--primary);
  border-color: rgba(45,210,119,.35);
}
.cmdk-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
}
.cmdk-empty__icon { font-size: 2rem; display: block; margin-bottom: .35rem; opacity: .65; }

.cmdk-foot {
  border-top: 1px solid var(--border-soft);
  padding: .55rem .8rem;
  display: flex; gap: .9rem;
  font-size: .72rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
}
.cmdk-foot kbd {
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: .05rem .35rem;
  border-radius: 4px;
  margin: 0 .15rem;
  font-size: .7rem; font-weight: 700;
  color: var(--text);
}

body.cmdk-open { overflow: hidden; }

/* ── Scroll-to-top Button ───────────────────────────────────────── */
.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 1rem);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: var(--text-on-primary);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 26px rgba(45, 210, 119, .35), 0 4px 10px rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
  cursor: pointer;
  z-index: 90;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s var(--polish-easing), box-shadow .18s ease;
  font-family: inherit;
}
.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top:hover {
  box-shadow: 0 14px 32px rgba(45, 210, 119, .45), 0 6px 14px rgba(0, 0, 0, .35);
}
.scroll-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (min-width: 1180px) {
  .scroll-top { bottom: 1.5rem; right: 1.75rem; }
}

/* ── Bottom-Nav: aktive Indikator-Animation ─────────────────────── */
.bottom-nav .nav-item { transition: color .15s ease, background .15s ease; }
.bottom-nav .nav-item .nav-icon {
  transition: transform .18s var(--polish-easing);
}
.bottom-nav .nav-item.active .nav-icon { transform: scale(1.08); }
.bottom-nav .nav-item.active::before {
  width: 26px; height: 3px;
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(45, 210, 119, .65);
  animation: navPop .25s var(--polish-easing) both;
}
@keyframes navPop {
  from { transform: translateX(-50%) scaleX(.4); opacity: 0; }
  to   { transform: translateX(-50%) scaleX(1);  opacity: 1; }
}

/* ── Card-Polish: feinere Übergänge für Spezialkarten ───────────── */
.stat-card,
.td-card,
.td-panel,
.more-card {
  transition: transform .2s var(--polish-easing), border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

/* ── Buttons: Icon-Buttons mit zusätzlichem Press-Feedback ──────── */
.btn-icon { transition: background .15s, color .15s, transform .12s var(--polish-easing); }
.btn-icon:hover { transform: translateY(-1px); }
.btn-icon:active { transform: translateY(0); }
.btn-icon:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Number-Input: spinner ausblenden für Sportdaten */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

.flash-close {
  background: rgba(0,0,0,.18);
  border: 0;
  color: inherit;
  font-size: 1rem; line-height: 1;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: .75;
  transition: opacity .15s, background .15s;
  font-family: inherit;
  flex-shrink: 0;
}
.flash-close:hover { opacity: 1; background: rgba(0,0,0,.30); }

/* ── Status-Pulse-Indikatoren ───────────────────────────────────── */
.dot-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  position: relative;
  flex-shrink: 0;
}
.dot-pulse::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: dotPulse 1.6s ease-out infinite;
  opacity: .6;
}
.dot-pulse--warn { background: var(--warning); }
.dot-pulse--warn::after { border-color: var(--warning); }
.dot-pulse--danger { background: var(--danger); }
.dot-pulse--danger::after { border-color: var(--danger); }
@keyframes dotPulse {
  0% { transform: scale(.7); opacity: .55; }
  80% { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ── Empty-State: feinere Optik ─────────────────────────────────── */
.empty-state .empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto .85rem;
}
.empty-state h3 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  margin: .1rem 0 .55rem;
}
.empty-state .empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin-top: 1.1rem;
}

/* ── Skeleton / Loading ─────────────────────────────────────────── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: transparent !important;
}
.skeleton::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Badge: dezenter Pop-Effekt für Live-Updates ────────────────── */
.badge.is-new {
  animation: badgePop .35s var(--polish-easing);
}
@keyframes badgePop {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

/* ── Login-Page Refinements ─────────────────────────────────────── */
body.login-page::before {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  top: -120px; left: -100px;
  background: radial-gradient(circle, rgba(45,210,119,.18) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
body.login-page::after {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  bottom: -140px; right: -120px;
  background: radial-gradient(circle, rgba(245,185,80,.10) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.login-card { position: relative; z-index: 1; }

/* ── Landing-Page Refinements ───────────────────────────────────── */

/* Hero-Mockup: kleines Slot-Score Schaubild als visueller Anker */

/* Stats-Strip auf Landing */

/* FAQ-Section auf Landing */

/* ── Mehr-Page Hero ─────────────────────────────────────────────── */
.more-hero__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.more-hero__text { flex: 1 1 280px; min-width: 0; }
.more-hero__quick { display: flex; gap: .5rem; flex-wrap: wrap; }
.more-hero__quick .btn { gap: .35rem; }
.more-hero__shortcut {
  margin-left: .35rem;
  padding: .1rem .4rem;
  font-size: .7rem; font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  letter-spacing: .04em;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .more-hero__quick .btn { width: 100%; justify-content: center; }
  .more-hero__quick { width: 100%; }
}

/* ── Mehr-Page (Übersicht der Features) ─────────────────────────── */
.more-card {
  position: relative;
  overflow: hidden;
}
.more-card::after {
  content: "→";
  position: absolute;
  right: .85rem; top: 50%;
  transform: translateY(-50%) translateX(-4px);
  color: var(--primary);
  font-weight: 800;
  opacity: 0;
  transition: opacity .18s ease, transform .18s var(--polish-easing);
}
.more-card:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.more-card:hover {
  background: linear-gradient(135deg, var(--surface-2) 0%, rgba(45,210,119,.05) 100%);
  border-color: rgba(45,210,119,.45);
}
.more-card strong { display: block; }

/* ── Pure Mobile-Optimierungen ──────────────────────────────────── */
@media (max-width: 640px) {
  .scroll-top { width: 40px; height: 40px; right: .75rem; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + .85rem); }
  .cmdk-overlay { padding-top: 5vh; }
  .cmdk-shell { max-width: 100%; border-radius: 12px; }
  .user-menu-pop { right: -.25rem; min-width: 220px; }
  .header-inner { padding: 0 .75rem; }
}

/* iOS: bessere Touch-Handles */
@supports (-webkit-touch-callout: none) {
  .btn, .nav-item, .more-card, .cmdk-item, .user-menu-pop__item a {
    -webkit-tap-highlight-color: rgba(45, 210, 119, .15);
  }
}

/* ── Karten-Hover: subtile Lift-Animation ───────────────────────── */
.team-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--polish-shadow-card), 0 16px 30px rgba(0,0,0,.30);
}

/* ── Tabellen-Hover-Polish ──────────────────────────────────────── */
tbody tr { transition: background .12s ease; }

/* ── Header: Mobile-Optimierung Header-Links ────────────────────── */
@media (max-width: 480px) {
  .user-chip { display: none; }
}

/* ── Print verbessern ───────────────────────────────────────────── */
@media print {
  .scroll-top, .cmdk-overlay, .user-menu-pop { display: none !important; }
  .skip-link { display: none !important; }
}

/* ──────────────────────────────────────────────────────────────────
   Taktik-Board — komplettes Redesign
   Modernes, mobile-first Layout mit echten Spielfeld-Proportionen,
   weichen Animationen und klarer Touch-Bedienung.
   ────────────────────────────────────────────────────────────────── */
:root {
  --pitch-grass-1: #1f7a3f;
  --pitch-grass-2: #258a48;
  --pitch-grass-3: #1a6535;
  --pitch-grass-edge: #144826;
  --pitch-line: rgba(255,255,255,.86);
  --pitch-line-soft: rgba(255,255,255,.60);
  --pitch-shadow:
    0 24px 60px rgba(0,0,0,.55),
    0 8px 18px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(255,255,255,.07),
    inset 0 60px 120px -60px rgba(255,255,255,.10);

  --tactic-own:        #2dd277;
  --tactic-own-strong: #19a45e;
  --tactic-own-light:  #6df2a3;
  --tactic-opp:        #ef5d6a;
  --tactic-opp-strong: #b6303f;
  --tactic-opp-light:  #ff8a92;
  --tactic-ball:       #fff;
  --tactic-note:       #fff3a8;
  --tactic-arrow:      #ffd86b;
  --tactic-arrow-soft: rgba(255,216,107,.55);

  --tactic-radius:     16px;
  --tactic-z-pitch:    1;
  --tactic-z-arrow:    3;
  --tactic-z-item:     4;
  --tactic-z-touch:    9;
  --tactic-z-toast:    20;
  --tactic-z-ui:       12;
}

/* ── Page-Layout ─────────────────────────────────────────────────── */
.tactic-page-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1080px) {
  .tactic-page-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
  .tactic-page-grid > .tactic-page-side { position: sticky; top: 80px; }
}

/* ── Board-Liste als horizontaler Karten-Scroll ──────────────────── */
.tactic-board-list-group {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}
.tactic-board-list-group > .tactic-board-list-item {
  flex: 0 1 220px;
  min-width: 180px;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
}
.tactic-board-list-item {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.tactic-board-list-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.30);
}
.tactic-board-list-item.is-active {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(45,210,119,.08) 100%);
  box-shadow: 0 0 0 2px rgba(45,210,119,.20) inset, 0 8px 18px rgba(0,0,0,.30);
}
.tactic-board-list-item.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: .55rem; bottom: .55rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}
.tactic-board-list-heading {
  display: flex; gap: .35rem; flex-wrap: wrap; align-items: center;
}
.tactic-board-list-heading strong {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.005em;
  flex: 1 0 100%;
  margin-bottom: .15rem;
  color: var(--text);
}

/* ── Pill-Badges harmonisieren ──────────────────────────────────── */
.tactic-board-category-badge,
.tactic-board-primary-badge,
.tactic-board-visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .005em;
  border: 1px solid transparent;
  line-height: 1.4;
}
.tactic-board-category-badge {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(90,168,255,.25);
}
.tactic-board-primary-badge {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(245,185,80,.30);
}
.tactic-board-primary-badge::before { content: "★"; font-size: .85em; }
.tactic-board-visibility-badge {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(34,197,94,.25);
}

/* ── Header über dem Spielfeld ──────────────────────────────────── */
.tactic-board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}
.tactic-board-header h2 {
  margin: 0 0 .25rem;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}
.tactic-board-header__meta {
  display: flex; gap: .35rem; flex-wrap: wrap; align-items: center;
  font-size: .8rem; color: var(--text-muted);
  margin-top: .3rem;
}
.tactic-board-header__meta strong { color: var(--text); font-weight: 600; }

.tactic-board-header__quickbar {
  display: flex; gap: .4rem; flex-wrap: wrap; align-items: center;
}

/* ── Toolbar ─────────────────────────────────────────────────────── */
.tactic-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .55rem;
  margin-bottom: .9rem;
  border-radius: var(--tactic-radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0,0,0,.30);
  align-items: center;
}
.tactic-toolbar__group {
  display: flex; gap: .25rem;
  padding: .2rem;
  background: var(--bg);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
}
.tactic-tool {
  --tool-fg: var(--text-muted);
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .85rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--tool-fg);
  font-size: .85rem; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
  white-space: nowrap;
  min-height: 34px;
}
.tactic-tool:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tactic-tool:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.tactic-tool.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: var(--text-on-primary);
  box-shadow: 0 4px 12px rgba(45,210,119,.35), inset 0 1px 0 rgba(255,255,255,.25);
  transform: translateY(-1px);
}
.tactic-tool.is-active.tactic-tool--opponent {
  background: linear-gradient(135deg, var(--tactic-opp-light) 0%, var(--tactic-opp-strong) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(230,72,87,.40), inset 0 1px 0 rgba(255,255,255,.20);
}
.tactic-tool.is-active.tactic-tool--ball {
  background: linear-gradient(135deg, #fff 0%, #d8b66a 100%);
  color: #1c1404;
  box-shadow: 0 4px 12px rgba(216,182,106,.40), inset 0 1px 0 rgba(255,255,255,.40);
}
.tactic-tool.is-active.tactic-tool--note {
  background: linear-gradient(135deg, #fff7c0 0%, #f5d75a 100%);
  color: #2e2400;
  box-shadow: 0 4px 12px rgba(245,215,90,.40), inset 0 1px 0 rgba(255,255,255,.35);
}
.tactic-tool.is-active.tactic-tool--arrow {
  background: linear-gradient(135deg, #ffe18b 0%, #f4b430 100%);
  color: #2e1c00;
  box-shadow: 0 4px 12px rgba(244,180,48,.45), inset 0 1px 0 rgba(255,255,255,.30);
}
.tactic-tool__icon { font-size: 1.05rem; line-height: 1; }
.tactic-tool[disabled] { opacity: .5; cursor: not-allowed; }

.tactic-toolbar__hint {
  margin-left: auto;
  font-size: .76rem;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .65rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-soft);
  max-width: 100%;
}
.tactic-toolbar__hint kbd {
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: .08rem .4rem;
  border-radius: 5px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 1px 1px rgba(0,0,0,.40);
}

/* ── Pitch (Spielfeld) ───────────────────────────────────────────── */
.tactic-board-stage {
  position: relative;
  margin: 0 auto;
  max-width: 540px;
  width: 100%;
}
.tactic-board-stage--wide { max-width: 760px; }

.tactic-board-view {
  display: block;
  margin-top: 1rem;
}

.tactic-board-pitch {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 68 / 105;
  margin: 0 auto;
  border-radius: var(--tactic-radius);
  overflow: hidden;
  background:
    /* sanfter Vignette-Schatten */
    radial-gradient(ellipse at 50% 35%, transparent 50%, rgba(0,0,0,.18) 100%),
    /* feine Querstreifen für Glanz */
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.025) 0,
      rgba(255,255,255,.025) 1px,
      transparent 1px,
      transparent 4px
    ),
    /* gemähte Streifen (vertikal in der Höhe) */
    repeating-linear-gradient(
      180deg,
      var(--pitch-grass-1) 0,
      var(--pitch-grass-1) calc(100% / 16),
      var(--pitch-grass-2) calc(100% / 16),
      var(--pitch-grass-2) calc(100% / 8)
    );
  box-shadow: var(--pitch-shadow);
  border: 1px solid rgba(255,255,255,.06);
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
/* alte Pseudo-Linien deaktivieren — Markierungen kommen via SVG */
.tactic-board-pitch::before,
.tactic-board-pitch::after { content: none !important; }

/* Sanftes Glow am Rand */
.tactic-board-pitch::after {
  content: "" !important;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 60px rgba(0,0,0,.40);
  pointer-events: none;
  z-index: 1;
}

/* Pitch-Markierungen via SVG-Layer */
.tactic-board-pitch__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--tactic-z-pitch);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.30));
}
.tactic-board-pitch__lines * {
  fill: none;
  stroke: var(--pitch-line);
  stroke-width: .38;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}
.tactic-board-pitch__lines .pitch-spot {
  fill: var(--pitch-line);
  stroke: none;
}
.tactic-board-pitch__lines .pitch-line-thin {
  stroke-width: .28;
  opacity: .80;
}

/* Optionaler horizontaler Modus */
.tactic-board-pitch--horizontal {
  aspect-ratio: 105 / 68;
}

/* Vollbild-Modus */
.tactic-board-stage.is-fullscreen {
  position: fixed;
  inset: 0;
  max-width: none;
  background: rgba(0,0,0,.90);
  z-index: 9999;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tactic-board-stage.is-fullscreen .tactic-board-pitch {
  max-width: min(96vw, calc(96vh * 68 / 105));
  max-height: 96vh;
}

/* ── Items: Spieler/Gegner/Ball ──────────────────────────────────── */
.tactic-board-item,
.tactic-board-note {
  z-index: var(--tactic-z-item);
}
.tactic-board-item {
  min-width: 38px;
  min-height: 38px;
  padding: 0 .4rem;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: -.01em;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255,255,255,.92);
  box-shadow:
    0 5px 14px rgba(0,0,0,.55),
    0 1px 2px rgba(0,0,0,.30),
    inset 0 -4px 6px rgba(0,0,0,.20),
    inset 0 2px 3px rgba(255,255,255,.22);
  cursor: grab;
  transition: transform .15s cubic-bezier(.2,.7,.3,1), box-shadow .15s ease, opacity .15s ease;
}
.tactic-board-item:hover {
  transform: translate(-50%, -50%) translateY(-1px) scale(1.03);
}
.tactic-board-item:active {
  cursor: grabbing;
}
.tactic-board-item.is-dragging {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow:
    0 14px 28px rgba(0,0,0,.65),
    0 4px 8px rgba(0,0,0,.45),
    inset 0 -4px 6px rgba(0,0,0,.24),
    inset 0 2px 3px rgba(255,255,255,.26);
  z-index: var(--tactic-z-touch);
  transition: none;
}
.tactic-board-item--player {
  background:
    radial-gradient(circle at 50% 28%, var(--tactic-own-light) 0%, var(--tactic-own) 42%, var(--tactic-own-strong) 100%);
  color: #03130a;
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.tactic-board-item--opponent {
  background:
    radial-gradient(circle at 50% 28%, var(--tactic-opp-light) 0%, var(--tactic-opp) 42%, var(--tactic-opp-strong) 100%);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,.30);
}
.tactic-board-item--ball {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  background:
    radial-gradient(circle at 35% 28%, #fff 0%, #f1ebd0 38%, #b89240 88%);
  color: transparent;
  border-color: rgba(0,0,0,.55);
  box-shadow:
    0 5px 12px rgba(0,0,0,.55),
    0 1px 2px rgba(0,0,0,.40),
    inset 0 -3px 5px rgba(0,0,0,.30);
}
.tactic-board-item--ball::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, transparent 50%, rgba(0,0,0,.20) 100%),
    conic-gradient(from 30deg,
      rgba(0,0,0,.0) 0deg,
      rgba(0,0,0,.32) 28deg,
      rgba(0,0,0,.0) 56deg,
      rgba(0,0,0,.32) 84deg,
      rgba(0,0,0,.0) 112deg,
      rgba(0,0,0,.32) 140deg,
      rgba(0,0,0,.0) 168deg,
      rgba(0,0,0,.32) 196deg,
      rgba(0,0,0,.0) 224deg,
      rgba(0,0,0,.32) 252deg,
      rgba(0,0,0,.0) 280deg,
      rgba(0,0,0,.32) 308deg,
      rgba(0,0,0,.0) 336deg);
  opacity: .55;
  pointer-events: none;
}

.tactic-board-item--editing,
.tactic-board-note.tactic-board-item--editing {
  outline: 3px dashed var(--accent);
  outline-offset: 4px;
  animation: tacticEditPulse 1.2s ease-in-out infinite;
  z-index: 8;
}
@keyframes tacticEditPulse {
  0%, 100% { outline-color: rgba(245,185,80,.90); }
  50%      { outline-color: rgba(245,185,80,.40); }
}

/* ── Notiz (sticky note) ─────────────────────────────────────────── */
.tactic-board-note {
  max-width: 200px;
  min-width: 90px;
  padding: .55rem .7rem;
  background:
    linear-gradient(180deg, #fff8b5 0%, #f4e07a 100%);
  color: #1c1404;
  border-radius: 8px;
  font-size: .8rem;
  line-height: 1.35;
  font-weight: 600;
  box-shadow:
    0 8px 20px rgba(0,0,0,.55),
    0 2px 4px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.50);
  border: 1px solid rgba(0,0,0,.18);
  cursor: grab;
  word-wrap: break-word;
}
.tactic-board-note::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 24px;
  height: 7px;
  margin-left: -12px;
  background: rgba(0,0,0,.32);
  border-radius: 2px;
  filter: blur(2px);
  pointer-events: none;
}
.tactic-board-note:active { cursor: grabbing; }
.tactic-board-note:hover {
  transform: translate(-50%, -50%) translateY(-1px);
}
.tactic-board-note.is-dragging {
  transform: translate(-50%, -50%) scale(1.05) rotate(-1deg);
  box-shadow: 0 14px 28px rgba(0,0,0,.55), 0 4px 8px rgba(0,0,0,.40);
  z-index: var(--tactic-z-touch);
}

/* ── Item-Aktionen (Lösch- und Edit-Buttons) ─────────────────────── */
.tactic-board-item-remove,
.tactic-board-item-edit {
  position: absolute;
  top: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 18px;
  padding: 0;
  border: 1.5px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.62);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  transition: opacity .15s ease, transform .12s ease, background .15s ease;
  font-weight: 700;
  z-index: 10;
  backdrop-filter: blur(2px);
}
.tactic-board-item:hover .tactic-board-item-remove,
.tactic-board-item:hover .tactic-board-item-edit,
.tactic-board-note:hover .tactic-board-item-remove,
.tactic-board-note:hover .tactic-board-item-edit,
.tactic-board-item.is-touched .tactic-board-item-remove,
.tactic-board-item.is-touched .tactic-board-item-edit,
.tactic-board-note.is-touched .tactic-board-item-remove,
.tactic-board-note.is-touched .tactic-board-item-edit {
  opacity: 1;
}
.tactic-board-item-remove { right: -7px; }
.tactic-board-item-edit  { right: -32px; background: rgba(45,210,119,.85); }
.tactic-board-item-remove:hover {
  background: var(--danger);
  transform: scale(1.15);
}
.tactic-board-item-edit:hover {
  background: var(--primary-strong);
  transform: scale(1.15);
}

/* ── Pfeile ──────────────────────────────────────────────────────── */
.tactic-board-arrow-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--tactic-z-arrow);
  pointer-events: none;
  overflow: visible;
}
.tactic-board-arrow-layer line {
  stroke: var(--tactic-arrow);
  stroke-width: 1;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.55));
  vector-effect: non-scaling-stroke;
}
.tactic-board-arrow-layer path {
  fill: var(--tactic-arrow);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.55));
}
.tactic-board-arrow-preview {
  stroke: rgba(255,255,255,.92);
  stroke-width: 1.2;
  stroke-dasharray: 1.5 1.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  fill: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
  animation: tacticArrowDash 1.2s linear infinite;
}
@keyframes tacticArrowDash {
  to { stroke-dashoffset: -3; }
}

.tactic-board-arrow-remove-form {
  display: inline-block;
  margin: .4rem .35rem 0 0;
}

/* ── Pitch-Cursor je nach Modus ──────────────────────────────────── */
.tactic-board-pitch[data-tactic-board-click-target="1"]:not(.tactic-mode-move):not(.tactic-mode-arrow) {
  cursor: cell;
}
.tactic-board-pitch.tactic-mode-arrow { cursor: crosshair; }
.tactic-board-pitch.tactic-mode-move  { cursor: default; }

/* ── Klick-Vorschau ─────────────────────────────────────────────── */
.tactic-board-click-preview {
  position: absolute;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  background: rgba(45,210,119,.30);
  border: 2px dashed rgba(255,255,255,.90);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  pointer-events: none;
  z-index: 7;
  animation: tacticPreviewPulse 1.2s ease-in-out infinite;
}
.tactic-board-click-preview.is-visible { display: flex; }
.tactic-board-click-preview span { text-shadow: 0 1px 2px rgba(0,0,0,.65); }
.tactic-board-pitch.tactic-mode-move .tactic-board-click-preview,
.tactic-board-pitch.tactic-mode-arrow .tactic-board-click-preview {
  display: none !important;
}
@keyframes tacticPreviewPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.20); opacity: .75; }
}

/* ── Empty-State auf dem Pitch ──────────────────────────────────── */
.tactic-board-empty {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: .75rem 1.15rem;
  background: rgba(0,0,0,.62);
  color: #fff;
  border-radius: 10px;
  font-size: .95rem;
  font-style: normal;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(4px);
  z-index: 8;
  text-align: center;
  max-width: 90%;
}

/* ── Toast (Auto-Save Feedback) ─────────────────────────────────── */
.tactic-toast {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translate(-50%, 8px);
  padding: .5rem .9rem;
  border-radius: var(--radius-pill);
  background: rgba(0,0,0,.78);
  color: #d8fbe6;
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.18);
  z-index: var(--tactic-z-toast);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.50);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.tactic-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.tactic-toast--err { color: #ffb7be; background: rgba(75,15,25,.85); }

/* ── Pitch-Overlay-UI (Vollbild/Quick-Actions) ──────────────────── */
.tactic-pitch-actions {
  position: absolute;
  right: .65rem;
  top: .65rem;
  z-index: var(--tactic-z-ui);
  display: flex;
  gap: .35rem;
}
.tactic-pitch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,.20);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
  backdrop-filter: blur(4px);
  padding: 0;
}
.tactic-pitch-action:hover {
  background: rgba(0,0,0,.78);
  transform: scale(1.06);
}

/* ── Legende ─────────────────────────────────────────────────────── */
.tactic-board-legend {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  margin: .65rem 0 .25rem;
  padding: .55rem .7rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  color: var(--text-muted);
}
.tactic-board-legend__item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.tactic-board-legend__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.7);
  display: inline-block;
}
.tactic-board-legend__dot--own {
  background: radial-gradient(circle at 50% 30%, var(--tactic-own-light) 0%, var(--tactic-own) 60%);
}
.tactic-board-legend__dot--opp {
  background: radial-gradient(circle at 50% 30%, var(--tactic-opp-light) 0%, var(--tactic-opp) 60%);
}
.tactic-board-legend__dot--ball {
  background: radial-gradient(circle at 35% 30%, #fff 0%, #cba85b 90%);
  border-color: rgba(0,0,0,.40);
}
.tactic-board-legend__dot--note {
  background: linear-gradient(180deg, #fff8b5 0%, #f4e07a 100%);
  border-color: rgba(0,0,0,.30);
  border-radius: 3px;
}
.tactic-board-legend__dot--arrow {
  background: var(--tactic-arrow);
  width: 22px;
  height: 4px;
  border-radius: 2px;
  border: none;
}

/* ── Formular: Item-Anlegen ─────────────────────────────────────── */
.tactic-board-form-hint {
  color: var(--text-muted);
  font-size: .9rem;
  margin: 0 0 .85rem;
  line-height: 1.5;
}
.tactic-board-meta-grid label,
.tactic-board-item-form-grid label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.tactic-board-meta-grid input[type="text"],
.tactic-board-meta-grid input[type="number"],
.tactic-board-meta-grid select,
.tactic-board-meta-grid textarea,
.tactic-board-item-form-grid input[type="text"],
.tactic-board-item-form-grid input[type="number"],
.tactic-board-item-form-grid select,
.tactic-board-item-form-grid textarea {
  margin-top: .35rem;
}
.tactic-board-item-form-grid label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: .5rem;
}

/* ── Quick-Actions im Form ──────────────────────────────────────── */
.tactic-board-quickbar {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
  padding: .55rem .65rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  margin-top: .65rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.tactic-board-quickbar form { display: inline; margin: 0; }
.tactic-board-quickbar .btn-sm {
  padding: .35rem .65rem;
  font-size: .8rem;
}

/* ── Responsives Verhalten ──────────────────────────────────────── */
@media (max-width: 760px) {
  .tactic-board-pitch { max-width: 100%; }
  .tactic-board-stage { max-width: 100%; }
  .tactic-toolbar { padding: .45rem; gap: .3rem; }
  .tactic-tool { padding: .4rem .65rem; font-size: .8rem; min-height: 36px; }
  .tactic-tool__label { display: none; }
  .tactic-tool__icon { font-size: 1.15rem; }
  .tactic-toolbar__hint { display: none; }
  .tactic-board-list-group > .tactic-board-list-item { min-width: 100%; }
  .tactic-board-item { min-width: 36px; min-height: 36px; font-size: .78rem; }
  .tactic-board-item--ball { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
  .tactic-board-note { max-width: 150px; font-size: .76rem; }
  .tactic-board-item-remove,
  .tactic-board-item-edit { opacity: 1; width: 22px; height: 22px; }
  .tactic-board-item-edit { right: -34px; }
  .tactic-board-item-remove { right: -10px; }
}
@media (max-width: 460px) {
  .tactic-board-legend { font-size: .72rem; padding: .45rem .55rem; gap: .45rem; }
}


/* ── Datei-Upload-Drop-Hover (visuelle Stütze) ──────────────────── */
input[type="file"]:focus + label,
input[type="file"]:hover { box-shadow: var(--polish-ring); }

/* ── Tabs: Tasten-Fokus ─────────────────────────────────────────── */
.tab-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ── Card-Header sanftes „Bottom-Glow" für hervorgehobene Bereiche */
.card-header--dark { position: relative; }
.card-header--dark::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45,210,119,.6), transparent);
}

/* ── Aktive Nav-Items im Desktop-Rail mit Sheen-Effekt ──────────── */
@media (min-width: 1180px) {
  .bottom-nav .nav-item.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-strong) 100%);
    box-shadow: 0 6px 16px rgba(45, 210, 119, .35), inset 0 1px 0 rgba(255,255,255,.18);
  }
  .bottom-nav .nav-item.active::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,.10) 60%, transparent 90%);
    pointer-events: none;
  }
}

/* ── Mannschafts-Wizard ─────────────────────────────────────────── */
.team-wizard-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .35rem;
}
.btn-wizard {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .13s, border-color .13s, color .13s, transform .08s;
  min-height: 38px;
  white-space: nowrap;
}
.btn-wizard:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--primary);
  color: var(--primary);
}
.btn-wizard--active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
  color: var(--text-on-primary) !important;
  border-color: var(--primary-strong) !important;
  box-shadow: 0 4px 12px rgba(45,210,119,.28);
}
.btn-wizard--taken {
  opacity: .42;
  cursor: not-allowed;
  text-decoration: line-through;
}
@media (max-width: 480px) {
  .btn-wizard { font-size: .82rem; padding: .5rem .75rem; }
}

/* ── Rangfolge-Badge (1./2./3. Mannschaft) ──────────────────────── */
.team-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .35rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: var(--text-on-primary);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
