:root {
  --bg: #f1f4f7; --card: #fff; --text: #1d2733; --muted: #6b7785; --line: #e1e7ec;
  --dark: #17222f; --accent: #2e7d32;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.45 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif; color: var(--text); background: var(--bg); padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
h1, h2, h3, h4 { margin: 0; }
button { font: inherit; }

.top { background: var(--dark); color: #fff; padding-top: env(safe-area-inset-top); position: sticky; top: 0; z-index: 10; }
.top-inner { max-width: 640px; margin: 0 auto; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.team { font-weight: 700; font-size: 18px; }
.club { font-size: 12px; opacity: .7; }
.me { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }

main { max-width: 640px; margin: 0 auto; padding: 14px 14px 20px; }
.loading, .empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.hello { font-size: 17px; font-weight: 600; margin: 4px 2px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.open-hint { font-size: 12px; font-weight: 600; background: #fff3e0; color: #e65100; padding: 2px 9px; border-radius: 99px; }
.ok-hint { font-size: 12px; font-weight: 600; background: #e8f5e9; color: var(--accent); padding: 2px 9px; border-radius: 99px; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 13px; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--text); }
.chip.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.sec { font-size: 18px; margin: 4px 2px 12px; }
.sec small { font-size: 13px; color: var(--muted); font-weight: 400; }

.event { display: flex; gap: 12px; background: var(--card); border-radius: 14px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 5px solid var(--c); cursor: pointer; }
.event.big { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.event.past { opacity: .7; }
.event.cancelled h3 { text-decoration: line-through; }
.ev-date { width: 46px; flex: none; text-align: center; line-height: 1.1; color: var(--c); }
.ev-date b { display: block; font-size: 24px; }
.ev-date small { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.ev-main { flex: 1; min-width: 0; }
.ev-top { display: flex; gap: 6px; }
.type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c); }
.cancel-tag { font-size: 11px; font-weight: 700; background: #c62828; color: #fff; padding: 0 6px; border-radius: 4px; }
.event h3 { font-size: 16px; margin: 2px 0 3px; }
.ev-meta { font-size: 13px; color: var(--muted); }
.ev-counts { display: flex; gap: 10px; font-size: 13px; margin-top: 6px; font-weight: 600; }
.c-zu { color: #2e7d32; } .c-vl { color: #f9a825; } .c-ab { color: #c62828; } .c-of { color: var(--muted); font-weight: 400; }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.rsvp-btn { border: 1.5px solid var(--s); color: var(--s); background: #fff; border-radius: 10px; padding: 9px 4px; font-weight: 700; font-size: 13px; cursor: pointer; }
.rsvp-btn.on { background: var(--s); color: #fff; }
.rsvp-btn:active { transform: scale(.97); }
.mine-past { font-size: 13px; margin-top: 6px; color: var(--muted); }
.my-note { font-size: 12px; color: var(--muted); margin-top: 6px; font-style: italic; }
.past-toggle { width: 100%; border: 0; background: none; color: var(--muted); text-align: left; padding: 12px 4px; cursor: pointer; font-weight: 600; }

.msg { background: var(--card); border-radius: 14px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.msg-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.msg-head b { color: var(--text); }
.msg h3 { font-size: 16px; margin-bottom: 4px; }
.msg p { margin: 0; }

.team-list { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.tm { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tm:last-child { border-bottom: 0; }
.tm .num { width: 30px; height: 30px; border-radius: 50%; background: #eef2f6; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.tm .grow { flex: 1; }
.tm .pos { font-size: 12px; color: var(--muted); }
.tm.me-row { background: #f1f8f1; }
.tm.me-row .num { background: var(--accent); color: #fff; }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabbar button { flex: 1; max-width: 200px; border: 0; background: none; padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); cursor: pointer; position: relative; }
.tabbar button span { font-size: 20px; filter: grayscale(1); opacity: .7; }
.tabbar button.on { color: var(--accent); font-weight: 700; }
.tabbar button.on span { filter: none; opacity: 1; }
.dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: #e53935; }

.btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: #c62828; border-color: #c62828; color: #fff; }
.btn.block { width: 100%; }

.login { background: var(--card); border-radius: 16px; padding: 24px 20px; margin-top: 20px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.login h1 { font-size: 22px; margin: 10px 0; }
.login p { color: var(--muted); }
.login label { display: block; text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 0 12px; }
.login input, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #cfd7df; border-radius: 10px; margin-top: 5px; }
.error { color: #c62828 !important; font-weight: 600; }
.login form { text-align: left; }
.login .btn.block { margin-top: 4px; }
.link-btn { border: 0; background: none; color: #1565c0; cursor: pointer; padding: 12px; font-size: 14px; }
.btn:disabled { opacity: .6; }
a.btn { display: block; text-decoration: none; text-align: center; }
.pw-box { margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pw-box summary { cursor: pointer; font-weight: 600; }
.pw-box label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 10px 0; }
.pw-box input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cfd7df; border-radius: 10px; margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.backdrop { position: fixed; inset: 0; background: rgba(10,16,24,.0); z-index: 50; display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.backdrop.show { background: rgba(10,16,24,.45); }
.sheet { background: #fff; width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .2s; }
.backdrop.show .sheet { transform: none; }
.grip { width: 40px; height: 5px; border-radius: 3px; background: #d5dce3; margin: 0 auto 12px; }
.sheet h2 { font-size: 20px; margin: 4px 0 6px; }
.sheet h4 { margin: 16px 0 6px; font-size: 14px; }
.sheet p { margin: 3px 0; }
.d-head .type { color: var(--c); }
.info { background: #f6f8fa; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.names { margin: 0; padding-left: 20px; }
.names li { padding: 2px 0; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

.update-banner { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 70; max-width: 616px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; background: #fff; border-left: 5px solid #1e88e5; border-radius: 12px; padding: 10px 12px 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.update-banner span { flex: 1; font-weight: 600; }
#toast { position: fixed; bottom: calc(84px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 10px); background: var(--dark); color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Nominierung, Rückmeldemodus, Rechte, Teamkasse (1.3.0) */
.tag { font-size: 11px; font-weight: 600; background: #eef2f6; color: var(--muted); padding: 0 6px; border-radius: 4px; }
.tag.nom { background: #e8f5e9; color: var(--accent); }
.event.not-nom { opacity: .65; }
.mode-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.rsvp-btn.auto.on { background: color-mix(in srgb, var(--s) 75%, #fff); border-style: dashed; }
.field { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cfd7df; border-radius: 10px; margin-top: 4px; background: #fff; }
.msg.compose .field { margin: 0 0 8px; }
.msg.compose textarea { margin: 0 0 8px; }
.link-btn.small { font-size: 13px; padding: 6px 0 0; }
.gchips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; vertical-align: middle; }
.gchip { font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--g); border-radius: 99px; padding: 0 7px; line-height: 16px; }
.gdot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.contact { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; margin-top: 2px; }
.contact a { color: #1565c0; text-decoration: none; }
main h4 { margin: 16px 2px 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.neg { color: #c62828; } .ok { color: var(--accent); }
.cash-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.cash-head div { background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.cash-head small { display: block; font-size: 12px; color: var(--muted); }
.cash-head b { font-size: 20px; }
.cash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.cash-list { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.cash-row { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.cash-row:last-child { border-bottom: 0; }
.cash-row.open { border-left: 4px solid #c62828; }
.cash-row.inactive { opacity: .55; }
.cash-row .grow { flex: 1; min-width: 0; }
.cash-row .r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.paid-btn { border: 1.5px solid #c62828; color: #c62828; background: #fff; border-radius: 99px; font-size: 12px; font-weight: 700; padding: 3px 10px; cursor: pointer; }
.paid-btn.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.fl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 10px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; }
.chk input { width: 18px; height: 18px; }
.pick-list { max-height: 34vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; }
.others { margin-top: 8px; }
.other-row { display: flex; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.other-row .grow { flex: 1; }
.mini { width: 36px; height: 32px; border: 1.5px solid var(--s); color: var(--s); background: #fff; border-radius: 8px; font-weight: 700; cursor: pointer; }
.mini.on { background: var(--s); color: #fff; }
.tabbar button { max-width: 160px; }
