:root {
  --bg: #f6f7f9;
  --fg: #1c2330;
  --muted: #6b7484;
  --accent: #1f6feb;
  --card: #fff;
  --line: #e2e5ea;
  --plus: #157347;
  --minus: #b42318;
  --warn-bg: #fff4d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d; --fg: #e6e9ef; --muted: #9aa3b2; --accent: #6ea8fe; --card: #1b212b; --line: #2b3340;
    --plus: #4ade80; --minus: #f87171; --warn-bg: #3a3218;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--accent); }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); padding: .75rem 1rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.site-header nav { display: flex; gap: 1rem; align-items: center; }
.brand { font-weight: 700; text-decoration: none; }
.user { color: var(--muted); }
.container { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
h1 { margin: .25rem 0 1rem; font-size: 1.6rem; }
h2 { margin-top: 2rem; font-size: 1.2rem; }
.muted, .hint, .crumb { color: var(--muted); }
.crumb { margin: 0; font-size: .9rem; }
.crumb a { color: inherit; }
.message { padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1rem; background: var(--card); border: 1px solid var(--line); }
.message.warning { background: var(--warn-bg); }
.message.success { border-color: var(--plus); }
.button { display: inline-block; padding: .5rem 1rem; border: 0; border-radius: .5rem; background: var(--accent); color: #fff;
  text-decoration: none; cursor: pointer; font: inherit; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
form.inline { display: inline; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
button.link.danger { color: var(--minus); }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: 1rem; }
.cards { list-style: none; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: .5rem; padding: .75rem 1rem; }
.cards a { text-decoration: none; color: inherit; display: block; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
th, td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 600; }
tr.me td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
tr.inactive td { color: var(--muted); }
.plus { color: var(--plus); font-weight: 600; }
.minus { color: var(--minus); font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: .5rem; padding: .5rem 1rem; display: flex; flex-direction: column; }
.stats strong { font-size: 1.25rem; }
.form { max-width: 34rem; }
.form.compact { margin-top: 1rem; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: .5rem; }
.form > div { margin-bottom: 1rem; }
.form label { display: block; font-weight: 600; margin-bottom: .25rem; }
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; padding: .5rem; font: inherit; border: 1px solid var(--line);
  border-radius: .4rem; background: var(--card); color: var(--fg); }
.form .helptext { display: block; color: var(--muted); font-size: .85rem; }
.form .errorlist { color: var(--minus); list-style: none; padding: 0; margin: 0 0 .25rem; }
@media (max-width: 40rem) {
  table { display: block; overflow-x: auto; }
}

.filter { width: 100%; max-width: 34rem; padding: .5rem; font: inherit; border: 1px solid var(--line); border-radius: .4rem;
  background: var(--card); color: var(--fg); margin-bottom: 1rem; }
.liga-gruppe { background: var(--card); border: 1px solid var(--line); border-radius: .5rem; margin-bottom: .5rem; padding: .25rem 1rem; }
.liga-gruppe summary { cursor: pointer; padding: .4rem 0; font-weight: 600; }
.liga-gruppe ul { columns: 2 16rem; list-style: none; padding: 0 0 .5rem; margin: 0; }
.liga-gruppe li { padding: .15rem 0; break-inside: avoid; }
.badge { font-size: .75rem; padding: .05rem .4rem; border-radius: .4rem; background: var(--warn-bg); }
.choice { display: block; padding: .25rem 0; font-weight: 400 !important; }
.choice input { width: auto !important; margin-right: .5rem; }
