:root {
  --navy: #1c2459; --navy-2: #2b3678; --ink: #1a2040; --muted: #6b7890; --line: #e3e7ee; --bg: #f6f7fa; --soft: #eef1f6; --mist: #7a95b1; --gold: #f2c230;
  --ok: #2fa66a; --warn: #e9a700; --bad: #e0483e; --r: 14px; --shadow: 0 1px 2px rgba(28,36,89,.06), 0 8px 24px rgba(28,36,89,.07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font: 16px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; letter-spacing: -.02em; color: var(--navy); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; width: 100%; outline: none; min-height: 46px; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(43,54,120,.14); }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .grow { flex: 1; }
.ic { display: inline-flex; flex: none; } .ic.big svg { width: 38px; height: 38px; } .ic.flip { transform: rotate(180deg); }
.logo { border-radius: 50%; flex: none; }
.link { color: var(--navy-2); font-weight: 600; text-decoration: none; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 16px; border-radius: 11px; background: #fff; border: 1px solid var(--line); font-weight: 600; color: var(--navy); white-space: nowrap; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); } .btn:hover { background: var(--soft); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(28,36,89,.25); } .btn.primary:hover { background: var(--navy-2); }
.btn.danger { color: var(--bad); border-color: #f3c9c5; } .btn.block { width: 100%; } .btn.small { min-height: 36px; padding: 6px 11px; font-size: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--muted); flex: none; } .icon-btn:hover { background: var(--soft); color: var(--navy); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; } .field > span { font-size: 13.5px; font-weight: 600; color: #46506b; } .field small { color: var(--muted); font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.chips, .checks { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; } .checks { margin: 0; }
.chip { padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 550; font-size: 14px; color: #46506b; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; } .chip.ghost { border-style: dashed; }
.seg { display: flex; background: var(--soft); border-radius: 11px; padding: 3px; margin-bottom: 14px; }
.seg button { flex: 1; padding: 8px 10px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(28,36,89,.15); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: #46506b; font-size: 12px; font-weight: 600; white-space: nowrap; } .tag.navy { background: var(--navy); color: #fff; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.lamp { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; } .lamp.ok { background: var(--ok); } .lamp.warn { background: var(--warn); } .lamp.bad { background: var(--bad); }
.toasts { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 99; align-items: center; width: max-content; max-width: 90vw; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 30px rgba(20,26,60,.3); animation: pop .2s; transition: opacity .3s; text-align: center; } .toast.ok { background: #1d7a4b; } .toast.err { background: #b3342c; } .toast.out { opacity: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } } @keyframes up { from { transform: translateY(40px); opacity: 0; } } @keyframes fade { from { opacity: 0; } }

/* Fenster */
.sheet-wrap { position: fixed; inset: 0; background: rgba(20,26,60,.42); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; } .sheet-wrap.out { opacity: 0; transition: opacity .18s; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 92dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.9,.3,1); padding-bottom: env(safe-area-inset-bottom); }
.sheet.wide { max-width: 1040px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 20px; } .sheet-head h2 { font-size: 18px; color: var(--navy); }
.sheet-body { padding: 8px 20px 22px; overflow: auto; }
.sub { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 11px; background: var(--soft); margin-bottom: 6px; } .pick:active { background: #dfe5f0; }
.pick > div { flex: 1; min-width: 0; } .pick strong { display: block; } .pick span { font-size: 13px; color: var(--muted); } .pick.used { opacity: .55; }

/* Seiten */
.center-page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px 24px; text-align: center; }
.login { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 4px; align-items: stretch; } .login .logo { align-self: center; } .login h1 { margin-top: 8px; } .login > p { margin-bottom: 14px; } .login .field { text-align: left; }
.empty { text-align: center; padding: 50px 20px; color: var(--mist); display: flex; flex-direction: column; align-items: center; gap: 8px; } .empty h3 { color: var(--navy); }
.list { display: flex; flex-direction: column; gap: 12px; }
.ev { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; } .ev.click { cursor: pointer; transition: transform .12s; } .ev.click:active { transform: scale(.99); }
.ev-top { display: flex; gap: 13px; } .ev-main { flex: 1; min-width: 0; }
.ev-main h3 { font-size: 17px; margin: 3px 0 4px; } .ev-main h1 { margin: 3px 0 4px; }
.ev-main p { display: flex; gap: 6px; align-items: center; color: #46506b; font-size: 14.5px; } .ev-main p .ic svg { width: 16px; height: 16px; color: var(--mist); }
.ev-main p.note { background: var(--soft); border-radius: 8px; padding: 6px 9px; margin-top: 7px; font-size: 14px; }
.date { width: 54px; flex: none; border-radius: 12px; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; padding: 7px 0; line-height: 1.1; height: max-content; }
.date span { font-size: 11.5px; font-weight: 600; text-transform: uppercase; opacity: .85; } .date strong { font-size: 22px; }
.date.k-Trainingslager { background: var(--mist); } .date.k-Regatta { background: var(--gold); color: var(--navy); }
.kind { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--navy-2); } .kind.k-Trainingslager { color: #4d6a88; } .kind.k-Regatta { color: #9a7400; }
.rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.rsvp button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; border-radius: 13px; font-weight: 700; font-size: 16px; border: 2px solid var(--line); background: #fff; color: #46506b; transition: all .15s; } .rsvp button:active { transform: scale(.97); }
.rsvp .yes.on { background: var(--ok); border-color: var(--ok); color: #fff; } .rsvp .no.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.ev.zu { box-shadow: var(--shadow), inset 4px 0 0 var(--ok); } .ev.ab { box-shadow: var(--shadow), inset 4px 0 0 var(--bad); }
.closed { margin-top: 11px; font-size: 14px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 9px 11px; }

/* Sportler */
.a-page { max-width: 560px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
.a-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; } .a-head > div { flex: 1; } .a-head p { color: var(--muted); font-size: 14.5px; }
.install { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--navy); color: #fff; border-radius: var(--r); padding: 13px 14px; margin-bottom: 16px; }
.install > div { flex: 1; } .install strong { display: block; } .install span { font-size: 13.5px; opacity: .8; }
.a-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.guide { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 12px; }
.guide li { display: flex; gap: 14px; align-items: center; background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.g-pic { width: 84px; flex: none; } .mock { width: 100%; display: block; }
.g-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; margin-right: 8px; }
.guide p { font-size: 14.5px; color: #46506b; margin-top: 4px; }

/* Trainer */
.t-page { min-height: 100dvh; display: flex; flex-direction: column; }
.t-head { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.t-head > strong { color: var(--navy); flex: 1; } .who { color: var(--muted); font-size: 14px; display: none; }
.t-nav { display: flex; } .t-nav button { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--muted); }
.t-nav.top { display: none; gap: 4px; flex: 1; margin-left: 14px; } .t-nav.top button { padding: 8px 13px; border-radius: 10px; } .t-nav.top button.on { background: var(--navy); color: #fff; }
.t-nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.t-nav.bottom button { flex: 1; flex-direction: column; gap: 2px; padding: 9px 0 8px; font-size: 12px; } .t-nav.bottom button.on { color: var(--navy); }
.t-main { flex: 1; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 1180px; width: 100%; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; } .row-gap { display: flex; gap: 8px; flex-wrap: wrap; }
.lead { margin-bottom: 12px; } .search { margin-bottom: 12px; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; } .c { font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: var(--soft); color: #46506b; }
.c.zu { background: #e3f5ec; color: #1d7a4b; } .c.ab { background: #fdecea; color: #a8362e; } .c.boats { background: #e3e8f6; color: var(--navy); }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--navy-2); font-weight: 600; margin-bottom: 12px; min-height: 40px; }
.detail-head { display: flex; gap: 13px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.grp { margin-bottom: 18px; } .grp h2, .pool h2 { font-size: 14px; color: var(--navy); display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.grp h2 span, .pool h2 span, .col h3 span { background: var(--soft); color: var(--muted); border-radius: 99px; padding: 0 8px; font-size: 12.5px; }
.rows { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #f0f2f6; } .row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; cursor: pointer; } .row-main strong { display: block; } .row-main span { font-size: 13px; color: var(--muted); }
.mini { display: flex; gap: 6px; } .mini button { width: 42px; height: 42px; border-radius: 11px; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--muted); background: #fff; }
.mini .yes.on { background: var(--ok); border-color: var(--ok); color: #fff; } .mini .no.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.pad { padding: 0 4px; }
.plan { display: flex; flex-direction: column; gap: 14px; }
.pool { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; } .pool-list { display: flex; gap: 6px; flex-wrap: wrap; } .hint { margin-top: 10px; }
.chipA { background: var(--soft); border-radius: 10px; padding: 6px 10px; cursor: grab; line-height: 1.25; } .chipA strong { display: block; font-size: 14.5px; } .chipA span { font-size: 12px; color: var(--muted); }
.crews { display: grid; grid-template-columns: 1fr; gap: 12px; align-content: start; align-items: start; }
.crew { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; }
.crew-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; } .crew-head h3 { display: flex; gap: 8px; align-items: center; font-size: 17px; } .crew-head p { font-size: 13px; color: var(--muted); }
.loc { font-weight: 700; } .l-MRS { color: var(--navy); } .l-MRC { color: #9a7400; } .l-Obe { color: #2e7d6b; } .l-Ext { color: #8a4bb0; }
.crew .seats { display: flex; flex-direction: column; gap: 6px; }
.seat { display: flex; align-items: center; flex: none; gap: 10px; width: 100%; text-align: left; border: 1.5px dashed var(--line); border-radius: 11px; padding: 8px 10px; min-height: 50px; background: #fbfcfe; }
.seat.filled { border-style: solid; background: #fff; } .seat.over { border-color: var(--navy-2); background: #eef1fb; }
.seat.ok { border-color: #b9e2cc; } .seat.warn { border-color: #f0d37a; background: #fffbee; } .seat.bad { border-color: #efb1ab; background: #fff5f4; }
.seat .k { width: 70px; font-size: 12px; font-weight: 700; color: var(--muted); flex: none; } .seat .n { flex: 1; min-width: 0; } .seat .n strong { display: block; } .seat .n small { color: var(--muted); font-size: 12.5px; } .seat .n.empty { color: #a9b2c4; font-size: 14.5px; }
.add-crew { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; border: 2px dashed #c9d0de; border-radius: var(--r); color: var(--navy-2); font-weight: 700; } .add-crew:hover { background: #fff; }
.cols { display: grid; grid-template-columns: 1fr; gap: 16px; } .col h3 { display: flex; gap: 8px; align-items: center; font-size: 15px; margin-bottom: 8px; }
.linkbox { background: var(--soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; } .linkbox code { font-size: 12px; word-break: break-all; color: var(--muted); }

@media (min-width: 820px) {
  .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; }
  .t-nav.bottom { display: none; } .t-nav.top { display: flex; } .t-head > strong { flex: none; } .who { display: block; }
  .t-main { padding: 28px 28px 60px; }
  .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .plan { flex-direction: row; align-items: flex-start; } .pool { width: 280px; flex: none; position: sticky; top: 76px; } .pool-list { flex-direction: column; flex-wrap: nowrap; max-height: 60vh; overflow: auto; }
  .crews { flex: 1; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .cols { grid-template-columns: repeat(4, 1fr); }
  .toasts { bottom: 28px; }
}
