/* =====================================================================
   Tanzkalender – zentrales Stylesheet
   Mobile-first, ohne Framework. Custom Properties für Farben/Abstände,
   Flexbox/Grid fürs Layout. Breakpoints: Tablet ≥768px, Desktop ≥1024px.
   ===================================================================== */

/* ---------- Design-Tokens ---------- */
:root {
    /* Farben (auf ausreichende Kontraste geachtet) */
    --c-bg: #ffffff;
    --c-fg: #1c1c1c;
    --c-muted: #5a5a5a;
    --c-primary: #b11065;         /* Logo-Farbe */
    --c-primary-dark: #8c0d50;
    --c-accent: #5f6670;
    --c-border: #e0e0e0;
    --c-surface: #f5f5f7;
    --c-surface-2: #ececef;
    --c-success-bg: #e6f5ea;
    --c-success-fg: #1b6b3a;
    --c-error-bg: #fde8e8;
    --c-error-fg: #8a0e30;
    --c-focus: #b11065;

    /* Abstände (Spacing-Skala) */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;

    --radius: 8px;
    --maxw: 1320px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Basis-Schriftgröße: bewusst großzügig (gute Lesbarkeit, v. a. 60+).
       112.5% ≈ 18px. Alle rem-Werte skalieren hierüber mit. Der Admin-
       Bereich multipliziert diesen Wert zusätzlich mit dem Regler-Faktor. */
    --tk-base-fs: 112.5%;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Das hidden-Attribut muss IMMER greifen – auch wenn ein Element per CSS
   ein eigenes display (grid/flex) hat (z. B. Ansichts-Container der Termine). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; font-size: var(--tk-base-fs); }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--c-fg);
    background: var(--c-bg);
    line-height: 1.6;
    font-size: 1rem;
}

img { max-width: 100%; height: auto; }

/* Optionale Schriftart fürs Frontend (Admin-Einstellung „auch im Frontend“) */
body[data-font="serif"] { font-family: Georgia, Cambria, "Times New Roman", Times, serif; }
body[data-font="mono"]  { font-family: "SFMono-Regular", ui-monospace, Consolas, "Liberation Mono", Menlo, monospace; }

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sichtbare Fokus-Stile (Barrierefreiheit) */
:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 2px;
    border-radius: 3px;
}
/* Auf dunklem Untergrund (magenta Header, Türöffner) heller Fokus-Ring. */
.site-header :focus-visible, .door-opener :focus-visible { outline-color: #ffffff; }

/* Skip-Link */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--c-fg);
    color: #fff;
    padding: var(--sp-2) var(--sp-4);
    z-index: 100;
}
.skip-link:focus { left: var(--sp-2); top: var(--sp-2); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-4); }
.content { padding: var(--sp-6) var(--sp-4) var(--sp-7); min-height: 60vh; }

/* Hinweis: KEIN scrollbar-gutter:stable – das reservierte rechts eine Rinne, die
   Chrome als weissen Streifen durch die vollbreiten Balken (Header/Footer) zeigt.
   Ohne Reservierung reicht der Header bis zum Fensterrand; auf scrollenden Seiten
   sitzt dort die echte Scrollbar. Trade-off: minimaler horizontaler Versatz beim
   Wechsel zwischen kurzen und langen Seiten. */
.content, .admin-main { overflow-wrap: break-word; }
.event-description { overflow-wrap: break-word; }
.event-description img { max-width: 100%; height: auto; }
/* Breite Inhalte (Tabellen) scrollen innerhalb ihres Containers */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header / Navigation (mobile-first: Burger) ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: linear-gradient(100deg, #241018 0%, #6a0a3c 55%, var(--c-primary) 100%);
    color: #fff; box-shadow: 0 4px 18px rgba(16,24,40,.15);
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-3); padding-top: var(--sp-3); padding-bottom: var(--sp-3);
}
.brand { color: #fff; font-weight: 800; font-size: 1.2rem; letter-spacing: .3px; display: inline-flex; align-items: center; gap: .6rem; }
.brand:hover { text-decoration: none; opacity: .92; }
.brand-logo { height: 88px; width: auto; display: block; }
@media (max-width: 600px) { .brand-logo { height: 60px; } }
.brand-tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; background: rgba(255,255,255,.22); padding: 3px 9px; border-radius: 999px; }
.site-header .wrap { padding-top: 1.15rem; padding-bottom: 1.15rem; }
.main-nav a { position: relative; }
.main-nav a:hover, .main-nav a:focus { text-decoration: none; }
@media (min-width: 768px) {
    .main-nav a:not(.linklike)::after {
        content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
        background: #fff; transform: scaleX(0); transform-origin: left; transition: transform .15s;
    }
    .main-nav a:not(.linklike):hover::after,
    .main-nav a.is-active::after { transform: scaleX(1); }
    .main-nav a.is-active { font-weight: 700; }
}
/* Mobil: aktiver Menüpunkt hervorgehoben */
.main-nav a.is-active { font-weight: 800; }

/* Kleines rundes Profilbild im Menü */
.nav-profile { display: inline-flex; align-items: center; gap: .45rem; }
.nav-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255,255,255,.6); flex: 0 0 auto; }

.nav-toggle {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    background: none; border: 1px solid rgba(255,255,255,0.5); color: #fff;
    border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); cursor: pointer;
    font: inherit;
}
.nav-toggle .bars { display: inline-block; width: 18px; height: 2px; background: #fff; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: #fff;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

.main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding: var(--sp-2) 0 var(--sp-3);
}
/* Mobil: weisse Liste mit Icons, als Panel UNTERHALB des Headers (nicht im
   Header – der Header bleibt gleich hoch, das Menü klappt darunter auf). */
.main-nav.is-open {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
    display: flex;
    background: #fff;
    margin: 0;
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
    box-shadow: 0 14px 28px rgba(16,24,40,.22);
    border-bottom: 1px solid #eadfe6;
    gap: 2px;
    max-height: calc(100vh - 96px); overflow-y: auto;
}
.main-nav > a, .main-nav > .nav-logout { width: 100%; }
.main-nav a, .main-nav .linklike {
    color: var(--c-fg); width: 100%; text-align: left; box-sizing: border-box;
    display: flex; align-items: center; gap: .7rem;
    padding: 0.82rem 0.7rem; border-radius: 10px;
    font-weight: 600; font-size: 1.05rem;
    background: transparent; border: none;
    transition: background .12s;
}
.main-nav .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; flex: 0 0 auto; color: var(--c-accent); }
.main-nav .nav-icon svg { stroke: currentColor; }
.main-nav .nav-icon .nav-avatar { width: 24px; height: 24px; border-width: 1.5px; }
.main-nav a:hover, .main-nav a:focus, .main-nav .linklike:hover, .main-nav .linklike:focus {
    background: #f3eef1; text-decoration: none;
}
.main-nav a.is-active {
    background: #f6eaf1; color: var(--c-primary); font-weight: 800;
}
.main-nav a.is-active .nav-icon { color: var(--c-primary); }
.main-nav .nav-logout { margin: 0; }
.linklike { background: none; border: none; color: inherit; cursor: pointer; font: inherit; }

/* ---------- Impersonation-Banner (Admin-Ansicht) ---------- */
.impersonate-banner {
    display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: center;
    background: #2d2440; color: #fff; padding: .5rem 1rem; font-size: .9rem;
}
.impersonate-banner .btn { background: var(--c-primary); }
.impersonate-banner .ic { vertical-align: -.15em; margin-right: .25rem; }

/* ---------- Flash / Alerts ---------- */
.alert { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); margin-bottom: var(--sp-4); }
.alert-error { background: var(--c-error-bg); color: var(--c-error-fg); border: 1px solid #f5b5b5; }
.alert-success { background: var(--c-success-bg); color: var(--c-success-fg); border: 1px solid #b7e0c4; }
.alert-warning { background: #fff8e6; color: #7a5f00; border: 1px solid #f0dca0; }
.alert-info    { background: #eef5ff; color: #1e3a72; border: 1px solid #cfe0f7; }
.alert-accent  { background: #fbeef5; color: #8c0d50; border: 1px solid #f0cfe1; }
.alert-plain   { background: #f5f4f6; color: #333333; border: 1px solid #e8e5ea; }
.alert-icon { display: flex; align-items: center; gap: .55rem; }
.alert-icon .ic { flex: 0 0 auto; }
.alert ul { margin: 0; padding-left: 1.2rem; }

/* Feld-Fehlermeldungen (inline am Formularfeld) */
.field-error { display: block; color: var(--c-error-fg); font-size: 0.85rem; margin-top: 3px; }
[aria-invalid="true"] { border-color: var(--c-error-fg) !important; outline-color: var(--c-error-fg); }

/* Formularweite Fehlermeldung – inline im Formular statt als Seiten-Banner */
.form-alert {
    background: var(--c-error-bg); color: var(--c-error-fg);
    border: 1px solid #f5b5b5; border-radius: var(--radius);
    padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-4);
    font-size: 0.92rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: var(--sp-3) var(--sp-5); border-radius: var(--radius);
    background: var(--c-primary); color: #fff; border: none; cursor: pointer;
    font-size: 1rem; line-height: 1.2; text-align: center; white-space: nowrap;
}
.btn:hover { background: var(--c-primary-dark); text-decoration: none; }
.btn-secondary { background: #555; }
.btn-danger { background: #9d1b1b; }
.btn-small { padding: var(--sp-1) var(--sp-3); font-size: 0.85rem; }
.inline { display: inline; }

/* SVG-Icons */
.ic { display: inline-block; vertical-align: -0.15em; }
.btn .ic { display: block; margin: 0 auto; }

/* Icon-Buttons (Symbole statt Text) */
.btn-icon { padding: 0.4rem 0.5rem; line-height: 0; min-width: 2.1rem; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon.btn-small { padding: 0.4rem 0.45rem; }

/* WYSIWYG-Editor */
.wysiwyg { border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; margin-top: 0.25rem; background: #fff; font-weight: normal; }
.wysiwyg-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.wysiwyg-btn { background: #fff; border: 1px solid var(--c-border); border-radius: 6px; padding: 0.25rem 0.5rem; cursor: pointer; font-size: 0.85rem; min-width: 2rem; }
.wysiwyg-btn:hover { background: var(--c-surface-2); }
.wysiwyg-btn--normal { font-weight: 400; color: #1a1a1a; }
.wysiwyg-editor { min-height: 180px; padding: 0.75rem; overflow-wrap: break-word; font-weight: 400; font-style: normal; color: var(--c-fg); }
.wysiwyg-tall .wysiwyg-editor { min-height: 360px; } /* Beschreibung doppelt so hoch (nur markierte Felder) */
.wysiwyg-editor strong, .wysiwyg-editor b { font-weight: 700; }
.wysiwyg-editor:focus { outline: 2px solid var(--c-focus); outline-offset: -2px; }
.wysiwyg-editor h2 { font-size: 1.25rem; margin: 0.5rem 0; }
.wysiwyg-editor h3 { font-size: 1.1rem; margin: 0.5rem 0; }
.wysiwyg-editor p { margin: 0.5rem 0; }

/* ---------- Hero / Startseite ---------- */
.hero { text-align: center; padding: var(--sp-6) 0; }
.hero h1 { font-size: 1.8rem; margin: 0 0 var(--sp-2); }

/* ---------- Kalender (JS-gerendert) ---------- */
.cal-toolbar {
    display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center;
    justify-content: space-between; margin-bottom: var(--sp-5);
    background: linear-gradient(180deg, #fff, var(--c-surface));
    border: 1px solid var(--c-border); border-radius: 14px;
    padding: var(--sp-4) var(--sp-5); box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.cal-toolbar h1 { font-size: 1.8rem; margin: 0; }
.cal-controls { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.cal-controls select {
    min-height: 44px; padding: 0 2.2rem 0 var(--sp-3); border: 1px solid var(--c-border);
    border-radius: 999px; font: inherit; font-size: 1rem; background-color: #fff;
}
.cal-controls .btn { min-width: 44px; }
/* Vor/Zurück-Pfeile deutlich größer und gut greifbar */
#cal-prev, #cal-next { font-size: 1.6rem; line-height: 1; min-width: 52px; padding: 0.25rem 0.9rem; }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-weekday { text-align: center; font-weight: 700; padding: var(--sp-2) 0; color: var(--c-accent); font-size: 0.92rem; text-transform: uppercase; letter-spacing: .05em; }
.cal-cell {
    min-width: 0; min-height: 118px; background: #fff; border: 1px solid var(--c-border);
    border-radius: 12px; padding: 8px; font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.cal-cell--empty { background: transparent; border: none; box-shadow: none; }
.cal-cell--today { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(177,16,101,.20); }
.cal-daynum { font-weight: 700; color: var(--c-accent); font-size: 1rem; margin-bottom: 3px; }
.cal-cell--today .cal-daynum {
    color: #fff; background: var(--c-primary); width: 1.7em; height: 1.7em;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
.cal-event {
    display: block; max-width: 100%; margin-top: 4px; padding: 4px 8px;
    background: var(--c-surface); border-left: 4px solid var(--c-primary); border-radius: 6px;
    color: var(--c-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 0.86rem; transition: background .12s, transform .12s;
}
.cal-event:hover { text-decoration: none; background: var(--c-surface-2); transform: translateX(2px); }
.cal-event .t { color: var(--c-primary); font-weight: 700; margin-right: 4px; }
/* Vergangene Tage: Einträge hellgrau / weniger intensiv (kommende bleiben kräftig) */
.cal-cell--past { background: #fbfbfc; }
.cal-cell--past .cal-daynum { color: #bcbcbc; }
.cal-cell--past .cal-event { opacity: .5; filter: grayscale(45%); }
.cal-cell--past .cal-event .t { color: #9a9a9a; }
.cal-cell--past .cal-event:hover { opacity: 1; filter: none; }
.cal-empty-msg { grid-column: 1 / -1; padding: var(--sp-4); text-align: center; color: var(--c-muted); }
.cal-loading { padding: var(--sp-5); text-align: center; color: var(--c-muted); }

/* ---------- Ansichts-Umschalter (Monat/Woche/Tag/Liste) ---------- */
.cal-view-switch { display: inline-flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.cal-view-switch .btn.is-active {
    background: var(--c-primary); color: #fff; border-color: var(--c-primary);
}

/* ---------- Layout: Kalender + Seitenspalte (mobil: gestapelt) ---------- */
.calendar-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); align-items: start; }
.calendar-main { min-width: 0; }
@media (min-width: 1024px) {
    .calendar-layout { grid-template-columns: 1fr 300px; }
}

/* Dezente Seitenspalte „Nächste Veranstaltungen" */
.cal-sidebar {
    background: #fff; border: 1px solid var(--c-border, #ece7ea);
    border-radius: 14px; padding: var(--sp-4);
    position: sticky; top: 110px;
    box-shadow: 0 1px 3px rgba(16,24,40,.05);
}
.cal-sidebar h2 {
    font-size: 1rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--c-accent); margin: 0; font-weight: 800;
}
.cal-side-sub {
    color: var(--c-muted); font-size: .8rem; margin: 4px 0 var(--sp-3);
    padding-bottom: var(--sp-3); border-bottom: 1px solid #f1edf0;
}
.cal-side-empty { color: var(--c-muted); font-size: .92rem; margin: 0; }
.cal-side-list { list-style: none; margin: 0; padding: 0; }
.cal-side-item + .cal-side-item { border-top: 1px solid #f4f0f3; }
.cal-side-item a {
    display: flex; gap: .7rem; align-items: flex-start; padding: .6rem; margin: 0 -.6rem;
    border-radius: 10px; text-decoration: none; color: inherit; transition: background .12s;
}
.cal-side-item a:hover { background: #faf5f8; text-decoration: none; }
.cal-side-item a:hover .csi-title { color: var(--c-primary); }
/* Datums-Badge links (Monat farbig, Tag gross) */
.csi-badge { flex: 0 0 auto; width: 46px; border-radius: 8px; overflow: hidden; border: 1px solid #ece7ea; text-align: center; background: #fff; }
.csi-mon { display: block; color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .02em; padding: 2px 0; text-transform: uppercase; }
.csi-day { display: block; background: #fff; color: var(--c-accent); font-size: 1.35rem; font-weight: 800; line-height: 1.1; padding: 3px 0; }
.csi-body { flex: 1 1 auto; min-width: 0; }
.csi-title { display: block; font-size: .95rem; font-weight: 700; line-height: 1.28; overflow-wrap: anywhere; }
.csi-time { display: flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--c-muted); font-style: italic; margin-top: 3px; }
.csi-time svg { flex: 0 0 auto; stroke: var(--c-muted); }
.csi-desc { display: block; font-size: .82rem; color: #555; line-height: 1.35; margin-top: 3px; }
.cal-side-all {
    display: inline-flex; align-items: center; gap: 5px; margin-top: var(--sp-3);
    padding-top: var(--sp-3); border-top: 1px solid #f1edf0;
    width: 100%; font-size: .85rem; font-weight: 700; color: var(--c-primary);
}
.cal-side-all:hover { text-decoration: none; gap: 8px; }

/* ---------- Wochenansicht ---------- */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-week .cal-wday {
    border: 1px solid var(--c-border, #eadfe6); border-radius: var(--radius);
    background: var(--c-surface); padding: 6px; min-height: 150px; display: flex; flex-direction: column; gap: 4px;
}
.cal-week .cal-wday--today { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(177,16,101,.20); }
.cal-week .cal-wday--past { background: #fbfbfc; }
.cal-week .cwd-head { font-weight: 700; color: var(--c-accent); font-size: .85rem; text-align: center; border-bottom: 1px solid #eee; padding-bottom: 3px; }
.cal-week .cal-wday--today .cwd-head { color: var(--c-primary); }

.cal-week .cal-event { border-left-width: 4px; }
@media (max-width: 680px) {
    .cal-week { display: flex; overflow-x: auto; gap: 8px; -webkit-overflow-scrolling: touch; }
    .cal-week .cal-wday { flex: 0 0 78%; }
    .cal-view-switch { margin-left: 0; }
}

/* ---------- Tagesansicht (nutzt Agenda-Stil) ---------- */
.cal-day-empty { padding: var(--sp-5); text-align: center; color: var(--c-muted); }

/* ---------- Veranstalter-Seite / Abo-Karten ---------- */
.veranstalter { max-width: 900px; }
.veranstalter h1 { display: flex; align-items: center; gap: 10px; }
.veranstalter .lead { font-size: 1.08rem; color: #333; }
.abo-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); margin: var(--sp-3) 0 var(--sp-5); }
@media (min-width: 720px) { .abo-grid { grid-template-columns: 1fr 1fr; } }
.abo-card {
    background: var(--c-surface); border: 1px solid var(--c-border, #e7e2e6);
    border-radius: var(--radius); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2);
}
.abo-card h3 { margin: 0; }
.abo-price { font-size: 1.8rem; font-weight: 800; color: var(--c-primary); margin: 0; }
.abo-meta { color: var(--c-muted); font-size: .95rem; margin: 0; }
.abo-card .btn { align-self: flex-start; margin-top: auto; }
.abo-new {
    background: #faf3f8; border: 1px solid #f0d9e8; border-radius: var(--radius);
    padding: var(--sp-4); margin-bottom: var(--sp-4);
}
.abo-new h2 { margin-top: 0; }
.abo-hint { color: var(--c-muted); font-size: .95rem; }

/* Profil: Veranstalter-Abo-Kasten */
.profile-abo { margin-top: var(--sp-5); }
.profile-abo .abo-grid { margin-bottom: 0; }

/* ---------- Zeitleiste (Termine-Ansicht) ---------- */
.event-timeline { position: relative; margin-top: var(--sp-4); }
.tl-empty { color: var(--c-muted); padding: var(--sp-4); }
.tl-group { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: var(--sp-4); padding-bottom: var(--sp-4); }
.tl-group::before { content: ""; position: absolute; left: 61px; top: 8px; bottom: -8px; width: 2px; background: var(--c-border, #e9e1e7); }
.tl-group:last-child::before { display: none; }
.tl-date { position: relative; text-align: center; line-height: 1.1; padding-top: 2px; }
.tl-date::after {
    content: ""; position: absolute; left: 60px; top: 6px; width: 13px; height: 13px; border-radius: 50%;
    background: var(--c-primary); box-shadow: 0 0 0 3px var(--c-bg, #fff);
}
.tl-group--today .tl-date::after { background: var(--c-primary); }
.tl-day { display: block; font-size: 1.5rem; font-weight: 800; color: var(--c-accent); }
.tl-mon { display: block; font-size: .8rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .03em; }
.tl-dow { display: block; font-size: .78rem; color: var(--c-muted); }
.tl-today { display: inline-block; margin-top: 4px; background: var(--c-primary); color: #fff; font-size: .68rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.tl-group--today .tl-day { color: var(--c-primary); }
.tl-items { display: grid; gap: var(--sp-2); min-width: 0; }
.tl-item {
    position: relative;
    display: flex; gap: var(--sp-3); align-items: baseline; text-decoration: none; color: inherit;
    background: #fff; border: 1px solid var(--c-border); border-left: 4px solid var(--cat, var(--c-primary));
    border-radius: 12px; padding: .6rem .9rem; box-shadow: 0 1px 2px rgba(16,24,40,.05);
    transition: transform .12s ease, box-shadow .16s ease;
}
.tl-item:hover { text-decoration: none; transform: translateX(2px); box-shadow: 0 6px 16px rgba(16,24,40,.08), 0 1px 3px rgba(16,24,40,.05); }
/* Feste Breite der Uhrzeit-Spalte, damit alle Titel bündig starten (mit/ohne Endzeit). */
.tl-time { flex: 0 0 7.5em; font-weight: 800; color: var(--c-primary); font-size: .95rem; white-space: nowrap; }
.tl-body { min-width: 0; }
/* Titel = Link zum Termin (macht die ganze Zeile klickbar via Stretched-Link). */
.tl-title { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; color: inherit; text-decoration: none; }
.tl-title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tl-item:hover .tl-title { text-decoration: none; }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-top: 3px; }
.tl-meta .badge { font-size: .72rem; }
.tl-loc { color: var(--c-muted); font-size: .85rem; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
/* Nur der Ort-Link liegt über dem Stretched-Link (separat klickbar). */
a.tl-loc { position: relative; z-index: 2; }
a.tl-loc:hover { color: var(--c-primary); text-decoration: none; }
.tl-loc svg { flex: 0 0 auto; opacity: .75; }
.tl-dist { color: var(--c-primary); font-size: .82rem; font-weight: 700; }
.tl-group--past { opacity: .62; }
.tl-group--past:hover { opacity: 1; }
@media (max-width: 480px) {
    .tl-group { grid-template-columns: 50px 1fr; gap: var(--sp-3); }
    .tl-group::before { left: 49px; }
    .tl-date::after { left: 48px; }
    .tl-day { font-size: 1.25rem; }
    .tl-item { flex-direction: column; gap: 2px; }
}

/* ---------- DB-gestützte PLZ/Ort-Felder (Autocomplete) ---------- */
.zip-wrap { position: relative; }
.zip-suggest {
    position: absolute; z-index: 1200; left: 0; right: 0; top: 100%;
    background: #fff; border: 1px solid var(--c-border, #d9d2d7); border-top: none;
    border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 20px rgba(16,24,40,.12);
    max-height: 260px; overflow-y: auto;
}
.zip-suggest[hidden] { display: none; }
.zip-opt { padding: .5rem .7rem; cursor: pointer; font-weight: normal; display: flex; gap: .5rem; align-items: baseline; }
.zip-opt strong { color: var(--c-primary); min-width: 3.2em; }
.zip-opt .zk { margin-left: auto; color: var(--c-muted); font-size: .8rem; }
.zip-opt.is-active, .zip-opt:hover { background: #faf3f8; }
.zip-hint { display: block; margin-top: 3px; font-size: .82rem; color: var(--c-error-fg, #b3261e); }
.zip-hint.zip-hint--info { color: var(--c-muted); }
.zip-hint[hidden] { display: none; }

/* ---------- Startseiten-Werbebanner ---------- */
.home-banners--top { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; align-items: center; margin: 0 0 var(--sp-4); }
.home-banners--bottom { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; align-items: center; margin: var(--sp-6) 0 var(--sp-4); }
.home-banner { display: inline-block; line-height: 0; }
.home-banner img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
/* Banner-Ecken vom Admin wählbar (Standard: abgerundet). „Eckig" = ohne Radius. */
body[data-banner-corners="square"] .home-banner img,
body[data-banner-corners="square"] .door-opener__stage,
body[data-banner-corners="square"] .door-opener__ad img,
body[data-banner-corners="square"] .door-opener__stage::before,
body[data-banner-corners="square"] .door-opener__door { border-radius: 0; }
/* Seiten-Banner: an den freien Rand (Gutter) neben dem Inhalt gebunden, damit
   sie den 1320px breiten Inhalt nie überlappen. Breite = halber freier Rand
   abzüglich Abstand; Bilder werden auf diese Breite begrenzt. */
.home-banners--side {
    position: fixed; top: 150px; z-index: 15;
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
    width: calc((100vw - var(--maxw)) / 2 - 24px);
}
.home-banners--left { left: 12px; }
.home-banners--right { right: 12px; }
.home-banners--side .home-banner { width: 100%; display: flex; justify-content: center; }
.home-banners--side .home-banner img { max-width: 100%; max-height: 82vh; width: auto; height: auto; }
/* Unter ~1680px bleibt zu wenig Rand für ein sinnvolles Seiten-Banner. */
@media (max-width: 1680px) { .home-banners--side { display: none; } }

/* ---------- Startseiten-Infobox (Admin-Mitteilung) ---------- */
/* Standard: schlicht & dezent – hellgrauer Hintergrund, magenta Linie links. */
.home-notice {
    margin: 0 0 var(--sp-5); border-radius: 12px; padding: var(--sp-4) var(--sp-5);
    background: #f5f4f6; border: 1px solid #e8e5ea; border-left: 4px solid var(--c-primary);
    color: var(--c-fg);
}
.home-notice .hn-title { display: flex; align-items: center; gap: 9px; margin: 0 0 var(--sp-2); font-size: 1.2rem; color: var(--c-accent); }
.home-notice .hn-title svg { stroke: var(--c-primary); }
.home-notice .hn-text { line-height: 1.55; }
/* Farbvarianten (im Admin wählbar) */
.home-notice--plain   { background: #f5f4f6; border-color: #e8e5ea; border-left-color: var(--c-primary); }
.home-notice--accent  { background: #fbeef5; border-color: #f0cfe1; border-left-color: var(--c-primary); }
.home-notice--info    { background: #eef5ff; border-color: #cfe0f7; border-left-color: #2563eb; }
.home-notice--info .hn-title svg    { stroke: #2563eb; }
.home-notice--success { background: #eefaf0; border-color: #cdeed4; border-left-color: #1f9d4d; }
.home-notice--success .hn-title svg { stroke: #1f9d4d; }
.home-notice--warning { background: #fff8e6; border-color: #f2e3ad; border-left-color: #d99e12; }
.home-notice--warning .hn-title svg { stroke: #d99e12; }

/* ---------- Passkeys (WebAuthn) ---------- */
.passkey-login { margin-top: var(--sp-4); }
.passkey-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    padding: 13px 16px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer;
    background: #202a38; color: #fff; border: 1px solid #202a38;
    transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}
.passkey-btn svg { stroke: #fff; flex: 0 0 auto; }
.passkey-btn:hover { background: #2c3a4d; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.btn-block { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.or-sep { display: flex; align-items: center; gap: .8rem; color: var(--c-muted); font-size: .9rem; margin: var(--sp-3) 0; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--c-border, #e2dde1); }
.passkey-status { display: block; margin-top: 8px; font-size: .9rem; color: var(--c-muted); }
.profile-passkeys { margin-top: var(--sp-5); }
.profile-passkeys h2 { display: flex; align-items: center; gap: 8px; }
.pk-list { list-style: none; margin: var(--sp-3) 0; padding: 0; display: grid; gap: var(--sp-2); }
.pk-item {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem;
    background: var(--c-surface); border: 1px solid var(--c-border, #e7e2e6);
    border-radius: var(--radius); padding: var(--sp-2) var(--sp-3);
}
.pk-name { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.pk-meta { color: var(--c-muted); font-size: .85rem; }
.pk-del { margin-left: auto; }

/* ---------- Farbiger Titel-Tooltip im Kalender ---------- */
.cal-tip {
    position: fixed; z-index: 9999; max-width: 340px;
    padding: 9px 13px; border-radius: 8px;
    font-size: 1.02rem; font-weight: 500; line-height: 1.4;
    background: #ffffff; color: #6a6a6a;
    border: 1px solid var(--c-border);
    box-shadow: 0 3px 12px rgba(16,24,40,.12); pointer-events: none;
    white-space: pre-line; word-break: break-word;
}
/* Kalendername als rundes Label in Kalenderfarbe – gleiche Grösse wie im Detail (.badge) */
.cal-tip-name { display: inline-block; padding: 2px var(--sp-2); border-radius: 999px;
    font-size: .72rem; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
/* Datums-Badge + Termintext (Badge links neben dem Titel, unter dem Kalendernamen) */
.cal-tip-row { display: flex; align-items: flex-start; gap: 8px; }
.cal-tip-date { flex: 0 0 auto; width: 42px; border-radius: 8px; overflow: hidden;
    border: 1px solid #ececec; text-align: center; background: #fff; line-height: 1; }
.cal-tip-mon { display: block; color: #fff; font-size: .56rem; font-weight: 800;
    letter-spacing: .02em; padding: 2px 0; text-transform: uppercase; }
.cal-tip-day { display: block; color: #333; font-size: 1.05rem; font-weight: 800; padding: 2px 0; }
.cal-tip-ev { display: block; color: #6a6a6a; }
.cal-tip[hidden] { display: none; }

/* ---------- Routenberechnung (Detailseite unter der Karte) ---------- */
.route-plan {
    margin-top: var(--sp-4);
    background: linear-gradient(180deg, #fff, #fbf6fa);
    border: 1px solid var(--c-border, #ecdfe8); border-radius: 16px;
    padding: var(--sp-4) var(--sp-4) var(--sp-4);
    box-shadow: 0 4px 16px rgba(16,24,40,.06);
}
.route-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.route-ico {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c-primary); color: #fff;
}
.route-ico svg { stroke: #fff; }
.route-title { font-size: 1.15rem; margin: 0; line-height: 1.2; }
.route-sub { margin: 2px 0 0; color: var(--c-muted); font-size: .9rem; }

.route-input {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--c-border, #d9d2d7); border-radius: 12px;
    padding: 4px 6px 4px 12px;
}
.route-input:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(177,16,101,.12); }
.route-input .ri-ico { display: inline-flex; color: var(--c-muted); }
.route-input .ri-ico svg { stroke: var(--c-muted); }
.route-input input { flex: 1 1 auto; min-width: 0; border: none; outline: none; padding: 10px 4px; font-size: 1rem; background: transparent; }
.ri-geo {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
    background: var(--c-surface, #f4eef2); color: var(--c-primary); border: 1px solid var(--c-border, #e6d8e2);
    border-radius: 9px; padding: 7px 11px; font-weight: 700; font-size: .9rem; cursor: pointer;
}
.ri-geo:hover { background: #f3e3ee; }
.ri-geo svg { stroke: var(--c-primary); }
@media (max-width: 460px) { .ri-geo span { display: none; } }

.route-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--sp-3); margin-top: var(--sp-3); }
.route-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 16px; border-radius: 12px; font-weight: 700; font-size: 1rem;
    cursor: pointer; text-decoration: none; border: 1px solid transparent;
    transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}
.route-btn svg { flex: 0 0 auto; }
.route-btn:hover { transform: translateY(-1px); text-decoration: none; }
.route-btn--primary { background: var(--c-primary); color: #fff; box-shadow: 0 4px 12px rgba(177,16,101,.25); }
.route-btn--primary svg { stroke: #fff; }
.route-btn--primary:hover { background: var(--c-primary-dark); box-shadow: 0 7px 18px rgba(177,16,101,.32); }
.route-btn--osm { background: #fff; color: var(--c-fg); border-color: var(--c-border, #d9d2d7); }
.route-btn--osm svg { stroke: var(--c-fg); }
.route-btn--osm:hover { background: var(--c-surface, #f4eef2); border-color: #c9bcc6; }
.route-status { display: block; margin-top: var(--sp-2); font-size: .88rem; color: var(--c-muted); }
@media (max-width: 520px) { .route-actions { grid-template-columns: 1fr; } }

/* ---------- Filter-Leiste (Listenansicht) ---------- */
.filter-bar {
    display: flex; flex-wrap: wrap; align-items: end; gap: var(--sp-3) var(--sp-4);
    background: linear-gradient(180deg, #fbfbfc, var(--c-surface));
    border: 1px solid var(--c-border); padding: var(--sp-4); border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
    margin-bottom: var(--sp-5);
}
.filter-bar label {
    display: flex; flex-direction: column; gap: var(--sp-1); font-size: 0.85rem; font-weight: 600;
    flex: 1 1 150px; min-width: 130px;
}
.filter-bar .filter-q { flex: 1.7 1 190px; }
/* Kalender-Feld etwas breiter (Namen wie „Tanzen am Nachmittag" nicht abschneiden);
   Suche oben leicht verkleinert, damit die Zeile nicht zusätzlich umbricht. */
.filter-bar .filter-cal { flex-grow: 1.4; flex-basis: 195px; min-width: 180px; }
.filter-bar input, .filter-bar select {
    width: 100%; box-sizing: border-box; height: 42px;
    padding: 0 var(--sp-3); border: 1px solid var(--c-border); border-radius: 10px; background: #fff;
    font: inherit; font-weight: normal; transition: border-color .14s, box-shadow .14s;
}
.filter-bar input:focus, .filter-bar select:focus {
    outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(177,16,101,.13);
}
.filter-actions { display: flex; gap: var(--sp-2); align-items: end; flex: 0 0 auto; }
/* Filter-Symbol-Buttons genau so hoch wie die Eingabefelder, quadratisch */
.filter-actions .btn { height: 42px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.filter-actions .btn-icon { width: 42px; min-width: 42px; padding: 0; }

/* ---------- PLZ-Multiselect ---------- */
.filter-plz { position: relative; }
.plz-multi {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    min-height: 42px; box-sizing: border-box; padding: 3px 6px;
    border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff;
}
.plz-multi:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(177, 16, 101, 0.15); }
.plz-chips { display: contents; }
.plz-chip {
    display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 600;
    background: var(--c-primary); color: #fff; border-radius: 999px; padding: 2px 4px 2px 9px; line-height: 1.4;
}
.plz-chip-x {
    border: 0; background: rgba(255,255,255,0.25); color: #fff; cursor: pointer;
    width: 16px; height: 16px; border-radius: 50%; font-size: 0.9rem; line-height: 1; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.plz-chip-x:hover { background: rgba(255,255,255,0.45); }
#plz-input {
    flex: 1 1 60px; min-width: 60px; border: 0 !important; outline: none;
    height: 32px !important; padding: 0 2px !important; font: inherit; font-weight: normal; background: transparent;
}
.plz-suggest {
    position: absolute; top: calc(100% + 3px); left: 0; right: 0; z-index: 200;
    margin: 0; padding: 4px; list-style: none; max-height: 240px; overflow-y: auto;
    background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.plz-opt {
    display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 6px;
    cursor: pointer; font-size: 0.9rem; font-weight: normal;
}
.plz-opt:hover { background: #f3eef1; }
.plz-opt .plz-cnt {
    margin-left: auto; background: #eee; color: var(--c-accent); border-radius: 999px;
    padding: 1px 8px; font-size: 0.72rem; font-weight: 600;
}

/* ---------- Event-Liste ---------- */
.event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.event-item {
    position: relative;
    display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center;
    padding: 0.9rem 1.15rem;
    border: 1px solid var(--c-border); border-left: 3px solid var(--cat, var(--c-primary));
    border-radius: 12px; background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 1px rgba(16,24,40,.03);
    overflow: hidden; transition: box-shadow .16s ease, transform .12s ease, border-color .16s ease;
}
.event-item:hover {
    box-shadow: 0 6px 16px rgba(16,24,40,.08), 0 1px 3px rgba(16,24,40,.05);
    transform: translateY(-1px);
}
/* Ganze Karte klickbar zum Termin (Stretched-Link über den Titel), der Ort-Link
   liegt darüber und bleibt separat anklickbar. */
.event-title { color: var(--c-fg); text-decoration: none; font-weight: 600; }
.event-title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.event-item:hover .event-title { text-decoration: none; }
/* Kalender-Datums-Symbol links (Monat + Tag) im Kalenderfarbton. */
.event-cal { flex: 0 0 auto; width: 48px; border-radius: 10px; overflow: hidden; border: 1px solid var(--c-border); text-align: center; background: #fff; align-self: center; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.event-cal-mon { display: block; background: var(--cat, var(--c-primary)); color: #fff; font-size: .6rem; font-weight: 800; letter-spacing: .05em; padding: 3px 0; text-transform: uppercase; }
.event-cal-day { display: block; background: #fff; color: var(--c-fg); font-size: 1.32rem; font-weight: 800; line-height: 1.05; padding: 3px 0 4px; }
/* Feste Breite der Uhrzeit-Spalte, damit alle Titel bündig starten
   (unabhängig davon, ob eine Endzeit angezeigt wird). */
.event-date { font-weight: 700; color: var(--c-primary); flex: 0 0 7.5rem; white-space: nowrap; }
.event-main { flex: 1; min-width: 12rem; display: flex; flex-direction: column; gap: 2px; }
.event-title { min-width: 0; }
/* Infos aus dem Detaileintrag – dezent unterhalb des Titels. */
.event-info { font-size: .82rem; color: var(--c-muted); font-weight: 400; line-height: 1.35; overflow-wrap: anywhere; }
/* Ort: als Link zur Orts-Seite (liegt über dem Stretched-Link). */
.event-loc { position: relative; z-index: 2; color: var(--c-muted); font-size: 0.9rem; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
a.event-loc:hover { color: var(--c-primary); text-decoration: none; }
.event-loc svg { flex: 0 0 auto; opacity: .75; }
.event-loc-count { background: var(--c-primary); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.badge { position: relative; z-index: 0; display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: var(--c-accent); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: .01em; box-shadow: 0 1px 2px rgba(16,24,40,.12); }

/* ---------- Orts-Seite (/ort/{id}) ---------- */
.venue-head { margin: var(--sp-4) 0 var(--sp-3); }
.venue-head h1 { margin: 0 0 .3rem; }
.venue-sub { color: var(--c-muted); margin: .1rem 0 0; display: inline-flex; align-items: center; gap: .35rem; font-size: .95rem; }
.venue-sub svg { color: var(--c-primary); opacity: .85; }
/* Standortinformationen-Box */
.venue-info { background: var(--c-surface, #faf6f9); border: 1px solid var(--c-border, #ecdfe8); border-radius: 14px; padding: var(--sp-4) var(--sp-5); margin: var(--sp-3) 0 var(--sp-4); }
.venue-info-h { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin: 0 0 var(--sp-3); }
.venue-info-h svg { color: var(--c-primary); }
.venue-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-3) var(--sp-4); margin: 0; }
.venue-info-grid > div { display: flex; flex-direction: column; gap: 2px; }
.venue-info-grid dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); font-weight: 700; }
.venue-info-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.venue-info-grid dd a { color: var(--c-primary); display: inline-flex; align-items: center; gap: .3rem; }
.venue-info-grid .venue-coords { font-weight: 500; color: var(--c-muted); font-variant-numeric: tabular-nums; }
/* Schlanker (dezenter) Routenplaner auf der Orts-Seite */
.route-plan--slim { background: var(--c-surface, #faf6f9); box-shadow: none; border-radius: 14px; }
.route-plan--slim .route-ico { width: 38px; height: 38px; background: transparent; color: var(--c-primary); border: 1px solid var(--c-border, #e6d8e2); }
.route-plan--slim .route-ico svg { stroke: var(--c-primary); }
.route-plan--slim .route-title { font-size: 1.02rem; }
.venue-events-h { display: flex; align-items: center; gap: .5rem; margin: var(--sp-5) 0 var(--sp-3); font-size: 1.2rem; }
.venue-events-h svg { color: var(--c-primary); }
.venue-link { display: inline-block; margin-left: .4rem; color: var(--c-primary); font-weight: 600; font-size: .92rem; white-space: nowrap; }
/* Detailseite: „Weitere Termine an diesem Ort" */
.venue-more { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: var(--sp-4) var(--sp-5); margin: var(--sp-4) 0; }
.venue-more-h { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin: 0 0 var(--sp-3); }
.venue-more-h svg { color: var(--c-primary); }
.venue-more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.venue-more-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; padding: .5rem .75rem; border-radius: 9px; text-decoration: none; color: var(--c-fg); background: #fff; border: 1px solid var(--c-border); transition: background .12s, transform .08s; }
.venue-more-list a:hover { background: #faf3f8; transform: translateX(2px); text-decoration: none; }
.venue-more-list .vm-date { flex: 0 0 auto; font-weight: 700; color: var(--c-primary); font-size: .9rem; white-space: nowrap; min-width: 10rem; }
.venue-more-list .vm-title { color: var(--c-fg); }
.venue-more-all { display: inline-block; margin-top: var(--sp-3); color: var(--c-primary); font-weight: 600; text-decoration: none; }
.venue-more-all:hover { text-decoration: underline; }
.result-count { color: var(--c-muted); font-size: 0.9rem; margin-bottom: var(--sp-3); }

/* ---------- Ansichts-Umschalter (Liste/Kacheln/Karte) ---------- */
.events-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.events-head h1 { margin: 0; }
.view-switch { display: inline-flex; gap: 4px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 999px; padding: 4px; }
.view-switch button { display: inline-flex; align-items: center; gap: .4rem; border: none; background: none; padding: .45rem .9rem; border-radius: 999px; cursor: pointer; color: var(--c-muted); font: inherit; font-weight: 600; }
.view-switch button:hover { color: var(--c-fg); }
.view-switch button.is-active { background: var(--c-primary); color: #fff; box-shadow: 0 3px 10px rgba(177,16,101,.30); }
@media (max-width: 560px) { .view-switch button span { display: none; } }

/* ---------- Kacheln-Ansicht ---------- */
.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.event-card { display: block; background: #fff; border: 1px solid var(--c-border); border-left: 4px solid var(--cat, var(--c-primary)); border-radius: 10px; padding: 1rem; color: var(--c-fg); box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: transform .14s, box-shadow .14s; }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(16,24,40,.10); text-decoration: none; }
.event-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.ec-date { color: var(--c-primary); font-weight: 700; font-size: .85rem; }
.ec-title { margin: .2rem 0; font-size: 1.05rem; line-height: 1.3; }
.ec-loc { color: var(--c-muted); font-size: .9rem; }
.ec-dist { color: var(--c-primary); font-size: .8rem; font-weight: 600; margin-top: .3rem; }

/* ---------- Kartenansicht + Umkreissuche ---------- */
.event-map { height: 70vh; min-height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--c-border); }
.map-results { margin-top: .75rem; }
.leaflet-popup-content a { color: var(--c-primary); font-weight: 600; }
.geo-search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.geo-search #geo-place { flex: 1 1 180px; padding: .5rem; border: 1px solid var(--c-border); border-radius: var(--radius); font: inherit; }
.geo-or { color: var(--c-muted); font-size: .85rem; }
.geo-radius { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; }
.geo-radius select { padding: .4rem; border: 1px solid var(--c-border); border-radius: var(--radius); font: inherit; }
.geo-status { color: var(--c-muted); font-size: .85rem; }

/* ---------- Event-Detail ---------- */
.event-detail .back { margin-bottom: var(--sp-4); }
.event-meta { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-1) var(--sp-4); margin: var(--sp-4) 0; }
.event-meta dt { font-weight: 700; color: var(--c-muted); }
.event-meta dd { margin: 0; }
.event-description { margin: var(--sp-5) 0; }

/* ---------- Formulare ---------- */
.form label { display: block; margin-bottom: var(--sp-4); font-weight: 600; }
/* Enthält ein Label den WYSIWYG-Editor, darf es NICHT fett sein – sonst übernimmt
   der Browser „bold" als Tipp-Stil und getippter Text wird fett. Der Feldname wird
   separat wieder hervorgehoben (.wysiwyg-label). */
.form label:has(.wysiwyg) { font-weight: 400; }
.wysiwyg-label { display: inline-block; font-weight: 600; margin-bottom: .1rem; }
.form input[type=text], .form input[type=url], .form input[type=email],
.form input[type=password], .form input[type=search], .form input[type=datetime-local],
.form input[type=tel], .form input[type=number], .form input[type=date],
.form select, .form textarea {
    width: 100%; padding: var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--radius);
    font: inherit; font-weight: normal; margin-top: var(--sp-1);
}
.form .checkbox { font-weight: normal; display: flex; align-items: center; gap: var(--sp-2); }
.form .checkbox input { width: auto; margin: 0; }
.form-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }

.auth-box { max-width: 420px; margin: var(--sp-6) auto; padding: var(--sp-6); background: var(--c-surface); border-radius: var(--radius); }
.auth-box .btn { width: 100%; }
.auth-links { margin-top: var(--sp-4); font-size: 0.9rem; text-align: center; }

/* Registrierung: breitere Karte, gegliederte Abschnitte, 2-Spalten-Raster */
.auth-box--wide {
    max-width: 680px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .08);
    border: 1px solid var(--c-border, #ece7ea);
}
.auth-box--wide > h1 { text-align: center; margin-bottom: .2rem; }
.reg-intro { text-align: center; color: var(--c-muted); margin: 0 0 var(--sp-5); }
.reg-form .reg-section {
    border: 1px solid var(--c-border, #e7e2e6); border-radius: 14px;
    padding: var(--sp-2) var(--sp-4) var(--sp-3); margin-bottom: var(--sp-5); border-top: 3px solid var(--c-primary);
}
.reg-form .reg-section > legend {
    font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--c-primary); padding: 0 .5rem;
}
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-4); }
.reg-grid > label { margin-bottom: var(--sp-3); }
.reg-grid > label.full { grid-column: 1 / -1; }
.reg-required-note { color: var(--c-muted); font-size: .82rem; margin: .2rem 0 0; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1.05rem; font-weight: 700; }
@media (max-width: 560px) {
    .reg-grid { grid-template-columns: 1fr; }
    .auth-box--wide { padding: var(--sp-4); }
}
.profile { max-width: none; width: 100%; }

/* ---------- Tabellen (auch Admin) ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin: var(--sp-4) 0; }
.table th, .table td { text-align: left; padding: var(--sp-2); border-bottom: 1px solid var(--c-border); font-size: 0.9rem; }
.table th { background: var(--c-surface); }
.status { font-size: 0.8rem; padding: 2px var(--sp-2); border-radius: 999px; }
.status--active { background: var(--c-success-bg); color: var(--c-success-fg); }
.status--pending { background: #fff4d6; color: #8a5a00; }
.status--inactive { background: var(--c-surface-2); color: var(--c-muted); }

/* ---------- Pager / Footer / Fehlerseite ---------- */
.pager { display: flex; gap: var(--sp-4); align-items: center; justify-content: center; margin-top: var(--sp-6); }
.error-page { text-align: center; padding: var(--sp-7) 0; }
.site-footer { margin-top: var(--sp-6); background: var(--c-surface); border-top: 1px solid var(--c-border); color: var(--c-muted); }
/* Obere Zeile: Marke links, Rechtslinks rechts. */
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4) var(--sp-6); padding: var(--sp-5) 0 var(--sp-4); }
.footer-brand { display: flex; align-items: center; gap: .7rem; }
.footer-mark {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
    background: #fff url("/img/figure.svg") no-repeat center / 58%;
    border: 1px solid var(--c-border); box-shadow: 0 1px 3px rgba(16,24,40,.10);
}
.footer-brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.footer-name { font-weight: 800; color: var(--c-fg); letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; }
.footer-tag { font-size: .82rem; color: var(--c-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.footer-link { position: relative; color: var(--c-muted); font-size: .95rem; font-weight: 600; text-decoration: none; transition: color .12s; padding: .1rem 0; }
.footer-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--c-primary); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .16s ease; }
.footer-link:hover, .footer-link.is-active { color: var(--c-primary); text-decoration: none; }
.footer-link:hover::after, .footer-link.is-active::after { transform: scaleX(1); }
/* Untere Zeile: feine Trennlinie, Copyright links, Version rechts. */
.footer-base { border-top: 1px solid var(--c-border); }
.footer-base-inner { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .85rem 0; }
.footer-copy { margin: 0; font-size: .85rem; color: var(--c-muted); }
.footer-version { font-size: .72rem; color: var(--c-muted); opacity: .65; letter-spacing: .03em; }
@media (max-width: 640px) {
    .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4); padding-top: var(--sp-5); }
    .footer-brand { flex-direction: column; gap: .5rem; }
    .footer-links { justify-content: center; gap: .8rem 1.3rem; }
    .footer-base-inner { flex-direction: column; gap: .25rem; padding: .9rem 0; }
}

/* Rechts-/Info-Seiten (volle Inhaltsbreite) */
.legal { max-width: none; width: 100%; }
.legal h1 { margin-bottom: var(--sp-4); }
.legal h2 { font-size: 1.2rem; margin: var(--sp-5) 0 var(--sp-2); }
.legal ul { padding-left: 1.3rem; }
.legal li { margin: .3rem 0; }
.legal-placeholder { color: #b26b00; background: #fff6e6; padding: 0 .3rem; border-radius: 4px; font-style: italic; }
.legal-updated { margin-top: var(--sp-5); color: var(--c-muted); font-size: .9rem; }
.contact-card {
    display: flex; gap: var(--sp-4); align-items: center;
    background: #f4f3f6; border: 1px solid #e6e2e8; border-radius: 14px;
    padding: var(--sp-4); margin: var(--sp-3) 0 var(--sp-5);
}
.contact-card .cc-photo { flex: 0 0 auto; }
.contact-card .cc-photo img {
    width: 128px; height: 128px; object-fit: cover; border-radius: 12px;
    border: 1px solid #e0dce3; box-shadow: 0 2px 8px rgba(16,24,40,.10); display: block;
}
.contact-card .cc-info { min-width: 0; }
.contact-card .cc-info p { margin: 0 0 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.contact-card .cc-info p:last-child { margin-bottom: 0; }
.contact-card .cc-info svg { stroke: var(--c-primary); flex: 0 0 auto; }
.contact-card .cc-org strong { font-size: 1.1rem; }
.contact-card .cc-prompt { color: var(--c-muted); font-style: italic; }
.contact-card .cc-tel { font-weight: 700; font-size: 1.05rem; }
.contact-card .cc-tel a { color: var(--c-primary); }
@media (max-width: 480px) {
    .contact-card { flex-direction: column; align-items: flex-start; }
    .contact-card .cc-photo img { width: 100%; max-width: 160px; height: auto; aspect-ratio: 1/1; }
}
.contact-form label { display: block; font-weight: 600; margin-bottom: var(--sp-3); }
.contact-form input, .contact-form textarea { width: 100%; box-sizing: border-box; margin-top: .3rem; padding: .6rem .7rem; border: 1px solid var(--c-border); border-radius: var(--radius); font: inherit; }
/* Honeypot komplett unsichtbar (Spam-Falle) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Admin-Kopf ---------- */
.admin-header { background: var(--c-accent); color: #fff; }
.admin-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.admin-nav a { color: #fff; }
.admin-user { opacity: 0.9; font-size: 0.9rem; }
.admin-content { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
.stat-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin: var(--sp-4) 0 var(--sp-5); }
.stat-card { flex: 1 1 140px; background: var(--c-surface); border-radius: var(--radius); padding: var(--sp-4); text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--c-primary); }
.stat-label { color: var(--c-muted); font-size: 0.85rem; }
.toolbar, .search-bar { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin: var(--sp-4) 0; }

/* =====================================================================
   Tablet ≥ 768px
   ===================================================================== */
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .main-nav {
        display: flex; flex-direction: row; align-items: center; width: auto;
        gap: var(--sp-5); padding-bottom: 0;
    }
    .main-nav a, .main-nav .linklike {
        padding: 0; width: auto; background: none; border: none; border-radius: 0;
        font-weight: 600; font-size: 1rem; display: inline-flex; align-items: center; gap: .4rem;
        color: #fff;
    }
    .main-nav a:hover, .main-nav a:focus, .main-nav .linklike:hover, .main-nav .linklike:focus { background: none; }
    .main-nav a.is-active { background: none; border: none; font-weight: 700; color: #fff; }
    .main-nav a.is-active .nav-icon { color: #fff; }
    .main-nav > a, .main-nav > .nav-logout { border-top: none; width: auto; }
    .main-nav.is-open { position: static; background: none; box-shadow: none; padding: 0; max-height: none; border: none; }
    /* Desktop: Text-Navigation – Icons ausblenden, Profilbild bleibt sichtbar. */
    .main-nav .nav-icon { display: none; width: auto; color: inherit; }
    .main-nav .nav-profile .nav-icon { display: inline-flex; }
    .main-nav .nav-profile .nav-icon svg { display: none; }

    .cal-cell { min-height: 104px; }

    .filter-bar {
        grid-template-columns: 2fr 1fr 1fr;
        align-items: end;
    }
    .filter-bar .filter-q { grid-column: 1 / -1; }

    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-5); }
    .form-grid .full { grid-column: 1 / -1; }
}

/* =====================================================================
   Desktop ≥ 1024px
   ===================================================================== */
@media (min-width: 1024px) {
    .hero h1 { font-size: 2.2rem; }
    .cal-cell { min-height: 120px; font-size: 0.85rem; }
    .filter-bar { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; }
    .filter-bar .filter-q { grid-column: auto; }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   Barrierefreiheit & Lesbarkeit (Zielgruppe 60+) – dezenter Feinschliff.
   Größere Grundschriften, klarere Kontraste, komfortablere Touch-Ziele.
   ===================================================================== */

/* Kategorie-/Status-Badges nie umbrechen (z. B. „Tanz-Abendveranstaltungen“) */
.badge {
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 3px 10px;
    font-weight: 600;
    line-height: 1.35;
}
.event-card-top { flex-wrap: wrap; }

/* Etwas größere, besser lesbare Sekundärtexte */
.event-loc, .ec-loc { font-size: 1rem; color: #4a4a4a; }
.event-dist { font-weight: 700; color: var(--c-primary); font-size: .95rem; white-space: nowrap; }
.result-count { font-size: 1rem; color: #4a4a4a; }
.ec-date, .event-date { font-size: 1rem; }
.ec-title { font-size: 1.2rem; }
.ec-dist, .geo-status, .geo-or { font-size: .95rem; }

/* Listentitel prominenter */
.event-title { font-size: 1.12rem; font-weight: 600; }

/* Komfortablere Touch-Ziele (min. ~44px) und ruhigere Buttons */
.btn {
    padding: 0.6rem 1.15rem;
    font-size: 1.02rem;
    min-height: 44px;
}
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.92rem; min-height: 38px; }

/* Formularfelder angenehm groß */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select, textarea { font-size: 1rem; }

/* Filterleiste: Beschriftungen und Felder etwas größer/höher */
.filter-bar label { font-size: 0.95rem; }
.filter-bar input, .filter-bar select { height: 46px; }
.filter-actions .btn { height: 46px; }
.filter-actions .btn-icon { width: 46px; min-width: 46px; }
.plz-multi { min-height: 46px; }

/* Überschriften mit etwas mehr Präsenz */
h1 { font-size: 2rem; line-height: 1.2; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

/* Fokus noch deutlicher sichtbar */
:focus-visible { outline-width: 3px; outline-offset: 3px; }

/* Tooltip (z. B. Kategorie-Badge auf der Detailseite) */
.has-tip { position: relative; cursor: help; outline: none; }
.has-tip::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
    background: #1c1c1c; color: #fff; padding: .4rem .65rem; border-radius: 7px;
    white-space: nowrap; font-size: .82rem; font-weight: 500; line-height: 1.2;
    opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 60;
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.has-tip::before {
    content: ""; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: #1c1c1c; opacity: 0; transition: opacity .12s ease; z-index: 60;
}
.has-tip:hover::after, .has-tip:focus::after,
.has-tip:hover::before, .has-tip:focus::before { opacity: 1; }

/* ---------- Profil ---------- */
.profile-card { background: #fff; border: 1px solid var(--c-border); border-radius: 18px; box-shadow: 0 6px 24px rgba(16,24,40,.08); overflow: hidden; width: 100%; }
.profile-head { display: flex; align-items: center; gap: 1.5rem; padding: 2.1rem 2.3rem; background: linear-gradient(100deg, #2a0c1c 0%, var(--c-primary) 58%, #cf2d81 100%); color: #fff; }
.profile-avatar { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.16); border: 3px solid rgba(255,255,255,.6); display: inline-flex; align-items: center; justify-content: center; font-size: 2.3rem; font-weight: 800; letter-spacing: .5px; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.profile-id { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.profile-name { font-size: 1.75rem; font-weight: 800; line-height: 1.15; }
.profile-user { opacity: .85; font-size: .95rem; }
.profile-role { align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem; margin-top: .3rem; padding: .2rem .7rem; border-radius: 999px; background: rgba(255,255,255,.2); font-size: .82rem; font-weight: 600; }
/* Trennlinien statt Raster-Hintergrund → leere Zellen bleiben unsichtbar (kein „graues Feld") */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; margin: 0; background: transparent; }
.profile-item { background: #fff; padding: 1.2rem 1.6rem; border-top: 1px solid var(--c-border); }
.profile-item dt { display: flex; align-items: center; gap: .45rem; color: var(--c-muted); font-size: .88rem; font-weight: 600; margin: 0 0 .3rem; text-transform: uppercase; letter-spacing: .02em; }
.profile-item dd { margin: 0; font-size: 1.1rem; font-weight: 500; word-break: normal; overflow-wrap: normal; }
/* E-Mail nimmt die volle Breite und bricht nicht mitten im Wort um */
.profile-item.email-item { grid-column: 1 / -1; }
.email-item dd { font-size: 1rem; }
.email-link { color: var(--c-primary); white-space: nowrap; }
.email-link:hover { text-decoration: underline; }
.pending-hint { display: inline-flex; align-items: center; gap: .35rem; margin-top: .3rem !important; color: #8a6d00; font-size: .85rem; font-weight: 600; }
.verify-hint { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-top: .45rem !important;
    padding: .6rem .8rem; background: #fff8e6; border: 1px solid #f0dca0; border-radius: var(--radius);
    color: #7a5f00; font-size: .86rem; line-height: 1.45; font-weight: 500; }
.verify-hint > span { display: inline-flex; align-items: baseline; gap: .35rem; }
.verify-hint .ic { align-self: center; flex: 0 0 auto; }
.verify-resend { background: none; border: none; padding: 0; margin: 0; color: var(--c-primary); font-weight: 700;
    font-size: .86rem; cursor: pointer; text-decoration: underline; }
.verify-resend:hover { color: var(--c-primary-dark); }
/* Zwei-Faktor-Status im Profil (dezent) */
.tfa-on { color: var(--c-success-fg); font-weight: 600; }
.tfa-off { color: var(--c-muted); font-weight: 600; }
.tfa-link { margin-left: .5rem; font-size: .9rem; font-weight: 600; color: var(--c-primary); }
.tfa-link:hover { text-decoration: underline; }
.tfa-hint { display: flex; align-items: flex-start; gap: .5rem; margin: 0; padding: .85rem 1.6rem 1.1rem;
    color: var(--c-muted); font-size: .88rem; line-height: 1.5; background: var(--c-surface); border-top: 1px solid var(--c-border); }
.tfa-hint .ic { flex: 0 0 auto; margin-top: .1rem; color: var(--c-accent); }
.tfa-hint a { color: var(--c-primary); font-weight: 600; }
.tfa-hint a:hover { text-decoration: underline; }
/* QR-Code für die 2FA-Einrichtung */
.tfa-qr { width: 208px; max-width: 60vw; margin: 1.1rem auto .6rem; padding: 12px; background: #fff;
    border: 1px solid var(--c-border); border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.tfa-qr:empty { display: none; }
.tfa-qr svg { display: block; width: 100%; height: auto; }
.tfa-qr-key { text-align: center; margin: 0 0 .4rem; }
.tfa-qr-key code { font-size: 1.05rem; letter-spacing: 2px; background: #f3eef1; padding: .45rem .75rem;
    border-radius: 8px; display: inline-block; }

.profile-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1.3rem 1.6rem; border-top: 1px solid var(--c-border); }

/* Profil-Bearbeiten-Formular */
.profile-form { max-width: none; width: 100%; margin-top: var(--sp-3); display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem 1.5rem; background: #fff; border: 1px solid var(--c-border); border-radius: 16px; padding: 1.6rem; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.profile-form > .avatar-field, .profile-form > .pw-fieldset, .profile-form > .reg-fieldset, .profile-form > .form-actions { grid-column: 1 / -1; }
.profile-form > .reg-fieldset { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.profile-form > label { display: block; }
.profile-form label { display: block; font-weight: 600; }
.profile-form input { width: 100%; box-sizing: border-box; margin-top: .3rem; padding: .6rem .7rem; border: 1px solid var(--c-border); border-radius: var(--radius); font: inherit; }
.profile-form input:disabled { background: var(--c-surface); color: var(--c-muted); }
.pw-fieldset, .reg-fieldset { border: 1px solid var(--c-border); border-radius: var(--radius); padding: .5rem 1.1rem 1.1rem; display: grid; gap: 1rem; }
.pw-fieldset legend, .reg-fieldset legend { font-weight: 700; padding: 0 .4rem; }
.field-hint { display: block; color: var(--c-muted); font-size: .85rem; margin-top: 2px; }

/* Teilen-/Export-Leiste auf der Detailseite */
.share-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--sp-5); }
.share-bar .btn { background: #fff; color: var(--c-fg); border: 1px solid var(--c-border); }
.share-bar .btn:hover { background: var(--c-surface); border-color: var(--c-primary); color: var(--c-primary); }

/* Druckansicht: nur den Termin, ohne Navigation/Karten/Buttons */
@media print {
    .site-header, .site-footer, .share-bar, .detail-map, .map-heading,
    .back, .nav-toggle, .impersonate-banner, .home-near { display: none !important; }
    body { font-size: 12pt; }
    .content { padding: 0; }
}

/* Standort-Karte auf Detailseiten */
.map-heading { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; margin: var(--sp-5) 0 var(--sp-3); }
.detail-map {
    height: 600px; width: 100%; border-radius: 14px;
    border: 1px solid var(--c-border); box-shadow: 0 1px 3px rgba(16,24,40,.10);
    position: relative; z-index: 0; isolation: isolate;
}
.tk-red-pin { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
/* Kategorie-farbige Marker auf der Termine-Karte */
.tk-cat-pin { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
/* Farbiges Kalender-/Kategorie-Label im Karten-Popup */
.map-cat { display: inline-block; padding: 1px 8px; border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 700; margin-bottom: 3px; }

/* Dauer-Tooltip auf der Detailkarte: dezent in Markenfarbe hervorgehoben */
.leaflet-tooltip.detail-map-tip {
    background: #fdf2f8;
    color: #7a1250;
    border: 1px solid #edc4da;
    border-left: 3px solid var(--c-primary, #b11065);
    border-radius: 8px;
    padding: 5px 10px;
    font-weight: 700;
    font-size: .82rem;
    box-shadow: 0 3px 10px rgba(177,16,101,.18);
}
.leaflet-tooltip-top.detail-map-tip::before { border-top-color: #fdf2f8; }
.leaflet-tooltip-bottom.detail-map-tip::before { border-bottom-color: #fdf2f8; }

/* Startseite: „Termine in deiner Nähe“ */
.home-near { margin-top: var(--sp-7); }
.near-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.near-controls .geo-radius { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.near-controls select { min-height: 44px; padding: 0 2rem 0 var(--sp-3); border: 1px solid var(--c-border); border-radius: 999px; font: inherit; background-color: #fff; }
/* isolation kapselt ALLES im Wrap (Karte + Hinweis-Overlay mit z-index:500) in einen
   eigenen Stacking-Context, damit nichts über den sticky Header (z-index:20) läuft.
   Wichtig: ohne eigenen Kontext „entkommt" der hohe z-index des Overlays in den Root. */
.home-map-wrap { position: relative; z-index: 0; isolation: isolate; }
.home-map { height: 560px; width: 100%; border-radius: 14px; border: 1px solid var(--c-border); box-shadow: 0 1px 3px rgba(16,24,40,.10); position: relative; z-index: 0; isolation: isolate; }
/* Nach der Standortsuche wird die Karte grösser dargestellt. */
.home-map-wrap.located .home-map { height: 640px; }
/* Wichtig: das hidden-Attribut muss die Flex-Anzeige des Overlays überschreiben. */
.home-map-hint[hidden] { display: none !important; }
.home-map-hint {
    position: absolute; inset: 0; z-index: 500; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: rgba(255,255,255,.78);
}
.home-map-hint-box { max-width: 420px; padding: 1.5rem; }
.home-map-hint .hint-pin { display: inline-flex; color: var(--c-primary); background: #fff; border: 1px solid var(--c-border); border-radius: 50%; padding: .7rem; box-shadow: 0 2px 10px rgba(16,24,40,.12); }
.home-map-hint p { font-size: 1.05rem; font-weight: 600; margin: .8rem 0; }
.home-map-hint small { display: block; margin-top: .7rem; color: var(--c-muted); }
.home-map-hint.is-loading { opacity: .6; pointer-events: none; }

/* Tanz-Symbol (magenta Figur auf weißem Kreis) links vor jedem Seitentitel */
.content h1 { display: flex; align-items: center; gap: .6rem; }
.content h1::before {
    content: "";
    flex: 0 0 auto;
    width: 1.6em; height: 1.6em;
    background: #ffffff url("/img/figure.svg") no-repeat center / 58%;
    border: 1px solid var(--c-border);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(16,24,40,.12);
}
/* In der Termine-Kopfzeile bleibt der Titel neben dem Ansichts-Umschalter */
.events-head h1 { display: inline-flex; }

/* =====================================================================
   Einheitliche Titelzeilen: Symbol + Titel links, gleiche Höhe,
   identischer Hintergrund – über ALLE Frontend-Seiten hinweg.
   ===================================================================== */
.content h1,
.events-head,
.cal-toolbar {
    background: linear-gradient(180deg, #ffffff, var(--c-surface));
    border: 1px solid var(--c-border);
    border-radius: 14px;
    padding: var(--sp-4) var(--sp-5);
    min-height: 76px;
    box-sizing: border-box;
    margin: 0 0 var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}
.content h1 { justify-content: flex-start; gap: .7rem; font-size: 1.9rem; line-height: 1.15; }
.events-head, .cal-toolbar { justify-content: space-between; flex-wrap: wrap; }
/* Titel innerhalb der Kopf-Container tragen KEINEN eigenen Hintergrund */
.events-head h1,
.cal-toolbar h1 {
    background: none; border: none; border-radius: 0; padding: 0; margin: 0;
    min-height: 0; font-size: 1.9rem; line-height: 1.15;
    display: inline-flex; align-items: center; gap: .7rem;
}
/* Symbol-Badge einheitlich groß und mittig */
.content h1::before,
.events-head h1::before,
.cal-toolbar h1::before {
    width: 1.7em; height: 1.7em; flex: 0 0 auto;
}

/* Veranstalter-Website: dezent, professionell, verlinkt (statt großem Button) */
.event-website { margin: var(--sp-4) 0; }
.event-website a {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem; border: 1px solid var(--c-border); border-radius: 999px;
    background: #fff; color: var(--c-primary); font-weight: 600; max-width: 100%;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.event-website a:hover { text-decoration: none; border-color: var(--c-primary); background: var(--c-surface); box-shadow: 0 2px 10px rgba(177,16,101,.12); }
.event-website .ew-icon { display: inline-flex; color: var(--c-primary); }
.event-website .ew-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-website .ew-ext { display: inline-flex; color: var(--c-accent); flex: 0 0 auto; }

/* =====================================================================
   Cookie-/Datenschutz-Banner (DSG/DSGVO), konfigurierbar im Admin.
   ===================================================================== */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    background: #1c1c1c; color: #fff; box-shadow: 0 -4px 24px rgba(0,0,0,.28);
    transform: translateY(105%); transition: transform .28s ease;
}
.cookie-banner.cookie-top { top: 0; bottom: auto; transform: translateY(-105%); box-shadow: 0 4px 24px rgba(0,0,0,.28); }
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding: 1rem var(--sp-4); }
.cookie-body { flex: 1 1 340px; }
.cookie-title { display: inline-flex; align-items: center; gap: .45rem; font-size: 1.05rem; }
.cookie-body p { margin: .35rem 0 0; font-size: .95rem; line-height: 1.55; color: #e9e9e9; }
.cookie-body a { color: #ff9ecf; text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; flex: 0 0 auto; }
.cookie-banner .btn-secondary { background: transparent; border: 1px solid rgba(255,255,255,.55); color: #fff; }
.cookie-banner .btn-secondary:hover { background: rgba(255,255,255,.12); }
@media (max-width: 560px) { .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1 1 auto; } }

/* =====================================================================
   Mobile Kalender-Agenda (barrierefrei, gut lesbar für 60+).
   Auf kleinen Bildschirmen ersetzt eine klare Tagesliste das Raster.
   ===================================================================== */
.calendar.is-agenda { display: block; }
.agenda-day {
    background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
    margin-bottom: var(--sp-4); overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.06);
    /* Beim „auf heute springen" Platz für den sticky Header + etwas Abstand,
       damit der obere Rand unterhalb des Headers sichtbar bleibt. */
    scroll-margin-top: 128px;
}
.agenda-day--today { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(177,16,101,.20); }
.cal-cell--today, .cal-wday--today { scroll-margin-top: 128px; }
.agenda-date {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    background: var(--c-surface); padding: .8rem 1.1rem; border-bottom: 1px solid var(--c-border);
}
.agenda-date .ad-dow { font-weight: 800; font-size: 1.2rem; color: var(--c-primary); }
.agenda-date .ad-num { font-weight: 700; font-size: 1.15rem; }
.agenda-date .ad-today { margin-left: auto; background: var(--c-primary); color: #fff; font-size: .82rem; font-weight: 800; padding: .2rem .7rem; border-radius: 999px; }
.agenda-event {
    display: grid; grid-template-columns: auto 1fr; gap: .15rem .9rem; align-items: baseline;
    padding: 1rem 1.1rem; min-height: 56px; box-sizing: border-box;
    border-left: 6px solid var(--c-primary); border-bottom: 1px solid var(--c-border); color: var(--c-fg);
}
.agenda-event:last-child { border-bottom: none; }
.agenda-event:hover, .agenda-event:focus { background: #faf3f8; text-decoration: none; outline: none; }
.agenda-event:focus-visible { outline: 3px solid var(--c-focus); outline-offset: -3px; }
.agenda-event .ae-time { font-weight: 800; color: var(--c-primary); font-size: 1.1rem; white-space: nowrap; }
.agenda-event .ae-title { font-weight: 600; font-size: 1.18rem; line-height: 1.35; min-width: 0; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
.agenda-event .ae-loc { grid-column: 2; color: #4a4a4a; font-size: 1rem; margin-top: .1rem; min-width: 0; overflow-wrap: break-word; }

/* Kalender-Toolbar auf sehr kleinen Screens übersichtlich stapeln */
@media (max-width: 560px) {
    .cal-toolbar { flex-direction: column; align-items: stretch; gap: .7rem; }
    .cal-toolbar h1 { font-size: 1.5rem; justify-content: center; }
    .cal-controls { justify-content: center; }
    .cal-controls select { flex: 1 1 100%; }
    #cal-prev, #cal-next, #cal-today { min-height: 48px; }
}

/* =====================================================================
   Profilbild / Avatar-Upload mit Cropper und runder Lightbox.
   ===================================================================== */
.profile-avatar.has-image { padding: 0; overflow: hidden; }
.profile-avatar.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.avatar-field { grid-column: 1 / -1; }
.pf-label { display: block; font-weight: 600; margin-bottom: .4rem; }
.avatar-edit { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.avatar-preview { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; border: 2px solid var(--c-border); background: var(--c-surface); display: inline-flex; align-items: center; justify-content: center; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview-link { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.avatar-preview .avatar-initials { font-size: 1.7rem; font-weight: 800; color: var(--c-primary); }
.avatar-actions { display: flex; flex-direction: column; gap: .4rem; }
.btn-file { cursor: pointer; align-self: flex-start; }
.avatar-remove { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; }

/* Cropper-Modal */
.avatar-cropper { position: fixed; inset: 0; z-index: 1100; background: rgba(20,12,20,.82); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ac-box { background: #fff; border-radius: 16px; padding: 1.4rem; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.ac-box h3 { margin: 0 0 .3rem; display: inline-flex; align-items: center; gap: .4rem; }
.ac-stage { position: relative; width: 320px; max-width: 82vw; margin: 1rem auto; }
#avatar-canvas { width: 100%; height: auto; aspect-ratio: 1 / 1; display: block; border-radius: 12px; background: #eee; cursor: grab; touch-action: none; }
#avatar-canvas:active { cursor: grabbing; }
.ac-circle { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2000px rgba(0,0,0,.38); border: 2px solid rgba(255,255,255,.9); pointer-events: none; }
.ac-zoom { display: flex; align-items: center; gap: .5rem; justify-content: center; font-weight: 600; margin: .3rem 0 1rem; }
.ac-zoom input { flex: 1 1 auto; max-width: 220px; accent-color: var(--c-primary); }
.ac-actions { display: flex; gap: .6rem; justify-content: center; }

/* Bild-Lightbox (Frontend) */
.tk-lightbox { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 4vh 4vw; background: rgba(20,12,20,.86); cursor: zoom-out; }
.tk-lightbox img { max-width: 88vw; max-height: 80vh; border-radius: 14px; box-shadow: 0 12px 48px rgba(0,0,0,.5); background: #fff; }
.tk-lightbox--round img { border-radius: 50%; width: min(60vw, 60vh); height: min(60vw, 60vh); object-fit: cover; }
.tk-lightbox-cap { color: #fff; font-weight: 600; }
.tk-lightbox-close { position: absolute; top: max(1rem, 2vh); right: max(1rem, 2vw); width: 2.6rem; height: 2.6rem;
    display: flex; align-items: center; justify-content: center; padding: 0; font-size: 1.9rem; line-height: 1;
    color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
    cursor: pointer; transition: background .15s, transform .15s; }
.tk-lightbox-close:hover { background: rgba(255,255,255,.28); transform: scale(1.06); }
/* Galerie/Slideshow-Bedienung – dunkler Hintergrund, damit sie auch über hellen
   Bildern klar sichtbar sind, und im Vordergrund (z-index). */
.tk-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 3.4rem; height: 3.4rem;
    display: flex; align-items: center; justify-content: center; padding: 0; font-size: 2.2rem; line-height: 1;
    color: #fff; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.7); border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,.5); cursor: pointer; transition: background .15s, transform .15s; }
.tk-lightbox-nav:hover { background: rgba(0,0,0,.85); }
.tk-lightbox-prev { left: max(.75rem, 1.5vw); }
.tk-lightbox-next { right: max(.75rem, 1.5vw); }
.tk-lightbox-prev:hover { transform: translateY(-50%) scale(1.08); }
.tk-lightbox-next:hover { transform: translateY(-50%) scale(1.08); }
.tk-lightbox-play { position: absolute; bottom: max(1rem, 3vh); left: 50%; transform: translateX(-50%); z-index: 3;
    min-width: 3rem; height: 3rem; padding: 0 .8rem; display: flex; align-items: center; justify-content: center;
    color: #fff; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.7); border-radius: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.5); cursor: pointer; font-size: 1.1rem; transition: background .15s; }
.tk-lightbox-play:hover { background: rgba(0,0,0,.85); }
@media (max-width: 560px) { .tk-lightbox-nav { width: 2.8rem; height: 2.8rem; font-size: 1.7rem; } }

/* =====================================================================
   Handbuch / Hilfeseiten (Benutzer & Admin). Bildschirm-Ansicht sowie
   CI-Druckausgabe (PDF): schwarz auf weiss, CI-Farben dezent als Akzent.
   ===================================================================== */
.manual { max-width: 960px; margin: 0 auto; }
.manual-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.manual-toolbar .spacer { flex: 1 1 auto; }
.manual-doc { position: relative; overflow: hidden; background: #fff; color: #111; border: 1px solid var(--c-border);
    border-radius: 16px; padding: clamp(1.5rem, 3vw, 3.2rem); box-shadow: 0 10px 40px rgba(16,24,40,.10); }
/* dezenter CI-Streifen oben */
.manual-doc::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, #241018, #6a0a3c 45%, var(--c-primary)); }
.manual-head { display: flex; align-items: center; gap: 1.2rem; padding: .3rem 0 1.2rem; margin-bottom: 1.8rem;
    border-bottom: 2px solid var(--c-border); }
.manual-logo { height: 54px; width: auto; flex: 0 0 auto; }
.manual-head h1 { margin: 0; font-size: 2rem; line-height: 1.12; color: #111; letter-spacing: -.01em; }
.manual-sub { margin: .3rem 0 0; color: var(--c-muted); font-size: .92rem; }
.manual-lead { font-size: 1.06rem; color: #333 !important; background: linear-gradient(180deg, #fbf4f8, #fff);
    border: 1px solid #f0e3ec; border-left: 4px solid var(--c-primary); border-radius: 10px; padding: .9rem 1.1rem; }
.manual-doc section { scroll-margin-top: 90px; padding-top: .2rem; }
.manual-doc section + section { border-top: 1px dashed var(--c-border); margin-top: 1.5rem; }
.manual-doc h2 { font-size: 1.34rem; margin: 2.1rem 0 .8rem; padding: .1rem 0 .1rem .85rem; color: #111;
    border-left: 5px solid var(--c-primary); scroll-margin-top: 90px; }
.manual-doc h3 { font-size: 1.06rem; margin: 1.35rem 0 .4rem; color: var(--c-primary-dark); scroll-margin-top: 90px; }
.manual-doc p, .manual-doc li { color: #1c1c1c; line-height: 1.64; }
.manual-doc ul, .manual-doc ol { padding-left: 1.35rem; margin: .5rem 0 1rem; }
.manual-doc li { margin: .3rem 0; }
.manual-doc li::marker { color: var(--c-primary); }
.manual-doc code { background: #f3eef1; padding: .08rem .4rem; border-radius: 5px; font-size: .9em; color: #7a1250; }
.manual-doc strong { color: #111; }
.manual-doc a { color: var(--c-primary); }
.manual-note { border: 1px solid #f0dca0; background: #fff8e6; border-radius: 10px;
    padding: .75rem 1rem; margin: 1rem 0; font-size: .92rem; color: #6b5300; }
.manual-note strong { color: #6b5300; }
/* Inhaltsverzeichnis */
.manual-toc { background: linear-gradient(180deg, #faf6f9, #fff); border: 1px solid var(--c-border);
    border-radius: 12px; padding: 1.1rem 1.35rem; margin: 0 0 2rem; }
.manual-toc h2 { border: 0; padding: 0; margin: 0 0 .7rem; font-size: .82rem; color: var(--c-primary);
    text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.manual-toc ol { columns: 2; column-gap: 2.4rem; margin: 0; padding-left: 1.2rem; }
.manual-toc li { margin: .2rem 0; break-inside: avoid; }
.manual-toc li::marker { color: var(--c-primary); font-weight: 700; }
.manual-toc a { color: #333; text-decoration: none; border-radius: 6px; padding: .04rem .25rem; }
.manual-toc a:hover { color: var(--c-primary); background: #f6eaf1; text-decoration: none; }
.manual-foot { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--c-border);
    color: var(--c-muted); font-size: .85rem; text-align: center; }
@media (max-width: 640px) { .manual-toc ol { columns: 1; } }

/* Druck / „Als PDF speichern": reines CI-Dokument, schwarz auf weiss. */
@media print {
    .manual .manual-toolbar, .manual-doc .no-print { display: none !important; }
    .manual, .manual-doc { max-width: none; margin: 0; }
    .manual-doc { border: 0; border-radius: 0; box-shadow: none; padding: 0; color: #000; }
    .manual-head { border-bottom: 3px solid #b11065; }
    .manual-head h1, .manual-doc h2, .manual-doc h3, .manual-doc p, .manual-doc li, .manual-doc strong { color: #000; }
    .manual-doc h2 { border-left: 4px solid #b11065; break-after: avoid; }
    .manual-doc h3 { color: #8c0d50; break-after: avoid; }
    .manual-doc code { background: #eee; }
    .manual-toc { background: #fff; border: 1px solid #999; break-inside: avoid; }
    .manual-note { background: #fff; border: 1px solid #999; color: #000; break-inside: avoid; }
    .manual-doc::before { display: none; }
    .manual-lead { background: #fff !important; border-color: #999; }
    .manual-doc section + section { border-top: 1px solid #ccc; }
    .manual-doc section { break-inside: avoid-page; }
    a[href]::after { content: ""; } /* keine URL-Anhänge im Druck */
}
@page { margin: 16mm 15mm 18mm; }

/* Dezenter Hinweis auf das Handbuch/PDF (Profil, Admin-Dashboard) */
.doc-hint { display: flex; align-items: flex-start; gap: .45rem; margin: 1rem 1.6rem 0;
    color: var(--c-muted); font-size: .86rem; line-height: 1.5; }
.doc-hint .ic { flex: 0 0 auto; margin-top: .12rem; color: var(--c-accent); }
.doc-hint a { color: var(--c-primary); font-weight: 600; }
.doc-hint a:hover { text-decoration: underline; }
.admin-main .doc-hint { margin: 0 0 1.4rem; }

/* Dezenter Trenner/Abstand nach dem Handbuch-Hinweis im Profil */
.profile-sep { border: 0; border-top: 1px solid var(--c-border); margin: 1.4rem 1.6rem 0; }

/* Klickzähler je Banner-Slot (Admin) */
.banner-clicks { font-size: .8rem; font-weight: 500; color: var(--c-muted); margin-left: .5rem; }
.banner-clicks .ic { vertical-align: -2px; }

/* Banner-Wechsel-Regler (Admin) */
.range-row { display: flex; align-items: center; gap: .7rem; }
.range-row input[type=range] { flex: 1 1 auto; max-width: 320px; }
.range-out { min-width: 3ch; font-weight: 700; color: var(--c-primary); }

/* Datenschutz-Zustimmung (Registrierung, Kontaktformular) */
.consent-check { display: flex; align-items: flex-start; gap: .55rem; margin: .4rem 0 .2rem;
    font-size: .92rem; line-height: 1.5; color: var(--c-fg); cursor: pointer; }
.consent-check input[type=checkbox] { margin-top: .18rem; flex: 0 0 auto; width: 1.05rem; height: 1.05rem; accent-color: var(--c-primary); }
.consent-check a { color: var(--c-primary); font-weight: 600; }
.consent-check a:hover { text-decoration: underline; }
.consent-check--error { color: var(--c-error-fg); }
.consent-check--error input[type=checkbox] { outline: 2px solid var(--c-error-fg); outline-offset: 1px; }

/* PWA-Installationsbalken (dezent, unten) */
.pwa-install { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1300;
    display: flex; align-items: center; gap: .8rem; max-width: min(560px, calc(100vw - 24px));
    padding: .7rem .8rem .7rem 1.1rem; background: #fff; color: var(--c-fg);
    border: 1px solid var(--c-border); border-radius: 14px; box-shadow: 0 8px 30px rgba(16,24,40,.18); }
.pwa-install-txt { font-size: .9rem; line-height: 1.3; }
.pwa-install-txt strong { color: var(--c-primary); }
.pwa-install-btn { flex: 0 0 auto; background: var(--c-primary); color: #fff; border: 0;
    border-radius: 999px; padding: .5rem 1.1rem; font-weight: 700; cursor: pointer; }
.pwa-install-btn:hover { background: var(--c-primary-dark); }
.pwa-install-close { flex: 0 0 auto; background: none; border: 0; font-size: 1.4rem; line-height: 1;
    color: var(--c-muted); cursor: pointer; padding: 0 .2rem; }
.pwa-install-close:hover { color: var(--c-fg); }
@media (max-width: 480px) { .pwa-install { left: 12px; right: 12px; transform: none; max-width: none; } }

/* ---------- Premium-Banner „Türöffner" ---------- */
.door-opener { position: fixed; inset: 0; z-index: 9998; display: none; align-items: center; justify-content: center; padding: 2vh 2vw; }
.door-opener.is-visible { display: flex; }
.door-opener__backdrop { position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 45%, rgba(20,6,16,.72), rgba(5,2,8,.92)); backdrop-filter: blur(3px); cursor: pointer; opacity: 0; transition: opacity 1.2s ease; }
.door-opener.is-visible .door-opener__backdrop { opacity: 1; }
/* perspective: Türflügel schwingen räumlich auf (3D-Scharnier). */
.door-opener__stage { position: relative; max-width: 96vw; max-height: 92vh; line-height: 0; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.55); perspective: 1700px; }
/* Die Werbung liegt dahinter (innen) – wird beim Öffnen sanft „aufgeblendet". */
.door-opener__ad { display: block; }
.door-opener__ad img {
    display: block; max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 12px;
    transform: scale(1.04); filter: brightness(.5) saturate(.9);
    transition: transform 6.5s cubic-bezier(.22,.61,.24,1), filter 5s ease;
}
.door-opener.is-open .door-opener__ad img { transform: scale(1); filter: brightness(1) saturate(1); }
/* dezenter, neutraler Enthüllungs-Schein aus der Mitte */
.door-opener__stage::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 12px;
    background: radial-gradient(62% 82% at 50% 50%, rgba(255,255,255,.14), rgba(255,255,255,0) 70%);
    opacity: 0; transition: opacity 2s ease;
}
.door-opener.is-open .door-opener__stage::before { opacity: 1; }
/* schlichtes „Premium"-Label oben links (blendet beim Öffnen aus) */
.door-opener__badge {
    position: absolute; top: 14px; left: 14px; z-index: 5; padding: .3rem .75rem; border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.92);
    background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.35); pointer-events: none;
    backdrop-filter: blur(2px); transition: opacity .6s ease;
}
.door-opener.is-open .door-opener__badge { opacity: 0; }
/* keine funkelnden Sternchen mehr – bewusst schlicht */
.door-opener__sparkles { display: none; }
.door-opener__door {
    position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 3; box-sizing: border-box; overflow: hidden;
    background: linear-gradient(160deg, #2a1220 0%, #5c1038 55%, #8f1257 100%);
    display: flex; align-items: center; justify-content: center;
    transition: transform 6s cubic-bezier(.33,.03,.15,1), box-shadow 6s ease, filter 6s ease;
    backface-visibility: hidden;
}
/* sehr dezenter, statischer Lichtverlauf (Politur) – kein Glitzern */
.door-opener__door::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 42%, rgba(0,0,0,.22) 100%);
}
/* schlanker, neutraler Griff nahe der Innenkante */
.door-opener__door::after {
    content: ""; position: absolute; top: 50%; width: 3px; height: 54px; border-radius: 3px;
    background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(0,0,0,.4);
    transform: translateY(-50%); z-index: 2;
}
.door-opener__door--left  { left: 0;  transform-origin: left center;  transform: rotateY(0deg); box-shadow: inset -1px 0 0 rgba(255,255,255,.10), inset -40px 0 70px rgba(0,0,0,.45); }
.door-opener__door--right { right: 0; transform-origin: right center; transform: rotateY(0deg); box-shadow: inset 1px 0 0 rgba(255,255,255,.10), inset 40px 0 70px rgba(0,0,0,.45); }
.door-opener__door--left::after  { right: 12px; }
.door-opener__door--right::after { left: 12px; }
.door-opener__door span {
    color: rgba(255,255,255,.7); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
    writing-mode: vertical-rl; padding: .4rem; user-select: none;
}
.door-opener__door--left span { transform: rotate(180deg); }
/* Werbung AUF den Türen: ein Motiv wird über beide Flügel gezeigt (linke Hälfte
   links, rechte Hälfte rechts). Griff/Label werden dann ausgeblendet. */
.door-opener__door.has-img { background-color: #241018; background-size: 200% 100%; background-repeat: no-repeat; }
.door-opener__door--left.has-img  { background-position: left center; }
.door-opener__door--right.has-img { background-position: right center; }
.door-opener__door.has-img span,
.door-opener__door.has-img::after,
.door-opener__door.has-img::before { display: none; }
/* Nach innen aufschwingen: die Innenkanten drehen um die Aussenkante nach hinten. */
.door-opener.is-open .door-opener__door { filter: brightness(.78); }
.door-opener.is-open .door-opener__door--left  { transform: rotateY(110deg); box-shadow: inset -70px 0 110px rgba(0,0,0,.65); }
.door-opener.is-open .door-opener__door--right { transform: rotateY(-110deg); box-shadow: inset 70px 0 110px rgba(0,0,0,.65); }
.door-opener__close {
    position: absolute; top: 10px; right: 12px; z-index: 5;
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    background: rgba(0,0,0,.5); color: #fff; font-size: 1.4rem; line-height: 1;
    border: 1px solid rgba(255,255,255,.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .5s ease 5s, background .15s, transform .15s;
}
.door-opener.is-open .door-opener__close { opacity: 1; }
.door-opener__close:hover { background: rgba(0,0,0,.8); transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
    .door-opener__door,
    .door-opener__ad img,
    .door-opener__stage::before { transition: none; }
    .door-opener__ad img { transform: none; filter: none; }
}

