        :root { --primary: #004b9c; --primary-dark: #003a7a; }

        body { margin: 0; padding: 0; background: #f8f9fa; }

        /* Seiten-Wrapper 80% */
        #page-wrap {
            width: 80%;
            margin: 0 auto;
            overflow: hidden;
            padding-top: 1.5rem;
        }
        @media (max-width: 768px) {
            #page-wrap { width: 100%; padding-top: .75rem; }
        }

        /* Map – direkt unter Navbar */
        #map-section {
            position: relative;
            height: 48vh;
            min-height: 260px;
            border-radius: 16px;
            overflow: hidden;
        }
        #map {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
        }

        /* Floating search card */
        #search-bar {
            position: absolute;
            bottom: 18px;
            left: 50%;
            transform: translateX(-50%);
            width: min(520px, 88%);
            z-index: 1000;
            background: #fff;
            border-radius: 12px;
            border: 1px solid rgba(0,0,0,.08);
            box-shadow: 0 4px 16px rgba(0,0,0,.1);
            padding: .5rem .85rem .6rem;
        }

        /* Tabs */
        .sb-tabs {
            display: flex;
            gap: .25rem;
            margin-bottom: .45rem;
            border-bottom: 1px solid #eee;
            padding-bottom: .35rem;
        }
        .sb-tab {
            flex: 1;
            background: none;
            border: none;
            border-radius: 6px;
            padding: .25rem .4rem;
            font-size: .78rem;
            font-weight: 600;
            color: #999;
            cursor: pointer;
            transition: background .15s, color .15s;
            text-decoration: none;
            text-align: center;
        }
        .sb-tab:hover { background: #f5f5f5; color: #555; }
        .sb-tab.active {
            background: #e8f0fe;
            color: var(--primary);
        }

        #search-bar .sb-input-wrap {
            display: flex;
            align-items: center;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            overflow: hidden;
            background: #fff;
        }
        #search-bar .sb-input-wrap .sb-icon {
            padding: 0 .55rem;
            color: #bbb;
            font-size: .95rem;
            flex-shrink: 0;
        }
        #search-bar .sb-input-wrap input {
            flex: 1;
            border: none;
            outline: none;
            font-size: 1rem;
            padding: .42rem .4rem;
            background: transparent;
            -webkit-appearance: none;
            line-height: normal;
        }
        #search-bar .sb-input-wrap button {
            border: none;
            background: var(--primary);
            color: #fff;
            width: 34px;
            height: 34px;
            flex-shrink: 0;
            border-radius: 5px;
            margin: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: .9rem;
            transition: background .2s;
            cursor: pointer;
        }
        #search-bar .sb-input-wrap button:hover { background: var(--primary-dark); }

        /* Stat cards */
        .stat-card {
            border-radius: .75rem;
            border: 1px solid #dee2e6;
            padding: 1rem .75rem;
            text-align: center;
            background: #fff;
            transition: transform .15s, box-shadow .15s;
            height: 100%;               /* gleich hohe Kästchen je Reihe (2026-11-15) */
            display: flex; flex-direction: column; justify-content: center; align-items: center;
        }
        .stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
        a.stat-card { color: inherit; text-decoration: none; cursor: pointer; }   /* Kacheln verlinkt (2026-11-25) */
        a.stat-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
        .stat-card .stat-val { font-size: 2rem; font-weight: 700; line-height: 1; color: var(--primary); }
        .stat-card .stat-lbl { font-size: .8rem; color: #6c757d; margin-top: .3rem; line-height: 1.25; text-wrap: balance; }
        @media (max-width: 575.98px) { .stat-card .stat-lbl { min-height: 2.5em; display: flex; align-items: center; justify-content: center; } }
        /* Zusatzangaben (2026-11-29): „ab heute“ und vereinsinterne Wettkämpfe (nur für Berechtigte) */
        .stat-card .stat-sub { display: block; font-size: .7rem; opacity: .8; }
        .stat-card .stat-mo { font-size: .72rem; color: #6c757d; margin-top: .25rem; padding: .05rem .45rem; border-radius: 1rem; background: #f1f3f5; white-space: nowrap; }
        @media (max-width: 575.98px) { .stat-card .stat-lbl { flex-direction: column; } }
        [data-bs-theme="dark"] .stat-card .stat-mo { background: rgba(255,255,255,.08); color: #aaa; }
        /* Gleich hohe Kacheln auch in Safari/iOS: Spalten als Flex-Container, Kachel füllt sie ohne %-Höhe;
           auf dem Handy Raster mit gleich hohen Zeilen (2026-11-15) */
        .stat-row > [class*="col-"] { display: flex; }
        .stat-row > [class*="col-"] > .stat-card { flex: 1 1 auto; width: 100%; height: auto; }
        @media (max-width: 575.98px) {   /* ab 576 px vier nebeneinander (2026-11-29, vorher 768) */
            .stat-row { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
            .stat-row > [class*="col-"] { width: auto; max-width: none; }
        }

        /* Competition cards */
        /* Umkreissuche (2026-11-15, wie Wettkampfseite) */
        #radius-bar { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; padding:.6rem .9rem; background:#f8f9fa; border-radius:.6rem; margin-bottom:1rem; }
        #radius-bar label { font-size:.84rem; font-weight:600; color:#555; white-space:nowrap; }
        #plzInput { width:160px; }
        #radiusStatus { font-size:.82rem; }
        [data-bs-theme="dark"] #radius-bar { background:#252525; }
        [data-bs-theme="dark"] #radius-bar label { color:#aaa; }
        .vc-dist { font-size:.78rem; color:var(--primary); font-weight:600; margin-top:.2rem; }
        @media (max-width:576px) {
            #radius-bar { display:grid; grid-template-columns:1fr auto; gap:.45rem; padding:.6rem; }
            #radius-bar label, #radiusStatus { grid-column:1 / -1; }
            #plzInput { width:100%; font-size:16px; }
            #radiusSelect, #filterVerband, #sortDatum { font-size:16px; }
            #radiusBtn, #radiusClear { grid-column:1 / -1; padding:.55rem; }
            #quickFilter, #filterVerband, #sortDatum { max-width:none !important; flex:1 1 100%; }
        }
        .comp-card {
            display: flex;
            gap: .75rem;
            align-items: stretch;
            padding: .7rem .85rem;
            border: 1px solid #dee2e6;
            border-radius: .5rem;
            background: #fff;
            margin-bottom: .5rem;
            transition: box-shadow .15s;
        }
        .comp-card:last-child { margin-bottom: 0; }
        .comp-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
        .cc-date-badge {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-width: 48px;
            width: 48px;
            flex-shrink: 0;
            background: var(--primary, #004b9c);
            color: #fff;
            border-radius: .4rem;
            padding: .35rem .2rem;
        }
        .cc-date-badge.cc-date-expired { background: #dc3545; }
        .cc-day { font-size: 1.4rem; font-weight: 700; line-height: 1; }
        .cc-mon { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: .15rem; opacity: .9; }
        .cc-inner {
            display: flex !important;
            flex-direction: column;
            gap: .35rem;
            flex: 1;
            min-width: 0;
        }
        .cc-inner > div:last-child { display: flex; align-items: center; }
        [data-bs-theme="dark"] .cc-date-badge { background: #1a4a8a; }
        [data-bs-theme="dark"] .cc-date-badge.cc-date-expired { background: #842029; }

        /* Action boxes */
        .action-box { display:inline-flex;align-items:center;justify-content:center;padding:.38rem .7rem;border:1px solid #dee2e6;border-radius:.5rem;text-decoration:none;font-weight:600;font-size:.82rem;line-height:1;background:#fff;color:#212529;transition:background .15s,border-color .15s;white-space:nowrap; }
        .action-box:hover { background: #f8f9fa; color: #212529; }
        .action-box-primary { border-color:#aac4e8;color:#004b9c;background:#e6eef8; }
        .action-box-primary:hover { border-color:#004b9c;background:#e6eef8;color:#003a7a; }
        .action-box-secondary { border-color:#ced4da;color:#6c757d;background:#f8f9fa; }

        /* Search-Results-Dropdown (erscheint oberhalb der Suchleiste) */
        #search-results {
            position: absolute;
            bottom: calc(100% + 8px);
            left: 0; right: 0;
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 28px rgba(0,0,0,.18);
            overflow: hidden;
            max-height: 340px;
            overflow-y: auto;
            z-index: 1001;
            display: none;
        }
        .sr-item {
            display: flex; align-items: flex-start; gap: .6rem;
            padding: .55rem .9rem; cursor: pointer;
            text-decoration: none; color: inherit;
            border-bottom: 1px solid #f0f0f0;
            transition: background .12s;
        }
        .sr-item:last-child { border-bottom: none; }
        .sr-item:hover, .sr-item:focus { background: #f0f4ff; outline: none; }
        .sr-ico { font-size: 1rem; flex-shrink: 0; margin-top: .15rem; }
        .sr-text { line-height: 1.4; font-size: .88rem; overflow: hidden; }
        .sr-text strong { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .sr-text small { color: #777; }
        .sr-empty { color: #888; font-size: .85rem; padding: .65rem .9rem; cursor: default; }
        .sr-section-head { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
            color: #999; padding: .45rem .9rem .2rem; pointer-events: none; }
        [data-bs-theme="dark"] #search-results { background: #1e1e1e; border: 1px solid #333; }
        [data-bs-theme="dark"] .sr-item { border-bottom-color: #2a2a2a; color: #e0e0e0; }
        [data-bs-theme="dark"] .sr-item:hover { background: #252535; }
        [data-bs-theme="dark"] .sr-text small { color: #999; }
        [data-bs-theme="dark"] .sr-section-head { color: #666; }

        /* Dark mode */
        [data-bs-theme="dark"] body { background: #111 !important; color: #e8e8e8; }
        [data-bs-theme="dark"] .bg-white,
        [data-bs-theme="dark"] .comp-card,
        [data-bs-theme="dark"] .stat-card,
        [data-bs-theme="dark"] #search-bar,
        [data-bs-theme="dark"] .bg-white.rounded-3 { background: #1e1e1e !important; color: #e8e8e8; border-color: #333 !important; }
        [data-bs-theme="dark"] #search-bar .sb-title { color: #ffffff !important; }
        [data-bs-theme="dark"] .sb-input-wrap { background: #252525; border-color: #555; }
        [data-bs-theme="dark"] .sb-input-wrap input { background: #252525; color: #f0f0f0; }
        [data-bs-theme="dark"] .sb-input-wrap input::placeholder { color: #777; }
        [data-bs-theme="dark"] .sb-input-wrap .sb-icon { color: #f59e0b; }
        [data-bs-theme="dark"] .sb-tabs { border-bottom-color: #333; }
        [data-bs-theme="dark"] .sb-tab { color: #777; }
        [data-bs-theme="dark"] .sb-tab:hover { background: #2a2a2a; color: #aaa; }
        [data-bs-theme="dark"] .sb-tab.active { background: #0d2d5e; color: #7ab0f5; }
        [data-bs-theme="dark"] .text-muted { color: #999 !important; }
        [data-bs-theme="dark"] .stat-card .stat-lbl { color: #999; }
        [data-bs-theme="dark"] .action-box { background: #2a2a2a; color: #ccc; border-color: #444; }
        [data-bs-theme="dark"] .action-box-primary { background: #0d2d5e; color: #7ab0f5; border-color: #1a4a8a; }
        [data-bs-theme="dark"] .action-box-secondary { background: #2a2a2a; color: #999; border-color: #444; }
        [data-bs-theme="dark"] .border { border-color: #333 !important; }
        [data-bs-theme="dark"] .badge.bg-secondary { background: #444 !important; }

        /* Map legend */
        .map-legend {
            position: absolute;
            bottom: 28px;
            left: 10px;
            z-index: 500;
            background: rgba(255,255,255,.92);
            border-radius: 6px;
            padding: .4rem .65rem;
            font-size: .78rem;
            box-shadow: 0 2px 8px rgba(0,0,0,.15);
            pointer-events: none;
            line-height: 1.8;
        }
    

/* „In meiner Nähe“-Einstieg unter dem Suchfeld (2026-11-29) */
.sb-near { display:flex; flex-wrap:wrap; gap:.4rem .9rem; padding:.45rem .2rem 0; font-size:.85rem; }
.sb-near a { color:var(--primary, #004b9c); text-decoration:none; font-weight:600; display:inline-flex; align-items:center; min-height:32px; }
.sb-near a:hover { text-decoration:underline; }
[data-bs-theme="dark"] .sb-near a { color:#8ab4f8; }

/* Suchreiter: Symbol und Wort nie umbrechen (iPhone, 2026-11-29) */
.sb-tab { flex:1 1 auto; white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; }
.sb-tabs .sb-tab { min-width:0; }
@media (max-width:430px) { .sb-tabs { gap:.15rem; } .sb-tab { padding:.3rem .15rem; font-size:.72rem; } .sb-tab i { margin-right:.15rem !important; } }   /* 4 Reiter inkl. Schützenfeste (2026-11-30) */
/* Fadenkreuz „In der Nähe“ links im Suchfeld (2026-11-29) */
#search-bar .sb-input-wrap { overflow: visible; }
.sb-near-dd { flex-shrink: 0; }
.sb-near-btn { border: 0; background: transparent; color: var(--primary, #004b9c); font-size: 1.15rem; width: 2.6rem; height: 2.6rem;
               display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; }
.sb-near-btn:hover, .sb-near-btn[aria-expanded="true"] { background: rgba(0,75,156,.08); }
.sb-near-dd .dropdown-item { padding-top: .6rem; padding-bottom: .6rem; font-weight: 600; }
[data-bs-theme="dark"] .sb-near-btn { color: #8ab4f8; }

/* ── Premium-Bereich der Startseite (partials/startseite_premium.php, 2026-12-01) ───────────────── */
.pt-wrap { position:relative; border:1px solid var(--bs-border-color); border-radius:1.25rem; padding:1.4rem 1.4rem 1rem; margin-bottom:1.5rem;
  background:linear-gradient(135deg, rgba(var(--bs-primary-rgb),.07), rgba(var(--bs-primary-rgb),0) 55%), var(--bs-body-bg); }
.pt-kopf { display:flex; gap:1rem; justify-content:space-between; align-items:flex-start; margin-bottom:1.1rem; }
.pt-eyebrow { font-size:.78rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--bs-primary); margin-bottom:.25rem; }
.pt-wrap h2 { font-size:1.45rem; font-weight:800; margin:0 0 .35rem; line-height:1.25; }
.pt-lead { margin:0; color:var(--bs-secondary-color); max-width:46rem; }
.pt-aktion { flex:0 0 auto; display:flex; gap:.6rem; align-items:center; text-decoration:none; color:#fff; padding:.6rem .95rem; border-radius:.9rem;
  background:linear-gradient(90deg,#c92a2a,#e03131); box-shadow:0 6px 18px rgba(201,42,42,.28); transition:transform .15s; }
.pt-aktion:hover { color:#fff; transform:translateY(-2px); }
.pt-aktion i { font-size:1.35rem; }
.pt-aktion span { display:flex; flex-direction:column; line-height:1.2; }
.pt-aktion small { opacity:.9; font-size:.78rem; }
.pt-note { margin:1rem 0 0; font-size:.78rem; color:var(--bs-secondary-color); }
@media (max-width:575.98px) {
  .pt-wrap { padding:1.1rem 1rem .9rem; border-radius:1rem; }
  .pt-wrap h2 { font-size:1.2rem; }
  .pt-kopf { flex-direction:column; }
}
@media (prefers-reduced-motion:reduce) { .pt-aktion { transition:none; } }
/* Einleitung oben schlank, Pakete unten unter „So funktioniert“ (2026-12-01) */
.pt-intro { padding:1.1rem 1.4rem .9rem; }
.pt-intro .pt-note { margin-top:.6rem; }
.pt-pakete { margin-top:1.75rem; scroll-margin-top:96px; }
