/* Gospelportal.de – Grundstil (Baustellen-Phase) */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #241a2e;
  --muted: #6b5f75;
  --line: #e7dfd3;
  --brand: #5b2a86;        /* tiefes Violett */
  --brand-ink: #ffffff;
  --accent: #e2a32b;       /* Gold */
  --accent-soft: #fbefd4;
  --focus: #1f6feb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(36, 26, 46, .10);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, tr:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Kopf */
.topbar { background: var(--brand); color: var(--brand-ink); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: .2px; font-size: 1.15rem; }
.logo svg { flex: none; }
.badge { background: var(--accent); color: #2a1a00; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

/* Hero / Startseite */
.hero { background: linear-gradient(180deg, var(--brand) 0%, #47206a 100%); color: #fff; padding: 40px 0 56px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #2a1a38 18px 36px); opacity: .9; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.15; margin: 0 0 12px; }
.hero p.lead { font-size: clamp(1.02rem, 2vw, 1.2rem); max-width: 46rem; margin: 0 0 24px; color: #efe7f7; }

.search { background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; max-width: 720px; }
.search label { display: block; font-weight: 600; margin-bottom: 8px; }
.search .row { display: flex; gap: 8px; flex-wrap: wrap; }
.search input[type=search] { flex: 1 1 260px; min-width: 0; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.search select { font: inherit; padding: 12px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer; background: var(--brand); color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--accent-soft); color: #5a3a00; }
.btn.small { padding: 6px 12px; font-size: .9rem; border-radius: 8px; }
.hint { font-size: .88rem; color: var(--muted); margin: 8px 0 0; }

.section { padding: 40px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.soon { display: inline-block; margin-top: 10px; font-size: .78rem; font-weight: 700; color: #7a5200; background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }

footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer a { color: var(--muted); }

/* Ergebnisseite */
.results-head { padding: 20px 0 8px; }
.results-head h1 { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 6px; }
.results-head .meta { color: var(--muted); margin: 0; }
.search.inline { box-shadow: none; border: 1px solid var(--line); margin: 12px 0 16px; max-width: none; }
#map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); background: #e9e4dc; }
@media (max-width: 600px) { #map { height: 360px; } }
.map-note { font-size: .85rem; color: var(--muted); margin: 6px 0 22px; }

table.choirs { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.choirs th { text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f6f1e9; padding: 10px 14px; }
table.choirs td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.choirs tbody tr { cursor: pointer; }
table.choirs tbody tr:hover, table.choirs tbody tr.hl { background: #f7f1fb; }
.c-name { font-weight: 650; }
.c-sub { color: var(--muted); font-size: .88rem; }
.nomap { display: inline-block; font-size: .74rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 6px; white-space: nowrap; }
.dist { color: var(--muted); font-size: .85rem; white-space: nowrap; }
td.act { text-align: right; width: 1%; white-space: nowrap; }
@media (max-width: 640px) {
  table.choirs thead { display: none; }
  table.choirs, table.choirs tbody, table.choirs tr, table.choirs td { display: block; width: 100%; }
  table.choirs td { border-top: 0; padding: 4px 14px; }
  table.choirs tr { border-top: 1px solid var(--line); padding: 8px 0; }
  td.act { text-align: left; padding-bottom: 10px; }
}
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); }

/* Karten-Fähnchen */
.flag-icon { background: none; border: 0; }
.flag { position: relative; width: 22px; height: 30px; cursor: pointer; }
.flag svg { position: absolute; left: 0; top: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.flag .lbl { position: absolute; left: 21px; top: 1px; white-space: nowrap; font: 600 11px/1.2 var(--font); color: var(--ink);
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; pointer-events: none; }
.flag.approx svg path.cloth { fill: #9a83b3; }
.hide-labels .flag .lbl { display: none; }
.small-flags .flag svg { transform: scale(.55); transform-origin: 3px 29px; }
.flag.hl svg path.cloth { fill: var(--accent); }

.leaflet-tooltip.choir-tip { min-width: 230px; padding: 10px 12px; border-radius: 10px; max-width: 280px; white-space: normal; font: 13px/1.45 var(--font); color: var(--ink); box-shadow: var(--shadow); }
.choir-tip strong { display: block; font-size: 14px; margin-bottom: 4px; }
.choir-tip .k { color: var(--muted); }

/* Detailfenster */
dialog.info { border: 0; border-radius: 18px; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 24px 60px rgba(0,0,0,.25); color: var(--ink); }
dialog.info::backdrop { background: rgba(26, 14, 40, .55); }
.info-head { background: var(--brand); color: #fff; padding: 18px 56px 16px 22px; position: relative; }
.info-head h2 { margin: 0; font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; }
.info-head p { margin: 4px 0 0; color: #e8dcf4; }
.info-close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.info-body { padding: 18px 22px 22px; overflow: auto; }
.info-body dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0 0 16px; }
.info-body dt { color: var(--muted); font-weight: 600; }
.info-body dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .info-body dl { grid-template-columns: 1fr; gap: 2px; } .info-body dd { margin-bottom: 8px; } }
.info-body .desc { background: #faf6ef; border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.info-foot { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.links a { margin-right: 10px; display: inline-block; }
