/* Hallen-Tauschbörse */
:root {
  --bg: #f2f1eb;
  --surface: #ffffff;
  --surface-2: #f7f6f1;
  --ink: #0f1e2c;
  --ink-2: #3f4c59;
  --muted: #76818c;
  --line: #e4e2d8;
  --line-2: #d5d2c6;
  --court: #1f5c94;
  --court-in: #2569a6;
  --court-deep: #113a61;
  --ball: #d6f24a;
  --ball-2: #c4e432;
  --ball-ink: #273300;
  --ok: #17895a;
  --ok-bg: #e2f4ea;
  --warn: #c2620a;
  --warn-bg: #fcefdf;
  --gap: #cf3442;
  --gap-bg: #fbe6e7;
  --focus: #2569a6;
  --shadow-s: 0 1px 2px rgba(15, 30, 44, .06);
  --shadow: 0 1px 2px rgba(15, 30, 44, .05), 0 6px 20px rgba(15, 30, 44, .06);
  --shadow-l: 0 10px 40px rgba(15, 30, 44, .18);
  --r: 18px;
  --r-s: 12px;
  --nav-h: 66px;
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-d: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a131c;
    --surface: #111d29;
    --surface-2: #162533;
    --ink: #e8eef3;
    --ink-2: #b4c0cb;
    --muted: #7d8c99;
    --line: #1f3143;
    --line-2: #2a4157;
    --court: #1b5487;
    --court-in: #21639f;
    --court-deep: #0d2f4f;
    --ok: #4fcf8f;
    --ok-bg: rgba(46, 170, 110, .16);
    --warn: #f0a04b;
    --warn-bg: rgba(230, 140, 40, .15);
    --gap: #ff6b74;
    --gap-bg: rgba(230, 70, 80, .16);
    --focus: #7fb6ec;
    --shadow-s: none;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-l: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.busy { cursor: progress; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
}

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand svg { flex: none; }
.brand b { display: block; font: 750 18px/1.1 var(--font-d); letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: 12.5px; }
.me-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow-s);
}
.me-btn.none { padding: 7px 14px; }

/* ---------- Avatare ---------- */
.av {
  --h: 210;
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: hsl(var(--h) 60% 90%);
  color: hsl(var(--h) 50% 28%);
  font: 700 14px/1 var(--font-d);
  letter-spacing: -.02em;
}
.av svg { width: 56%; height: 56%; }
.av.s { width: 26px; height: 26px; font-size: 11.5px; }
.av.l { width: 46px; height: 46px; font-size: 18px; }
.av.xl { width: 60px; height: 60px; font-size: 23px; }
.av.me { box-shadow: 0 0 0 2.5px var(--surface), 0 0 0 5px var(--ball-2); }
.av.guest { background: var(--surface-2); color: var(--ink-2); border: 1.5px dashed var(--line-2); }
.av.free { background: transparent; color: var(--gap); border: 2px dashed currentColor; }
@media (prefers-color-scheme: dark) {
  .av { background: hsl(var(--h) 32% 26%); color: hsl(var(--h) 75% 84%); }
}

/* ---------- Abschnitte & Karten ---------- */
.hello { margin: 8px 2px 14px; }
.hello h1 { margin: 0; font: 750 26px/1.15 var(--font-d); letter-spacing: -.025em; }
.hello p { margin: 4px 0 0; color: var(--muted); }

.sec { margin: 26px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec h2 { margin: 0; font: 700 13px/1.2 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sec a, .sec button.link { font-size: 14px; }
.link { background: none; border: 0; padding: 0; color: var(--court); font-weight: 600; text-decoration: none; }
@media (prefers-color-scheme: dark) { .link { color: #8cc1f2; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.list { display: flex; flex-direction: column; overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; width: 100%;
  background: none; border: 0; text-align: left;
}
button.row:hover { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 650; }
.row .sub { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--line-2); flex: none; }

.dateblock {
  flex: none; width: 48px; text-align: center;
  border-radius: 12px; padding: 5px 0 6px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.dateblock .wd { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dateblock .dn { display: block; font: 750 19px/1.05 var(--font-d); letter-spacing: -.02em; }
.dateblock .mo { display: block; font-size: 11px; color: var(--muted); }

/* ---------- Status-Pillen ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.gap { background: var(--gap-bg); color: var(--gap); border-color: transparent; }
.pill.ball { background: var(--ball); color: var(--ball-ink); border-color: transparent; }
.pill svg { width: 13px; height: 13px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink);
  font-weight: 650; font-size: 15px; line-height: 1.2;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
a.btn { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.ball { background: var(--ball); color: var(--ball-ink); border-color: var(--ball-2); box-shadow: 0 2px 0 var(--ball-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.danger { color: var(--gap); }
.btn.s { min-height: 36px; padding: 7px 14px; font-size: 14px; }
.btn.icon { width: 40px; min-height: 40px; padding: 0; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns.end { justify-content: flex-end; }

/* ---------- Hero: nächstes Spiel ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(160deg, var(--court) 0%, var(--court-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 34px -14px rgba(17, 58, 97, .55);
}
.hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .72; }
.hero h2 { margin: 3px 0 0; font: 750 24px/1.12 var(--font-d); letter-spacing: -.02em; }
.hero .when { margin-top: 2px; opacity: .8; font-size: 14.5px; }
.hero .rel {
  flex: none; margin-top: 2px;
  background: var(--ball); color: var(--ball-ink);
  padding: 5px 11px; border-radius: 999px; font-weight: 750; font-size: 13.5px;
}
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .12); color: inherit;
}
.icon-btn svg { width: 20px; height: 20px; }

.court { position: relative; margin: 8px 12px 0; }
.court svg.lines { display: block; width: 100%; height: auto; }
.court .spot {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 30%; text-align: center;
  background: none; border: 0; color: #fff; padding: 0;
}
.court .spot .av { box-shadow: 0 3px 10px rgba(0, 0, 0, .25); background: hsl(var(--h) 62% 91%); color: hsl(var(--h) 50% 27%); }
.court .spot .av.guest { background: #fff; color: var(--court-deep); border: 0; }
.court .spot .av.me { box-shadow: 0 0 0 2.5px var(--court), 0 0 0 5px var(--ball); }
.court .spot .nm {
  font-weight: 700; font-size: 13.5px; line-height: 1.1;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.court .spot .face { position: relative; display: inline-block; }
.court .spot .tag {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 750; letter-spacing: .02em; white-space: nowrap;
  padding: 1px 7px; border-radius: 999px; background: #fff; color: var(--court-deep);
}
.court .spot .tag + * { margin-top: 4px; }
.court .spot.open .av { background: rgba(255, 255, 255, .08); color: #fff; border: 2px dashed rgba(255, 255, 255, .85); box-shadow: none; animation: breathe 2.2s ease-in-out infinite; }
.court .spot.tausch .av { outline: 2px dashed var(--ball); outline-offset: 3px; }
.court .spot.tausch .tag { background: var(--ball); color: var(--ball-ink); }
@keyframes breathe { 50% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .court .spot.open .av { animation: none; } }

.hero-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 10px 10px 10px; padding: 10px 10px 10px 14px;
  border-radius: 16px; background: rgba(5, 25, 45, .35);
}
.hero-foot .st { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 15px; }
.hero-foot .st small { display: block; font-weight: 500; opacity: .75; font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #4fd18d; box-shadow: 0 0 0 4px rgba(79, 209, 141, .22); }
.dot.warn { background: var(--ball); box-shadow: 0 0 0 4px rgba(214, 242, 74, .22); }
.dot.gap { background: #ff7a83; box-shadow: 0 0 0 4px rgba(255, 122, 131, .25); }
.hero .btn { border-color: transparent; }
.hero .btn.glass { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------- Hinweis-Karten ("Für dich") ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.note .ic {
  flex: none; width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2);
}
.note .ic svg { width: 19px; height: 19px; }
.note.req .ic { background: var(--ball); color: var(--ball-ink); }
.note.gap .ic { background: var(--gap-bg); color: var(--gap); }
.note.swap .ic { background: var(--warn-bg); color: var(--warn); }
.note .body { flex: 1; min-width: 0; }
.note .body p { margin: 0 0 10px; }
.note .body p small { color: var(--muted); display: block; margin-top: 2px; font-size: 13.5px; }

/* ---------- Plan ---------- */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  margin: 6px 0 4px;
}
.seg button {
  flex: 1; border: 0; background: none; border-radius: 999px;
  padding: 8px 10px; font-weight: 650; font-size: 14px; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s), 0 0 0 1px var(--line); }

.month { margin: 22px 4px 8px; font: 700 13px/1.2 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.match {
  display: flex; gap: 12px; align-items: center; width: 100%;
  padding: 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); text-align: left;
}
.match.past { opacity: .55; box-shadow: none; background: transparent; }
.match.next { border-color: var(--court); box-shadow: 0 0 0 1px var(--court), var(--shadow); }
.match .names { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.match .names .nm-chip { padding-right: 7px; gap: 6px; }
.nm-chip {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 3px 9px 3px 3px; border-radius: 999px;
  background: var(--surface-2); font-size: 14px; font-weight: 600;
}
.nm-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-chip.me { background: var(--ball); color: var(--ball-ink); }
.nm-chip.me .av { background: rgba(255, 255, 255, .65); color: var(--ball-ink); }
.nm-chip.tausch { background: var(--warn-bg); color: var(--warn); outline: 1.5px dashed currentColor; outline-offset: -1.5px; }
.nm-chip.frei { background: var(--gap-bg); color: var(--gap); outline: 1.5px dashed currentColor; outline-offset: -1.5px; }
.nm-chip.guest { font-style: italic; }
.match .mark { flex: none; width: 22px; display: grid; place-items: center; }
.match .mark svg { width: 18px; height: 18px; }
.tagline { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--court); margin-bottom: 2px; }
@media (prefers-color-scheme: dark) { .tagline { color: #8cc1f2; } }

/* ---------- Börse ---------- */
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 15px; color: var(--ink-2); }
.steps li::before {
  counter-increment: s; content: counter(s);
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ball); color: var(--ball-ink); font-weight: 750; font-size: 13.5px;
}
.steps b { color: var(--ink); }

.offer { padding: 14px; }
.offer + .offer { border-top: 1px solid var(--line); }
.offer .head { display: flex; align-items: center; gap: 12px; }
.offer .head .grow { flex: 1; min-width: 0; }
.offer .head .t { font-weight: 650; }
.offer .head .sub { color: var(--muted); font-size: 14px; }
.offer .btns { margin-top: 12px; }
.meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--warn); border-radius: 4px; }

.empty {
  text-align: center; padding: 34px 20px; color: var(--muted);
}
.empty svg { width: 56px; height: 56px; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }

/* ---------- Team ---------- */
.stat { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.stat .grow { flex: 1; min-width: 0; }
.stat .t { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.bar { display: flex; height: 7px; border-radius: 7px; background: var(--surface-2); overflow: hidden; margin-top: 6px; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; }
.bar i.played { background: var(--court); }
.bar i.up { background: var(--ball-2); }
.stat .num { text-align: right; font: 750 20px/1 var(--font-d); }
.stat .num small { display: block; font: 600 12px/1.3 var(--font); color: var(--muted); }
.delta { font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.delta.plus { color: var(--ok); background: var(--ok-bg); }
.delta.minus { color: var(--warn); background: var(--warn-bg); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); padding: 10px 14px 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.log { padding: 4px 0; }
.log .ev { display: flex; gap: 12px; padding: 10px 14px; }
.log .ev .txt { flex: 1; min-width: 0; font-size: 14.5px; }
.log .ev .txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.log .ev.undone .txt span { text-decoration: line-through; color: var(--muted); }

/* ---------- Bottom-Navigation ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 0 12px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-top: 1px solid var(--line);
}
.nav-in { max-width: 600px; margin: 0 auto; display: flex; height: var(--nav-h); }
.nav button {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--muted);
  font-size: 11.5px; font-weight: 650;
}
.nav button svg { width: 24px; height: 24px; }
.nav button[aria-current="page"] { color: var(--ink); }
.nav button[aria-current="page"] .ni { background: var(--ball); color: var(--ball-ink); }
.nav .ni { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .2s; }
.badge {
  position: absolute; top: 6px; left: calc(50% + 10px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--gap); color: #fff; font-size: 11px; font-weight: 750;
  display: grid; place-items: center; border: 2px solid var(--surface);
}

/* ---------- Bottom-Sheet ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(8, 18, 28, .45);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 600px; margin: 0 auto;
  max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-l);
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet.on { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 2px auto 12px; }
.sheet h3 { margin: 0; font: 750 22px/1.2 var(--font-d); letter-spacing: -.02em; }
.sheet .lead { margin: 4px 0 16px; color: var(--muted); }
.sheet .close { position: absolute; right: 12px; top: 12px; background: var(--surface-2); color: var(--ink-2); }
.sheet hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.sheet p { margin: 0 0 12px; }
.hint { font-size: 14px; color: var(--muted); }
.hint.box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; }

.slot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
}
.slot + .slot { border-top: 1px solid var(--line); }
.slot .grow { flex: 1; min-width: 0; }
.slot .t { font-weight: 650; }
.slot .sub { color: var(--muted); font-size: 14px; }
.slot .btns { flex: none; }
.slot.stack { flex-wrap: wrap; }
.slot.stack .btns { width: 100%; padding-left: 46px; }

.choice { display: grid; gap: 10px; margin-bottom: 16px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  padding: 14px; border-radius: 16px;
  background: var(--surface); border: 1.5px solid var(--line);
}
.opt[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.opt .radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); margin-top: 2px; display: grid; place-items: center; }
.opt[aria-checked="true"] .radio { border-color: var(--ink); }
.opt[aria-checked="true"] .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.opt b { display: block; font-size: 16px; }
.opt span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.opt[disabled] { opacity: .5; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums;
}
.chip small { color: var(--muted); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ball); color: var(--ball-ink); border-color: var(--ball-2); }
.chip[aria-pressed="true"]::before { content: "✓"; font-weight: 800; margin-right: -1px; }
.chip[aria-pressed="false"] { color: var(--muted); }
.chips-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.chips-head b { font-size: 15px; }

.pick { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.pick button {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface);
}
.pick button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pick .grow { flex: 1; min-width: 0; }
.pick .t { font-weight: 650; }
.pick .sub { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.swapline {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line);
  margin-bottom: 14px; font-weight: 650; text-align: center;
}
.swapline .side { flex: 1; }
.swapline .side small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.swapline svg { width: 22px; height: 22px; color: var(--muted); flex: none; }

.field { display: flex; gap: 8px; margin-top: 10px; }
.field input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--surface);
}
.done-ic {
  width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 12px;
  display: grid; place-items: center; background: var(--ball); color: var(--ball-ink);
}
.done-ic svg { width: 32px; height: 32px; }
.center { text-align: center; }

select.admin {
  margin-top: 6px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
}

/* ---------- Namenswahl ---------- */
.who { padding: 10px 2px 0; }
.who h3 { text-align: center; margin-top: 4px; }
.who .lead { text-align: center; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.who-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px 9px; border-radius: 16px; font-size: 15px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 650;
}
.who-grid button:hover { border-color: var(--line-2); background: var(--surface-2); }
.who-grid button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.nm-chip .av.me { box-shadow: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: calc(100vw - 32px);
  padding: 11px 12px 11px 16px; border-radius: 16px;
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-l); font-weight: 600; font-size: 14.5px;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.sheet-open .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top)); transform: translate(-50%, -20px); }
body.sheet-open .toast.on { transform: translate(-50%, 0); }
.toast.err { background: var(--gap); color: #fff; }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: inherit; padding: 6px 12px; border-radius: 10px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .toast button { background: rgba(0, 0, 0, .12); } }

/* ---------- Sonstiges ---------- */
.foot { margin: 30px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.gate { min-height: 80dvh; display: grid; place-items: center; text-align: center; padding: 20px; }
.gate h1 { font: 750 24px/1.2 var(--font-d); margin: 16px 0 6px; }
.gate p { color: var(--muted); max-width: 320px; margin: 0 auto; }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } .sheet { transition: none; } }

@media (min-width: 640px) {
  .app { padding-top: 6px; }
  .court .spot .av.l { width: 58px; height: 58px; font-size: 22px; }
  .court .spot .nm { font-size: 15px; }
  .hello h1 { font-size: 30px; }
}

.empty > svg { display: block; margin: 0 auto 8px; }

/* Hilfe unten in der Börse – nur bei Bedarf */
.help { margin: 30px 0 0; text-align: center; }
.help summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
}
.help summary::-webkit-details-marker { display: none; }
.help summary svg { width: 16px; height: 16px; }
.help summary:hover, .help[open] summary { color: var(--ink-2); background: var(--surface-2); }
.help .steps { text-align: left; margin-top: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* Schalter (Benachrichtigungen) */
.switches { margin: 2px 0 12px; }
.switch-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 11px 0;
}
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row b { display: block; font-size: 15px; }
.switch-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.switch { flex: none; position: relative; width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); transition: background .2s; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.switch-row[aria-checked="true"] .switch { background: var(--ok); }
.switch-row[aria-checked="true"] .switch::after { transform: translateX(18px); }
