/* Täufergeschichte – Interaktive Karte (öffentliche Seite) */
.gk-app { --gk-accent: var(--bs-primary, #2b6cb0); --gk-border:#d9dee5; --gk-bg:#f5f7fa; --gk-text:#1f2933; --gk-muted:#667085; --gk-h:38px; color:var(--gk-text); }
.gk-app *, .gk-app *::before, .gk-app *::after { box-sizing:border-box; }
.gk-muted { color:var(--gk-muted); }
.gk-small { font-size:.82rem; }

/* ---- Intro ---- */
.gk-intro { padding-top:1rem; padding-bottom:.5rem; }
.gk-crumbs { font-size:.85rem; color:var(--gk-muted); margin-bottom:.4rem; }
.gk-intro h1 { font-size:1.7rem; margin:0 0 .4rem; }
.gk-lead { margin:0 0 .5rem; max-width:62rem; color:#3b4652; }

/* ---- Buttons ---- */
.gk-btn { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; height:var(--gk-h); padding:0 .85rem; border:1px solid #b8c2cc; border-radius:8px; background:#fff; color:var(--gk-text); font:inherit; font-size:.9rem; line-height:1; cursor:pointer; white-space:nowrap; text-decoration:none; }
.gk-btn:hover { background:var(--gk-bg); }
.gk-btn:focus-visible, .gk-app button:focus-visible, .gk-app a:focus-visible, .gk-app select:focus-visible, .gk-app input:focus-visible { outline:3px solid #f6ad55; outline-offset:2px; }
.gk-btn--icon { width:var(--gk-h); padding:0; }
.gk-btn[aria-pressed="true"] { background:var(--gk-accent); border-color:var(--gk-accent); color:#fff; }

/* ---- Toolbar ---- */
.gk-toolbar { padding-top:.5rem; padding-bottom:.5rem; }
.gk-tb-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:.6rem .8rem; margin-bottom:.5rem; }
.gk-tb-row--cats { align-items:center; }
.gk-tb-right { margin-left:auto; display:flex; gap:.5rem; align-items:flex-end; }
.gk-search { position:relative; flex:1 1 280px; min-width:220px; }
.gk-search i { position:absolute; left:.75rem; top:50%; transform:translateY(-50%); color:var(--gk-muted); }
.gk-search input { width:100%; height:var(--gk-h); padding:0 .75rem 0 2.2rem; border:1px solid #b8c2cc; border-radius:8px; font:inherit; font-size:.92rem; }
.gk-sel { display:flex; flex-direction:column; gap:.2rem; font-size:.78rem; font-weight:600; color:#3b4652; margin:0; }
.gk-sel select, .gk-sel input { height:var(--gk-h); border:1px solid #b8c2cc; border-radius:8px; padding:0 .6rem; font:inherit; font-size:.92rem; font-weight:400; min-width:160px; background:#fff; }
.gk-tb-label { font-size:.82rem; font-weight:600; color:#3b4652; }
.gk-cats { display:flex; flex-wrap:wrap; gap:.4rem; }
.gk-cat-btn { display:inline-flex; align-items:center; gap:.4rem; height:30px; padding:0 .7rem; border:1px solid #b8c2cc; border-radius:15px; background:#fff; font:inherit; font-size:.84rem; cursor:pointer; }
.gk-cat-btn .gk-dot { width:.75rem; height:.75rem; border-radius:50%; background:var(--gk-c); display:inline-block; }
.gk-cat-btn[aria-pressed="false"] { opacity:.5; text-decoration:line-through; }
.gk-person-chips { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.4rem; }
.gk-person-chips:empty { display:none; }
.gk-pchip { display:inline-flex; align-items:center; gap:.4rem; height:30px; padding:0 .3rem 0 .7rem; border-radius:15px; border:2px solid var(--gk-c); background:#fff; font-size:.85rem; }
.gk-pchip button { border:0; background:none; cursor:pointer; font-size:1.1rem; line-height:1; padding:0 .35rem; }
.gk-settings { position:relative; }
.gk-settings > summary { list-style:none; }
.gk-settings > summary::-webkit-details-marker { display:none; }
.gk-settings__body { position:absolute; right:0; top:calc(100% + 4px); z-index:1200; background:#fff; border:1px solid var(--gk-border); border-radius:10px; box-shadow:0 10px 28px rgba(0,0,0,.18); padding:.6rem .85rem; display:flex; flex-direction:column; gap:.4rem; min-width:260px; }
.gk-settings__body label { display:flex; align-items:center; gap:.5rem; font-size:.9rem; margin:0; }
.gk-people-range { margin-bottom:.3rem; font-size:.9rem; }
.gk-people-range > summary { cursor:pointer; font-weight:600; }
.gk-prl { display:flex; flex-wrap:wrap; gap:.35rem; margin:.4rem 0; max-height:130px; overflow:auto; }
.gk-prl button { height:28px; padding:0 .65rem; border:1px solid #b8c2cc; border-radius:14px; background:#fff; font-size:.82rem; cursor:pointer; }
.gk-prl button[aria-pressed="true"] { background:var(--gk-accent); color:#fff; border-color:var(--gk-accent); }
.gk-meet { background:#fff8e6; border:1px solid #f3d79a; border-radius:8px; padding:.45rem .7rem; margin:.3rem 0 0; font-size:.88rem; }
.gk-status { margin:.2rem 0 0; font-size:.85rem; color:var(--gk-muted); min-height:1.2em; }

/* ---- Bühne: Karte + Overlay ---- */
.gk-stage { position:relative; height:clamp(520px, calc(100vh - 150px), 900px); border-top:1px solid var(--gk-border); border-bottom:1px solid var(--gk-border); overflow:hidden; background:#e8eef3; }
.gk-map { position:absolute; inset:0; z-index:1; }
.gk-loading { position:absolute; top:12px; left:50%; transform:translateX(-50%); z-index:950; background:#fff; border-radius:20px; padding:.35rem .9rem; box-shadow:0 2px 10px rgba(0,0,0,.2); font-size:.88rem; }
.gk-loading[hidden] { display:none; }
.leaflet-container { font:inherit; }

/* Marker */
.gk-pin-wrap { background:none; border:0; }
.gk-pinbox { position:relative; display:block; width:34px; height:34px; }
.gk-pin { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; border-radius:50% 50% 50% 0; transform:rotate(-45deg); background:var(--c, #4a5568); border:2px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.45); color:#fff; font-size:.8rem; }
.gk-pin > i { transform:rotate(45deg); }
.gk-pin__n { position:absolute; top:-7px; right:-9px; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:#111827; color:#fff; font-size:.7rem; line-height:18px; text-align:center; border:1px solid #fff; }
.gk-pin-wrap.is-active .gk-pin { box-shadow:0 0 0 4px rgba(246,173,85,.9), 0 2px 8px rgba(0,0,0,.5); }
.gk-pin-wrap.is-dim { opacity:.35; }
.gk-cluster-wrap { background:none; border:0; }
.gk-cluster { width:40px; height:40px; border-radius:50%; background:var(--gk-accent); color:#fff; border:3px solid rgba(255,255,255,.9); box-shadow:0 2px 8px rgba(0,0,0,.4); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.9rem; }
.gk-arrow { background:none; border:0; text-align:center; font-size:14px; line-height:14px; text-shadow:0 0 2px #fff; }

/* Popup */
.gk-popup .leaflet-popup-content { margin:12px 14px; min-width:230px; max-width:320px; }
.gk-pop h3 { font-size:1rem; margin:0; }
.gk-pop__sub { font-size:.78rem; color:var(--gk-muted); margin:0 0 .4rem; }
.gk-pop p { margin:.25rem 0; font-size:.88rem; }
.gk-pop ul { list-style:none; margin:.3rem 0 0; padding:0; max-height:210px; overflow:auto; }
.gk-pop__item { display:flex; gap:.5rem; align-items:baseline; width:100%; text-align:left; border:0; background:none; padding:.3rem .2rem; border-bottom:1px solid #eef1f4; cursor:pointer; font:inherit; font-size:.88rem; }
.gk-pop__item:hover { background:#f1f5f9; }
.gk-pop__year { flex:0 0 auto; font-weight:700; min-width:3.2rem; color:var(--gk-accent); }
.gk-pop__more { margin-top:.4rem; }
.gk-pop__dot { width:.65rem; height:.65rem; border-radius:50%; background:var(--c); flex:0 0 auto; align-self:center; }

/* Panel (rechts als Overlay, mobil als Bottom-Sheet) */
.gk-panel { position:absolute; top:0; right:0; bottom:0; width:min(470px, 100%); z-index:1100; background:#fff; box-shadow:-8px 0 28px rgba(0,0,0,.28); display:flex; flex-direction:column; }
.gk-panel[hidden] { display:none; }
.gk-panel__bar { display:flex; justify-content:flex-end; gap:.4rem; padding:.5rem; border-bottom:1px solid #e5e7eb; flex:0 0 auto; }
.gk-panel__body { overflow:auto; padding:1rem 1.2rem 2.5rem; flex:1 1 auto; overscroll-behavior:contain; }
.gk-panel__body[aria-busy="true"] { opacity:.5; }
.gk-error { color:#b42318; }
#gk-panel-expand { display:none; }

.gk-detail h2 { font-size:1.35rem; margin:.4rem 0 .3rem; outline:none; }
.gk-cat { display:inline-flex; align-items:center; gap:.4rem; font-size:.78rem; font-weight:600; padding:.15rem .6rem; border-radius:12px; background:color-mix(in srgb, var(--gk-c) 16%, #fff); border:1px solid var(--gk-c); }
.gk-meta { display:flex; flex-wrap:wrap; gap:.3rem 1rem; font-size:.9rem; color:#3b4652; margin:0 0 .6rem; }
.gk-preview-note { background:#fff8e6; border:1px solid #f3d79a; padding:.4rem .7rem; border-radius:8px; font-size:.85rem; margin:0 0 .6rem; }
.gk-mini { display:flex; align-items:center; gap:.5rem; font-size:.72rem; color:var(--gk-muted); margin:.2rem 0 .8rem; }
.gk-mini__track { position:relative; flex:1; height:4px; background:#d6dde5; border-radius:2px; }
.gk-mini__dot { position:absolute; top:50%; width:12px; height:12px; margin:-6px 0 0 -6px; border-radius:50%; background:var(--gk-accent); border:2px solid #fff; box-shadow:0 0 0 1px var(--gk-accent); }
.gk-pn { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin:0 0 .9rem; }
.gk-pn a { display:flex; flex-direction:column; gap:.1rem; padding:.4rem .6rem; border:1px solid var(--gk-border); border-radius:8px; text-decoration:none; font-size:.84rem; color:var(--gk-text); }
.gk-pn a:hover { background:var(--gk-bg); }
.gk-pn__next { text-align:right; grid-column:2; }
.gk-content { line-height:1.6; }
.gk-content img { max-width:100%; height:auto; border-radius:4px; }
.gk-content table { width:100%; border-collapse:collapse; font-size:.9rem; }
.gk-content td, .gk-content th { border:1px solid var(--gk-border); padding:.3rem .5rem; }
.gk-sec { margin-top:1.1rem; }
.gk-sec h3 { font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color:var(--gk-muted); margin:0 0 .4rem; }
.gk-people, .gk-rel, .gk-files { list-style:none; padding:0; margin:0; }
.gk-people li, .gk-rel li { margin:.25rem 0; }
.gk-chipbtn, .gk-tag { border:1px solid #b8c2cc; background:#fff; border-radius:14px; padding:.1rem .6rem; font-size:.78rem; cursor:pointer; }
.gk-chipbtn:hover, .gk-tag:hover { background:var(--gk-bg); }
.gk-tags { display:flex; flex-wrap:wrap; gap:.35rem; margin:0; }
.gk-quellen { padding-left:1.2rem; margin:0; font-size:.9rem; }
.gk-quellen li { margin:.35rem 0; }
.gk-q-typ { color:var(--gk-muted); font-size:.8rem; }
.gk-files { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:.6rem; }
.gk-file--img img { width:100%; height:100px; object-fit:cover; border-radius:6px; border:1px solid var(--gk-border); display:block; }
.gk-file__cap { display:block; font-size:.75rem; color:var(--gk-muted); margin-top:.2rem; }
.gk-file:not(.gk-file--img) { grid-column:1 / -1; font-size:.92rem; }
.gk-detail__foot { display:flex; justify-content:space-between; align-items:center; gap:.6rem; margin-top:1.4rem; padding-top:.8rem; border-top:1px solid #e5e7eb; font-size:.8rem; }

/* Lightbox */
.gk-lb { position:fixed; inset:0; z-index:5000; background:rgba(0,0,0,.88); display:flex; flex-direction:column; align-items:center; justify-content:center; padding:1rem; }
.gk-lb img { max-width:96vw; max-height:80vh; object-fit:contain; background:#fff; }
.gk-lb p { color:#fff; margin:.6rem 0 0; text-align:center; max-width:90vw; }
.gk-lb button { position:absolute; top:.8rem; right:.8rem; }

/* Zeitleiste */
.gk-timeline { position:absolute; left:12px; right:12px; bottom:30px; z-index:900; display:flex; align-items:center; gap:.6rem; background:rgba(255,255,255,.96); border:1px solid var(--gk-border); border-radius:12px; padding:.45rem .7rem; box-shadow:0 4px 16px rgba(0,0,0,.2); }
.gk-timeline[hidden] { display:none; }
.gk-stage.has-panel .gk-timeline { right:calc(min(470px, 100%) + 12px); }
.gk-speed select { height:var(--gk-h); border:1px solid #b8c2cc; border-radius:8px; font:inherit; font-size:.85rem; padding:0 .3rem; }
.gk-range { position:relative; flex:1; min-width:0; }
.gk-hist { display:flex; align-items:flex-end; height:24px; gap:1px; }
.gk-hist i { flex:1; background:#cfd8e3; min-height:2px; border-radius:1px 1px 0 0; }
.gk-hist i.on { background:var(--gk-accent); }
.gk-range__inputs { position:relative; height:22px; }
.gk-range__inputs::before { content:""; position:absolute; left:0; right:0; top:50%; height:4px; margin-top:-2px; background:#d6dde5; border-radius:2px; }
.gk-range__fill { position:absolute; top:50%; height:4px; margin-top:-2px; background:var(--gk-accent); border-radius:2px; }
.gk-range__inputs input[type="range"] { position:absolute; left:0; width:100%; top:0; height:22px; margin:0; background:none; pointer-events:none; -webkit-appearance:none; appearance:none; }
.gk-range__inputs input[type="range"]::-webkit-slider-runnable-track { background:none; height:22px; }
.gk-range__inputs input[type="range"]::-moz-range-track { background:none; }
.gk-range__inputs input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none; pointer-events:auto; width:18px; height:18px; margin-top:2px; border-radius:50%; background:#fff; border:3px solid var(--gk-accent); cursor:grab; box-shadow:0 1px 4px rgba(0,0,0,.35); }
.gk-range__inputs input[type="range"]::-moz-range-thumb { pointer-events:auto; width:12px; height:12px; border-radius:50%; background:#fff; border:3px solid var(--gk-accent); cursor:grab; }
.gk-range__label { text-align:center; font-size:.82rem; font-weight:600; }

/* Liste: Alternative zur Karte (umschaltbar), ohne JavaScript immer offen, sonst eingeklappt unter der Karte */
.gk-list { padding:1rem 0 2rem; }
.gk-list > details > summary { cursor:pointer; list-style:revert; }
.gk-list > details > summary h2 { display:inline; }
.gk-app.is-list .gk-stage { display:none; }
.gk-app.gk-nojs .gk-stage, .gk-app.gk-nojs .gk-toolbar { display:none; }
.gk-list h2 { font-size:1.2rem; }
.gk-list__items { padding-left:0; list-style:none; margin:0; }
.gk-list__items li { padding:.5rem .2rem; border-bottom:1px solid #eef1f4; }
.gk-list__items li.is-hidden { display:none; }
.gk-list__date { display:inline-block; min-width:9rem; color:var(--gk-accent); font-weight:600; }

/* Mobil: Panel als Bottom-Sheet */
@media (max-width:768px) {
    .gk-intro h1 { font-size:1.35rem; }
    .gk-stage { height:calc(100vh - 120px); min-height:480px; }
    .gk-tb-right { margin-left:0; }
    .gk-panel { top:auto; left:0; right:0; width:auto; height:64%; border-radius:16px 16px 0 0; box-shadow:0 -8px 28px rgba(0,0,0,.3); }
    .gk-panel.is-expanded { height:94%; }
    .gk-panel__bar { padding:.35rem .5rem; position:relative; justify-content:space-between; flex-direction:row-reverse; }
    .gk-panel__bar::before { content:""; position:absolute; left:50%; top:6px; width:44px; height:5px; margin-left:-22px; background:#cbd2d9; border-radius:3px; }
    #gk-panel-expand { display:inline-flex; }
    .gk-stage.has-panel .gk-timeline { display:none; }
    .gk-timeline { left:8px; right:8px; bottom:26px; padding:.35rem .5rem; gap:.4rem; }
    .gk-speed { display:none; }
    .gk-sel select, .gk-sel input { min-width:140px; }
    .gk-pn { grid-template-columns:1fr; }
    .gk-pn__next { grid-column:1; text-align:left; }
}
@media (prefers-reduced-motion: reduce) { .gk-app * { transition:none !important; animation:none !important; } }
