/* SK United – Gestaltung. Farben aus dem Vereinslogo gemessen: Anthrazit #58525A, Limette #D4F850 */
:root {
  --lime: #d4f850;
  --lime-strong: #b9e021;
  --lime-ink: #1d2203;
  --anthra: #58525a;
  --bg: #f3f4ef;
  --bg-2: #e9ebe3;
  --card: #ffffff;
  --card-2: #f6f7f2;
  --line: #e1e3da;
  --text: #1d1b1f;
  --muted: #6c6870;
  --accent-text: #4d6400;   /* Limette auf hellem Grund ist zu blass – dunklere Schwester für Text */
  --ok: #2e8b3d;
  --maybe: #c98a00;
  --no: #c8402f;
  --shadow: 0 1px 2px rgba(20, 20, 30, .06), 0 6px 20px rgba(20, 20, 30, .06);
  --radius: 18px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121114;
  --bg-2: #1a191d;
  --card: #1e1c21;
  --card-2: #26242a;
  --line: #322f36;
  --text: #f1f1ec;
  --muted: #a39fa7;
  --accent-text: var(--lime);
  --ok: #57c46a;
  --maybe: #f0b429;
  --no: #ff6b5a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- Überschriften im Poster-Stil ---------- */
.poster {
  font-weight: 900; font-style: italic; text-transform: uppercase;
  letter-spacing: -.01em; line-height: .95;
}

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 10px) 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);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .logo { width: 36px; height: 36px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 1px var(--line); object-fit: contain; }
.topbar .brand { flex: 1; min-width: 0; }
.topbar .brand b { display: block; font-size: 17px; }
.topbar .brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }

/* ---------- Inhalt ---------- */
main { padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 28px); max-width: 720px; margin: 0 auto; }
.view { animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Titelbild je Bereich */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; margin: 6px 0 18px;
  min-height: 132px; padding: 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(120% 140% at 100% 0%, #3d3a40 0%, #19171b 60%) #19171b;
  color: #fff;
  box-shadow: var(--shadow);
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,9,12,.85) 0%, rgba(10,9,12,.55) 45%, rgba(10,9,12,0) 75%), linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.6) 100%); }
.hero h1, .hero p { text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.hero p { max-width: 62%; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 0; font-size: 34px; }
.hero h1 em { color: var(--lime); font-style: inherit; }
.hero p { margin: 6px 0 0; color: rgba(255,255,255,.82); font-size: 14px; }
.hero .stripe { position: absolute; z-index: 1; right: -30px; top: 18px; width: 180px; height: 12px; background: var(--lime); transform: rotate(-24deg); border-radius: 8px; opacity: .9; }
.hero.has-img .stripe { display: none; }

/* Abschnittsüberschrift */
.sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 2px 10px; }
.sec h2 { margin: 0; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }

/* Karten */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--line);
}
.card.tap { cursor: pointer; transition: transform .12s; }
.card.tap:active { transform: scale(.985); }
.card.cancelled { opacity: .6; }
.card h3 { margin: 0 0 4px; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.stack > * + * { margin-top: 10px; }
.empty { text-align: center; color: var(--muted); padding: 26px 12px; }
.empty .big { font-size: 36px; margin-bottom: 6px; }

/* Datumsblock links in Terminkarten */
.datebox {
  flex: none; width: 58px; text-align: center; border-radius: 14px; padding: 7px 0 6px;
  background: var(--card-2); border: 1px solid var(--line);
}
.datebox .wd { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--accent-text); letter-spacing: .05em; }
.datebox .d { font-size: 24px; font-weight: 900; line-height: 1; margin-top: 2px; }
.datebox .m { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.datebox.today { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.datebox.today .wd, .datebox.today .m { color: var(--lime-ink); }

/* Knöpfe */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 14px;
  font-weight: 700; font-size: 15px;
  background: var(--card-2); color: var(--text); border: 1px solid var(--line);
  transition: transform .1s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
a.btn { text-decoration: none; }
.btn.primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime-strong); }
.btn.dark { background: #1d1b1f; color: #fff; border-color: #1d1b1f; }
:root[data-theme="dark"] .btn.dark { background: #f1f1ec; color: #1d1b1f; border-color: #f1f1ec; }
.btn.danger { color: var(--no); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--text);
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.iconbtn svg { width: 20px; height: 20px; }
.add-btn { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }

/* Zusage-Knöpfe */
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.rsvp button {
  appearance: none; cursor: pointer; border-radius: 13px; min-height: 46px;
  border: 1.5px solid var(--line); background: var(--card-2); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text);
  transition: background .15s, border-color .15s, transform .1s;
}
.rsvp button:active { transform: scale(.96); }
.rsvp button svg { width: 18px; height: 18px; }
.rsvp button.on.ja { background: var(--lime); border-color: var(--lime-strong); color: var(--lime-ink); }
.rsvp button.on.vielleicht { background: color-mix(in srgb, var(--maybe) 22%, var(--card)); border-color: var(--maybe); }
.rsvp button.on.nein { background: color-mix(in srgb, var(--no) 16%, var(--card)); border-color: var(--no); }

/* Zähler-Pillen */
.counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line); white-space: nowrap;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.ja { background: var(--ok); } .dot.vielleicht { background: var(--maybe); } .dot.nein { background: var(--no); } .dot.offen { background: var(--muted); }
.pill.lime { background: var(--lime); border-color: var(--lime-strong); color: var(--lime-ink); }
.pill.red { background: color-mix(in srgb, var(--no) 14%, var(--card)); border-color: color-mix(in srgb, var(--no) 40%, var(--line)); color: var(--no); }
.tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 7px; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.tag.wichtig { background: color-mix(in srgb, var(--no) 15%, var(--card)); color: var(--no); border-color: transparent; }
.tag.termin { background: color-mix(in srgb, #3b82f6 15%, var(--card)); color: #3b82f6; border-color: transparent; }
.tag.spass { background: color-mix(in srgb, var(--maybe) 18%, var(--card)); color: var(--maybe); border-color: transparent; }
.tag.info { background: color-mix(in srgb, var(--lime) 35%, var(--card)); color: var(--accent-text); border-color: transparent; }

/* Personenliste in Terminen */
.people { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.people h4 { margin: 10px 0 6px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.people ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.people li { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--card-2); font-size: 14px; }
.people li .cm { color: var(--muted); font-size: 12px; }

/* Avatare */
.av {
  border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, #4a464c, #2a272c); color: var(--lime); font-weight: 900;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.s24 { width: 24px; height: 24px; font-size: 10px; }
.av.s36 { width: 36px; height: 36px; font-size: 14px; }
.av.s56 { width: 56px; height: 56px; font-size: 20px; }
.av.s120 { width: 120px; height: 120px; font-size: 44px; box-shadow: 0 0 0 4px var(--lime); }

/* Team-Raster */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.player {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; cursor: pointer; position: relative; transition: transform .12s;
}
.player:active { transform: scale(.97); }
.player .ph { aspect-ratio: 1 / 1; background: linear-gradient(160deg, #3d3a40, #161418); display: grid; place-items: center; position: relative; }
.player .ph img { width: 100%; height: 100%; object-fit: cover; }
.player .ph .ini { font-size: 46px; font-weight: 900; font-style: italic; color: var(--lime); }
.player .num {
  position: absolute; top: 8px; left: 8px; min-width: 34px; height: 34px; border-radius: 10px; padding: 0 6px;
  display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); font-weight: 900; font-style: italic; font-size: 17px;
}
.player .role { position: absolute; top: 8px; right: 8px; }
.player .tx { padding: 10px 12px 12px; }
.player .tx b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .tx span { font-size: 13px; color: var(--muted); }

/* Profilseite */
.profile-head { text-align: center; padding: 8px 0 4px; }
.profile-head .av { margin: 0 auto 14px; }
.profile-head h1 { margin: 0; font-size: 30px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fact small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.fact b { font-size: 18px; }
.meter { height: 8px; border-radius: 6px; background: var(--card-2); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--lime); border-radius: 6px; }

/* Tabelle */
.tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings td.l { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { table.standings { font-size: 13px; } .standings td, .standings th { padding-left: 2px; padding-right: 2px; } }
.standings th { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 4px; font-weight: 800; }
.standings th.l, .standings td.l { text-align: left; }
.standings td { text-align: center; padding: 10px 4px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.standings td.rk { font-weight: 900; width: 34px; }
.standings td.pts { font-weight: 900; }
.standings tr.us td { background: color-mix(in srgb, var(--lime) 30%, var(--card)); }
:root[data-theme="dark"] .standings tr.us td { background: color-mix(in srgb, var(--lime) 18%, var(--card)); }
.standings tr.us td:first-child { border-radius: 10px 0 0 10px; }
.standings tr.us td:last-child { border-radius: 0 10px 10px 0; }

/* Spielergebnis */
.score { font-size: 26px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 13px; flex: none; }
.result.w { background: var(--lime); color: var(--lime-ink); }
.result.l { background: color-mix(in srgb, var(--no) 18%, var(--card)); color: var(--no); }

/* Reiter innerhalb eines Bereichs */
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px; margin: 0 -2px 14px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.seg button.on { background: #1d1b1f; color: var(--lime); border-color: #1d1b1f; }
:root[data-theme="dark"] .seg button.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }

/* Beiträge */
.post h3 { font-size: 19px; margin: 8px 0 6px; }
.post .body { white-space: pre-wrap; word-wrap: break-word; }
.post .body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.post.pinned { border-color: var(--lime-strong); box-shadow: 0 0 0 1px var(--lime-strong), var(--shadow); }

/* Bierdienst */
.beer-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, #f5b800 18%, var(--card)); flex: none; }
.card.beer-me { border-color: var(--lime-strong); box-shadow: 0 0 0 1px var(--lime-strong), var(--shadow); }
.beer-row { padding: 9px 0; border-top: 1px solid var(--line); }
.beer-row:first-child { border-top: 0; }
.beer-nr { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: var(--card-2); color: var(--muted); flex: none; }
.beer-nr.on { background: var(--lime); color: var(--lime-ink); }

/* Fahrgemeinschaften */
.rides { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.ride { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.seats { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.seat { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; border: 1.5px dashed var(--line); color: var(--muted); }
.seat.taken { border-style: solid; border-color: var(--lime-strong); background: color-mix(in srgb, var(--lime) 30%, var(--card)); color: var(--text); }

/* Umfragen */
.poll { margin-top: 12px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; overflow: hidden;
  appearance: none; border: 1.5px solid var(--line); background: var(--card-2); color: var(--text); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; font-weight: 600; }
.poll-opt .fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--lime) 35%, transparent); z-index: 0; transition: width .3s; }
.poll-opt > *:not(.fill) { position: relative; z-index: 1; }
.poll-opt.mine { border-color: var(--lime-strong); }
.poll-opt .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--muted); display: grid; place-items: center; flex: none; }
.poll-opt .box.round { border-radius: 50%; }
.poll-opt.mine .box { background: var(--lime-strong); border-color: var(--lime-strong); color: var(--lime-ink); }
.poll-opt .box svg { width: 14px; height: 14px; }
.poll-opt[disabled] { cursor: default; }

/* Umschalter als Links (Team / Fotos) */
.seg a.segbtn { border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none; }
.seg a.segbtn.on { background: #1d1b1f; color: var(--lime); border-color: #1d1b1f; }
:root[data-theme="dark"] .seg a.segbtn.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }

/* Fotogalerie */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.album { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .12s; }
.album:active { transform: scale(.97); }
.album .cover { aspect-ratio: 4 / 3; background: linear-gradient(160deg, #3d3a40, #161418); display: grid; place-items: center; position: relative; font-size: 34px; }
.album .cover img { width: 100%; height: 100%; object-fit: cover; }
.album .cnt { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.album .tx { padding: 10px 12px 12px; }
.album .tx b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album .tx span { font-size: 13px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 14px; overflow: hidden; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
.photo-grid .ph { appearance: none; border: 0; padding: 0; aspect-ratio: 1 / 1; background: var(--card-2); cursor: pointer; overflow: hidden; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-grid .ph:active img { transform: scale(.95); }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; border-radius: 12px; overflow: hidden; }
.strip img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }

/* Großansicht */
.lightbox { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; animation: fadein .15s ease; }
.lb-top { display: flex; align-items: center; gap: 6px; padding: calc(var(--safe-t) + 8px) 10px 8px 16px; font-weight: 700; font-size: 14px; }
.lb-btn { appearance: none; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.lb-btn svg { width: 20px; height: 20px; }
.lb-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); appearance: none; border: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav svg { width: 22px; height: 22px; }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-nav.next svg { transform: rotate(180deg); }
.lb-cap { padding: 12px 16px calc(var(--safe-b) + 16px); font-size: 14px; }
.lb-cap span { color: rgba(255,255,255,.65); font-size: 13px; }
@media (hover: none) { .lb-nav { display: none; } }

/* Reaktionen & Kommentare */
.social { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.reacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.react { appearance: none; border: 1.5px solid var(--line); background: var(--card-2); color: var(--text); border-radius: 999px; padding: 3px 10px; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.react b { font-size: 13px; }
.react.on { border-color: var(--lime-strong); background: color-mix(in srgb, var(--lime) 35%, var(--card)); }
.react.add { color: var(--muted); font-size: 13px; font-weight: 700; }
.picker { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.picker button { appearance: none; border: 0; background: var(--card-2); border-radius: 12px; font-size: 22px; width: 44px; height: 44px; cursor: pointer; }
.picker button.on { background: color-mix(in srgb, var(--lime) 45%, var(--card)); }
.comments { margin-top: 10px; }
.comment { display: flex; gap: 8px; padding: 6px 0; }
.comment .bubble { background: var(--card-2); border-radius: 4px 14px 14px 14px; padding: 7px 11px; min-width: 0; flex: 1; }
.comment .bubble b { font-size: 13px; }
.comment .bubble .t { color: var(--muted); font-size: 12px; margin-left: 4px; }
.comment .bubble p { margin: 2px 0 0; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }

/* Leiste unten */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; position: relative;
}
.tabbar a svg { width: 24px; height: 24px; transition: transform .15s; }
.tabbar a .ic { width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }
.tabbar a.on { color: var(--text); }
.tabbar a.on .ic { background: var(--lime); color: var(--lime-ink); }
.tabbar a .badge {
  position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--no); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--card);
}

/* Unteres Blatt (Formulare) */
.sheet-back { position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 12, .45); opacity: 0; transition: opacity .2s; }
.sheet-back.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: 24px 24px 0 0; padding: 10px 16px calc(var(--safe-b) + 20px);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  max-width: 720px; margin: 0 auto; box-shadow: 0 -10px 40px rgba(0,0,0,.25);
}
.sheet.open { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 14px; font-size: 22px; }

/* Formularfelder */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 5px 2px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; border-radius: 13px; border: 1.5px solid var(--line);
  background: var(--card); padding: 10px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { border-color: var(--lime-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 40%, transparent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 2px; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--lime-strong); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 48px; }
.pw-wrap button { position: absolute; right: 4px; top: 3px; border: 0; background: none; width: 40px; height: 40px; cursor: pointer; color: var(--muted); }
.pw-wrap button svg { width: 20px; height: 20px; }

/* Tabelleneditor */
.st-edit { display: grid; grid-template-columns: 34px 1fr 40px 40px 40px 52px 44px 30px; gap: 4px; align-items: center; font-size: 13px; }
.st-edit input { min-height: 38px; padding: 6px; border-radius: 9px; text-align: center; }
.st-edit input.l { text-align: left; }
.st-edit .h { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; text-align: center; }

/* Hinweise */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; transition: all .25s;
  background: #1d1b1f; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--no); }
.offline { background: var(--maybe); color: #1d1b1f; text-align: center; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 12px; margin: 6px 0; }

/* Bestätigungsfenster */
.dialog-back { position: fixed; inset: 0; z-index: 130; background: rgba(10,10,12,.5); display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--card); border-radius: 22px; padding: 20px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.35); animation: pop .18s ease; }
.dialog h3 { margin: 0 0 8px; font-size: 19px; }
.dialog p { margin: 0 0 18px; color: var(--muted); }
.dialog .row { justify-content: flex-end; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Anmeldeseite ---------- */
.auth {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--safe-t) + 24px) 16px calc(var(--safe-b) + 24px);
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(212, 248, 80, .28), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(212, 248, 80, .14), transparent 70%),
    #141316;
  color: #f1f1ec; position: relative; overflow: hidden;
}
.auth .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.auth .stripe { position: absolute; width: 140%; height: 18px; background: var(--lime); left: -20%; top: 18%; transform: rotate(-16deg); opacity: .85; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: rgba(30, 28, 33, .78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 26px; padding: 24px 20px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  --card: #24222a; --line: #3a373f; --text: #f1f1ec; --muted: #a9a5ad; --card-2: #2c2a31; color-scheme: dark;
}
.auth-card .logo { width: 96px; height: 96px; border-radius: 50%; background: #fff; margin: -70px auto 12px; box-shadow: 0 0 0 4px var(--lime), 0 10px 30px rgba(0,0,0,.4); object-fit: contain; }
.auth-card h1 { text-align: center; margin: 0; font-size: 30px; }
.auth-card h1 em { color: var(--lime); font-style: inherit; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 6px 0 18px; font-size: 14px; }
.auth-card .seg { justify-content: center; }
.auth-card .seg button.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.auth-card .err { color: #ff8a7a; font-size: 14px; min-height: 20px; margin: 4px 2px 10px; }
.auth-card .note { font-size: 13px; color: var(--muted); background: rgba(212,248,80,.08); border: 1px solid rgba(212,248,80,.25); padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }

@media (min-width: 760px) {
  .hero { min-height: 170px; }
  .hero h1 { font-size: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =====================================================================
   GLAS & 3D  (Eckis Wahl 25.11.2026: dunkel = Flutlicht-Glas + 3D-Arena, hell = Tageslicht-Glas)
   Diese Schicht liegt über dem Grundstil und ersetzt Flächen durch Milchglas.
   ===================================================================== */
:root {
  --bg: #eef0ea;
  --card: rgba(255, 255, 255, .62);
  --card-2: rgba(255, 255, 255, .55);
  --line: rgba(29, 27, 31, .09);
  --solid: #ffffff;
  --glass-border: rgba(255, 255, 255, .9);
  --glass-shadow: 0 10px 30px rgba(50, 55, 70, .10), inset 0 1px 0 rgba(255, 255, 255, .95);
  --blur: blur(20px) saturate(1.8);
  --push: #b9c0ad;           /* Unterkante der Drück-Knöpfe */
  --nav-h: 66px;
}
:root[data-theme="dark"] {
  --bg: #0d0c10;
  --card: rgba(255, 255, 255, .075);
  --card-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .13);
  --solid: #1e1c22;
  --glass-border: rgba(255, 255, 255, .15);
  --glass-shadow: 0 12px 34px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
  --blur: blur(20px) saturate(1.6);
  --push: rgba(0, 0, 0, .55);
}
body { background: var(--bg); }

/* --- Hintergrund-Ebene: Foto + wandernde Lichter (dunkel) bzw. Farbwolken (hell) --- */
.bgfx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bgfx .bgimg { position: absolute; inset: -60px; background: center / cover no-repeat; opacity: 0; transition: opacity .6s, background-image .6s; }
.bgfx .orb { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.bgfx .o1 { width: 300px; height: 300px; top: -90px; left: -80px; background: #d4f850; opacity: .75; animation: orb1 18s ease-in-out infinite alternate; }
.bgfx .o2 { width: 260px; height: 260px; top: 42%; right: -110px; background: #9fe3d0; opacity: .55; animation: orb2 22s ease-in-out infinite alternate; }
.bgfx .o3 { width: 280px; height: 280px; bottom: -110px; left: 10%; background: #cfc6d8; opacity: .65; animation: orb1 26s ease-in-out infinite alternate-reverse; }
@keyframes orb1 { to { transform: translate(90px, 160px) scale(1.15); } }
@keyframes orb2 { to { transform: translate(-130px, -170px) scale(.9); } }
:root[data-theme="dark"] .bgfx .bgimg { opacity: 1; filter: blur(30px) brightness(.42) saturate(1.35); transform: scale(1.12); }
:root[data-theme="dark"] .bgfx .orb { mix-blend-mode: screen; }
:root[data-theme="dark"] .bgfx .o1 { opacity: .42; top: -120px; left: auto; right: -90px; }
:root[data-theme="dark"] .bgfx .o2 { background: #6b5cff; opacity: .26; right: auto; left: -120px; }
:root[data-theme="dark"] .bgfx .o3 { background: #d4f850; opacity: .14; }

/* --- Glasflächen --- */
.card, .player, .album, .fact, .tabbar, .sheet, .topbar.scrolled {
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.card, .player, .album, .fact {
  background: var(--card); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  position: relative; transition: transform .18s ease-out, box-shadow .2s, border-color .2s;
}
:root[data-theme="dark"] .card, :root[data-theme="dark"] .player, :root[data-theme="dark"] .album, :root[data-theme="dark"] .fact {
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .035));
}
.card { border-radius: 24px; }
.player, .album { border-radius: 22px; }
/* Lichtkante, die dem Zeiger/Finger folgt */
.card::before, .player::before, .album::before, .fact::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(212, 248, 80, .22), transparent 45%);
}
.card::after, .player::after, .album::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px; opacity: 0; transition: opacity .25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(212, 248, 80, .9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.lit::before, .lit::after { opacity: 1; }
:root:not([data-theme="dark"]) .card::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(212, 248, 80, .35), transparent 45%); }
.card > *, .player > *, .album > * { position: relative; }
.post.pinned { border-color: rgba(212, 248, 80, .7); box-shadow: 0 0 0 1px rgba(212, 248, 80, .5), 0 0 30px rgba(212, 248, 80, .15), var(--glass-shadow); }
.card.beer-me { border-color: rgba(212, 248, 80, .8); box-shadow: 0 0 0 1px rgba(212, 248, 80, .6), 0 0 34px rgba(212, 248, 80, .25), var(--glass-shadow); }

/* --- Kopfzeile: durchsichtig, beim Scrollen Glas --- */
.topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar.scrolled { background: color-mix(in srgb, var(--bg) 55%, transparent); border-bottom-color: var(--line); }
.topbar .logo { box-shadow: 0 0 0 2px rgba(212, 248, 80, .55), 0 4px 14px rgba(0, 0, 0, .18); }
:root[data-theme="dark"] .topbar .logo { box-shadow: 0 0 0 2px rgba(212, 248, 80, .6), 0 0 18px rgba(212, 248, 80, .35); }

/* --- Schwebende Glas-Leiste unten --- */
main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 44px); }
.tabbar {
  left: 12px; right: 12px; bottom: calc(var(--safe-b) + 10px); height: var(--nav-h); padding-bottom: 0;
  border-radius: 26px; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow), 0 18px 40px rgba(0, 0, 0, .18);
  background: color-mix(in srgb, var(--solid) 62%, transparent); max-width: 560px; margin: 0 auto;
}
:root[data-theme="dark"] .tabbar { background: rgba(28, 26, 32, .55); }
.tabbar a .ic { transition: background .25s, box-shadow .25s, transform .25s; }
.tabbar a.on .ic { transform: translateY(-1px); }
:root[data-theme="dark"] .tabbar a.on { color: var(--lime); }
:root[data-theme="dark"] .tabbar a.on .ic { background: rgba(212, 248, 80, .16); color: var(--lime); box-shadow: 0 0 22px rgba(212, 248, 80, .4), inset 0 0 0 1px rgba(212, 248, 80, .35); }
.toast { bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }

/* --- Titelbild mit Tiefe --- */
.hero-wrap { position: relative; margin: 6px 0 18px; perspective: 900px; }
.hero { margin: 0; border-radius: 26px; transform: rotateX(calc(var(--hy, 0) * -8deg)) rotateY(calc(var(--hx, 0) * 10deg)); transition: transform .2s ease-out;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .12); }
.hero img { transform: scale(1.12) translate(calc(var(--hx, 0) * -18px), calc(var(--hy, 0) * -12px)); transition: transform .2s ease-out; }
.hero h1, .hero p { transform: translate(calc(var(--hx, 0) * 10px), calc(var(--hy, 0) * 6px)); transition: transform .2s ease-out; }
:root[data-theme="dark"] .hero h1 { background: linear-gradient(180deg, #fff 35%, #e9ffa0); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 3px 12px rgba(0, 0, 0, .6)); }
:root[data-theme="dark"] .hero h1 em { color: var(--lime); -webkit-text-fill-color: var(--lime); }
/* Schwebender 3D-Ball (Startseite) */
.ball3d { position: absolute; z-index: 3; right: 92px; top: -14px; width: 62px; height: 62px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 28%, #fff 0 7%, #f4f8dc 18%, #d4f850 52%, #7b9a12 100%);
  box-shadow: 0 16px 26px rgba(0, 0, 0, .45), inset -7px -9px 16px rgba(0, 0, 0, .3), 0 0 26px rgba(212, 248, 80, .35);
  animation: ballbob 3.2s ease-in-out infinite; transform: translate(calc(var(--bx, 0) * 1px), 0); }
.ball3d::before, .ball3d::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.ball3d::before { background: radial-gradient(ellipse 72% 42% at 50% 50%, transparent 60%, rgba(60, 75, 0, .5) 62%, transparent 66%); transform: rotate(28deg); }
.ball3d::after { background: radial-gradient(ellipse 42% 74% at 50% 50%, transparent 60%, rgba(60, 75, 0, .45) 62%, transparent 66%); transform: rotate(28deg); }
@keyframes ballbob { 50% { transform: translateY(-9px) rotate(16deg); } }

/* --- Knöpfe zum Reindrücken --- */
.rsvp button, .btn.primary {
  box-shadow: 0 4px 0 var(--push), 0 8px 16px rgba(0, 0, 0, .12); transition: transform .08s, box-shadow .08s, background .2s, border-color .2s;
}
.rsvp button:active, .btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--push); }
.rsvp button { background: var(--card-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: var(--glass-border); }
.rsvp button.on.ja, .btn.primary { background: linear-gradient(180deg, #e1ff6e, #c4ec2c); color: var(--lime-ink); border-color: #b9e021; box-shadow: 0 4px 0 #7b9a12, 0 8px 22px rgba(212, 248, 80, .35); }
:root[data-theme="dark"] .rsvp button.on.ja, :root[data-theme="dark"] .btn.primary { box-shadow: 0 4px 0 #6f8a10, 0 0 26px rgba(212, 248, 80, .45); }
.rsvp button.on.ja:active, .btn.primary:active { box-shadow: 0 1px 0 #7b9a12; }
.btn { border-color: var(--glass-border); background: var(--card-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.iconbtn { background: var(--card-2); border-color: var(--glass-border); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* --- Datum als 3D-Kachel --- */
.datebox { border-radius: 16px; background: var(--card-2); border-color: var(--glass-border); }
.datebox.today { background: linear-gradient(180deg, #e1ff6e, #c4ec2c); border-color: #b9e021; box-shadow: 0 5px 0 #7b9a12, 0 10px 20px rgba(212, 248, 80, .3); }
:root[data-theme="dark"] .datebox:not(.today) { background: rgba(212, 248, 80, .1); border-color: rgba(212, 248, 80, .3); }

/* --- Zahlen mit Leuchtverlauf --- */
:root[data-theme="dark"] .score, :root[data-theme="dark"] .facts .fact b {
  background: linear-gradient(180deg, #fff 30%, var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- Felder, Reiter, Blätter, Dialoge --- */
.input, select.input, textarea.input { background: var(--card-2); border-color: var(--glass-border); }
:root[data-theme="dark"] .input { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .14); }
.seg button, .seg a.segbtn { background: var(--card); border-color: var(--glass-border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
:root[data-theme="dark"] .seg button.on, :root[data-theme="dark"] .seg a.segbtn.on { box-shadow: 0 0 20px rgba(212, 248, 80, .35); }
.sheet { background: color-mix(in srgb, var(--solid) 78%, transparent); border-top: 1px solid var(--glass-border); }
.sheet-back { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog { background: var(--solid); border: 1px solid var(--glass-border); }
.dialog-back { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tag, .pill { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.standings tr.us td { background: rgba(212, 248, 80, .28); }
:root[data-theme="dark"] .standings tr.us td { background: rgba(212, 248, 80, .16); box-shadow: inset 0 1px 0 rgba(212, 248, 80, .3), inset 0 -1px 0 rgba(212, 248, 80, .3); }
.player .ph { background: linear-gradient(160deg, rgba(70, 66, 74, .9), rgba(22, 20, 24, .95)); }
.av.s120 { box-shadow: 0 0 0 4px var(--lime), 0 0 40px rgba(212, 248, 80, .45); }

/* --- Übergang beim Bereichswechsel: Karten schweben gestaffelt herein --- */
.view { animation: none; }
.view.enter > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s; } .view.enter > *:nth-child(3) { animation-delay: .1s; }
.view.enter > *:nth-child(4) { animation-delay: .15s; } .view.enter > *:nth-child(5) { animation-delay: .2s; }
.view.enter > *:nth-child(6) { animation-delay: .25s; } .view.enter > *:nth-child(n+7) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(5px); } }

@media (prefers-reduced-motion: reduce) {
  .bgfx .orb, .ball3d { animation: none !important; }
  .hero, .hero img, .hero h1, .hero p { transform: none !important; }
}
