:root {
  --blue: #0b3d91; --blue2: #1557c0; --bg: #eef2f8; --card: #fff; --text: #14213d; --muted: #6b7690;
  --line: #dbe2ee; --chip: #e7ecf5; --red: #c62828; --new: #fff8e1;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1424; --card: #172036; --text: #e8edf7; --muted: #93a0bb; --line: #26324d; --chip: #222d47; --new: #2b2a1a; --blue2: #4d8bf0; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; }
.boot, .center { display: grid; place-items: center; min-height: 60vh; text-align: center; font-size: 15px; }
.boot { font-size: 48px; min-height: 100vh; }
h1 { margin: .2em 0; font-size: 26px; }
h2 { margin: 0 0 12px; font-size: 19px; }
a { color: var(--blue2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--red); margin: 0; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }

/* Kopf & Tabs */
.top { position: sticky; top: 0; z-index: 5; background: var(--blue); color: #fff; padding: calc(10px + var(--safe-t)) 16px 10px; }
.top b { display: block; font-size: 18px; }
.top small { opacity: .8; font-size: 13px; }
main { padding: 14px 14px calc(90px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs button { flex: 1; border: 0; background: none; color: var(--muted); padding: 8px 0 10px; font-size: 12px; position: relative; }
.tabs button span { display: block; font-size: 21px; line-height: 1.2; }
.tabs button.on { color: var(--blue2); font-weight: 600; }
.tabs i { position: absolute; top: 4px; left: 55%; background: var(--red); color: #fff; font-style: normal; font-size: 11px; border-radius: 9px; padding: 0 6px; }

/* Karten & Formulare */
.card { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.lbl { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input, textarea, select { width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-top: 5px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue2); border-color: transparent; }
textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
details { margin: 4px 0 14px; }
summary { font-weight: 600; font-size: 14px; padding: 6px 0; cursor: pointer; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; }
.check input { width: 22px; height: 22px; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 10px -14px 4px; padding: 0 14px; scrollbar-width: none; }
.chip { border: 0; background: var(--chip); color: var(--text); border-radius: 20px; padding: 9px 14px; font: inherit; font-size: 15px; white-space: nowrap; }
.chip.on { background: var(--blue2); color: #fff; font-weight: 600; }
.chip.sel { width: auto; margin: 0; padding: 9px 12px; -webkit-appearance: none; appearance: none; }

.btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 13px; font: inherit; font-weight: 600; background: var(--chip); color: var(--text); margin-top: 8px; cursor: pointer; }
.btn.primary { background: var(--blue2); color: #fff; }
.btn.big { padding: 16px; font-size: 18px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .6; }
.ic { border: 0; background: var(--chip); border-radius: 10px; width: 40px; height: 40px; font-size: 17px; flex: none; }

/* Login */
.auth { max-width: 380px; margin: 0 auto; padding: calc(50px + var(--safe-t)) 18px 30px; text-align: center; }
.auth .card { text-align: left; margin-top: 18px; }
.logo { font-size: 56px; }
.codeIn { text-align: center; font-size: 30px; letter-spacing: 10px; }

.hint { background: var(--new); border-radius: 12px; padding: 12px 40px 12px 14px; margin-bottom: 12px; font-size: 14px; position: relative; }
.hint .x { position: absolute; right: 8px; top: 8px; border: 0; background: none; font-size: 16px; color: var(--muted); }

/* Liste */
.filters input { margin: 0; }
.tip.new { background: linear-gradient(var(--new), var(--card) 60%); }
.tiphead { display: flex; align-items: center; gap: 12px; }
.num { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.grow { flex: 1; min-width: 0; }
.grow b { display: block; font-size: 17px; }
.grow small { color: var(--muted); font-size: 13px; }
.dup { color: #d97706; font-weight: 700; }
.player { margin-top: 10px; font-weight: 600; }
.meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.tip p { margin: 8px 0 0; white-space: pre-wrap; }
.coach { margin-top: 8px; font-size: 14px; background: var(--bg); border-radius: 8px; padding: 7px 10px; }
.foot { margin-top: 10px; font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.user { display: flex; align-items: center; gap: 8px; }
.badge { background: var(--chip); color: var(--blue2); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; vertical-align: 2px; }

/* Modal & Toast */
#modal { position: fixed; inset: 0; z-index: 20; background: rgba(5,12,30,.55); display: flex; align-items: flex-end; justify-content: center; }
#modal[hidden] { display: none; }
.sheet { background: var(--card); width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); max-height: 90vh; overflow: auto; }
.bigcode { font-size: 42px; font-weight: 800; letter-spacing: 8px; text-align: center; color: var(--blue2); margin: 6px 0; }
#toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translate(-50%, 20px); background: #14213d; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 15px; opacity: 0; transition: .25s; pointer-events: none; z-index: 30; max-width: 92vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.tel { display: inline-block; margin-top: 6px; color: var(--blue2); font-weight: 600; text-decoration: none; }
.adminrow { font-size: 14px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.linkbtn { border: 0; background: none; color: var(--blue2); font: inherit; font-size: 14px; font-weight: 600; padding: 0; }
