/* ---------------------------------------------------------------- Grundlage */
:root {
  --bg:        #f7f4f0;
  --surface:   #ffffff;
  --border:    #e3ddd5;
  --ink:       #2c2622;
  --ink-soft:  #6f6660;
  --accent:    #9a6b4f;
  --accent-dk: #7a5239;

  --good:  #2f7d4f;
  --bad:   #a8442f;
  --must:  #b8860b;
  --must-solid: #8f6708;  /* gefuellt, traegt weisse Schrift */
  --never: #8b2b2b;

  --good-bg:  #e8f3ea;
  --bad-bg:   #f8ebe7;
  --must-bg:  #fdf3dd;
  --never-bg: #f6e3e3;

  --radius: 12px;
  --shadow: 0 1px 3px rgba(44, 38, 34, .08), 0 6px 18px rgba(44, 38, 34, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body.centered { display: grid; place-items: center; min-height: 100vh; }

a { color: var(--accent-dk); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.muted { color: var(--ink-soft); }
.strong { font-weight: 600; }
h1, h2, h3 { line-height: 1.25; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 24px 20px 80px; }

/* ------------------------------------------------------------------ Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1220px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.brand { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  text-decoration: none; color: var(--ink-soft); padding: 6px 12px;
  border-radius: 999px; font-size: .93rem;
}
.topbar nav a:hover { background: var(--bg); color: var(--ink); }
.topbar nav a.active { background: var(--accent); color: #fff; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.who { font-weight: 600; font-size: .93rem; }

.progress-pill { display: flex; align-items: center; gap: 8px; }
.progress-bar {
  display: block; width: 90px; height: 7px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
.progress-bar > span {
  display: block; height: 100%; background: var(--good);
  transition: width .3s ease;
}
.progress-text { font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink-soft); font: inherit; font-size: .9rem; text-decoration: underline;
}
.link-button:hover { color: var(--ink); }

/* ------------------------------------------------------------------- Knöpfe */
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  text-decoration: none; font: inherit; font-size: .93rem; cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-big { padding: 13px 32px; font-size: 1.05rem; }
.btn-small { padding: 5px 12px; font-size: .82rem; }
.btn-danger { color: var(--never); border-color: #e2c4c4; }
.btn-danger:hover { background: var(--never-bg); }

.alert { padding: 12px 16px; border-radius: var(--radius); margin: 0 0 18px; }
.alert-error { background: var(--never-bg); color: var(--never); }
.alert-ok { background: var(--good-bg); color: var(--good); }

/* ----------------------------------------------------------------- Anmeldung */
.card-wrap { padding: 32px 20px; width: 100%; }
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow);
  padding: 36px 34px; max-width: 420px; margin: 0 auto;
}
.login-head { text-align: center; margin-bottom: 26px; }
.login-head h1 { margin: 6px 0 2px; font-size: 1.5rem; }
.login-head p { margin: 0; }
.rings { font-size: 2.4rem; }

.stack { display: grid; gap: 16px; }
.stack label, .row-form label { display: grid; gap: 6px; font-size: .88rem;
  font-weight: 600; color: var(--ink-soft); }
input[type=text], input[type=password], select, textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 9px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}

/* ----------------------------------------------------------------- Anleitung */
/* Anleitung in Einfacher Sprache: groessere Schrift, viel Zeilenabstand,
   kurze Absaetze stehen dicht beieinander. */
.intro { max-width: 680px; margin: 0 auto; font-size: 1.06rem; line-height: 1.65; }
.intro p { margin: 0 0 9px; }
.intro p + ul, .intro ul + p { margin-top: 12px; }
.intro .tips li { margin-bottom: 9px; }
.intro .veto-card p:last-child, .intro-block p:last-child { margin-bottom: 0; }
.intro-head { margin-bottom: 34px; }
.eyebrow { color: var(--accent); font-weight: 600; margin: 0 0 4px; font-size: .9rem; }
.intro h1 { font-size: 2rem; margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); margin: 0; line-height: 1.7; }

.intro-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.intro-block h2 { margin: 0 0 14px; font-size: 1.25rem; }
.intro-block { padding: 26px 28px; }
.intro-warning { border-color: #e6c9a8; background: #fffaf3; }

.vote-demo { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.vote-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .93rem;
  border: 1px solid transparent;
}
.vote-chip.vote-good  { background: var(--good-bg);  color: var(--good);  border-color: #bcdcc6; }
.vote-chip.vote-bad   { background: var(--bad-bg);   color: var(--bad);   border-color: #e8c4b9; }
.vote-chip.vote-must  { background: var(--must-bg);  color: var(--must);  border-color: #e8d19a; }
.vote-chip.vote-never { background: var(--never-bg); color: var(--never); border-color: #e0bcbc; }

.veto-card {
  border-radius: var(--radius); padding: 16px 18px; margin: 16px 0;
  border-left: 4px solid;
}
.veto-card p { margin: 10px 0 0; }
.veto-never { background: var(--never-bg); border-color: var(--never); }
.veto-must  { background: var(--must-bg);  border-color: var(--must); }
.callout {
  background: #fff; border: 1px dashed var(--accent);
  border-radius: var(--radius); padding: 14px 16px; margin: 20px 0 0;
}
.tips { margin: 12px 0 0; padding-left: 22px; }
.tips li { margin-bottom: 7px; }
.intro-foot { text-align: center; padding: 22px 0 0; }

/* ------------------------------------------------------------------ Werkzeuge */
.toolbar {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 7px 15px; border-radius: 999px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-soft); font-size: .9rem;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.year-filter { margin-left: auto; }
.year-filter label { display: flex; align-items: center; gap: 8px;
  font-size: .88rem; color: var(--ink-soft); }
.year-filter select { width: auto; }
.result-line { margin: 0 0 22px; color: var(--ink); font-size: .95rem; }

.empty {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px 24px; text-align: center;
}
.empty .big { font-size: 1.2rem; font-weight: 600; margin-top: 0; }

/* -------------------------------------------------------------------- Raster */
.year-group { margin-bottom: 42px; }
.year-head {
  position: sticky; top: 54px; z-index: 20;
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 16px; padding: 8px 0;
  background: linear-gradient(var(--bg) 72%, rgba(247, 244, 240, 0));
  font-size: 1.35rem;
}
.year-head small { color: var(--ink-soft); font-weight: 400; font-size: .78rem; }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.photo-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: border-color .15s ease;
}
.photo-card.voted { border-width: 2px; }
.photo-card.vote-is-good  { border-color: var(--good);  box-shadow: 0 0 0 3px var(--good-bg),  var(--shadow); }
.photo-card.vote-is-bad   { border-color: var(--bad);   box-shadow: 0 0 0 3px var(--bad-bg),   var(--shadow); }
.photo-card.vote-is-must  { border-color: var(--must);  box-shadow: 0 0 0 3px var(--must-bg),  var(--shadow); }
.photo-card.vote-is-never { border-color: var(--never); box-shadow: 0 0 0 3px var(--never-bg), var(--shadow); }
.photo-card.vote-is-never .photo-button img { filter: grayscale(1) opacity(.5); }

.photo-button {
  display: block; position: relative; width: 100%; padding: 0;
  border: 0; background: #efe9e2; cursor: zoom-in; line-height: 0;
}
.photo-button img {
  width: 100%; height: 210px; object-fit: cover; display: block;
  transition: filter .2s ease;
}
.badge {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  line-height: 1.5; display: none; backdrop-filter: blur(4px);
}
.badge.show { display: block; }
.badge.b-good  { background: rgba(232, 243, 234, .95); color: var(--good); }
.badge.b-bad   { background: rgba(248, 235, 231, .95); color: var(--bad); }
.badge.b-must  { background: rgba(253, 243, 221, .95); color: var(--must-solid); }
.badge.b-never { background: rgba(246, 227, 227, .95); color: var(--never); }

.photo-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.subtitle { margin: 0; font-size: .93rem; font-weight: 600; line-height: 1.4;
  min-height: 2.6em; }
.subtitle .muted { font-weight: 400; font-style: italic; }

/* Bewertung: vier Stimmen, gegenseitig ausschliessend wie Radio-Knoepfe.
   Oben die normale Abstimmung, darunter durch eine beschriftete Linie klar
   abgesetzt die beiden Notfall-Knoepfe. Die gewaehlte Stimme wird kraeftig
   gefuellt, damit man sie ueber das ganze Raster hinweg sofort sieht. */
.votes { display: flex; flex-direction: column; gap: 0; }

.segmented {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: #fbf9f7; overflow: hidden;
}
.segmented .vote + .vote { border-left: 1.5px solid var(--border); }

.vote {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 6px; cursor: pointer; position: relative;
  border: 0; background: transparent;
  font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink-soft);
  transition: background .13s ease, color .13s ease;
}
.vote span { white-space: nowrap; }
.vote:hover { background: rgba(0, 0, 0, .04); color: var(--ink); }
.vote:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; z-index: 2; }

/* Gewaehlt: kraeftige Fuellung, weisse Fettschrift, Haekchen davor. */
.vote.on {
  color: #fff; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.vote.on::before {
  content: "✓"; font-size: .95em; font-weight: 700; margin-right: 1px;
}
.vote.on.vote-good  { background: var(--good); }
.vote.on.vote-bad   { background: var(--bad); }
.vote.on.vote-must  { background: var(--must-solid); }
.vote.on.vote-never { background: var(--never); }
.vote.on:hover { filter: brightness(1.08); }
.segmented:has(.vote.on) { border-color: transparent; }

/* Beschriftete Trennlinie zwischen Abstimmung und Notfall-Knoepfen. */
.veto-trenner {
  display: flex; align-items: center; gap: 8px;
  margin: 11px 0 7px; color: #a49a91;
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em;
}
.veto-trenner::before, .veto-trenner::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* Die Notfall-Zeile tritt zurueck, solange sie nicht gewaehlt ist. */
.segmented-veto { background: transparent; border-style: dashed; border-color: #d8d0c6; }
.segmented-veto .vote + .vote { border-left-style: dashed; border-left-color: #d8d0c6; }
.segmented-veto .vote { font-size: .75rem; font-weight: 500; padding: 8px 6px;
  color: #90867d; }
.segmented-veto .vote:hover { color: var(--ink); }
.segmented-veto:has(.vote.on) { border-style: solid; }

/* Gewaehlter Notfall-Knopf: weisse Fettschrift auf voller Farbe. Ohne diese
   Regeln gewinnt die gedaempfte Textfarbe von .segmented-veto .vote und der
   Text steht grau auf dunklem Gelb (Kontrast 1,1:1). */
.segmented-veto .vote.on,
.lb-votes .segmented-veto .vote.on {
  color: #fff;
  font-weight: 700;
}
.segmented-veto .vote.on.vote-must,
.lb-votes .segmented-veto .vote.on.vote-must { background: var(--must-solid); }
.segmented-veto .vote.on.vote-never,
.lb-votes .segmented-veto .vote.on.vote-never { background: var(--never); }

/* Notiz: ausdruecklicher Speichern-Knopf statt stillem Autospeichern. */
.note-row { display: flex; align-items: center; gap: 10px; }
.btn-save { flex: none; opacity: .45; transition: opacity .15s ease; }
.btn-save:disabled { cursor: default; }
.btn-save.dirty {
  opacity: 1; background: var(--accent); border-color: var(--accent); color: #fff;
  font-weight: 600;
}
.btn-save.dirty:hover { background: var(--accent-dk); }
.note-state.fehler { color: var(--never); }

.note { resize: vertical; min-height: 52px; font-size: .88rem; }
.note-state { font-size: .74rem; color: var(--ink-soft); min-height: 1em; }
.note-state.saved { color: var(--good); }

.pager { display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 30px; }

/* ---------------------------------------------------------------- Großansicht */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 20, 18, .94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; flex: 1; min-height: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; width: 100%; }
.lb-figure img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 6px; background: #000;
}
.lb-caption { color: #f2ece6; text-align: center; display: flex; gap: 10px;
  align-items: baseline; justify-content: center; flex-wrap: wrap; }
.lb-year { font-weight: 700; color: #d9b48f; }
.lb-subtitle { font-size: .95rem; }

.lb-panel {
  width: 100%; max-width: 760px; margin-top: 14px;
  display: flex; flex-direction: column; gap: 9px;
}
.lb-votes .segmented { background: #2f2a26; border-color: #4b433c; }
.lb-votes .segmented .vote + .vote { border-left-color: #4b433c; }
.lb-votes .vote { padding: 12px 6px; font-size: .84rem; color: #cfc6bd; }
.lb-votes .vote:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.lb-votes .vote.on { color: #fff; }
.lb-votes .segmented-veto { background: transparent; border-color: #5a5148; }
.lb-votes .segmented-veto .vote { color: #9a8f85; }
.lb-votes .segmented-veto .vote + .vote { border-left-color: #5a5148; }
.lb-votes .veto-trenner { color: #8c8178; }
.lb-votes .veto-trenner::before, .lb-votes .veto-trenner::after { background: #4b433c; }
.lb-panel .note-row { justify-content: flex-start; }
.lb-note-state { color: #cfc6bd; }
.lb-note-state.saved { color: #8fd0a4; }
.lb-note { background: #2f2a26; border-color: #463f39; color: #f2ece6; }
.lb-note::placeholder { color: #8c8178; }
.lb-hint { text-align: center; margin: 0; font-size: .78rem; color: #8c8178; }

.lb-close, .lb-nav {
  position: absolute; background: rgba(255, 255, 255, .1); color: #fff;
  border: 0; cursor: pointer; border-radius: 50%;
  display: grid; place-items: center; transition: background .15s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 1.1rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

/* ------------------------------------------------------------------- Admin */
.admin h1 { margin-top: 0; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.panel h2 { margin-top: 0; font-size: 1.15rem; }
.summary { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px; }
.sum { border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--border); }
.sum b { display: block; font-size: 1.7rem; line-height: 1.1; }
.sum span { font-size: .85rem; font-weight: 600; }
.sum small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .76rem; }
.sum-gesetzt { background: var(--must-bg); }
.sum-dafuer { background: var(--good-bg); }
.sum-dagegen { background: var(--bad-bg); }
.sum-ausgeschlossen { background: var(--never-bg); }
.export-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 8px 10px; text-align: left;
  border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--ink-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-results { display: block; overflow-x: auto; }
.thumb-cell img { width: 64px; height: 48px; object-fit: cover; border-radius: 5px; }
.notes-cell { max-width: 380px; }
.notes-cell p { margin: 0 0 5px; font-size: .84rem; }
.status-pill { padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--bg); white-space: nowrap; }
.status-gesetzt .status-pill { background: var(--must-bg); color: var(--must-solid); }
.status-dafuer .status-pill { background: var(--good-bg); color: var(--good); }
.status-dagegen .status-pill { background: var(--bad-bg); color: var(--bad); }
.status-ausgeschlossen .status-pill { background: var(--never-bg); color: var(--never); }
.status-ausgeschlossen .thumb-cell img { filter: grayscale(1) opacity(.5); }

.inline { display: flex; gap: 5px; align-items: center; }
.inline input { width: 130px; }
.row-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 8px; }
.row-form input { width: 200px; }
.checkbox { flex-direction: row !important; align-items: center; gap: 6px !important; }
.checkbox input { width: auto; }
.sort-row { display: flex; gap: 8px; align-items: center; font-size: .88rem;
  color: var(--ink-soft); }

/* -------------------------------------------------------------------- Mobil */
@media (max-width: 640px) {
  .wrap { padding: 16px 12px 60px; }
  .topbar-inner { gap: 10px; padding: 8px 12px; }
  .topbar-right { width: 100%; margin-left: 0; justify-content: space-between; }
  .brand { font-size: .98rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .photo-button img { height: 150px; }
  .vote { font-size: .76rem; padding: 11px 4px; gap: 4px; }
  .segmented-veto .vote { font-size: .68rem; }
  .lb-votes .vote { font-size: .78rem; }
  .lb-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .year-head { top: 96px; font-size: 1.15rem; }
  .year-filter { margin-left: 0; }
  .table-results { font-size: .8rem; }
}

/* ----------------------------------------------------------- Nachfragedialog */
.veto-dialog {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(24, 20, 18, .6);
  display: grid; place-items: center; padding: 20px;
}
.veto-dialog[hidden] { display: none; }
.veto-box {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
  padding: 26px 28px; max-width: 440px;
}
.veto-box h3 { margin: 0 0 10px; font-size: 1.15rem; }
.veto-box p { margin: 0 0 10px; font-size: .93rem; }
.veto-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* Hinweis, dass Bildfehler nachtraeglich korrigiert werden. */
.intro-repair { border-color: #bcd3e0; background: #f4f9fc; }
.intro-repair em { font-style: italic; }

/* Datenschutz-Hinweis am Ende der Anleitung. */
.privat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px; margin: 0 0 14px;
  display: inline-block; text-align: left;
}

/* ------------------------------------------------- Auswertung: Widersprüche */
.panel-konflikt { border: 2px solid var(--never); background: #fdf6f6; }
.panel-konflikt h2 { color: var(--never); }

.konflikt-liste { display: grid; gap: 14px; margin-top: 16px; }
.konflikt-karte {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.konflikt-karte img {
  width: 110px; height: 82px; object-fit: cover; border-radius: 6px; flex: none;
}
.konflikt-parteien {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 8px 0 0;
}
.konflikt-parteien .gegen { color: var(--ink-soft); font-size: .8rem; }
.konflikt-notiz { margin: 7px 0 0; font-size: .86rem; }

/* Wer hat wie gestimmt: eine Marke je Person, Farbe = Stimme. */
.wer-cell { min-width: 190px; }
.wer {
  display: inline-block; margin: 2px 3px 2px 0; padding: 2px 9px;
  border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.wer-good  { background: var(--good-bg);  color: var(--good); }
.wer-bad   { background: var(--bad-bg);   color: var(--bad); }
.wer-must  { background: var(--must-bg);  color: var(--must-solid); }
.wer-never { background: var(--never-bg); color: var(--never); }

.teilnahme {
  display: block; font-size: .72rem; color: var(--ink-soft);
  margin-bottom: 4px; font-variant-numeric: tabular-nums;
}
.teilnahme.duenn { color: var(--bad); font-weight: 600; }

.sum-konflikt { background: var(--never-bg); border-color: var(--never); }
.sum-ohne { background: #f1efec; }
.status-konflikt .status-pill { background: var(--never); color: #fff; }
.status-konflikt { background: #fdf6f6; }
.status-ohne_stimme .status-pill { background: #ebe7e2; color: var(--ink-soft); }

.hinweis {
  background: #f4f9fc; border: 1px solid #bcd3e0; border-radius: var(--radius);
  padding: 13px 16px; margin: 0 0 18px; font-size: .9rem;
}

@media (max-width: 640px) {
  .konflikt-karte { flex-direction: column; }
  .konflikt-karte img { width: 100%; height: 140px; }
}

/* Drei Hinweise, die steuern, wonach ausgewaehlt wird: wie viel Platz die
   Diashow hat, fuer wen ausgewaehlt wird und ueber welchen Zeitraum. */
.zeit, .gaeste, .jahre {
  border-radius: var(--radius); padding: 13px 16px; margin: 12px 0 0;
  border: 1px solid;
}
.zeit   { background: #fff8ec; border-color: #e8d19a; }
.gaeste { background: #f4f9fc; border-color: #bcd3e0; }
.jahre  { background: #f3f7f2; border-color: #c3d8c6; }

/* Gemeinsamer Stand: wie viele Fotos sind nach allen Stimmen zurzeit drin. */
.auswahl-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 12px 3px 10px; border-radius: 999px;
  background: var(--good-bg); border: 1px solid #bcdcc6;
  cursor: help;
}
.auswahl-zahl {
  font-size: 1.15rem; font-weight: 700; color: var(--good);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.auswahl-text {
  font-size: .63rem; line-height: 1.25; color: var(--good);
  font-weight: 700; text-align: left;
}
.auswahl-text em { font-style: normal; font-weight: 500; opacity: .85; }
@media (max-width: 640px) {
  .auswahl-text { font-size: .58rem; }
  .auswahl-pill { padding: 2px 9px; }
}
.auswahl-zahl.puls { animation: auswahl-puls .45s ease; }
@keyframes auswahl-puls {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* ------------------------------------------- Grosser Schalter "nur offene" */
.offen-schalter {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: border-color .15s ease, background .15s ease;
}
.offen-schalter:hover { border-color: var(--accent); background: #fffdfb; }
.offen-schalter.an { border-color: var(--good); background: var(--good-bg); }

.kaestchen {
  flex: none; width: 30px; height: 30px; border-radius: 7px;
  border: 2px solid var(--ink-soft); background: #fff;
  display: grid; place-items: center;
  font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1;
}
.offen-schalter.an .kaestchen { background: var(--good); border-color: var(--good); }

.offen-text { display: flex; flex-direction: column; gap: 2px; }
.offen-text strong { font-size: 1.02rem; }
.offen-text small { color: var(--ink-soft); font-size: .84rem; }
.offen-schalter.an .offen-text small { color: var(--good); }

/* Fotoquelle = Unterordner, aus dem das Bild stammt. */
.quelle {
  margin: -4px 0 0; font-size: .76rem; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-quelle { font-size: .85rem; color: #b5a99c; }

.auswahl-filter { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
.auswahl-filter label { display: flex; align-items: center; gap: 8px;
  font-size: .88rem; color: var(--ink-soft); }
.auswahl-filter select { width: auto; max-width: 210px; }

@media (max-width: 640px) {
  .offen-schalter { padding: 12px 14px; gap: 11px; }
  .offen-text strong { font-size: .94rem; }
  .offen-text small { font-size: .78rem; }
  .auswahl-filter { margin-left: 0; width: 100%; }
  .auswahl-filter label { width: 100%; }
  .auswahl-filter select { flex: 1; max-width: none; }
}
.quelle-marke {
  display: inline-block; font-size: .74rem; color: var(--ink-soft);
  background: var(--bg); border-radius: 999px; padding: 1px 8px; margin: 2px 0;
}
