/* =========================================================
   Clubmanager – Badminton-Design
   Hallenboden-Grün, weiße Feldlinien, gelbe Linienmarkierung.
   Anton für Datum & Überschriften, Fira Sans für alles andere.
   ========================================================= */

@font-face { font-family: "Anton"; src: url("fonts/anton-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("fonts/fira-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("fonts/fira-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("fonts/fira-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("fonts/fira-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

[hidden] { display: none !important; }

:root {
  --court: #0e5e47;        /* Hallenboden */
  --court-deep: #0a4636;   /* Kopfzeile */
  --court-ink: #e6f2ec;    /* Text auf Grün */
  --line: #ffffff;         /* Feldlinien */
  --mark: #f5c518;         /* gelbe Markierung: heute, aktiv, Fokus */
  --floor: #eef3f0;        /* Seitenhintergrund */
  --paper: #ffffff;
  --ink: #15241e;
  --muted: #5d6f67;
  --rule: #d8e2dc;
  --ok: #128a55;
  --ok-bg: #e2f4ea;
  --red: #c2352b;
  --red-bg: #fbe9e7;
  --warn-bg: #fff3c4;
  --warn-ink: #7a5600;

  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --text: "Fira Sans", -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-card: 16px;
  --r-ctrl: 10px;
  --shadow: 0 1px 0 rgba(10, 70, 54, .06), 0 6px 18px -10px rgba(10, 70, 54, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.5 var(--text);
  background: var(--floor);
  color: var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--court); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Typografie ---------- */
h1, h2, h3 { line-height: 1.15; }
h1 { font-family: var(--display); font-weight: 400; font-size: 2.25rem; letter-spacing: .01em; margin: 6px 0 12px; }
h2 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; letter-spacing: .01em; margin: 28px 0 12px; }
h3 { font-size: 1.08rem; font-weight: 700; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* ---------- Kopfzeile ---------- */
.topbar {
  background: var(--court-deep);
  color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 3px solid var(--mark);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-size: 1.3rem; letter-spacing: .02em; }
.logo { width: 30px; height: 30px; transform: rotate(-24deg); }
.mainnav { display: flex; align-items: center; gap: 4px; }
.mainnav > a, .mainnav summary, .mainnav .linkbtn {
  color: var(--court-ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 7px 11px; border-radius: 8px; cursor: pointer;
}
.mainnav > a:hover, .mainnav summary:hover, .mainnav .linkbtn:hover { background: rgba(255,255,255,.1); color: #fff; }
.mainnav .current { color: #fff; box-shadow: inset 0 -3px 0 var(--mark); border-radius: 8px 8px 0 0; }
.menu { position: relative; margin-top: 0; }
.menu[open] > summary { margin-bottom: 0; }
.menu summary { list-style: none; display: inline-flex; align-items: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: -4px 0 0 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.menu[open] summary { background: rgba(255,255,255,.12); }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px;
  background: var(--paper); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px -12px rgba(10,70,54,.5);
  display: flex; flex-direction: column;
}
.menu-list a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.menu-list a:hover { background: var(--floor); }
.menu-list a.current { background: var(--ok-bg); color: var(--court); box-shadow: none; border-radius: 8px; }
.pill { display: inline-block; min-width: 20px; text-align: center; background: var(--mark); color: var(--ink); border-radius: 99px; padding: 0 6px; font-size: .78rem; font-weight: 700; line-height: 1.5; }

main { max-width: 760px; margin: 0 auto; padding: 22px 16px 56px; }
body.home main, body.detail main { max-width: none; padding: 0 0 56px; }
.below-court { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- Spielfeld-Bereich ---------- */
.court-hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #137255 0%, var(--court) 55%, #0b513d 100%);
  color: var(--court-ink);
  padding: 26px 16px 30px;
}
.court-lines { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); color: var(--line); opacity: .16; pointer-events: none; }
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.court-hero h1 { color: #fff; font-size: clamp(2.3rem, 8vw, 3.4rem); margin: 0 0 14px; }
.hero-sub { color: #fff; font-size: 1.2rem; margin: 22px 0 10px; }
.hero-empty { color: var(--court-ink); }
.hero-inner > .note { background: rgba(255,255,255,.14); color: #fff; }
.hero-inner > .back, .meta.on-court a { color: #fff; }

/* Gruppen-Filter */
.filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; }
.filter a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 99px; text-decoration: none; font-size: .93rem; font-weight: 500;
  color: #fff; border: 1.5px solid rgba(255,255,255,.45);
}
.filter a:hover { border-color: #fff; }
.filter a.active { background: #fff; border-color: #fff; color: var(--court-deep); }
.below-court .filter a, main > .filter a { color: var(--ink); border-color: var(--rule); background: var(--paper); }
.below-court .filter a.active, main > .filter a.active { background: var(--court); border-color: var(--court); color: #fff; }

/* ---------- Termin-Karten ---------- */
.next-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.event {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px;
  background: var(--paper); color: var(--ink);
  border-radius: var(--r-card); padding: 14px 16px 14px 14px; margin: 0 0 12px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--cat, var(--court));
}
.next-grid .event { margin: 0; }
.event-big { padding: 16px 18px 16px 16px; }
.date-block {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  font-family: var(--display); line-height: 1; padding-top: 2px; color: var(--ink);
}
.date-block .wd { font-size: .95rem; color: var(--muted); }
.date-block .day { font-size: 2.5rem; margin: 2px 0; font-variant-numeric: lining-nums; }
.date-block .mon { font-size: .95rem; color: var(--muted); }
.event-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cat-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--muted); }
.status { font-size: .8rem; font-weight: 700; border-radius: 6px; padding: 3px 9px; background: var(--ok-bg); color: var(--ok); }
.event h3 a { color: inherit; text-decoration: none; }
.event h3 a:hover { text-decoration: underline; }
.event-big h3 { font-size: 1.2rem; }
.meta { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 3px; font-size: .93rem; color: var(--muted); }
.meta li { display: flex; align-items: center; gap: 7px; }
.meta a { color: inherit; }
.mi { width: 15px; height: 15px; flex: none; }
.note { margin: 10px 0 0; padding: 8px 12px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; font-size: .93rem; }

/* Ausfall: deutlich, aber ohne Alarmstimmung */
.event.is-cancelled { background: #fffafa; }
.event.is-cancelled .status { background: var(--red); color: #fff; }
.event.is-cancelled h3 { text-decoration: line-through; text-decoration-color: rgba(194,53,43,.6); text-decoration-thickness: 2px; }
.event.is-cancelled .date-block .day { color: var(--red); }

.action-badge { display: inline-block; margin-top: 10px; padding: 5px 11px; border-radius: 8px; font-size: .85rem; font-weight: 700; text-decoration: none; background: var(--floor); color: var(--muted); }
.action-badge.open { background: var(--mark); color: var(--ink); }
.action-badge:hover { filter: brightness(.96); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--cat, var(--court)); flex: none; }
h3 .dot, h2 .dot, h1 .dot { margin-right: 8px; vertical-align: 2px; }
.dot.x { background: #fff; box-shadow: inset 0 0 0 2px var(--red); position: relative; }
.dot.x::after { content: ""; position: absolute; left: 1px; right: 1px; top: 4px; height: 2px; background: var(--red); transform: rotate(-45deg); }

/* ---------- Kalender ---------- */
.calendar { background: var(--paper); border-radius: var(--r-card); padding: 16px; margin: 22px 0 0; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { margin: 0; font-size: 1.5rem; }
.cal-head h2 span { color: var(--muted); }
.cal-nav { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: var(--floor); color: var(--ink); text-decoration: none; font-size: 1.5rem; line-height: 1; }
.cal-nav:hover { background: var(--rule); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: .8rem; color: var(--muted); font-weight: 500; padding: 2px 0 4px; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 54px; padding: 6px 2px; border-radius: 10px;
  text-decoration: none; color: var(--ink); border: 2px solid transparent;
}
.cal-day:hover { background: var(--floor); }
.cal-day.empty { visibility: hidden; }
.cal-day.past { color: #9aa8a1; }
.cal-day.has { background: #f3f7f5; }
.cal-day .num { font-weight: 500; font-size: .95rem; line-height: 26px; min-width: 26px; text-align: center; border-radius: 99px; }
.cal-day.today .num { background: var(--mark); color: var(--ink); font-weight: 700; }
.cal-day.selected { border-color: var(--court); background: var(--ok-bg); }
.cal-day .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cal-day .dot { width: 8px; height: 8px; }
.cal-day .dot.x::after { top: 3px; }
.legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
.legend .dot + .dot, .legend .dot.x { margin-left: 10px; }
.day-list h2 { margin-top: 26px; }

/* ---------- Termin-Detail ---------- */
.court-hero.slim { padding-bottom: 24px; }
.hero-cancelled { background: radial-gradient(120% 90% at 50% 0%, #7d2a24 0%, #5e1f1a 70%); }
.back { display: inline-block; margin-bottom: 12px; font-weight: 500; text-decoration: none; opacity: .9; }
.detail-head { display: grid; grid-template-columns: 70px 1fr; gap: 16px; align-items: start; }
.detail-head .date-block { background: #fff; border-radius: 12px; padding: 8px 4px 10px; border-left: 5px solid var(--cat); }
.detail-head h1 { margin: 2px 0 6px; font-size: clamp(1.9rem, 7vw, 2.6rem); }
.cat-tag.on-court { color: var(--court-ink); }
.status-line { display: inline-block; margin: 0; font-weight: 700; font-size: .9rem; padding: 3px 10px; border-radius: 6px; background: #fff; color: var(--ok); }
.status-line.is-cancelled { background: var(--red); color: #fff; }
.meta.on-court { color: var(--court-ink); margin-top: 16px; font-size: 1rem; }

/* ---------- Karten, Formulare, Buttons ---------- */
.card { background: var(--paper); border-radius: var(--r-card); padding: 18px 20px; margin: 14px 0; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.narrow { max-width: 430px; margin: 24px auto; }

label { display: block; margin: 12px 0; font-weight: 500; font-size: .93rem; }
label.check { font-weight: 400; display: flex; gap: 9px; align-items: center; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  display: block; width: 100%; margin-top: 5px;
  padding: 11px 13px; font: inherit; font-weight: 400; color: var(--ink);
  border: 1.5px solid #c9d5ce; border-radius: var(--r-ctrl); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--court); box-shadow: 0 0 0 3px rgba(245,197,24,.55); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--court); flex: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid .span2 { grid-column: span 2; }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } .grid .span2 { grid-column: auto; } }

.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--court); color: #fff; padding: 11px 20px; border-radius: var(--r-ctrl);
  text-decoration: none; margin-top: 8px;
}
.btn:hover { background: var(--court-deep); }
.btn.small { padding: 7px 13px; font-size: .9rem; margin-top: 0; background: var(--floor); color: var(--ink); font-weight: 500; }
.btn.small:hover { background: var(--rule); }
.btn.green, .btn.small.green { background: var(--ok); color: #fff; font-weight: 700; }
.btn.green:hover { background: var(--court); }
.btn.red, .btn.small.red { background: var(--red); color: #fff; font-weight: 700; }
.btn.red:hover { background: #a42b23; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: inherit; }
form.inline { display: inline; }
.danger { color: var(--red); margin-top: 12px; }

.flash { padding: 11px 15px; border-radius: 10px; margin: 12px 0; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--red-bg); color: var(--red); }
body.home main > .flash, body.detail main > .flash { max-width: 728px; margin: 14px auto; }

details { margin-top: 14px; }
details summary { cursor: pointer; color: var(--court); font-weight: 500; }
details.card summary { color: var(--ink); }
details[open] > summary { margin-bottom: 8px; }
input[type=color] { padding: 4px; height: 44px; }

/* Passwort anzeigen */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 100px !important; }
.pw-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); margin-top: 2px; border: 0; background: var(--floor); color: var(--ink); font: inherit; font-size: .82rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.forgot { margin: -4px 0 6px; font-size: .9rem; text-align: right; }

/* ---------- Anmeldung: auf dem Spielfeld ---------- */
body.auth {
  min-height: 100vh;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 610 1340' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='white' stroke-opacity='.16' stroke-width='4'%3E%3Crect x='2' y='2' width='606' height='1336'/%3E%3Cline x1='48' y1='2' x2='48' y2='1338'/%3E%3Cline x1='562' y1='2' x2='562' y2='1338'/%3E%3Cline x1='2' y1='670' x2='608' y2='670' stroke-dasharray='10 8'/%3E%3Cline x1='2' y1='472' x2='608' y2='472'/%3E%3Cline x1='2' y1='868' x2='608' y2='868'/%3E%3Cline x1='2' y1='78' x2='608' y2='78'/%3E%3Cline x1='2' y1='1262' x2='608' y2='1262'/%3E%3Cline x1='305' y1='2' x2='305' y2='472'/%3E%3Cline x1='305' y1='868' x2='305' y2='1338'/%3E%3C/g%3E%3C/svg%3E") center 70px / min(92vw, 520px) calc(100% - 100px) no-repeat,
    radial-gradient(120% 80% at 50% 0%, #137255 0%, var(--court) 55%, #0b513d 100%) fixed;
}
body.auth .topbar { background: transparent; border-bottom-color: transparent; justify-content: center; }
body.auth .brand { font-size: 1.6rem; }
body.auth .logo { width: 38px; height: 38px; }
body.auth .card { box-shadow: 0 24px 60px -24px rgba(0,0,0,.55); }
body.auth main > .flash { max-width: 430px; margin: 12px auto; }

/* ---------- Verwaltung ---------- */
.training { position: relative; border-left: 5px solid var(--cat, var(--court)); }
.training.is-cancelled { background: #fffafa; }
.training.is-cancelled h3 { text-decoration: line-through; text-decoration-color: rgba(194,53,43,.6); }
.training.compact { padding: 14px 18px; }
.status-badge { float: right; font-weight: 700; font-size: .8rem; border-radius: 6px; padding: 3px 9px; background: var(--ok-bg); color: var(--ok); }
.is-cancelled .status-badge { background: var(--red); color: #fff; }
.when { margin: 2px 0; color: var(--muted); }
.trainers { margin: 4px 0 0; font-size: .93rem; }
.status-form { margin-top: 10px; }
.status-form input { margin-bottom: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.delete { display: block; margin-top: 10px; font-size: .86rem; }
.actions-link { margin: 10px 0 0; font-size: .92rem; font-weight: 500; }
.day-head { margin-top: 26px; font-size: 1.25rem; }
.day-head .muted { font-family: var(--text); font-size: .9rem; }
.more { display: inline-block; margin-top: 10px; font-size: .9rem; font-weight: 500; }

.cat { border-left: 5px solid var(--cat); }
.cat-head { display: flex; gap: 12px; align-items: flex-start; }
.cat-head .dot { width: 14px; height: 14px; margin-top: 8px; }
.cat-head h2 { margin: 0; }
.cat h3 { font-size: 1rem; margin: 18px 0 6px; }
.chips { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--floor); border-radius: 99px; padding: 4px 6px 4px 12px; font-size: .92rem; }
.chip-x { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--muted); padding: 2px 6px; border-radius: 99px; }
.chip-x:hover { background: var(--red-bg); color: var(--red); }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-form select, .row-form input:not([type=checkbox]):not([type=radio]) { width: auto; flex: 1 1 180px; min-width: 0; max-width: 100%; margin: 0; }
select { max-width: 100%; text-overflow: ellipsis; }
.row-form .or { flex: none; }
select.compact { display: inline-block; width: auto; margin: 0; padding: 6px 8px; font-size: .9rem; }
.role { font-size: .75rem; font-weight: 700; border-radius: 6px; padding: 1px 8px; background: var(--floor); color: var(--muted); }
.role-admin { background: var(--mark); color: var(--ink); }
.role-organizer { background: var(--ok-bg); color: var(--court); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.danger-zone { box-shadow: inset 0 0 0 1.5px #f0c4bf; }
.danger-zone h2 { color: var(--red); }

/* ---------- Aktionen ---------- */
.action { border-top: 4px solid var(--mark); }
.action-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.action-head h3 { margin: 0; font-size: 1.15rem; }
.count { font-size: .85rem; font-weight: 700; border-radius: 6px; padding: 2px 10px; }
.count.open { background: var(--warn-bg); color: var(--warn-ink); }
.count.full { background: var(--ok-bg); color: var(--ok); }
.progress { height: 8px; background: var(--floor); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.supporters { list-style: none; padding: 0; margin: 10px 0; }
.supporters li { padding: 7px 0; border-top: 1px solid var(--rule); }
.supporters li:first-child { border-top: 0; }
.signup { margin-top: 12px; }
.signed { margin: 0 0 6px; color: var(--ok); font-weight: 700; }
fieldset.visibility { border: 1.5px solid var(--rule); border-radius: 12px; padding: 8px 14px; margin: 12px 0; }
fieldset.visibility legend { font-weight: 500; font-size: .93rem; padding: 0 4px; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 10px; margin: 4px 0 10px; }
.pick-list label { margin: 5px 0; }
.pick-list.scroll { max-height: 220px; overflow-y: auto; border: 1.5px solid var(--rule); border-radius: 10px; padding: 4px 10px; }

@media (max-width: 640px) {
  /* Menü über die volle Breite unter der Kopfzeile */
  .menu { position: static; }
  .menu-list { left: 12px; right: 12px; top: calc(100% + 6px); min-width: 0; }
}
@media (max-width: 520px) {
  .topbar { padding-left: 12px; padding-right: 12px; }
  .brand span { font-size: 1.15rem; }
  .mainnav > a, .mainnav summary, .mainnav .linkbtn { padding: 7px 8px; font-size: .9rem; }
  /* Menüpunkte dürfen auf schmalen Handys in eine zweite Zeile umbrechen statt abgeschnitten zu werden */
  .mainnav { flex-wrap: wrap; gap: 2px; }
}
@media (max-width: 400px) {
  .mainnav > a, .mainnav summary, .mainnav .linkbtn { padding: 7px 6px; font-size: .86rem; }
  .menu summary::after { margin-left: 6px; }
  .event { grid-template-columns: 52px 1fr; gap: 10px; }
  .date-block .day { font-size: 2.1rem; }
  .card { padding: 16px; }
}

/* ---------- Listen mit "Ändern" ---------- */
.add-card > summary { list-style: none; display: inline-block; margin: 0; }
.add-card > summary::-webkit-details-marker { display: none; }
.add-card[open] > summary { margin-bottom: 6px; background: var(--floor); color: var(--ink); }
.add-card:not([open]) { background: none; box-shadow: none; padding: 0; }
.loc-list li { align-items: flex-start; }
.loc-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.edit-toggle { margin: 0; }
.edit-toggle > summary { list-style: none; }
.edit-toggle > summary::-webkit-details-marker { display: none; }
.edit-toggle[open] { flex-basis: 100%; }
.edit-toggle[open] > summary { background: var(--court); color: #fff; }
.edit-panel { margin-top: 10px; padding: 4px 14px 10px; border-radius: 12px; background: var(--floor); }

/* ---------- Turniere ---------- */
.tour-cta { margin-top: 18px; background: var(--mark); color: var(--ink); font-size: 1.05rem; padding: 12px 22px; }
.tour-cta:hover { background: #ffd43b; }
.tour-badge { display: inline-block; margin: 10px 8px 0 0; padding: 5px 11px; border-radius: 8px; font-size: .85rem; font-weight: 700; text-decoration: none; background: var(--court); color: #fff; }
.tour-badge.mine { background: var(--ok-bg); color: var(--ok); }
.tour-badge.muted-badge { background: var(--floor); color: var(--muted); }
.tour-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--court); color: #fff; }
.tour-settings { margin-top: 22px; }
.tour-settings h3 { margin-top: 18px; }
.tour-flags .btn { margin-top: 4px; }
.public-link { margin-top: 12px; padding: 4px 14px 10px; background: var(--floor); border-radius: 12px; }
.public-link input { font-size: .9rem; }
.add-event { margin-top: 12px; }
.tour-section h2 { margin-top: 26px; }
.tour-form .tour-option { border: 1.5px solid var(--rule); border-radius: 12px; padding: 4px 14px; margin: 10px 0; }
.tour-option.is-in { border-color: var(--ok); background: #f6fcf8; }
.tour-option .opt-head { margin: 10px 0; }
.opt-note { display: block; color: var(--ok); font-weight: 500; margin: 4px 0 8px; }
.tour-option > .btn { margin: 0 0 12px; }
.partner-fields { margin: 0 0 10px 27px; }
.partner-fields p { margin: 6px 0 0; }
.tour-list-head { font-family: var(--display); font-weight: 400; font-size: 1.25rem; margin: 26px 0 0; }
.tour-event { border-top: 4px solid var(--court); }
.entry-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.seek { display: inline-block; font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--warn-bg); color: var(--warn-ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { align-items: flex-start; font-size: .92rem; margin: 18px 0 6px; }
.consent input { margin-top: 3px; }
.manage-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn.small.tour-manage { background: var(--court); color: #fff; font-weight: 700; }
.btn.small.tour-manage:hover { background: var(--court-deep); }
.deadline-line { margin: 10px 0 0; color: var(--court-ink); font-size: .92rem; }
.deadline-line.closed { display: inline-block; background: rgba(255,255,255,.14); color: #fff; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
fieldset.deadline { border: 1.5px solid var(--rule); border-radius: 12px; padding: 4px 14px 8px; margin: 12px 0; }
fieldset.deadline legend { font-weight: 500; font-size: .93rem; padding: 0 4px; }
.max-input { max-width: 190px; }
.copy-events { margin-top: 10px; }
.full-tag { background: var(--red-bg); color: var(--red); margin-left: 4px; }

/* ---------- Hilfe ---------- */
.help-toc { display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; }
.help-toc a { padding: 5px 0; font-weight: 500; text-decoration: none; }
.help-toc a:hover { text-decoration: underline; }
.toc-group { margin-top: 10px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.toc-group:first-child { margin-top: 0; }
.help-section { scroll-margin-top: 90px; }
.help-section h2 { margin-top: 0; font-size: 1.6rem; }
.help-section h3 { margin: 20px 0 6px; font-size: 1.05rem; }
.help-section ol, .help-section ul { padding-left: 22px; }
.help-section li { margin: 5px 0; }
.help-section .tip { margin: 14px 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); }
.to-top { margin: 14px 0 0; font-size: .85rem; }

/* ---------- Startseite ---------- */
.hero-lead { margin: -6px 0 16px; color: var(--court-ink); font-weight: 500; }
.hero-lead a { color: var(--mark); font-weight: 700; }
.info-board {
  background: var(--paper); color: var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 16px 18px; border-top: 5px solid var(--mark);
}
.info-board h2 { margin: 0 0 8px; }
.info-text p { margin: 0 0 10px; }
.info-text ul { margin: 0 0 10px; padding-left: 20px; }
.info-text a { color: var(--court); font-weight: 500; overflow-wrap: anywhere; }
.info-meta { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.info-meta a { color: var(--court); }
.info-board textarea { min-height: 180px; }
.btn.info-add { background: rgba(255,255,255,.14); color: #fff; margin-top: 0; }
.btn.info-add:hover { background: rgba(255,255,255,.24); }
.btn.ghost { background: transparent; color: var(--court); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn.ghost:hover { background: var(--paper); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head a { color: var(--court); font-weight: 500; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }

/* Aktionen-Karten (Startseite, Aktionen-Seite) */
.help-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px;
  background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 14px 16px 14px 14px; margin: 0 0 12px; border-left: 5px solid var(--cat, var(--court));
}
.help-event { margin: 0; font-size: .88rem; color: var(--muted); }
.help-event a { color: inherit; font-weight: 500; }
.help-card h3 { margin: 2px 0 4px; font-size: 1.15rem; }
.help-card h3 a { color: inherit; text-decoration: none; }
.help-card h3 a:hover { text-decoration: underline; }
.help-desc { margin: 0 0 6px; font-size: .93rem; }
.help-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.help-card .progress { margin: 8px 0; }
.help-card .signed { margin: 8px 0 0; }
.help-card .signed a { font-weight: 500; color: var(--court); margin-left: 4px; }
.help-signup { margin-top: 10px; }
.help-card.is-cancelled { opacity: .75; }
.cancel-tag { color: var(--red); }
@media (max-width: 520px) {
  .help-card { grid-template-columns: 52px 1fr; gap: 10px; }
}

/* Turnier: Export */
.export-card h3 { margin: 0 0 6px; }
.export-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.export-buttons .btn { text-decoration: none; }

/* Turnier: Import */
.import-card textarea { min-height: 160px; font-family: inherit; }
.import-preview { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 12px; }
.import-preview h3 { margin: 0 0 6px; }
.table-wrap { overflow-x: auto; margin: 10px 0 14px; }
.import-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.import-table th, .import-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.import-table th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.import-table tr.skip td { opacity: .6; }
.tag-member { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--court); background: #e3efe9; border-radius: 6px; padding: 1px 6px; margin-left: 2px; white-space: nowrap; }
.import-table .ok { color: var(--court); font-weight: 600; white-space: nowrap; }

/* Turnier: Anwesenheit am Turniertag */
.btn.ci-open { display: inline-block; margin: 0 0 12px; text-decoration: none; }
.btn.yellow { background: var(--mark); color: var(--ink); }
.ci-big { font-family: Anton, sans-serif; font-size: 2.1rem; line-height: 1; color: var(--court); }
.ci-of { font-family: "Fira Sans", sans-serif; font-size: 1rem; color: var(--muted); }
.ci-summary .progress { margin: 10px 0 6px; }
.ci-ready { margin: 6px 0 0; font-weight: 700; color: var(--court); background: #fff6cf; border-radius: 8px; padding: 6px 10px; }
.ci-events { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.ci-events a { color: var(--ink); font-weight: 600; }
.ci-events .ci-evcount { color: var(--muted); }
.ci-evready { background: var(--mark); color: var(--ink); font-size: .75rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.ci-tools { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.ci-tools input[type=search] { width: 100%; font-size: 1.05rem; padding: 10px 12px; }
.ci-event h2 { margin: 18px 0 8px; }
.ci-list { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
.ci-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.ci-row:last-child { border-bottom: 0; }
.ci-row.done { background: #e8f3ed; }
.ci-person {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 8px;
  border: 1.5px solid var(--rule); border-radius: 10px; background: #fff; color: var(--ink);
  font: inherit; font-size: 1rem; cursor: pointer; text-align: left;
}
.ci-person:hover { border-color: var(--court); }
.ci-box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #9fb2a8; flex: none; display: grid; place-items: center; }
.ci-person.on { border-color: var(--court); background: var(--court); color: #fff; }
.ci-person.on .ci-box { border-color: #fff; background: #fff; }
.ci-person.on .ci-box::after { content: "✓"; color: var(--court); font-weight: 800; font-size: 15px; line-height: 1; }
.ci-seeking { margin-left: 4px; }
.ci-filter { margin: 0; }
.ci-filter a { color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule); }
.ci-filter a.active { background: var(--court); border-color: var(--court); color: #fff; }
.ci-event h2 .ci-evcount { font-family: "Fira Sans", sans-serif; font-size: .9rem; font-weight: 500; color: var(--muted); }

/* Turnier: kompakte Teilnehmerliste mit Ändern-Symbol */
.entry-list { list-style: none; margin: 4px 0 0; padding: 0; }
.entry-list .entry-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px;
  padding: 3px 0; border-top: 1px solid var(--rule); line-height: 1.35; font-size: .95rem;
}
.entry-list .entry-row:first-child { border-top: 0; }
.entry-nr { flex: 0 0 1.7em; text-align: right; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.entry-names { flex: 1 1 0; min-width: 0; }
.entry-names .seek { font-size: .72rem; padding: 0 6px; vertical-align: 1px; }
.entry-edit { margin: 0; flex: none; }
.entry-edit > summary {
  list-style: none; cursor: pointer; color: var(--muted); font-size: .95rem; line-height: 1;
  padding: 3px 6px; border-radius: 6px; margin: 0;
}
.entry-edit > summary::-webkit-details-marker { display: none; }
.entry-edit > summary:hover, .entry-edit[open] > summary { background: #e3efe9; color: var(--court); }
.entry-edit[open] { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-end; }
.entry-edit[open] > summary { order: -1; margin-top: -1.55em; }
.entry-edit-form, .entry-remove { align-self: stretch; }
.entry-edit-form { background: var(--bg, #eef3f0); border-radius: 10px; padding: 10px 12px; margin: 6px 0 2px; }
.entry-edit-form label { margin-bottom: 8px; }
.entry-remove { text-align: right; margin: 0 0 6px; }
@media (min-width: 700px) {
  .entry-list.two-col { column-count: 2; column-gap: 28px; }
  .entry-list.two-col .entry-row { break-inside: avoid; }
  .entry-list.two-col .entry-row:first-child { border-top: 1px solid var(--rule); }
}

/* Anwesenheit: kompakte Zeilen (eine Zeile pro Meldung, Namen nebeneinander) */
.ci-event h2 { margin: 14px 0 6px; font-size: 1.25rem; }
.ci-list { display: grid; grid-template-columns: 1fr; }
.ci-row {
  display: grid; grid-template-columns: 1.6em minmax(0, 1fr); align-items: center; gap: 4px;
  padding: 2px 8px 2px 4px; border-bottom: 1px solid var(--rule); flex-wrap: nowrap;
}
.ci-row.pair { grid-template-columns: 1.6em minmax(0, 1fr) minmax(0, 1fr); }
.ci-row.done { background: #e8f3ed; }
.ci-nr { color: var(--muted); font-size: .75rem; text-align: right; font-variant-numeric: tabular-nums; }
.ci-person {
  min-height: 36px; padding: 4px 6px; gap: 7px; border: 0; border-radius: 8px;
  background: transparent; font-size: .93rem; width: 100%; min-width: 0;
}
.ci-person:hover { background: #eef3f0; }
.ci-name { min-width: 0; line-height: 1.2; overflow-wrap: anywhere; }
.ci-box { width: 19px; height: 19px; border-radius: 5px; }
.ci-person.on { background: transparent; color: var(--ink); border: 0; }
.ci-person.on .ci-name { font-weight: 600; }
.ci-person.on .ci-box { background: var(--court); border-color: var(--court); }
.ci-person.on .ci-box::after { color: #fff; font-size: 13px; }
.ci-seeking { color: var(--muted); font-size: .8rem; padding-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-summary { padding-top: 12px; padding-bottom: 12px; }
.ci-big { font-size: 1.8rem; }
@media (min-width: 760px) {
  .ci-list { grid-template-columns: 1fr 1fr; column-gap: 0; }
  .ci-list .ci-row:nth-child(odd) { border-right: 1px solid var(--rule); }
}
@media (min-width: 1200px) {
  .ci-list { grid-template-columns: 1fr 1fr 1fr; }
  .ci-list .ci-row { border-right: 1px solid var(--rule); }
}
.ci-row[hidden], .ci-event[hidden] { display: none; }
/* Anwesenheit: mehr Platz für Namen, Umbruch nur zwischen Wörtern bzw. am Bindestrich */
.ci-name { overflow-wrap: break-word; word-break: normal; hyphens: manual; }
.ci-row { grid-template-columns: 1.25em minmax(0, 1fr); gap: 2px; padding: 2px 4px 2px 2px; }
.ci-row.pair { grid-template-columns: 1.25em minmax(0, 1fr) minmax(0, 1fr); }
.ci-person { gap: 6px; padding: 4px 4px; }
.ci-box { width: 17px; height: 17px; }
.ci-person.on .ci-box::after { font-size: 12px; }
@media (max-width: 420px) {
  .ci-person { font-size: .88rem; }
  .ci-nr { font-size: .68rem; }
  main.page-checkin, .ci-list { margin-left: -6px; margin-right: -6px; }
}
.ci-person.on .ci-name { font-weight: 400; color: var(--court); }

/* Verlosung */
.ra-stage { margin: 8px 0 14px; border-radius: var(--r-card); overflow: hidden; }
.ra-stage .hero-inner { text-align: center; padding: 34px 16px 38px; }
.ra-round { margin: 0 0 6px; color: var(--mark); font-weight: 700; letter-spacing: .02em; min-height: 1.4em; }
.ra-name {
  margin: 0; font-family: Anton, sans-serif; color: #fff; line-height: 1.1;
  font-size: clamp(2rem, 9vw, 4.2rem); min-height: 1.15em; overflow-wrap: break-word;
}
.ra-spin .ra-name { opacity: .85; }
.ra-win .ra-name { animation: ra-pop .5s ease-out; color: var(--mark); }
@keyframes ra-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ra-win .ra-name { animation: none; } }
.ra-controls .ra-go { width: 100%; font-size: 1.25rem; padding: 14px; margin-top: 4px; }
.ra-controls .ra-go:disabled { opacity: .5; cursor: not-allowed; }
.ra-left { margin: 10px 0 0; text-align: center; }
.ra-list { list-style: none; padding: 0; margin: 0; }
.ra-list li { padding: 6px 0; border-top: 1px solid var(--rule); }
.ra-list li:first-child { border-top: 0; }
.ra-r { display: inline-block; min-width: 5.2em; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ra-admin { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; margin-top: 10px; }
.ra-admin[hidden] { display: none; }
/* Verlosung: Ausschluss */
.ra-excl > summary { cursor: pointer; }
.ra-ex-search { width: 100%; margin: 6px 0 8px; }
.ra-ex-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; max-height: 360px; overflow-y: auto; margin-bottom: 12px; border: 1px solid var(--rule); border-radius: 10px; padding: 4px 8px; }
.ra-ex { display: flex; gap: 7px; align-items: center; padding: 5px 0; font-size: .92rem; line-height: 1.2; cursor: pointer; }
.ra-ex[hidden] { display: none; }
.ra-ex input { flex: none; width: 18px; height: 18px; margin: 0; }
.ra-ex.drawn { color: var(--muted); }
@media (min-width: 760px) { .ra-ex-list { grid-template-columns: 1fr 1fr 1fr; } }
.ra-ex { font-weight: 400; }

/* ---------- Zu-/Absage zum Training ---------- */
.attend { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.attend-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.attend-q { font-weight: 700; flex: 1 1 auto; min-width: 9em; }
.attend.unanswered .attend-q { color: var(--court); }
.attend-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.att-btn {
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  min-height: 42px; padding: 8px 14px; border-radius: var(--r-ctrl);
  border: 2px solid var(--rule); background: var(--paper); color: var(--ink);
}
.att-btn:hover { border-color: var(--muted); }
.att-btn:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
.att-yes { border-color: var(--ok); color: var(--ok); }
.att-no { color: var(--red); border-color: #e7b9b4; }
.att-yes[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.att-no[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.attend.unanswered .att-yes { background: var(--ok-bg); }
.attend-line { margin: 8px 0 0; font-size: .92rem; color: var(--muted); }
.attend-line a { color: inherit; text-decoration: none; }
.attend-line a:hover { text-decoration: underline; }
.att-names { overflow-wrap: break-word; }
.att-count.yes { color: var(--ok); }
.att-count.no { color: var(--red); }
.attend-lists p { margin: 8px 0 0; overflow-wrap: break-word; }
.attend-card .attend { border-top: 0; margin-top: 0; padding-top: 0; }
.attend-card h2 { margin-top: 0; }
#training .section-head h2 { color: var(--court); }
.attend-hint {
  display: inline-block; margin: 10px 0 14px; padding: 8px 14px; border-radius: 999px;
  background: var(--mark); color: #1b1b1b; font-weight: 700; text-decoration: none;
}
.attend-hint:hover { background: #ffd84a; }
.event.is-cancelled .attend { display: none; }
@media (max-width: 420px) {
  .attend-btns { width: 100%; }
  .att-btn { flex: 1 1 0; padding: 8px 6px; font-size: .9rem; white-space: nowrap; }
}

/* Kompakte Trainingszeilen auf der Startseite („Training – bist du dabei?“) */
.att-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.att-row {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "info count" "form form";
  gap: 5px 10px; align-items: center;
  background: var(--paper); border-radius: 12px; box-shadow: var(--shadow);
  border-left: 5px solid var(--cat, var(--court)); padding: 7px 10px 8px 12px;
}
.att-row-info { grid-area: info; min-width: 0; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; }
.att-row-info:hover .att-row-title { text-decoration: underline; }
.att-row-when { font-size: .85rem; color: var(--muted); }
.att-row-when strong { color: var(--ink); }
.att-row-title { font-weight: 700; overflow-wrap: break-word; }
.att-row-count { grid-area: count; text-align: right; font-size: .85rem; color: var(--muted); text-decoration: none; line-height: 1.2; white-space: nowrap; }
.att-row-count strong { color: var(--ok); font-size: 1.05rem; }
.att-row-no { display: block; color: var(--red); }
.att-row-form { grid-area: form; display: flex; gap: 8px; margin: 0; }
.att-row .att-btn { min-height: 34px; padding: 4px 12px; font-size: .9rem; white-space: nowrap; }
.att-row.unanswered { box-shadow: var(--shadow), inset 0 0 0 2px var(--mark); }
@media (max-width: 520px) {
  .att-row-form .att-btn { flex: 1 1 0; padding: 5px 6px; }
}
@media (min-width: 640px) {
  .att-row { grid-template-columns: 1fr auto auto; grid-template-areas: "info count form"; padding: 8px 12px; }
}

/* Vorschau „Ansicht als Nutzer“ für Admins */
.preview-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px;
  background: var(--mark); color: #1b1b1b; padding: 8px 16px; font-size: .92rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.preview-bar form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.preview-bar .linkbtn { color: #1b1b1b; text-decoration: underline; }
.preview-bar .btn.small { background: #1b1b1b; color: #fff; font-weight: 700; }
.preview-bar .btn.small:hover { background: #000; }
.menu-list a.menu-preview-link { margin-top: 6px; border-top: 1px solid var(--rule); border-radius: 0 0 8px 8px; padding-top: 12px; }
