/* MyWaterpolo – SK Bern Wasserball
   Farben aus dem SKbE-Logo: Koralle #EC665F · Schwarz #1D1D1B · Blau #178BB4 */

:root {
  --coral: #ec665f;
  --coral-strong: #e14f47;
  --coral-soft: rgba(236, 102, 95, 0.12);
  --blue: #178bb4;
  --blue-soft: rgba(23, 139, 180, 0.12);
  --ink: #1d1d1b;
  --kraft: #6e5bd0;
  --orange: #f08a00;

  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #f7f7f9;
  --text: #1d1d1b;
  --text-2: #6e6e73;
  --text-3: #aeaeb2;
  --sep: rgba(60, 60, 67, 0.12);
  --fill: rgba(118, 118, 128, 0.12);
  --tabbar: rgba(249, 249, 251, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --hero: #1d1d1b;
  --logo-tile: #ffffff;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Inter", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --card-2: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #98989f;
    --text-3: #636366;
    --sep: rgba(84, 84, 88, 0.55);
    --fill: rgba(118, 118, 128, 0.24);
    --tabbar: rgba(22, 22, 24, 0.82);
    --shadow: none;
    --hero: #1c1c1e;
    --coral-soft: rgba(236, 102, 95, 0.2);
    --blue-soft: rgba(23, 139, 180, 0.24);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--coral); text-decoration: none; }
.hidden { display: none !important; }

/* ── Layout ─────────────────────────────────────────────── */
#app { min-height: 100vh; min-height: 100dvh; }
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 104px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; margin-bottom: 2px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--text-2); }
.brand img { width: 28px; height: 28px; object-fit: contain; background: var(--logo-tile); border-radius: 7px; padding: 3px; }
.brand img.app-ico { padding: 0; border-radius: 7px; object-fit: cover; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fill); color: var(--coral);
  transition: transform .15s ease, opacity .15s;
}
.icon-btn:active { transform: scale(.92); opacity: .7; }
.icon-btn svg { width: 20px; height: 20px; }
.top-actions { display: flex; gap: 8px; }

.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin: 6px 0 0; }
h1.large { font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; margin: 2px 0 18px; }
h2.section {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 28px 0 10px;
  display: flex; align-items: baseline; justify-content: space-between;
}
h2.section small { font-size: 15px; font-weight: 400; color: var(--text-2); letter-spacing: 0; }
.caption { font-size: 13px; color: var(--text-2); }

/* ── Cards & lists ──────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  overflow: hidden;
}
.card + .card { margin-top: 12px; }
.list { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; position: relative; width: 100%; text-align: left;
  min-height: 56px;
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 1px;
  background: var(--sep); transform: scaleY(.5); transform-origin: top;
}
.row.tap { transition: background .15s; }
.row.tap:active { background: var(--fill); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .trail { text-align: right; font-size: 15px; color: var(--text-2); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.row .trail strong { color: var(--text); font-weight: 600; display: block; }
.chev { color: var(--text-3); width: 14px; height: 14px; flex-shrink: 0; }
.row.past > *:not(.chev) { opacity: .5; }
.row.cancelled .title { text-decoration: line-through; color: var(--text-2); }

.datebox {
  width: 46px; flex-shrink: 0; text-align: center; border-radius: 12px; padding: 5px 0 6px;
  background: var(--fill);
}
.datebox .wd { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--coral); letter-spacing: .03em; }
.datebox .d { font-size: 20px; font-weight: 700; line-height: 1.05; }
.datebox.training .wd { color: var(--blue); }
.datebox.kraft .wd { color: var(--kraft); }
.datebox.event .wd { color: var(--orange); }

.bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--blue); flex-shrink: 0; }
.bar.match { background: var(--coral); }
.bar.kraft { background: var(--kraft); }
.bar.event { background: var(--orange); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--fill); color: var(--text);
}
.chip.coral { background: var(--coral-soft); color: var(--coral-strong); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.warn { background: rgba(255, 159, 10, .16); color: #c77700; }
.chip.ok { background: rgba(52, 199, 89, .16); color: #248a3d; }
@media (prefers-color-scheme: dark) { .chip.coral { color: #ff8f88; } .chip.blue { color: #5cc3e8; } .chip.warn { color: #ffb340; } .chip.ok { color: #4cd964; } }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px 14px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button {
  flex-shrink: 0; font-size: 15px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow); color: var(--text);
  transition: background .15s, color .15s;
}
.filter-chips button.on { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .filter-chips button.on { background: #f5f5f7; color: #000; } }

/* ── Segmented control ──────────────────────────────────── */
.segmented {
  display: flex; padding: 2px; border-radius: 10px; background: var(--fill); margin-bottom: 14px; position: relative;
}
.segmented button {
  flex: 1; font-size: 14px; font-weight: 500; padding: 7px 8px; border-radius: 8px; transition: background .2s, box-shadow .2s;
}
.segmented button.on { background: var(--card); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); font-weight: 600; }
@media (prefers-color-scheme: dark) { .segmented button.on { background: #636366; } }

/* ── Hero (nächstes Match) ──────────────────────────────── */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 20px;
  background: var(--hero); color: #fff; box-shadow: var(--shadow);
  display: block; width: 100%; text-align: left;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: repeating-conic-gradient(from 200deg at 100% 0, var(--coral) 0 7deg, transparent 7deg 14deg);
  opacity: .9; mask: linear-gradient(225deg, #000 0, transparent 60%); -webkit-mask: linear-gradient(225deg, #000 0, transparent 60%);
  pointer-events: none;
}
.hero .label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--coral); }
.hero .vs { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 2px; line-height: 1.1; position: relative; z-index: 1; }
.hero .meta { color: rgba(255, 255, 255, .72); font-size: 15px; position: relative; z-index: 1; }
.hero .when { display: flex; gap: 10px; margin-top: 16px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero .pill { background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 8px 12px; font-size: 15px; font-weight: 600; }
.hero .pill small { display: block; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .6); text-transform: uppercase; letter-spacing: .04em; }
.hero.empty { padding: 28px 20px; }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tile {
  background: var(--card); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); text-align: left; width: 100%;
}
.tile .k { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.tile .k svg { width: 16px; height: 16px; }
.tile .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 13px; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.blue .k { color: var(--blue); }
.tile.coral .k { color: var(--coral); }

/* ── Kalender ───────────────────────────────────────────── */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head .t { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.cal-head .t span { color: var(--coral); }
.cal-nav .text-btn { padding: 6px 4px; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.text-btn { color: var(--coral); font-size: 16px; font-weight: 500; padding: 6px 8px; }

.month { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 10px 8px 12px; }
.month .wds, .month .grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month .wds div { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 2px 0 8px; text-transform: uppercase; }
.day {
  height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 4px; position: relative;
}
.day .n {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-variant-numeric: tabular-nums; transition: background .15s;
}
.day.out .n { color: var(--text-3); }
.day.today .n { color: var(--coral); font-weight: 700; }
.day.sel .n { background: var(--ink); color: #fff; font-weight: 600; }
.day.sel.today .n { background: var(--coral); }
@media (prefers-color-scheme: dark) { .day.sel .n { background: #f5f5f7; color: #000; } .day.sel.today .n { background: var(--coral); color: #fff; } }
.dots { display: flex; gap: 3px; margin-top: 3px; height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.dots i.match { background: var(--coral); }
.dots i.kraft { background: var(--kraft); }
.dots i.event { background: var(--orange); }

.week { display: flex; flex-direction: column; gap: 10px; }
.week-day { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.week-day .wh {
  display: flex; align-items: baseline; gap: 8px; padding: 12px 16px 4px; font-size: 15px; font-weight: 600;
}
.week-day .wh .num { font-size: 22px; font-weight: 700; }
.week-day.today .wh .num, .week-day.today .wh .nm { color: var(--coral); }
.week-day .empty { padding: 4px 16px 14px; color: var(--text-3); font-size: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-2); margin: 12px 4px 0; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 5px; }
.legend i.match { background: var(--coral); }
.legend i.kraft { background: var(--kraft); }
.legend i.event { background: var(--orange); }

/* ── Trainer-Übersicht ──────────────────────────────────── */
.stats { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 4px; scrollbar-width: none; }
.stats::-webkit-scrollbar { display: none; }
.stat {
  flex-shrink: 0; min-width: 104px; background: var(--card); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); text-align: left;
}
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.stat.on { outline: 2px solid var(--coral); }
.stat.warn .v { color: #ff9f0a; }
.trainer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.me { box-shadow: inset 0 0 0 1.5px var(--coral); }

/* ── Profil ─────────────────────────────────────────────── */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 6px; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; background: var(--coral); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 600; letter-spacing: .02em;
}
.profile .nm { font-size: 24px; font-weight: 700; margin-top: 12px; letter-spacing: -0.02em; }
.profile .em { color: var(--text-2); font-size: 15px; margin: 2px 0 10px; }
.row .ico {
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
  background: var(--coral);
}
.row .ico svg { width: 18px; height: 18px; }
.row .ico.blue { background: var(--blue); }
.row .ico.ink { background: #3a3a3c; }
.row .ico.gray { background: #8e8e93; }
.row.danger .title { color: #ff3b30; font-weight: 500; }
.foot { text-align: center; color: var(--text-3); font-size: 12px; margin: 28px 0 0; }

/* ── Tab bar ────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--tabbar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep);
  padding: 6px 8px calc(var(--safe-bottom) + 6px);
}
.tabbar nav { max-width: 560px; margin: 0 auto; display: flex; }
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; font-weight: 500; color: var(--text-3); padding: 4px 0; transition: color .15s;
}
.tabbar button svg { width: 26px; height: 26px; }
.tabbar button.on { color: var(--coral); }

/* ── Bottom sheet ───────────────────────────────────────── */
.scrim {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; opacity: 0; transition: opacity .25s;
}
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 640px; margin: 0 auto;
  background: var(--bg); border-radius: 22px 22px 0 0; max-height: 88vh; overflow-y: auto;
  padding: 8px 16px calc(var(--safe-bottom) + 20px);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .9, .3, 1);
}
.sheet.show { transform: none; }
.sheet.instant, .scrim.instant { transition: none; }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--text-3); margin: 0 auto 10px; opacity: .6; }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet .sh-head h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.sheet .done { color: var(--coral); font-weight: 600; font-size: 17px; }
.detail-hero { text-align: center; padding: 8px 0 18px; }
.detail-hero .teams { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.detail-hero .score { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.detail-hero .chips { justify-content: center; margin-top: 10px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 52px; border-radius: var(--r-md); font-size: 17px; font-weight: 600;
  background: var(--coral); color: #fff; transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.98); opacity: .85; }
.btn:disabled { opacity: .45; }
.btn.secondary { background: var(--card); color: var(--coral); box-shadow: var(--shadow); }
.btn.ink { background: var(--ink); color: #fff; }
.btn svg { width: 20px; height: 20px; }
.btn + .btn { margin-top: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* ── Login ──────────────────────────────────────────────── */
.login {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px); max-width: 440px; margin: 0 auto;
}
.login .logo-wrap { margin: 7vh auto 0; width: 140px; height: 104px; display: flex; align-items: center; justify-content: center; background: var(--logo-tile); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); }
.login .logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.login h1 { text-align: center; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin: 24px 0 4px; }
.login h1 span { color: var(--coral); }
.login p.lead { text-align: center; color: var(--text-2); margin: 0 0 32px; font-size: 16px; }
.field { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 0 16px; display: flex; align-items: center; height: 54px; }
.field input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 17px; height: 100%; }
.field input::placeholder { color: var(--text-3); }
.field.code input { text-align: center; font-size: 28px; font-weight: 600; letter-spacing: .5em; font-variant-numeric: tabular-nums; padding-left: .5em; }
.login .btn { margin-top: 14px; }
.msg { font-size: 14px; text-align: center; margin-top: 14px; min-height: 20px; color: var(--text-2); }
.msg.err { color: #ff3b30; }
.login .spacer { flex: 1; }
.demo-box { background: var(--card); border-radius: var(--r-md); padding: 14px 16px; margin-top: 24px; font-size: 14px; color: var(--text-2); box-shadow: var(--shadow); }
.demo-box b { color: var(--text); }
.demo-box .chips { margin-top: 10px; }
.demo-box .chip { cursor: pointer; }

.empty-state { text-align: center; color: var(--text-2); padding: 36px 20px; }
.empty-state svg { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 8px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 96px); transform: translate(-50%, 20px); z-index: 60;
  background: rgba(29, 29, 27, .92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.updated { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 18px; }

@media (min-width: 760px) {
  .page { padding-top: calc(var(--safe-top) + 28px); }
  h1.large { font-size: 40px; }
}

/* ── Chips: Zusatzvarianten ─────────────────────────────── */
.chip.xs { font-size: 11.5px; padding: 2px 8px; }
.chip.muted { background: var(--fill); color: var(--text-3); text-decoration: line-through; }
.chip.orange { background: rgba(240, 138, 0, .14); color: #c26f00; }
.trail .chip { margin-top: 3px; }
.hero .pill.st-ok { background: rgba(52, 199, 89, .25); }
.hero .pill.st-warn { background: rgba(255, 159, 10, .28); }

/* ── Login: Zusatz ──────────────────────────────────────── */
.field-ico { display: flex; color: var(--text-3); margin-right: 10px; }
.field-ico svg { width: 20px; height: 20px; }
.caption.hint { text-align: center; margin: 14px 0 0; }
.mail-sent { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); font-size: 14px; color: var(--text-2); line-height: 1.4; }
.mail-sent b { color: var(--text); }
.mail-sent svg { width: 26px; height: 26px; color: var(--coral); flex-shrink: 0; margin-top: 2px; }
.row-links { display: flex; justify-content: space-between; margin-top: 10px; }
.row-links .text-btn { font-size: 15px; }
.login.wide { max-width: 560px; padding-top: calc(var(--safe-top) + 16px); }
.signup .chips.pick .chip { font-size: 15px; padding: 7px 13px; border: 0; }
.name-list { max-height: 46vh; overflow-y: auto; }
.row.picked { background: var(--coral-soft); }
.check { color: var(--coral); font-weight: 700; font-size: 18px; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; flex-shrink: 0; background: var(--fill); color: var(--text-2); }
.row.picked .avatar.sm { background: var(--coral); color: #fff; }

/* ── Game-Kachel ────────────────────────────────────────── */
.game-tile {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin-top: 12px;
  background: linear-gradient(135deg, #178bb4, #0f6f99); color: #fff; border-radius: var(--r-lg); padding: 12px 16px; box-shadow: var(--shadow);
}
.game-tile .gt-ico svg { width: 40px; height: 40px; display: block; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-12deg); } }
.game-tile .title { font-weight: 700; font-size: 17px; }
.game-tile .sub { font-size: 13px; color: rgba(255, 255, 255, .8); }
.game-tile .trail { text-align: right; font-size: 12px; color: rgba(255, 255, 255, .8); }
.game-tile .trail strong { display: block; font-size: 20px; color: #fff; }
.game-tile .chev { color: rgba(255, 255, 255, .7); }

/* ── Trainingsplan (Sessions) ───────────────────────────── */
.session { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 10px; }
.sess-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 16px 6px; }
.sess-head .title { font-weight: 700; font-size: 16px; }
.sess-head .sub { font-size: 13px; color: var(--text-2); }
.avail-line { padding: 0 16px 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.avail-line b { color: var(--text); font-weight: 600; }
.avail-line b.me-t { color: var(--coral); }
.flat .row:first-child::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 1px; background: var(--sep); transform: scaleY(.5); }
.part { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; }
.part .pt { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 82px; }
.lineup { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Game ───────────────────────────────────────────────── */
.game { position: fixed; inset: 0; z-index: 80; background: #0f6f99; touch-action: none; user-select: none; -webkit-user-select: none; animation: fade .2s ease; }
.game canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.g-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 10px) 14px 0; pointer-events: none; }
.g-top > * { pointer-events: auto; }
.g-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(29, 29, 27, .55); color: #fff; font-size: 17px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.g-mid { text-align: center; }
.g-score { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.g-balls { display: flex; gap: 5px; justify-content: center; margin-top: 4px; }
.g-balls i { width: 12px; height: 12px; border-radius: 50%; background: #f5c518; box-shadow: inset 0 0 0 2px #1f5fbf; }
.g-balls i.off { background: rgba(29, 29, 27, .2); box-shadow: none; }
.g-right { display: flex; align-items: center; gap: 8px; }
.g-best { font-size: 13px; font-weight: 700; color: var(--ink); background: rgba(255, 255, 255, .7); padding: 4px 10px; border-radius: 999px; }
.g-over { position: absolute; left: 50%; transform: translateX(-50%); width: min(84vw, 340px); display: flex; gap: 8px; }
.g-over .btn { height: 46px; flex: 1; font-size: 15px; padding: 0 6px; margin: 0; white-space: nowrap; }
.g-over .btn + .btn { margin-top: 0; }
.signup h1.large { text-align: left; margin-top: 4px; font-size: 34px; }

/* ── An-/Abmelden ───────────────────────────────────────── */
.rsvp { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 14px 12px; margin-bottom: 14px; }
.rsvp-q { font-weight: 700; font-size: 17px; margin: 0 2px 10px; }
.rsvp-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.rsvp-btns button { height: 44px; border-radius: 12px; background: var(--fill); font-weight: 600; font-size: 15px; transition: background .15s, color .15s, transform .1s; }
.rsvp-btns button:active { transform: scale(.97); }
.rsvp-btns button.on.y { background: #34c759; color: #fff; }
.rsvp-btns button.on.q { background: #ff9f0a; color: #fff; }
.rsvp-btns button.on.n { background: #ff3b30; color: #fff; }
.rsvp-note { width: 100%; margin-top: 10px; height: 40px; border-radius: 10px; border: 0; background: var(--fill); padding: 0 12px; font-size: 15px; outline: none; }
.att-box { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px 14px; }
.att-group + .att-group { margin-top: 12px; }
.att-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.att-label span { color: var(--text-3); font-weight: 500; margin-left: 4px; }
.att-note { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.att-note b { color: var(--text); }
.att-sum { font-size: 12px; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.att-sum .ok-t { color: #248a3d; font-weight: 700; }
.att-sum .no-t { color: #d70015; font-weight: 700; margin-left: 4px; }
@media (prefers-color-scheme: dark) { .att-sum .ok-t { color: #4cd964; } .att-sum .no-t { color: #ff6961; } }

/* ── Rangliste / Install ────────────────────────────────── */
.board-link { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--blue); padding: 4px; }
.board-link .chev { width: 12px; height: 12px; color: var(--blue); }
.rank { width: 30px; text-align: center; font-size: 20px; font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.install { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px 12px 12px 14px; margin-bottom: 14px; }
.install img { width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0; }
.install .title { font-weight: 700; font-size: 15px; }
.install .sub { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.install .x { width: 28px; height: 28px; border-radius: 50%; background: var(--fill); color: var(--text-2); font-size: 12px; flex-shrink: 0; }
.mini-btn { background: var(--coral); color: #fff; font-weight: 600; font-size: 14px; border-radius: 999px; padding: 7px 12px; flex-shrink: 0; }

/* ── Coach 📣 ───────────────────────────────────────────── */
.coach-pop { position: fixed; inset: 0; z-index: 95; pointer-events: none; }
.coach-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.coach-pop.show .coach-scrim { opacity: 1; }
.coach-card {
  position: absolute; left: 50%; bottom: calc(var(--safe-bottom) + 18px); width: min(92vw, 440px);
  transform: translate(-50%, 140%); transition: transform .38s cubic-bezier(.2, 1.3, .4, 1);
  background: var(--card); border-radius: 24px; padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); pointer-events: auto;
}
.coach-pop.show .coach-card { transform: translate(-50%, 0); }
.coach-pop.toast-like .coach-card { bottom: auto; top: calc(var(--safe-top) + 12px); transform: translate(-50%, -160%); }
.coach-pop.toast-like.show .coach-card { transform: translate(-50%, 0); }
.coach-pop.angry.show .coach-card { animation: shake .45s .3s; }
.coach-pop.furious.show .coach-card { animation: shake .5s .3s 2; }
@keyframes shake { 0%, 100% { margin-left: 0; } 20% { margin-left: -9px; } 40% { margin-left: 8px; } 60% { margin-left: -6px; } 80% { margin-left: 4px; } }
.coach-row { display: flex; gap: 12px; align-items: center; }
.coach-av { width: 92px; height: 100px; flex-shrink: 0; color: var(--text-2); overflow: visible; }
.coach-av.furious { animation: pulse .5s ease-in-out infinite alternate; }
.coach-av .steam { animation: steam 1s ease-out infinite; }
@keyframes pulse { to { transform: scale(1.06) rotate(-2deg); } }
@keyframes steam { from { transform: translateY(4px); opacity: .9; } to { transform: translateY(-8px); opacity: 0; } }
.coach-bubble { position: relative; background: var(--fill); border-radius: 18px; padding: 12px 14px; font-size: 16px; font-weight: 600; line-height: 1.35; flex: 1; }
.coach-bubble::before { content: ""; position: absolute; left: -7px; top: 26px; border: 8px solid transparent; border-right-color: var(--fill); border-left: 0; }
.coach-pop.furious .coach-bubble { background: rgba(255, 59, 48, .14); color: #c4190e; font-weight: 800; }
.coach-pop.furious .coach-bubble::before { border-right-color: rgba(255, 59, 48, .14); }
.coach-name { font-size: 12px; font-weight: 700; color: var(--coral); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.coach-actions { display: flex; gap: 8px; margin-top: 14px; }
.coach-actions .btn { height: 46px; font-size: 15px; margin: 0; }
@media (prefers-color-scheme: dark) { .coach-pop.furious .coach-bubble { color: #ff8a80; } }

.coach-nudge { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px 14px 14px 10px; margin-bottom: 14px; }
.coach-nudge .coach-av { width: 70px; height: 76px; }
.cn-text { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.cn-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.cn-actions { display: flex; gap: 8px; margin-top: 10px; }
.cn-actions button { flex: 1; height: 38px; border-radius: 10px; font-weight: 600; font-size: 14.5px; background: var(--fill); }
.cn-actions button.y { background: #34c759; color: #fff; }

.coach-report { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px 14px 12px 10px; }
.coach-report .coach-av { width: 76px; height: 82px; }
.cr-title { font-weight: 700; font-size: 16px; }
.cr-title small { font-weight: 400; color: var(--text-2); font-size: 13px; margin-left: 4px; }
.cr-stats { display: flex; gap: 12px; font-size: 13px; color: var(--text-2); margin-top: 4px; flex-wrap: wrap; }
.cr-stats b { color: var(--text); font-size: 16px; }
.cr-verdict { font-size: 14px; font-style: italic; margin-top: 6px; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--fill); position: relative; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch.on { background: #34c759; }
.switch.on::after { transform: translateX(20px); }

/* Login: Schwimmklub-Logo + Wasserball-Bär */
.login .logos { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 7vh auto 0; }
.login .logos .logo-wrap { margin: 0; }
.login .logos .bear { width: 112px; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); transform: rotate(4deg); }
.login .logos .logo-wrap.wp { width: 172px; height: 128px; padding: 16px; }

.demo-link { display: block; margin: 18px auto 0; font-size: 15px; font-weight: 600; color: var(--blue); padding: 6px 10px; }
.demo-box .chip { border: 0; font-size: 14px; padding: 7px 12px; }
