/* ==========================================================================
   NHD — App-Layout & Komponenten
   Baut auf nhd-design-tokens.css auf (dort sind alle Farb-/Typo-Variablen
   definiert). Diese Datei enthält nur Layout- und Komponentenklassen, die
   in mehreren Seiten wiederverwendet werden.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Lange deutsche Komposita (z.B. "Vereinseinstellungen") haben keine
   Leerzeichen zum Umbrechen — ohne das hier würden sie auf schmalen
   Handy-Bildschirmen einfach über den Rand hinauslaufen statt umzubrechen. */
h1, h2, h3, h4, p, label, a, span, div, td, th, button { overflow-wrap: break-word; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--nhd-font-sans); }
input, select, textarea { font-family: var(--nhd-font-sans); }
table { border-collapse: collapse; width: 100%; }

body.nhd {
  background-color: var(--nhd-surface-100);
  background-image:
    linear-gradient(rgba(6, 10, 18, 0.78), rgba(6, 10, 18, 0.78)),
    url('../img/background-dartboard.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  color: var(--nhd-ink);
  font-family: var(--nhd-font-sans);
  -webkit-font-smoothing: antialiased;
}

.nhd-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top-Navigation (Desktop) ---------- */
.nhd-topnav {
  height: 92px;
  flex-shrink: 0;
  display: none; /* ab 900px sichtbar, siehe Media Query unten */
  align-items: center;
  padding: 0 28px;
  gap: 24px;
  border-bottom: 1px solid var(--nhd-surface-300);
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nhd-topnav__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nhd-topnav__brand img { width: 52px; height: 52px; border-radius: 10px; }
.nhd-topnav__brand span {
  font-family: var(--nhd-font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--nhd-ink);
}
.nhd-topnav__links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nhd-topnav__links::-webkit-scrollbar { display: none; }
.nhd-topnav__link {
  padding: 12px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--nhd-ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.nhd-topnav__link.is-active {
  color: var(--nhd-ink-on-brand);
  background: var(--nhd-brand-blue-deep);
}
.nhd-profile-chip {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: 12px;
  font-weight: 700;
  color: var(--nhd-ink);
}

/* ---------- Bottom-Navigation (Mobile) ---------- */
.nhd-bottomnav {
  flex-shrink: 0;
  height: 64px;
  display: flex;
  border-top: 1px solid var(--nhd-border);
  background: rgba(11, 18, 32, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.nhd-bottomnav__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--nhd-ink-muted);
}
.nhd-bottomnav__link span { font-size: 10px; font-weight: 600; }
.nhd-bottomnav__link.is-active { color: var(--nhd-brand-blue-ink); }
.nhd-bottomnav__link.is-active span { font-weight: 700; }

/* ---------- "Mehr"-Sheet der Bottom-Nav (Mobile) ---------- */
.nhd-bottomnav__more {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}
.nhd-more-sheet[hidden] { display: none; }
.nhd-more-sheet__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.55);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 60;
}
.nhd-more-sheet__panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--nhd-surface-100);
  border-top: 1px solid var(--nhd-border);
  border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .25s ease;
  z-index: 61;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
}
.nhd-more-sheet.is-open .nhd-more-sheet__backdrop { opacity: 1; }
.nhd-more-sheet.is-open .nhd-more-sheet__panel { transform: translateY(0); }
.nhd-more-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--nhd-border);
  margin: 4px auto 14px;
}
.nhd-more-sheet__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 4px;
}
.nhd-more-sheet__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 14px;
  color: var(--nhd-ink);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.nhd-more-sheet__item:active { background: var(--nhd-surface-200); }
.nhd-more-sheet__item.is-active { color: var(--nhd-brand-blue-ink); background: var(--nhd-surface-200); }

@media (min-width: 900px) {
  .nhd-topnav { display: flex; }
  .nhd-bottomnav { display: none; }
  .nhd-more-sheet { display: none; }
  .nhd-page { padding: 32px 48px 40px !important; }
}

/* ---------- Steckbrief-Karte (Mitglieder: Antippen von Name/Organigramm) ---------- */
.nhd-member-modal[hidden] { display: none; }
.nhd-member-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.6);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 70;
}
.nhd-member-modal__panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.96);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  width: calc(100% - 32px);
  max-width: 360px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--nhd-surface-100);
  border: 1px solid var(--nhd-border);
  border-radius: var(--nhd-radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  padding: 28px 24px 22px;
  text-align: center;
  z-index: 71;
}
.nhd-member-modal.is-open .nhd-member-modal__backdrop { opacity: 1; }
.nhd-member-modal.is-open .nhd-member-modal__panel { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.nhd-member-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--nhd-ink-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}
.nhd-member-modal__avatar { display: flex; justify-content: center; margin-bottom: 14px; }
.nhd-member-modal__name { font-family: var(--nhd-font-display); font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.nhd-member-modal__badges { margin-bottom: 14px; }
.nhd-member-modal__motto {
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--nhd-ink);
  margin: 0 0 14px;
}
.nhd-member-modal__finish {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--nhd-surface-200);
  border: 1px solid var(--nhd-border);
  border-radius: var(--nhd-radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.nhd-member-modal__finish span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--nhd-ink-muted); }
.nhd-member-modal__finish strong { font-family: var(--nhd-font-mono); font-size: 15px; }
.nhd-member-modal__empty { font-size: 13px; color: var(--nhd-ink-muted); margin: 0 0 14px; }
.nhd-member-modal__meta { font-size: 12px; color: var(--nhd-ink-muted); }

/* ---------- Seiteninhalt ---------- */
.nhd-page {
  flex: 1;
  overflow: auto;
  padding: 20px 20px 16px;
}
.nhd-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.nhd-page-head h1 { margin: 0; }
.nhd-page-sub { margin: 4px 0 24px; font-size: 13px; color: var(--nhd-ink-muted); }

/* ---------- Formulare ---------- */
.nhd-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.nhd-field label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--nhd-ink-muted); text-transform: uppercase;
}
.nhd-input, .nhd-select {
  width: 100%;
  background: var(--nhd-surface-300);
  border: 1px solid var(--nhd-border);
  border-radius: var(--nhd-radius-md);
  padding: 13px 15px;
  font-size: 15px;
  color: var(--nhd-ink);
}
.nhd-input:focus, .nhd-select:focus {
  outline: 2px solid var(--nhd-focus-ring);
  outline-offset: 1px;
}
.nhd-btn-primary, .nhd-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
button.nhd-btn-primary, button.nhd-btn-secondary { width: auto; }
a.nhd-btn-primary, a.nhd-btn-primary:visited { color: var(--nhd-ink-on-brand); }

.nhd-alert {
  border-radius: var(--nhd-radius-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.nhd-alert-error   { background: rgba(200,39,44,0.15); border: 1px solid var(--nhd-danger-ink); color: var(--nhd-danger-ink); }
.nhd-alert-success { background: rgba(21,122,66,0.18); border: 1px solid var(--nhd-success-ink); color: var(--nhd-success-ink); }

/* ---------- Auth-Seiten (Zugang / Registrieren) ---------- */
.nhd-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--nhd-ink);
}
.nhd-auth-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--nhd-surface-200);
  border: 1px solid var(--nhd-border);
  border-radius: var(--nhd-radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 24px 16px;
}
.nhd-auth-card img.nhd-auth-logo { width: 96px; height: 96px; border-radius: 20px; }
.nhd-auth-card h1 {
  margin: 16px 0 2px; font-family: var(--nhd-font-display); font-weight: 700; font-size: 36px; letter-spacing: 0.02em;
}
.nhd-auth-card p.nhd-auth-sub { margin: 0 0 36px; font-size: 13px; color: var(--nhd-ink-muted); }
.nhd-auth-form { width: 100%; }
.nhd-auth-divider { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0 24px; }
.nhd-auth-divider .line { flex: 1; height: 1px; background: var(--nhd-border); }
.nhd-auth-divider span { font-size: 12px; color: var(--nhd-ink-muted); }
.nhd-auth-footer { flex-shrink: 0; padding: 16px; text-align: center; font-size: 11px; color: var(--nhd-ink-muted); }
.nhd-auth-link { display: block; text-align: center; color: var(--nhd-brand-blue-ink); font-size: 13px; font-weight: 600; margin-top: 14px; }

/* ---------- Avatar-Auswahl (Check-in) ---------- */
.nhd-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 12px;
}
@media (min-width: 900px) { .nhd-avatar-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 16px; } }
.nhd-avatar-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 0; font-family: var(--nhd-font-sans); opacity: 0.55; }
.nhd-avatar-tile .nhd-avatar { width: 64px; height: 64px; font-size: 18px; border: 2px solid var(--nhd-border); font-weight: 600; }
.nhd-avatar-tile span { font-size: 12px; font-weight: 600; color: var(--nhd-ink); text-align: center; }
.nhd-avatar-tile.is-checked-in { opacity: 1; }
.nhd-avatar-tile.is-checked-in .nhd-avatar { border-color: var(--nhd-brand-blue); border-width: 3px; }
/* is-inactive: deaktiviertes Mitgliederkonto (nicht Check-in-Status) — genutzt auf mitglieder.php */
.nhd-avatar-tile.is-inactive { opacity: 0.4; cursor: default; }
.nhd-avatar-tile.is-inactive .nhd-avatar { color: var(--nhd-ink-muted); }
.nhd-avatar-tile.is-inactive span { color: var(--nhd-ink-muted); }
.nhd-checkin-badge {
  position: absolute; bottom: -2px; right: -2px; width: 22px; height: 22px; border-radius: 999px;
  background: #22C066; border: 2px solid var(--nhd-surface-100);
  display: flex; align-items: center; justify-content: center;
}
button.nhd-avatar-tile { background: none; border: none; }

/* ---------- Übersicht: Hero ---------- */
.nhd-hero {
  flex-shrink: 0;
  display: flex;
  flex-direction: column-reverse;
  margin: -20px -20px 24px;
}
.nhd-hero__text { padding: 28px 24px 20px; }
.nhd-hero__logo-mark { display: block; align-self: center; margin: 0 auto 14px; height: 110px; width: 110px; object-fit: contain; }
.nhd-hero__eyebrow { font-size: 18px; font-weight: 700; letter-spacing: 0.09em; color: var(--nhd-accent-gold); margin-bottom: 8px; }
.nhd-hero__text h1 { margin: 0 0 8px; font-family: var(--nhd-font-display); font-weight: 700; font-size: 26px; color: #fff; line-height: 1.15; }
.nhd-hero__text p { margin: 0 0 20px; font-size: 14px; color: rgba(255,255,255,0.75); }
.nhd-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.nhd-hero__photos { display: flex; gap: 2px; }
.nhd-hero__image { flex: 1; height: 220px; overflow: hidden; }
.nhd-hero__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) {
  .nhd-hero { flex-direction: row; height: 480px; margin: -32px -48px 32px; }
  .nhd-hero__text { width: 460px; flex-shrink: 0; padding: 0 48px; display: flex; flex-direction: column; justify-content: center; }
  .nhd-hero__logo-mark { height: 170px; width: 170px; margin: 0 auto 18px; align-self: center; }
  .nhd-hero__eyebrow { font-size: 20px; }
  .nhd-hero__text h1 { font-size: 32px; }
  .nhd-hero__photos { flex: 1; height: 100%; gap: 3px; }
  .nhd-hero__image { height: 100%; }
}

.nhd-quick-tile { padding: 20px; }
.nhd-quick-tile svg { margin-bottom: 10px; }
.nhd-quick-tile__title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.nhd-quick-tile__sub { font-size: 12px; color: var(--nhd-ink-muted); }

/* ---------- Eintragen: Schnellerfassung-Gitter (Desktop) ----------
   Auf dem Handy hat das breite Kategorien-nebeneinander-Raster zu wenig
   Platz (seitliches Scrollen nötig) — ab 900px sichtbar, siehe
   .nhd-erfassung-mobile weiter unten für die mobile Kartenliste. */
.nhd-erfassung { display: none; }
@media (min-width: 900px) {
  .nhd-erfassung {
    display: grid;
    grid-template-columns: 170px repeat(var(--nhd-cat-count), minmax(0, 1fr)) 110px;
    align-items: center;
    column-gap: 6px;
    max-width: 100%;
    overflow-x: auto;
  }
}
.nhd-erfassung__totalhead { display: none; }
@media (min-width: 900px) {
  .nhd-erfassung__totalhead { display: block; text-align: right; font-size: 11px; font-weight: 700; color: var(--nhd-accent-gold); padding-bottom: 10px; letter-spacing: 0.06em; }
}
.nhd-erfassung__cathead { text-align: center; padding-bottom: 10px; }
.nhd-erfassung__catname { font-size: 11px; font-weight: 700; color: var(--nhd-ink); line-height: 1.3; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
.nhd-erfassung__catprice { font-family: var(--nhd-font-mono); font-size: 11px; font-weight: 700; color: var(--nhd-accent-gold); margin-top: 3px; }
@media (min-width: 900px) {
  .nhd-erfassung__catname { font-size: 15px; }
  .nhd-erfassung__catprice { font-size: 14px; }
}
.nhd-erfassung__person {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px;
  border-top: 1px solid var(--nhd-surface-300); font-size: 12px; font-weight: 600; text-align: center;
  transition: opacity 0.25s ease;
}
.nhd-erfassung__checkout {
  display: flex; align-items: center; gap: 3px; margin-top: 2px; background: none; border: none;
  padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--nhd-ink-muted); cursor: pointer; text-transform: uppercase;
}
.nhd-erfassung__checkout:hover { background: rgba(200,39,44,0.14); color: var(--nhd-danger-ink); }
.nhd-erfassung__cell {
  display: flex; align-items: center; justify-content: center; padding: 14px 0;
  border-top: 1px solid var(--nhd-surface-300); cursor: pointer; position: relative; background: none; border-left: none; border-right: none; border-bottom: none;
}
.nhd-erfassung__cell:hover svg { filter: brightness(1.3); }
.nhd-erfassung__badge {
  position: absolute; top: 2px; right: 50%; margin-right: -34px; min-width: 20px; height: 20px; border-radius: 999px;
  background: var(--nhd-accent-gold); color: var(--nhd-ink-on-accent); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; cursor: pointer;
  box-shadow: 0 0 0 2px var(--nhd-surface-100);
}
.nhd-erfassung__total {
  display: none; text-align: right; padding: 14px 0; border-top: 1px solid var(--nhd-surface-300);
  font-family: var(--nhd-font-mono); font-size: 14px; font-weight: 700; color: var(--nhd-accent-gold);
}
@media (min-width: 900px) { .nhd-erfassung__total { display: block; } }

/* ---------- Eintragen: Kartenliste (Mobil) ----------
   Ersetzt auf schmalen Screens das breite Raster: pro Person eine Karte,
   Kategorien darin untereinander mit Plus/Minus-Stepper statt eines engen
   Neben­einander-Gitters. Ab 900px wieder ausgeblendet (dort greift das
   Desktop-Raster oben). */
.nhd-erfassung-mobile { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) {
  .nhd-erfassung-mobile { display: none; }
}
.nhd-erfassung-person-card {
  background: var(--nhd-surface-200); border: 1px solid var(--nhd-border); border-radius: 14px;
  padding: 14px 16px; transition: opacity 0.25s ease;
}
.nhd-erfassung-person-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.nhd-erfassung-person-card__name { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; overflow-wrap: break-word; }
.nhd-erfassung-catrow {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-top: 1px solid var(--nhd-surface-300);
}
.nhd-erfassung-catrow__name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: break-word; }
.nhd-erfassung-catrow__price {
  font-family: var(--nhd-font-mono); font-size: 12px; font-weight: 700; color: var(--nhd-ink-muted); flex-shrink: 0;
}
.nhd-erfassung-stepper { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nhd-erfassung-stepper button {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--nhd-border);
  background: var(--nhd-surface-300); color: var(--nhd-ink); font-size: 18px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.nhd-erfassung-stepper button:active { background: var(--nhd-brand-blue); border-color: var(--nhd-brand-blue); color: #fff; }
.nhd-erfassung-stepper__count {
  min-width: 18px; text-align: center; font-weight: 700; font-family: var(--nhd-font-mono); font-size: 15px;
}
.nhd-erfassung-person-card__total {
  display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding-top: 12px;
  border-top: 1px solid var(--nhd-surface-300); font-weight: 700; color: var(--nhd-accent-gold);
  font-family: var(--nhd-font-mono); font-size: 14px;
}

/* ---------- Mitglieder: Organigramm (dynamisch, keine festen Pixel) ---------- */
.nhd-orgchart-wrap { overflow-x: auto; margin-bottom: 32px; }
.nhd-orgchart { display: inline-flex; gap: 32px; padding: 4px 8px 8px; min-width: 100%; justify-content: center; }
.nhd-org-unit { display: flex; flex-direction: column; align-items: center; }
.nhd-org-card {
  width: 170px; box-sizing: border-box; background: var(--nhd-surface-200); border: 1px solid var(--nhd-border);
  border-radius: 12px; padding: 16px; text-align: center; flex-shrink: 0;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nhd-org-card--root { border-color: var(--nhd-accent-gold); padding: 18px; width: 180px; }
.nhd-org-connector { width: 2px; height: 24px; background: var(--nhd-border); }
.nhd-org-children { display: inline-flex; gap: 24px; padding-top: 24px; border-top: 2px solid var(--nhd-border); position: relative; }
.nhd-org-children > .nhd-org-unit { position: relative; }
.nhd-org-children > .nhd-org-unit::before {
  content: ''; position: absolute; top: -24px; left: 50%; width: 2px; height: 24px; background: var(--nhd-border); transform: translateX(-50%);
}

/* ---------- Eintragen: kompaktes Turnier-Widget (als versetzter Baum) ---------- */
.nhd-quickmatch-rounds { display: flex; flex-direction: column; gap: 28px; overflow-x: auto; padding-bottom: 4px; }
@media (min-width: 900px) {
  .nhd-quickmatch-rounds { flex-direction: row; align-items: stretch; gap: 40px; }
}
.nhd-quickmatch-round { display: flex; flex-direction: column; width: 100%; max-width: 380px; flex-shrink: 0; }
@media (min-width: 900px) {
  .nhd-quickmatch-round { width: 300px; }
}
.nhd-quickmatch-round__title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--nhd-accent-gold);
  padding-bottom: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--nhd-border); flex-shrink: 0;
}
.nhd-quickmatch-round__matches { display: flex; flex-direction: column; gap: 20px; justify-content: center; flex: 1; }
.nhd-quickmatch {
  background: var(--nhd-surface-200); border: 1px solid var(--nhd-border); border-radius: 12px; padding: 12px 14px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nhd-quickmatch.is-tbd { opacity: 0.55; }
.nhd-quickmatch__players { display: flex; align-items: center; gap: 10px; }
.nhd-quickmatch__vs { font-size: 11px; color: var(--nhd-ink-muted); flex-shrink: 0; }
.nhd-quickmatch__player {
  flex: 1; background: var(--nhd-surface-300); border: 1px solid var(--nhd-border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--nhd-ink); cursor: pointer; text-align: center;
}
.nhd-quickmatch__player.is-winner { background: var(--nhd-brand-blue); border-color: var(--nhd-brand-blue); color: #fff; font-weight: 700; }
.nhd-quickmatch__player--tbd { color: var(--nhd-ink-muted); cursor: default; font-weight: 500; font-style: italic; }

/* ---------- Turniere: K.o.-Baum ---------- */
.nhd-bracket { display: flex; gap: 32px; overflow-x: auto; padding-bottom: 12px; }
.nhd-bracket__col { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; justify-content: center; }
.nhd-bracket__match {
  display: block; background: var(--nhd-surface-200); border: 1px solid var(--nhd-border); border-radius: 12px;
  overflow: hidden; color: var(--nhd-ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
button.nhd-bracket__row { width: 100%; background: none; border: none; border-bottom: 1px solid var(--nhd-border); font-family: inherit; text-align: left; cursor: pointer; border-radius: 0; }
button.nhd-bracket__row:last-child { border-bottom: none; }
.nhd-bracket__match.is-pickable button.nhd-bracket__row:hover { background: rgba(43, 99, 255, 0.12); color: var(--nhd-ink); }
.nhd-bracket__row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; color: var(--nhd-ink-muted); border-bottom: 1px solid var(--nhd-border); }
.nhd-bracket__row:last-child { border-bottom: none; }
.nhd-bracket__row span:first-child { flex: 1; }
.nhd-bracket__row.is-winner { color: var(--nhd-ink); font-weight: 700; border-left: 4px solid var(--nhd-accent-gold); }
button.nhd-bracket__row.is-winner { border-left: 4px solid var(--nhd-accent-gold); }
.nhd-bracket__row.is-winner .nhd-amount { color: var(--nhd-accent-gold); }
.nhd-bracket__col .nhd-bracket__final-card { margin-top: -8px; }
.nhd-bracket__final-card { background: var(--nhd-brand-blue-deep); border-radius: 12px; padding: 24px 12px; text-align: center; }

.nhd-color-swatch {
  width: 22px; height: 22px; border-radius: 999px; border: none; cursor: pointer; padding: 0;
}

/* ---------- Übersicht: Eingecheckt/Offene Posten ---------- */
.nhd-overview-split { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 900px) {
  .nhd-overview-split { flex-direction: row; align-items: flex-start; }
  .nhd-overview-split > div { flex: 1; min-width: 0; }
}

/* ---------- Karten & Tabellen ---------- */
.nhd-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.nhd-grid > * { flex: 1; min-width: 200px; }
.nhd-stat-label { font-size: 11px; color: var(--nhd-ink-muted); margin-bottom: 6px; }
.nhd-table-wrap { overflow-x: auto; }
.nhd-table thead th {
  text-align: left; padding: 10px 16px; font-size: 11px; color: var(--nhd-ink-muted); font-weight: 700;
  border-bottom: 1px solid var(--nhd-border);
}
.nhd-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--nhd-border); }
.nhd-table tr:last-child td { border-bottom: none; }

/* ---------- Horizontal-Scroll-Hinweis (v.a. mobil) ----------
   Sanfter Fade-Out am rechten Rand für breite, seitlich scrollbare
   Bereiche (Turnierbaum, Organigramm, Schnellerfassungs-Gitter, Tabellen)
   — signalisiert "hier geht's noch weiter", ohne dass zusätzliches Markup
   nötig ist. Wirkt nur, wenn der Inhalt tatsächlich breiter ist als der
   sichtbare Bereich; sonst unsichtbar (kein Nachteil auf Desktop). */
.nhd-scroll-fade {
  mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
}

/* ---------- Events: Kalender ---------- */
.nhd-cal {
  background:
    radial-gradient(circle at 0% 0%, rgba(41, 85, 201, 0.16), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(212, 168, 83, 0.10), transparent 50%);
  border-radius: 18px;
}
.nhd-cal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.nhd-cal__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--nhd-font-display); font-weight: 700; font-size: 21px;
}
.nhd-cal__nav-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--nhd-surface-300); border: 1px solid var(--nhd-border);
  display: flex; align-items: center; justify-content: center; color: var(--nhd-ink);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.nhd-cal__nav-btn:hover { background: var(--nhd-brand-blue); border-color: var(--nhd-brand-blue); color: #fff; transform: translateY(-1px); }

.nhd-cal__weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 8px; }
.nhd-cal__weekday {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--nhd-ink-muted);
  letter-spacing: 0.06em; padding-bottom: 8px; border-bottom: 1px solid var(--nhd-border);
}

.nhd-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.nhd-cal-day {
  position: relative; min-width: 0; border-radius: 12px; padding: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nhd-cal-day--has-events { background: var(--nhd-surface-300); border-color: var(--nhd-border); }
.nhd-cal-day:hover { border-color: var(--nhd-brand-blue); }
.nhd-cal-day--today { border-color: var(--nhd-accent-gold); }

.nhd-cal-day__num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 4px;
  font-size: 12px; font-weight: 600; color: var(--nhd-ink-muted);
  border-radius: 999px; margin-bottom: 6px;
}
.nhd-cal-day--today .nhd-cal-day__num {
  background: var(--nhd-accent-gold); color: #241c08; font-weight: 700;
}

.nhd-cal-event-pill {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; line-height: 1.35;
  border-radius: 6px; padding: 3px 6px; margin-bottom: 3px;
  overflow: hidden;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.nhd-cal-event-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nhd-cal-event-pill:hover { transform: translateY(-1px); filter: brightness(1.15); }
.nhd-cal-day__more { font-size: 9px; color: var(--nhd-ink-muted); font-weight: 600; }

/* ---------- Events: Seiten-Eyebrow & "Alle anzeigen"-Button ---------- */
.nhd-page-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.09em; color: var(--nhd-accent-gold); margin-bottom: 4px; }
.nhd-show-all-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; margin-top: 4px;
  border: 1px solid var(--nhd-border); border-radius: 10px;
  background: var(--nhd-surface-200);
  font-size: 13px; font-weight: 700; color: var(--nhd-ink); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  list-style: none;
}
.nhd-show-all-btn::-webkit-details-marker { display: none; }
.nhd-show-all-btn:hover { background: var(--nhd-surface-300); border-color: var(--nhd-brand-blue); }

/* Gäste (spielen nur einmal): kleines Label am Namen */
.nhd-guest-tag {
  font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--nhd-accent-gold); border: 1px solid var(--nhd-accent-gold); border-radius: 999px;
  padding: 1px 6px; margin-left: 4px; vertical-align: middle; white-space: nowrap;
}

/* ---------- Turniere: Gruppenphase ---------- */
.nhd-group-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .nhd-group-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.nhd-table--compact td, .nhd-table--compact th { padding: 10px 10px; }
.nhd-table--compact td:nth-child(2) { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nhd-table tr.is-through td { background: rgba(240, 180, 41, 0.07); }
.nhd-quickmatch-groups { display: flex; flex-direction: column; gap: 32px; }
.nhd-quickmatch-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 900px) { .nhd-quickmatch-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px 28px; } }
.nhd-quickmatch-grid .nhd-quickmatch-round { width: 100%; max-width: none; }
.nhd-quickmatch-round__matches .nhd-quickmatch { margin: 0; }
.nhd-quickmatch-grid .nhd-quickmatch-round__matches { gap: 10px; }
.nhd-quickmatch-groupblock .nhd-quickmatch__player { padding: 10px 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Legs-Eingabe unter einer Partie */
.nhd-quickmatch__scores { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; color: var(--nhd-ink-muted); font-size: 13px; }
.nhd-quickmatch__scorelabel { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.nhd-quickmatch__score {
  width: 54px; text-align: center; padding: 8px 4px; font-size: 15px; font-weight: 700; font-family: var(--nhd-font-display, inherit);
  background: var(--nhd-surface-300); border: 1px solid var(--nhd-border); border-radius: 8px; color: var(--nhd-ink);
  -moz-appearance: textfield; appearance: textfield;
}
.nhd-quickmatch__score::-webkit-outer-spin-button, .nhd-quickmatch__score::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nhd-quickmatch__score:focus { outline: none; border-color: var(--nhd-brand-blue); }
.nhd-quickmatch__score.is-error { border-color: var(--nhd-danger-ink); }

/* Gruppen von Hand zuteilen */
.nhd-btn-sm { padding: 7px 12px; font-size: 12px; }
.nhd-assign-counts { font-size: 13px; margin-bottom: 10px; color: var(--nhd-ink); }
.nhd-assign-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; border: 1px solid var(--nhd-border); border-radius: 8px; }
.nhd-assign-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--nhd-border); }
.nhd-assign-row:last-child { border-bottom: none; }
.nhd-assign-row.is-assigned { background: rgba(43, 99, 255, 0.07); }
.nhd-assign-name { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nhd-assign-pills { display: flex; gap: 6px; flex-shrink: 0; }
.nhd-assign-pills label { margin: 0; cursor: pointer; }
.nhd-assign-pills input { position: absolute; opacity: 0; pointer-events: none; }
.nhd-assign-pills span {
  display: inline-block; min-width: 40px; text-align: center; padding: 8px 0; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: var(--nhd-surface-300); border: 1px solid var(--nhd-border); color: var(--nhd-ink-muted);
}
.nhd-assign-pills input:checked + span { background: var(--nhd-brand-blue); border-color: var(--nhd-brand-blue); color: #fff; }
.nhd-assign-pills input[value=""]:checked + span { background: var(--nhd-surface-200); border-color: var(--nhd-border); color: var(--nhd-ink-muted); }
.nhd-assign-pills input:focus-visible + span { outline: 2px solid var(--nhd-accent-gold); outline-offset: 2px; }

/* ---------- Preise & Namen ---------- */
.nhd-price-head { display: none; }
.nhd-price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 16px 0; border-bottom: 1px solid var(--nhd-border); }
.nhd-price-row:last-child { border-bottom: none; }
.nhd-price-row.is-inactive { opacity: .6; }
.nhd-price-cell label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--nhd-ink-muted); margin-bottom: 4px; }
.nhd-price-cell--name { grid-column: 1 / -1; order: 1; }
.nhd-price-cell:nth-child(2) { order: 2; }
.nhd-price-cell--sort { order: 3; }
.nhd-price-cell:nth-child(3) { order: 4; grid-column: 1 / -1; }
.nhd-price-cell--active { order: 5; grid-column: 1 / -1; }
.nhd-price-cell--active { display: flex; align-items: flex-end; }
.nhd-price-cell--active > label.nhd-price-check { text-transform: none; font-size: 14px; letter-spacing: 0; color: var(--nhd-ink); font-weight: 600; margin: 0; padding: 10px 0; }
.nhd-price-check { display: inline-flex !important; align-items: center; gap: 8px; cursor: pointer; }
.nhd-price-check input { width: 18px; height: 18px; }
.nhd-price-new { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: end; }
@media (min-width: 900px) {
  .nhd-price-head { display: grid; grid-template-columns: 1fr 120px 170px 80px 80px; gap: 12px; padding: 14px 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--nhd-ink-muted); border-bottom: 1px solid var(--nhd-border); }
  .nhd-price-row { grid-template-columns: 1fr 120px 170px 80px 80px; align-items: center; padding: 10px 0; }
  .nhd-price-cell, .nhd-price-cell--name, .nhd-price-cell--sort, .nhd-price-cell--active, .nhd-price-cell:nth-child(2), .nhd-price-cell:nth-child(3) { order: 0; grid-column: auto; }
  .nhd-price-cell label { display: none; }
  .nhd-price-cell--active > label.nhd-price-check { padding: 0; }
  .nhd-price-new { grid-template-columns: 1fr 120px 170px auto; }
}

/* ---------- Spielplan: Gruppen A/B abwechselnd an 3 Scheiben ---------- */
.nhd-plan { display: flex; flex-direction: column; gap: 18px; }
.nhd-plan-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--nhd-ink-muted); }
.nhd-plan-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--board, var(--nhd-ink)); border: 1px solid var(--board, var(--nhd-border)); background: rgba(255,255,255,.03); }
.nhd-plan-board--links  { --board: #4C8DFF; }
.nhd-plan-board--mitte  { --board: #F0B429; }
.nhd-plan-board--rechts { --board: #2FBF71; }

.nhd-plan-block { background: var(--nhd-surface-100); border: 1px solid var(--nhd-border); border-radius: 16px; padding: 14px; }
.nhd-plan-block.is-current { border-color: var(--nhd-accent-gold); box-shadow: 0 0 0 1px var(--nhd-accent-gold), 0 10px 30px rgba(240,180,41,.12); }
.nhd-plan-block.is-done { opacity: .78; }
.nhd-plan-block__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.nhd-plan-block__no { font-family: var(--nhd-font-display); font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.nhd-plan-block__sub { font-size: 12px; color: var(--nhd-ink-muted); }
.nhd-plan-group { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #fff; }
.nhd-plan-group--a { background: #2B63FF; }
.nhd-plan-group--b { background: #B8860B; }
.nhd-plan-group--c { background: #1E8E5A; }
.nhd-plan-group--d { background: #8B5CF6; }
.nhd-plan-now { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .1em; background: var(--nhd-accent-gold); color: #0B1220; }
.nhd-plan-ok { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--nhd-success-ink); }

.nhd-plan-boards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) {
  .nhd-plan-boards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .nhd-plan-board--links  { grid-column: 1; }
  .nhd-plan-board--mitte  { grid-column: 2; }
  .nhd-plan-board--rechts { grid-column: 3; }
}
.nhd-plan-board { border-radius: 12px; border: 1px solid var(--board); overflow: hidden; background: rgba(255,255,255,.02); }
.nhd-plan-board__label { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--board); background: color-mix(in srgb, var(--board) 14%, transparent); border-bottom: 1px solid var(--board); }
.nhd-plan-board .nhd-quickmatch { border: none; border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nhd-plan-board .nhd-quickmatch__player { padding: 10px 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nhd-plan-finished { padding: 14px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--nhd-success-ink); background: rgba(21,122,66,.15); border: 1px solid var(--nhd-success-ink); }
.nhd-plan-donebox { margin-top: 6px; }
.nhd-plan-donebox > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--nhd-ink-muted); padding: 10px 2px; list-style: none; }
.nhd-plan-donebox > summary::-webkit-details-marker { display: none; }
.nhd-plan-donebox > summary::before { content: '▸ '; }
.nhd-plan-donebox[open] > summary::before { content: '▾ '; }
.nhd-plan-donebox .nhd-plan-block { margin-top: 12px; }

/* ---------- Eintragen (Desktop): alle Personen ohne Scrollen ----------
   Die Zeilenhöhe passt sich an die Fensterhöhe und die Anzahl Personen an
   (--nhd-person-count aus eintragen.php): wenige Personen = grosszügig,
   viele = kompakt, damit möglichst alle auf einen Blick sichtbar sind. */
@media (min-width: 900px) {
  .nhd-erfassung {
    --row-h: clamp(48px, calc((100vh - 330px) / var(--nhd-person-count, 8)), 104px);
    --nhd-icon: clamp(30px, calc(var(--row-h) - 14px), 46px);
    grid-template-columns: 210px repeat(var(--nhd-cat-count), minmax(0, 1fr)) 100px;
    column-gap: 4px;
  }
  .nhd-erfassung__cathead { padding-bottom: 8px; }
  .nhd-erfassung__catname { font-size: 13px; }
  .nhd-erfassung__catprice { font-size: 12px; margin-top: 2px; }
  .nhd-erfassung__totalhead { padding-bottom: 8px; }

  .nhd-erfassung__person {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av name" "av out";
    column-gap: 10px; row-gap: 0; align-content: center; align-items: center; justify-items: start;
    min-height: var(--row-h); padding: 4px 6px; text-align: left;
  }
  .nhd-erfassung__person > .nhd-avatar { grid-area: av; width: 38px !important; height: 38px !important; font-size: 13px !important; }
  .nhd-erfassung__person > span { grid-area: name; font-size: 14px; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nhd-erfassung__person > .nhd-erfassung__checkout { grid-area: out; margin: 0 0 0 -7px; }

  .nhd-erfassung__cell { height: var(--row-h); padding: 0; }
  .nhd-erfassung__cell svg { width: var(--nhd-icon); height: var(--nhd-icon); }
  .nhd-erfassung__badge { top: 50%; transform: translateY(-50%); margin-right: calc(var(--nhd-icon) / -2 - 12px); right: 50%; }
  .nhd-erfassung__total { display: flex; align-items: center; justify-content: flex-end; height: var(--row-h); padding: 0; }
}

/* ---------- Turniere: Vollbildmodus ---------- */
.nhd-page-head__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nhd-page-head__actions .nhd-btn-secondary { width: auto; }
.nhd-fs-bar { display: none; }
.nhd-fs-exit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(11, 18, 32, 0.92); color: var(--nhd-ink);
  border: 1px solid var(--nhd-border);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.nhd-fs-exit:hover { border-color: var(--nhd-accent-gold); }

body.nhd-fs .nhd-topnav,
body.nhd-fs .nhd-bottomnav,
body.nhd-fs .nhd-more-sheet,
body.nhd-fs .nhd-page-head,
body.nhd-fs .nhd-tourney-tabs,
body.nhd-fs .nhd-page-sub { display: none !important; }
body.nhd-fs .nhd-page { padding: 14px 20px 32px !important; }
/* Leiste mit Titel + "Vollbild beenden" klebt oben und verdeckt nichts */
.nhd-page:has(.nhd-fs-bar) { overflow: visible; }
body.nhd-fs .nhd-fs-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 60;
  height: 52px; box-sizing: border-box; padding: 0 4px; margin-bottom: 10px;
  background: rgba(11, 18, 32, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--nhd-border);
}
body.nhd-fs .nhd-fs-bar__title {
  font-family: var(--nhd-font-display); font-weight: 700; font-size: 20px;
  letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (min-width: 900px) {
  body.nhd-fs .nhd-page { padding: 18px 36px 40px !important; }
}

/* ---------- Eintragen: Kategorie-Kopfzeile bleibt beim Scrollen oben ---------- */
.nhd-erfassung-wrap { display: none; }
@media (min-width: 900px) {
  .nhd-erfassung-wrap { display: block; }
  /* .nhd-page und das Raster hatten overflow:auto und würden "sticky" blockieren */
  .nhd-page:has(#erfassung-grid) { overflow: visible; }
  .nhd-erfassung { column-gap: 0; overflow: visible; }
  .nhd-erfassung__head {
    display: grid;
    grid-template-columns: 210px repeat(var(--nhd-cat-count), minmax(0, 1fr)) 100px;
    column-gap: 0;
    align-items: end;
    position: sticky;
    top: 92px; /* direkt unter der Top-Navigation */
    z-index: 5;
    padding-top: 10px;
    background: rgba(11, 18, 32, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--nhd-border);
  }
}

/* ---------- Eintragen: Vollbildmodus ---------- */
@media (min-width: 900px) {
  /* im Vollbild entfällt das Menü: Kopfzeile klebt ganz oben, Zeilen dürfen höher werden */
  body.nhd-fs .nhd-erfassung__head { top: 52px; }
  body.nhd-fs .nhd-erfassung {
    --row-h: clamp(48px, calc((100vh - 190px) / var(--nhd-person-count, 8)), 120px);
  }
}
body.nhd-fs .nhd-eintragen-tools { display: none !important; }

/* ---------- 180er-Erfassung (Eintragen) + 180er-Wertung ---------- */
.nhd-180 { margin-top: 36px; }
.nhd-180__title { margin-bottom: 8px; }
.nhd-180__hint { margin: 0 0 14px; font-size: 12px; color: var(--nhd-ink-muted); }
.nhd-180__hint strong { color: var(--nhd-accent-gold); }
.nhd-180__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.nhd-180__card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--nhd-surface-200); border: 1px solid var(--nhd-border); border-radius: 14px;
  padding: 12px 14px; transition: border-color .2s ease, box-shadow .2s ease;
}
.nhd-180__card.is-flash { border-color: var(--nhd-accent-gold); box-shadow: 0 0 0 2px rgba(240, 180, 41, .25); }
.nhd-180__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nhd-180__name { font-size: 14px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nhd-180__counts { display: flex; gap: 16px; font-size: 12px; color: var(--nhd-ink-muted); }
.nhd-180__counts b { font-family: var(--nhd-font-mono); font-size: 16px; color: var(--nhd-accent-gold); margin-left: 4px; }
.nhd-180__btns { display: flex; gap: 8px; }
.nhd-180__btns button {
  height: 46px; border-radius: 12px; border: 1px solid var(--nhd-border); cursor: pointer;
  font: inherit; font-weight: 800; color: var(--nhd-ink); background: var(--nhd-surface-300);
}
.nhd-180__btns button:disabled { opacity: .5; }
.nhd-180__minus { width: 52px; font-size: 22px; flex-shrink: 0; }
.nhd-180__plus { flex: 1; font-size: 16px; letter-spacing: .03em; background: var(--nhd-brand-blue) !important; border-color: var(--nhd-brand-blue) !important; color: #fff !important; }
.nhd-180__plus:active { filter: brightness(1.15); }
@media (max-width: 899px) {
  .nhd-180__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nhd-180__card { padding: 10px; gap: 8px; }
  .nhd-180__who { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nhd-180__name { white-space: normal; font-size: 13px; }
  .nhd-180__counts { gap: 10px; }
  .nhd-180__btns button { height: 44px; }
  .nhd-180__minus { width: 42px; font-size: 20px; }
  .nhd-180__plus { font-size: 14px; }
}

/* ---------- Turnier-Einstellungen ---------- */
.nhd-hint { font-size: 12px; color: var(--nhd-ink-muted); margin: 6px 0 0; }
.nhd-hint:empty { display: none; }
.nhd-settings-summary { color: var(--nhd-ink-muted); }
.nhd-assign-count-ok { color: var(--nhd-success-ink); }
.nhd-assign-count-warn { color: var(--nhd-accent-gold); }

/* K.o.-Phase: Scheibe pro Partie */
.nhd-ko-legend { margin: 0 0 16px; }
.nhd-bracket__col { width: 270px; }
.nhd-bracket__match.nhd-plan-board { border: 1px solid var(--board); }
.nhd-bracket__match.nhd-plan-board .nhd-plan-board__label { font-size: 10px; letter-spacing: .06em; padding: 6px 10px; gap: 6px; white-space: nowrap; }
.nhd-plan-board__label svg { flex-shrink: 0; }
.nhd-quickmatch-round__matches .nhd-plan-board .nhd-quickmatch { margin: 0; }

/* Buchhaltung: pro Person mit Details */
.nhd-bh-toggle { white-space: nowrap; padding: 7px 14px; font-size: 12px; cursor: pointer; }
.nhd-bh-row.is-open td { background: rgba(255,255,255,.03); }
.nhd-bh-detail[hidden] { display: none; }
.nhd-bh-detail > td { padding: 0 !important; background: rgba(255,255,255,.02); }
.nhd-bh-detail__box { padding: 14px 18px 18px; border-left: 3px solid var(--nhd-accent-gold); }
.nhd-bh-detail__cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nhd-bh-cat { padding: 5px 11px; border-radius: 999px; font-size: 12px; border: 1px solid var(--nhd-border); background: var(--nhd-surface-300); color: var(--nhd-ink); }
.nhd-bh-detail__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nhd-bh-detail__table td { padding: 8px 4px; border-bottom: 1px solid var(--nhd-border); }
.nhd-bh-detail__table tr:last-child td { border-bottom: none; }
.nhd-bh-table .nhd-amount { white-space: nowrap; }
.nhd-bh-toggle { min-width: 92px; text-align: center; }
.nhd-bh-detail__table td:nth-child(2) { text-align: left; }
.nhd-bh-detail__table td:first-child { width: 110px; white-space: nowrap; }
@media (max-width: 640px) {
  .nhd-bh-table > thead th:nth-child(2), .nhd-bh-table > tbody > tr.nhd-bh-row > td:nth-child(2) { display: none; }
  .nhd-bh-table > thead th, .nhd-bh-table > tbody > tr.nhd-bh-row > td { padding-left: 10px; padding-right: 10px; }
  .nhd-bh-toggle { min-width: 0; padding: 7px 10px; }
  .nhd-bh-detail__box { padding: 12px 12px 14px; }
}
@media (max-width: 640px) {
  .nhd-bh-table > thead th:nth-child(3), .nhd-bh-table > tbody > tr.nhd-bh-row > td:nth-child(3) { display: none; }
  .nhd-bh-table { width: 100%; }
  .nhd-bh-detail__table td:first-child { width: 92px; }
}

/* Check-in: Gast löschen (× oben rechts am Avatar) */
.nhd-avatar-tile .nhd-guest-del {
  position: absolute; top: -4px; right: -4px; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: #3A1620; color: #FF8A8A; border: 1px solid #7A2B38; z-index: 2; padding: 0;
}
.nhd-avatar-tile .nhd-guest-del:hover, .nhd-avatar-tile .nhd-guest-del:focus-visible { background: #B3261E; color: #fff; outline: none; }
@media (hover: none) { .nhd-avatar-tile .nhd-guest-del { width: 28px; height: 28px; top: -6px; right: -6px; } }

/* Zahlung: Bezahlt-Knopf pro Person */
.nhd-pay-cell { display: inline-flex; align-items: center; gap: 12px; justify-content: flex-end; }
.nhd-pay-btn { padding: 8px 14px; font-size: 13px; min-height: 0; white-space: nowrap; }
@media (max-width: 480px) {
  .nhd-pay-cell { gap: 8px; }
  .nhd-pay-cell .nhd-amount { font-size: 16px !important; }
  .nhd-pay-btn { padding: 8px 10px; }
}

.nhd-pay-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nhd-pay-table td { vertical-align: middle; }
@media (max-width: 480px) {
  .nhd-pay-table td { padding: 10px 8px; }
  .nhd-pay-table td:first-child { padding-left: 12px; }
  .nhd-pay-table td:last-child { padding-right: 12px; }
  .nhd-pay-name { gap: 8px; }
  .nhd-pay-name .nhd-avatar { width: 32px !important; height: 32px !important; font-size: 11px !important; }
  .nhd-pay-table td:last-child > span:not(.nhd-pay-cell) { font-size: 12px !important; }
}
@media (max-width: 480px) {
  .nhd-pay-cell .nhd-amount { font-size: 14px !important; }
  .nhd-pay-btn { padding: 7px 9px; font-size: 12px; }
  .nhd-pay-cell { gap: 6px; }
  .nhd-pay-name span span:first-child { font-size: 14px; }
  .nhd-pay-table td:last-child > span:not(.nhd-pay-cell) { font-size: 11px !important; gap: 4px !important; }
}
