/* Halloween-Karte Ternberg – Basis-Stil (Werte aus docs/halloween/mockups) */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url("../fonts/bricolage-grotesque-700.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url("../fonts/bricolage-grotesque-800.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2"); }

:root {
  --bg: #14121a;
  --surface: #1f1c27;
  --map-bg: #1d1a24;
  --line: #2e2a38;
  --line-2: #3a3545;
  --text: #f4efe6;
  --muted: #b9b1a6;
  --accent: #ff8a3d;
  --accent-hover: #ffb07a;
  --group: #a78bfa;
  --off: #6f6878;
  --error: #f87171;
  --ok: #4ade80;
  --r-card: 18px;
  --r-btn: 12px;
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* ---------- App-Rahmen (mobil zuerst, am Desktop zentrierte Spalte) ---------- */
.app {
  min-height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
/* Karte füllt den freien Platz; alles andere behält seine volle Höhe (sonst rutscht Text ins Menü).
   Reicht der Platz nicht, schrumpft die Karte bis min-height, danach scrollt die Seite. */
.view-map .app { height: auto; min-height: 560px; min-height: max(560px, 100vh); min-height: max(560px, 100dvh); }
.view-map .app > :not(.map-wrap) { flex: none; }

/* ---------- Kopfzeile Karte ---------- */
.top {
  padding: 20px 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.eyebrow {
  margin: 0 0 2px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.top h1 { font-weight: 800; font-size: 30px; line-height: 1.05; }
.counter { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.counter strong { font-family: var(--font-head); font-weight: 800; font-size: 30px; line-height: 1.1; color: var(--accent); }
.counter span { font-size: 12px; color: var(--muted); }

/* Infoleiste unter der Überschrift (scrollt waagrecht, falls zu breit) */
.stats {
  flex: none;   /* sonst drückt die Karte die Leiste auf 0 Höhe */
  display: flex; gap: 6px; margin: -4px 0 10px; padding: 0 12px;
  list-style: none; overflow-x: auto; scrollbar-width: none;
}
.stats::-webkit-scrollbar { display: none; }
.stats li {
  flex: none; padding: 5px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted); white-space: nowrap;
}
.stats strong { color: var(--text); font-weight: 700; }
#st-kidsnow strong { color: var(--group); }

.notice {
  margin: 0 12px 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Karte ---------- */
.map-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
  margin: 0 12px;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--map-bg);
  isolation: isolate;
}
#map { position: absolute; inset: 0; background: var(--map-bg); }

/* Dunkle Darstellung der OSM-Kacheln */
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.82) saturate(.45) sepia(.12); }

.legend {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 66px);
  pointer-events: none;
}
/* Am Handy wird mit zwei Fingern gezoomt – die Buttons stören dort nur */
@media (pointer: coarse) {
  .legend { max-width: calc(100% - 20px); }
  .leaflet-control-zoom { display: none; }
}
.legend-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 18, 26, .88);
  font-size: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.legend-muted { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-on { background: var(--accent); }
.dot-off { background: var(--off); }
.dot-seen { background: transparent; border: 2px solid var(--group); }
.dot-neighbor { background: repeating-linear-gradient(135deg, rgba(20, 18, 26, .4) 0 2px, transparent 2px 4px), var(--accent); }
.dot-no { background: #2a2633; border: 2px solid var(--off); }

.locate {
  position: absolute;
  right: 10px;
  bottom: 22px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
}
.locate.is-busy svg { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.offline {
  position: absolute;
  left: 10px;
  bottom: 22px;
  z-index: 500;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 18, 26, .92);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Leaflet an das Theme anpassen */
.leaflet-container { background: var(--map-bg); font-family: var(--font-text); }
.leaflet-control-attribution {
  background: rgba(20, 18, 26, .75) !important;
  color: var(--muted) !important;
  font-size: 10px;
}
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar { border: none !important; box-shadow: 0 4px 12px rgba(0, 0, 0, .45) !important; }
.leaflet-bar a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-bottom-color: var(--line-2) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
}

/* ---------- Pins ---------- */
.pin-icon { background: none; border: none; }
.pin {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
  transition: transform .12s ease;
}
.pin svg { width: 55%; height: 55%; stroke-width: 2.4; }
.pin.is-out { background: var(--off); }
.pin.is-selected { border: 3px solid var(--text); }
.pin.is-seen {
  background: var(--surface);
  border: 2.5px solid var(--group);
  color: var(--accent);
}
.pin.is-seen.is-out { color: var(--off); border-color: var(--off); }
.pin.is-seen.is-selected { border-color: var(--text); }
/* Von Nachbarn gemeldet: orange wie ein Haus, aber schraffiert (nicht vom Haus selbst eingetragen) */
.pin.is-seen.is-neighbor {
  background: repeating-linear-gradient(135deg, rgba(20, 18, 26, .32) 0 3px, transparent 3px 7px), var(--accent);
  border: 2px solid var(--bg);
  color: var(--bg);
}
.pin.is-seen.is-neighbor svg { stroke-width: 2.6; }
.pin.is-seen.is-neighbor.is-out {
  background: repeating-linear-gradient(135deg, rgba(20, 18, 26, .32) 0 3px, transparent 3px 7px), var(--off);
}
/* Bitte nicht läuten: grau mit durchgestrichener Glocke */
.pin.is-seen.is-no { background: #2a2633; border: 2.5px solid var(--off); color: #d6cfc6; }
.pin.is-seen.is-no svg { stroke-width: 2.2; }
.pin.is-seen.is-neighbor.is-selected, .pin.is-seen.is-no.is-selected { border: 3px solid var(--text); }
.me-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #60a5fa;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(96, 165, 250, .3);
}

/* ---------- Detailkarte ---------- */
.detail {
  margin: 12px 12px 0;
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 148px;
}
.detail-hint { margin: auto 0; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 15px; }
.detail-hint svg { color: var(--accent); flex-shrink: 0; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.detail-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.15; }
.detail-time { font-size: 14px; color: var(--muted); margin-top: 4px; }
.detail-text { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.detail-crowd {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.detail-crowd svg { color: var(--group); flex-shrink: 0; }
.badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-on { background: var(--accent); color: var(--bg); }
.badge-off { background: var(--line); color: var(--muted); }
.badge-seen { border: 1.5px solid var(--group); color: var(--group); }
.badge-neighbor { border: 1.5px solid var(--accent); color: var(--accent); }
.badge-no { background: var(--line); color: var(--text); border: 1.5px solid var(--off); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--line); font-size: 13px; }

/* ---------- Untere Navigation ---------- */
.tabbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 8px 4px;
}
.tabbar a {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  border-radius: 12px;
}
.tabbar a.is-active { color: var(--accent); font-weight: 700; }
.tabbar a:hover { color: var(--text); }
/* „Wir ziehen los“ vor dem Halloween-Tag: ausgegraut, führt aber zur Info-Seite */
.tabbar a.is-soon { opacity: .45; }
.tabbar a.is-soon.is-active { opacity: .7; }

.legal-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 12px 10px;
  font-size: 12px;
  color: var(--off);
}
/* Unter dem Menü: Linie als Trenner, damit die Fußzeile nicht wie ein Teil der Tabs wirkt */
.tabbar + .legal-links {
  margin: 6px 16px 0;
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
}
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Unterseiten ---------- */
.page-head { display: flex; align-items: center; gap: 12px; padding: 22px 20px 12px; }
.page-head h1 { font-weight: 800; font-size: 26px; line-height: 1.1; }
.back {
  width: 44px;
  height: 44px;
  margin-left: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 12px;
}
.page-body { flex: 1; padding: 0 20px 20px; }
.card { background: var(--surface); border-radius: var(--r-card); padding: 16px; }
.card p { margin: 0; }
.prose { line-height: 1.6; }
.prose h2 { font-size: 20px; margin: 20px 0 6px; }

.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 10px;
}
.splash h1 { font-weight: 800; font-size: 40px; line-height: 1.05; }
.splash p { margin: 0 auto; max-width: 420px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); color: var(--bg); }

/* ---------- Formulare ---------- */
.form, .form fieldset { display: flex; flex-direction: column; gap: 16px; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 14px; font-weight: 700; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.field-note { margin: 0; font-size: 12.5px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.field-note.warn { color: #fcd34d; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
select, input[type="email"], input[type="text"], textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-size: 16px;            /* verhindert Zoom auf iOS */
}
textarea { padding: 10px; resize: vertical; min-height: 70px; line-height: 1.4; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 61, .25); }
::placeholder { color: #8a8290; }
fieldset:disabled select, fieldset:disabled textarea { opacity: .6; }
.is-invalid select, .is-invalid input, .is-invalid textarea, .pick-wrap.is-invalid { border-color: var(--error); box-shadow: 0 0 0 2px rgba(248, 113, 113, .45); }
.checks.is-invalid .check span { color: #fecaca; }

.checks { display: flex; flex-direction: column; gap: 4px; }
.check { min-height: 44px; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; padding: 6px 0; cursor: pointer; }
.check input { flex-shrink: 0; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(248, 113, 113, .12);
  border: 1px solid rgba(248, 113, 113, .5);
  color: #fecaca;
  font-size: 14px;
}
.form-foot { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }

/* Karte zum Pin-Setzen */
.pick-wrap { position: relative; height: 230px; border-radius: 14px; overflow: hidden; background: var(--map-bg); border: 1px solid transparent; isolation: isolate; }
.pick-sm { height: 190px; }

/* Hilfe */
.help .card p { margin: 0; line-height: 1.5; }
.help a { color: var(--accent); }
.help-legend, .help-list, .help-steps { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.help-legend { list-style: none; }
.help-legend li { display: flex; gap: 10px; align-items: baseline; }
.help-legend .dot { flex: none; transform: translateY(1px); }
.help-list, .help-steps { padding-left: 20px; }

/* Wir ziehen los: Gebietskarte als Infobox */
.zone-info { display: flex; flex-direction: column; gap: 6px; }
.zone-info .field-note { margin: 0; }
.zone-map { height: 260px; border-radius: 14px; overflow: hidden; background: var(--map-bg); isolation: isolate; }
.leaflet-tooltip.zone-label {
  background: rgba(21, 18, 28, .85); color: var(--text); border: 0; box-shadow: none;
  padding: 2px 6px; border-radius: 6px; font: 700 12px/1.3 var(--font-text);
}
.leaflet-tooltip.zone-label::before { display: none; }
.pick-map { position: absolute; inset: 0; }
.map-hint {
  position: absolute; left: 8px; bottom: 8px; z-index: 500;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(20, 18, 26, .85); font-size: 12px; color: var(--muted);
  pointer-events: none;
}
.locate-sm { bottom: 10px; width: 40px; height: 40px; }
.pin.is-ghost { opacity: .55; box-shadow: none; border-width: 1.5px; }

.claim {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--group);
  background: rgba(167, 139, 250, .1);
  font-size: 14px;
}
.claim p { margin: 0 0 10px; }
.claim-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { gap: 8px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-big { min-height: 52px; font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--line); color: var(--text); }
.btn-danger { background: transparent; color: var(--error); border: 1px solid rgba(248, 113, 113, .6); }
.btn-danger:hover { background: rgba(248, 113, 113, .12); color: var(--error); }
.btn-danger-solid { background: var(--error); color: var(--bg); }
.btn-danger-solid:hover { background: #fca5a5; color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Karten, Banner, Stapel ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card-title { font-size: 18px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-sub { font-family: var(--font-text); font-weight: 400; font-size: 14px; }
.banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-size: 15px;
}
.banner > svg { flex-shrink: 0; margin-top: 2px; }
.banner p { margin: 0; }
.banner > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.banner-ok { border-color: rgba(74, 222, 128, .5); }
.banner-ok > svg { color: var(--ok); }
.banner-warn { border-color: rgba(252, 211, 77, .5); }
.banner-warn > svg { color: #fcd34d; }
.banner-error { border-color: rgba(248, 113, 113, .6); }
.banner-error > svg { color: var(--error); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 180px; }

/* ---------- Großer Schalter ---------- */
.big-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px; border-radius: 18px; background: var(--bg); }
.big-toggle button {
  min-height: 84px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid transparent; border-radius: 14px;
  background: transparent; color: var(--muted);
  font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.15; text-align: center;
  cursor: pointer; padding: 8px;
}
.big-toggle button:hover:not(:disabled) { border-color: var(--line-2); color: var(--text); }
.big-toggle button[data-status="active"][aria-checked="true"] { background: var(--accent); color: var(--bg); }
.big-toggle button[data-status="out"][aria-checked="true"] { background: var(--off); color: var(--text); }
.big-toggle button:disabled { cursor: not-allowed; }
.big-toggle.is-busy { opacity: .8; }

/* ---------- Erfolgsscreen & Link ---------- */
.done { display: flex; flex-direction: column; gap: 14px; }
.done h2 { font-weight: 800; font-size: 28px; }
.done > p { margin: 0; }
.done-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 138, 61, .15); color: var(--accent);
}
.link-box {
  display: block; padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-2);
  font-size: 13px; overflow-wrap: anywhere; user-select: all;
}
.homescreen { font-size: 14px; color: var(--muted); }
.homescreen summary { cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); }
.homescreen p { margin: 4px 0; }

.danger-zone { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 6px 0 10px; }

/* ---------- Dialog ---------- */
.dialog {
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line-2); border-radius: var(--r-card);
  background: var(--surface); color: var(--text); padding: 20px;
}
.dialog::backdrop { background: rgba(10, 8, 16, .7); }
.dialog h2 { font-size: 20px; margin-bottom: 8px; }
.dialog p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Sichtungen & Melden auf der Karte ---------- */
.spot-btn {
  position: absolute; left: 50%; bottom: 22px; z-index: 500; transform: translateX(-50%);
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: none;
  background: var(--group); color: var(--bg);
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5); white-space: nowrap;
}
.spot-btn:hover { background: #c4b5fd; }
#map.is-placing { cursor: crosshair; }
.detail-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.detail-foot .detail-crowd { border-top: 0; padding-top: 0; }
.link-btn {
  border: none; background: none; padding: 8px 0; min-height: 36px;
  color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer;
}
.link-btn:hover { color: var(--error); }
.vote-row { display: flex; gap: 8px; }
.vote-row .btn { flex: 1 1 0; min-width: 0; padding: 4px 8px; font-size: 14px; line-height: 1.2; text-align: center; }
.btn-vote-yes { background: transparent; color: var(--text); border: 1px solid var(--group); }
.btn-vote-yes:hover { background: rgba(167, 139, 250, .15); color: var(--text); }
.vote-row .btn[aria-pressed="true"] { background: var(--group); color: var(--bg); border-color: var(--group); }
.vote-row .btn-ghost[aria-pressed="true"] { background: var(--off); color: var(--text); border-color: var(--off); }
.chip-sm { min-height: 40px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--group); color: var(--bg); border-color: var(--group); font-weight: 700; }
.dialog fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.dialog .field { margin-bottom: 12px; }

/* ---------- Nachbarn melden (Haus-Seite) ---------- */
.card-title-sm { font-size: 16px; margin-top: 4px; }
.nb-wrap { height: 240px; }
.nb-choice { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg); }
.nb-item { border-color: var(--line-2); }
.nb-item .mine-text { gap: 2px; min-width: 0; }
.kind-chips { margin-top: -2px; }

/* ---------- Gruppen ---------- */
.page-lead { margin: 0 20px 14px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.page-body-tight { padding: 0 12px 20px; }
.group-form { padding: 16px; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  font-size: 15px; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--line-2);
}
.chip[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.chip:hover { border-color: var(--muted); }
.align-end { align-items: end; }
select.on-dark { background: var(--bg); }
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg);
}
.stepper button {
  width: 44px; height: 44px; border: none; background: transparent; color: var(--text);
  font-size: 22px; cursor: pointer; border-radius: 10px;
}
.stepper button:disabled { color: var(--off); cursor: default; }
.stepper output { font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.btn-group { background: var(--group); color: var(--bg); flex: 1; }
.btn-group:hover { background: #c4b5fd; color: var(--bg); }
.btn-row-fill { flex-wrap: nowrap; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 8px; }
.section-title { font-size: 18px; font-weight: 700; margin: 0 8px 8px; }
.section-head .section-title { margin: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.exp-card { padding: 12px 14px; border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.exp-head { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; flex-wrap: wrap; }
.bars { display: grid; gap: 6px; align-items: end; height: 34px; }
.bar { border-radius: 4px; background: #5b4d8a; }
.bar.is-high { background: var(--group); }

.mine-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mine-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid rgba(167, 139, 250, .35);
}
.mine-text { display: flex; flex-direction: column; }
.mine-actions { display: flex; gap: 6px; }

/* Öffentliche Druckvorlagen */
.print-card { gap: 14px; }
.print-card .card-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.swatches { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.swatches .label { margin-bottom: 4px; padding: 0; }
.swatch {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px;
  border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer;
}
.swatch:has(input:checked) { border-color: var(--accent); background: rgba(255, 138, 61, .08); }
.swatch input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.swatch-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--text); flex-shrink: 0; }
.swatch small { display: block; color: var(--muted); font-size: 13px; }

.print-row { display: flex; gap: 8px; align-items: flex-end; }
.print-row .field { flex: 1; }

.dev-mail pre { margin: 0; white-space: pre-wrap; font-size: 13px; overflow-wrap: anywhere; }

@media (max-width: 370px) {
  .top h1, .counter strong { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
