/* Jubiläumsplaner – Gestaltung wie die Vereinsheimkasse (DLRG-Rot/Gelb).
   Schriften liegen lokal im Ordner /fonts (kein Abruf bei Google = DSGVO-konform). */
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap; src: url("/fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --rot: #e30613; --rot-dunkel: #b30510; --rot-hell: #fde7e8;
  --gelb: #ffed00; --gelb-hell: #fffbd6; --gelb-rand: #e8d400;
  --gruen: #1b7a3a; --gruen-hell: #e6f2ea; --blau: #1f5fae; --blau-hell: #e8f0fa;
  --grund: #f6f4ef; --weiss: #ffffff; --text: #1c1b1a; --text-2: #4a4744; --text-3: #6b6763;
  --linie: #e4dfd6; --linie-2: #cfc9bf;
  --schrift: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --titel: "Barlow Condensed", "Arial Narrow", var(--schrift);
  --radius: 10px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--schrift); font-size: 16px; line-height: 1.45; color: var(--text); background: var(--grund); -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--titel); font-weight: 700; line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: 34px; } h2 { font-size: 24px; } h3 { font-size: 18px; }
p { margin: 0 0 .5em; }
a { color: var(--rot-dunkel); }
a:hover { color: #8a040c; }
button, input, select, textarea { font: inherit; color: var(--text); }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
[hidden] { display: none !important; }
.loading { padding: 40px; text-align: center; color: var(--text-2); }
.hint { color: var(--text-2); font-size: 14px; }
.meta { color: var(--text-3); font-size: 13px; }
.small { font-size: 14px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.pad { padding: 16px; }
.lead { color: var(--text-2); font-size: 16px; margin: 0; }
.eyebrow { font-weight: 700; font-size: 13px; color: var(--rot-dunkel); margin: 0 0 6px; }
.mention { color: var(--rot-dunkel); background: var(--rot-hell); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Knöpfe & Felder ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 2px solid transparent; border-radius: var(--radius);
  background: var(--weiss); color: var(--text); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--rot); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--rot-dunkel); color: #fff; }
.btn-outline { border-color: var(--text); background: var(--weiss); }
.btn-ghost { background: transparent; border-color: var(--linie-2); font-weight: 600; }
.btn-ghost:hover { background: var(--grund); }
.btn-danger { background: var(--weiss); border-color: var(--rot); color: var(--rot-dunkel); }
.btn-danger:hover { background: var(--rot-hell); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-wide { width: 100%; }
.link-btn { background: none; border: none; padding: 4px 0; color: var(--rot-dunkel); font-weight: 700; font-size: 14px; cursor: pointer; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--linie); border-radius: 8px; background: var(--weiss); cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: var(--grund); }
.input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--linie-2); border-radius: 8px; background: var(--weiss); color: var(--text); font-size: 16px; }
textarea.input { min-height: 90px; resize: vertical; }
input[type=color].input { width: 56px; padding: 4px; }
input[type=range].input { padding: 0; border: none; accent-color: var(--rot); }
.input-sm { min-height: 36px; padding: 4px 8px; font-size: 14px; width: auto; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.field { margin-bottom: 14px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.check { width: 22px; height: 22px; accent-color: var(--rot); flex-shrink: 0; }
.check-row { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 15px; cursor: pointer; }
.form-grid { display: flex; flex-direction: column; gap: 4px; }
.form-grid.narrow { max-width: 560px; }
.form-error { color: var(--rot-dunkel); font-weight: 600; min-height: 1.2em; margin: 4px 0 10px; }
.fs { border: 1px solid var(--linie); border-radius: 8px; padding: 10px 14px; margin: 8px 0 0; }
.fs legend { font-weight: 700; padding: 0 4px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 10px 0; }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--grund); border: 1px solid var(--linie-2); font-size: 14px; font-weight: 700; }
.pill-warn { background: var(--gelb); border-color: var(--gelb-rand); color: var(--text); }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 700; background: var(--gelb-hell); border: 1px solid var(--gelb-rand); padding: 12px; border-radius: 8px; text-align: center; user-select: all; overflow-wrap: anywhere; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; }
.notice p { margin: 0; flex: 1 1 260px; }
.notice-warn { background: var(--gelb-hell); border: 1px solid var(--gelb-rand); }
.wide { grid-column: 1 / -1; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px calc(24px + var(--safe-bottom)); background: var(--grund); }
.login-card { width: 100%; max-width: 420px; background: var(--weiss); border-radius: 16px; border: 1px solid var(--linie); padding: 28px; }
.brand-block { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 14px; margin: -28px -28px 22px; background: var(--rot); border-radius: 16px 16px 0 0; }
.login-logo { width: 52px; height: 52px; border-radius: 50%; }
.brand-block .brand-title { color: #fff; font-family: var(--titel); font-weight: 700; font-size: 28px; line-height: 1; margin: 0; }
.brand-block .brand-sub { color: var(--gelb); font-weight: 600; margin: 2px 0 0; }
.install-hint { max-width: 420px; width: 100%; background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px; padding: 10px 16px; }
.install-hint summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }

/* ---------- Rahmen ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px;
  padding: calc(8px + var(--safe-top)) 16px 8px; background: var(--rot); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.brand > span { display: flex; flex-direction: column; min-width: 0; }
.topbar .brand-title { font-family: var(--titel); font-weight: 700; font-size: 24px; line-height: 1; color: #fff; }
.topbar .brand-sub { font-size: 13px; font-weight: 600; color: var(--gelb); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle { display: none; width: 44px; height: 44px; border: none; border-radius: 10px; background: rgba(0,0,0,.18); color: #fff; align-items: center; justify-content: center; cursor: pointer; }
.bell { position: relative; width: 44px; height: 44px; border: none; border-radius: 10px; background: rgba(0,0,0,.18); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.badge { position: absolute; top: 3px; right: 3px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; background: var(--gelb); color: var(--text); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.me-pill { background: rgba(0,0,0,.18); color: #fff; text-decoration: none; font-weight: 600; padding: 10px 14px; border-radius: 999px; white-space: nowrap; font-size: 15px; }
.me-pill:hover { color: #fff; background: rgba(0,0,0,.28); }
.layout { display: flex; min-height: calc(100vh - 64px); }
.side { flex: 0 0 250px; background: var(--weiss); border-right: 1px solid var(--linie); padding: 12px; overflow-y: auto; }
.nav-link { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-link:hover { background: var(--rot-hell); color: var(--text); }
.nav-link.active { background: var(--rot-hell); color: var(--rot-dunkel); }
.nav-head { margin: 16px 0 4px; padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.nav-empty { padding: 8px 12px; font-size: 14px; color: var(--text-2); }
.main { flex: 1; min-width: 0; padding: 24px; padding-bottom: calc(24px + var(--safe-bottom)); outline: none; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.empty { text-align: center; padding: 48px 16px; background: var(--weiss); border: 1px dashed var(--linie-2); border-radius: 14px; }
.card { background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 20px; margin-bottom: 20px; min-width: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.grid-cards > .card { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid #f0ece5; }
.list li:first-child { border-top: none; }
.list-link { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; text-decoration: none; color: var(--text); }
.list-link:hover b { color: var(--rot-dunkel); }
.countdown { display: flex; align-items: center; gap: 12px; background: var(--rot); color: #fff; border-radius: 12px; padding: 12px 20px; }
.count-num { font-family: var(--titel); font-size: 44px; font-weight: 700; line-height: 1; }
.count-label b { color: var(--gelb); }

/* ---------- Benachrichtigungen ---------- */
.notif-panel { position: fixed; top: calc(64px + var(--safe-top)); right: 12px; z-index: 40; width: min(400px, calc(100vw - 24px)); max-height: 70vh; display: flex; flex-direction: column;
  background: var(--weiss); border: 1px solid var(--linie-2); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.2); }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--linie); }
.notif-head h2 { margin: 0; flex: 1; font-size: 22px; }
.notif-list { overflow-y: auto; }
.notif { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid #f0ece5; text-decoration: none; color: var(--text); }
.notif:hover { background: var(--grund); }
.notif.unread { background: var(--gelb-hell); }
.notif.unread .notif-text { font-weight: 700; }
.notif-time { font-size: 13px; color: var(--text-3); }

/* ---------- Dialoge & Meldungen ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(28,27,26,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--weiss); border-radius: 16px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid var(--linie-2); border-radius: 10px; background: var(--weiss); text-align: left; cursor: pointer; }
.choice:hover { border-color: var(--rot); background: var(--rot-hell); }
.choice span { color: var(--text-2); font-size: 14px; }
#toasts { position: fixed; bottom: calc(16px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.toast-fehler { background: var(--rot-dunkel); }

/* ---------- Baukasten ---------- */
.design-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; padding: 12px 16px; background: var(--gelb-hell); border: 1px solid var(--gelb-rand); border-radius: 12px; }
.design-bar .hint { margin: 0; color: var(--text); }
.blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.block { background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 16px; min-width: 0; }
.designing .block { border: 2px dashed var(--linie-2); cursor: grab; }
.block.dragging { opacity: .5; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: 1 / -1; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.block-title { margin: 0; flex: 1; min-width: 120px; font-size: 22px; }
.block-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.grip { color: var(--text-3); display: flex; }
.block-hinweis { background: var(--gelb-hell); border-color: var(--gelb-rand); }
.block-hinweis .block-body > .pre { font-size: 18px; font-weight: 700; }
.seg { display: inline-flex; border: 1px solid var(--linie-2); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.seg button { border: none; background: var(--weiss); padding: 6px 12px; font-weight: 600; cursor: pointer; min-height: 34px; }
.seg button.on { background: var(--rot-hell); color: var(--rot-dunkel); }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.kcol, .bcol { background: var(--grund); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kcol h3, .bcol h3 { font-family: var(--schrift); font-size: 13px; color: var(--text-2); margin: 2px 2px 0; }
.task { background: var(--weiss); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; font-size: 15px; }
.task.prio-hoch { border-left: 4px solid var(--rot); }
.task .meta { margin: 2px 0 6px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-actions .input-sm { max-width: 110px; }
.task-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.row-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid #f0ece5; }
.row-item:first-child { border-top: none; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item.done b, .row-item.done span:first-child { text-decoration: line-through; color: var(--text-2); }
.grow { flex: 1; min-width: 0; }
.inline-add { display: flex; gap: 8px; margin-top: 10px; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.bcol { flex: 1 1 220px; }
.bcard { border-radius: 8px; padding: 10px; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.bcard .meta { margin: 4px 0 0; }
.bcard-tools { display: flex; gap: 4px; margin-top: 6px; }
.c-gelb { background: var(--gelb-hell); } .c-blau { background: var(--blau-hell); } .c-rot { background: var(--rot-hell); } .c-gruen { background: var(--gruen-hell); } .c-grau { background: #f0ece5; }

/* ---------- Fragen ---------- */
.split { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > .card { margin: 0; }
.q-list { padding: 0; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px; border-bottom: 1px solid var(--linie); }
.chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--linie-2); border-radius: 999px; background: var(--weiss); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--rot-hell); border-color: var(--rot); color: var(--rot-dunkel); }
.qs { list-style: none; margin: 0; padding: 0; }
.q { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-top: 1px solid #f0ece5; text-decoration: none; color: var(--text); }
.q:hover { background: #faf8f4; }
.q.current { background: var(--gelb-hell); }
.status { align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.s-offen { background: var(--rot); color: #fff; } .s-klaerung { background: var(--gelb); color: var(--text); }
.s-beantwortet { background: var(--gruen-hell); color: #0f4d26; } .s-erledigt { background: #f0ece5; color: var(--text-2); }
.q-head { display: flex; gap: 10px; align-items: center; }
.q-title { font-size: 30px; margin: 8px 0 12px; }
.q-status { display: flex; align-items: center; gap: 8px; }
.q-status .input { width: auto; }
.post { padding: 12px 0; border-top: 1px solid #f0ece5; }
.answer { padding-left: 16px; }
.answer.solution { background: var(--gruen-hell); border-radius: 10px; padding: 12px 16px; border-top: none; margin-top: 6px; }
.answer-form { margin-top: 14px; }
.mention-wrap { position: relative; }
.mention-list { position: absolute; left: 0; top: 100%; z-index: 20; list-style: none; margin: 4px 0 0; padding: 4px; width: min(320px, 100%); background: var(--weiss); border: 1px solid var(--linie-2); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.mention-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.mention-list li.on, .mention-list li:hover { background: var(--rot-hell); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 13px; color: var(--text-2); padding: 10px 12px; border-bottom: 2px solid var(--linie); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid #f0ece5; vertical-align: top; font-size: 15px; }
.table tr:last-child td { border-bottom: none; }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.actions > * { margin-left: 4px; }
.table tr.archived td { color: var(--text-3); }
.card .table-wrap { border: none; margin: 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.filters .field { margin: 0; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
.perm-row .input { width: 180px; }
.cell-pair { display: flex; gap: 6px; align-items: center; }
.cell-pair .input { width: auto; min-width: 70px; }
.legend-levels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.lv { padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.lv-0 { background: #f0ece5; color: var(--text-3); } .lv-1 { background: var(--blau-hell); color: #163f75; } .lv-2 { background: var(--gruen-hell); color: #1b5e30; }
.lv-3 { background: var(--gelb-hell); color: var(--text); border: 1px solid var(--gelb-rand); } .lv-4 { background: var(--rot); color: #fff; }
.lv-sel { font-weight: 700; min-width: 130px; }
.danger-zone { border-color: #f3c3c6; }

/* ---------- Lageplan ---------- */
.main:has(.plan) { padding: 0; }
.plan { display: flex; flex-direction: column; height: calc(100vh - 64px - var(--safe-top)); }
.plan-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--weiss); border-bottom: 1px solid var(--linie); }
.plan-title h1 { margin: 0; font-size: 28px; }
.plan-bar .input { width: auto; max-width: min(420px, 100%); }
.plan-bar .head-actions { max-width: 100%; }
.plan-body { flex: 1; display: flex; min-height: 0; }
.plan-tools { flex: 0 0 112px; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--weiss); border-right: 1px solid var(--linie); overflow-y: auto; }
.plan-tools .hint { font-size: 12px; }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; width: 100%; border: none; border-radius: 10px; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.tool:hover { background: var(--rot-hell); }
.tool.on { background: var(--rot); color: #fff; }
.tool-cat { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.tool-cat .label { font-size: 11px; margin: 0; }
.tool-cat .input { font-size: 13px; padding: 4px; min-height: 36px; }
.plan-wrap { flex: 1; min-width: 0; position: relative; overflow: hidden; background: #efece6; }
.plan-canvas { display: block; touch-action: none; cursor: crosshair; outline: none; }
.plan-side { flex: 0 0 320px; overflow-y: auto; background: var(--weiss); border-left: 1px solid var(--linie); padding: 14px; }
.props { border-bottom: 1px solid var(--linie); padding-bottom: 14px; margin-bottom: 14px; }
.props .stat { font-size: 18px; }
.pts summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.pt-row { display: grid; grid-template-columns: 1fr 80px auto; gap: 6px; align-items: center; font-size: 13px; margin: 4px 0; }
.pt-row .input { min-height: 34px; padding: 4px 6px; }
.legend h2 { margin-bottom: 8px; }
.leg-group { margin-bottom: 12px; }
.leg-group h3 { font-family: var(--schrift); font-size: 13px; color: var(--text-3); margin: 8px 0 4px; }
.leg { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 8px; border: none; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.leg:hover { background: var(--grund); }
.leg-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.leg.off .leg-name b { color: #9a948c; text-decoration: line-through; }
.leg.off svg { color: #9a948c; }
.sw { width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0; border: 1px solid rgba(0,0,0,.15); }
.sw-line { height: 0; border: none; border-top: 3px solid; border-radius: 0; margin: 0 2px; width: 20px; }
.sw-hatch { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.75) 0 3px, transparent 3px 6px) !important; }
.sw-note { background: var(--gelb); border-radius: 50%; }
.sw-done { background: var(--linie-2); border-radius: 50%; }
.sw-text { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--weiss); }
.sw-grid { background-color: var(--weiss); background-image: linear-gradient(var(--linie-2) 1px, transparent 1px), linear-gradient(90deg, var(--linie-2) 1px, transparent 1px); background-size: 6px 6px; }

/* ---------- Handy ---------- */
@media (max-width: 1100px) {
  .plan-side { flex-basis: 260px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .side { position: fixed; z-index: 35; top: calc(64px + var(--safe-top)); bottom: 0; left: 0; width: 280px; transform: translateX(-105%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .side.open { transform: none; }
  .main { padding: 16px; }
  .blocks { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3 { grid-column: auto; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .me-pill { display: none; }
  h1 { font-size: 28px; }
  .plan { height: auto; }
  .plan-body { flex-direction: column; }
  .plan-tools { flex-direction: row; flex-basis: auto; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--linie); }
  .tool { width: 72px; flex-shrink: 0; }
  .tool-cat { border: none; min-width: 150px; }
  .plan-wrap { height: 65vh; flex: none; }
  .plan-side { flex-basis: auto; border-left: none; border-top: 1px solid var(--linie); }
}
@media (max-width: 480px) {
  .topbar .brand-sub { display: none; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .login-card { padding: 20px; }
  .brand-block { margin: -20px -20px 20px; }
}

/* =====================================================================
   Version 0.2.0 – 60 Jahre DLRG Bruchköbel
   ===================================================================== */
:root { --navy: #000434; }

/* ---------- Szene: Rot/Dunkelblau diagonal, Luftblasen, Wellen ---------- */
.fx-stage { position: relative; min-height: 100vh; min-height: 100dvh; background: var(--rot); overflow: hidden; color: #fff; }
.fx-navy { position: fixed; inset: 0; background: var(--navy); clip-path: polygon(100% 0, 100% 100%, 0 100%); animation: fx-wipe .9s cubic-bezier(.65,0,.35,1) both; }
@keyframes fx-wipe { from { clip-path: polygon(100% 0, 100% 0, 100% 0); } to { clip-path: polygon(100% 0, 100% 100%, 0 100%); } }
.fx-bubbles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.fx-bubbles i { position: absolute; bottom: -30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); background: rgba(255,255,255,.08); opacity: 0; animation: fx-bubble linear 1 forwards; }
@keyframes fx-bubble { 0% { opacity: 0; transform: translateY(0); } 8% { opacity: 1; } 50% { transform: translateY(-50vh) translateX(12px); } 92% { opacity: .9; } 100% { opacity: 0; transform: translateY(-105vh) translateX(-8px); } }
.fx-waves { position: fixed; left: 0; right: 0; bottom: 0; height: 90px; pointer-events: none; overflow: hidden; }
.fx-waves svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.fx-w1 { animation: fx-drift 9s linear infinite; } .fx-w2 { animation: fx-drift 14s linear infinite reverse; }
@keyframes fx-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fx-pop { animation: fx-pop .7s .75s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes fx-pop { from { opacity: 0; transform: scale(.6) rotate(-6deg); } to { opacity: 1; transform: none; } }
.fx-rise { animation: fx-rise .6s 1s ease-out both; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Login / Startseite ---------- */
.start { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(36px + var(--safe-top)) 16px calc(120px + var(--safe-bottom)); gap: 0; }
.start-logo { width: 170px; height: 170px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.35); display: block; }
.start h1 { color: #fff; font-size: clamp(32px, 6vw, 44px); margin: 18px 0 0; }
.start .start-sub { color: var(--gelb); font-weight: 700; font-size: 18px; margin: 4px 0 0; }
.start-count { margin-top: 16px; display: inline-flex; align-items: baseline; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 18px; color: #fff; }
.start-count b { font-family: var(--titel); font-size: 34px; color: var(--gelb); line-height: 1; font-variant-numeric: tabular-nums; }
.start .login-card { margin-top: 28px; color: var(--text); text-align: left; box-shadow: 0 12px 34px rgba(0,0,0,.18); }
.start .login-card h2 { font-size: 28px; margin-bottom: 12px; }
.start .install-hint { margin-top: 16px; color: var(--text); text-align: left; }
.start-links { margin-top: 18px; font-size: 14px; }
.start-links a { color: #fff; margin: 0 8px; }
.start-links a:hover { color: var(--gelb); }

/* ---------- Ladeanzeige (Rettungsring) ---------- */
.boot-loader { position: fixed; inset: 0; z-index: 300; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: opacity .35s; }
.boot-loader.out { opacity: 0; pointer-events: none; }
.boot-loader svg { width: 84px; height: 84px; animation: fx-spin 1s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }

/* ---------- Kopfzeile mit 60er-Logo ---------- */
.brand-logo { border-radius: 8px; border: 2px solid rgba(255,255,255,.9); }

/* ---------- Countdown im Dashboard ---------- */
.countdown { background: var(--navy); }

/* ---------- Hinweis „Neue Version verfügbar“ ---------- */
.update-bar { position: fixed; left: 50%; bottom: calc(16px + var(--safe-bottom)); transform: translateX(-50%); z-index: 150; display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3); width: max-content; max-width: calc(100vw - 24px); }
.update-bar p { margin: 0; font-weight: 600; }
.update-bar .btn { min-height: 40px; }

/* ---------- Menü-Fuß ---------- */
.nav-foot { margin-top: 24px; padding: 12px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--text-3); display: flex; flex-direction: column; gap: 6px; }
.nav-foot a { color: var(--text-2); }
.nav-version { font-weight: 700; color: var(--text-3); }

/* ---------- „Abgetaucht“ (Seite nicht gefunden in der App) ---------- */
.lost { text-align: center; padding: 48px 16px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 16px; }
.lost svg { width: 72px; height: 72px; margin-bottom: 10px; }
.lost h1 { font-size: 38px; }
.lost .row-gap { justify-content: center; margin-top: 18px; }

/* ---------- Datenschutz-Seite ---------- */
.legal { max-width: 760px; margin: 0 auto; }
.legal .pre { line-height: 1.6; }
.legal-public { min-height: 100vh; padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); background: var(--grund); }

/* ---------- Statische Fehlerseiten ---------- */
.err-main { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: calc(32px + var(--safe-top)) 20px calc(110px + var(--safe-bottom)); }
.err-code { font-family: var(--titel); font-weight: 700; font-size: 20px; letter-spacing: 2px; color: var(--gelb); margin: 22px 0 0; }
.err-main h1 { color: #fff; font-size: clamp(34px, 7vw, 56px); margin: 6px 0 0; max-width: 16ch; }
.err-main p.text { font-size: 18px; max-width: 34rem; margin: 14px auto 0; }
.err-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.btn-light { background: #fff; color: var(--rot-dunkel); border-color: #fff; }
.btn-light:hover { background: var(--gelb); border-color: var(--gelb); color: var(--text); }
.btn-line { background: transparent; color: #fff; border-color: #fff; }
.btn-line:hover { background: rgba(255,255,255,.15); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .fx-bubbles { display: none; }
  .fx-navy, .fx-pop, .fx-rise, .fx-w1, .fx-w2, .boot-loader svg { animation: none !important; }
}
