/* ============================================================
   Familienzeit – warmes, freundliches Design für Familien
   ============================================================ */

:root {
  --bg: #faf6ef;
  --bg-soft: #f3ecdf;
  --card: #ffffff;
  --ink: #2b3240;
  --muted: #6e6a63;
  --line: #e8e0d2;

  --primary: #2e7d6b;
  --primary-deep: #245d50;
  --primary-soft: #e0f0eb;
  --accent: #f4a53a;
  --accent-soft: #fdeed6;
  --coral: #e8654f;
  --coral-soft: #fbe4de;
  --sky: #4a90d9;
  --sky-soft: #e3eefa;

  --radius: 16px;
  --radius-small: 10px;
  --shadow: 0 2px 10px rgba(80, 60, 30, 0.07), 0 12px 28px rgba(80, 60, 30, 0.06);
  --shadow-small: 0 1px 4px rgba(80, 60, 30, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; }
a { color: var(--primary-deep); }
a:hover { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; margin: 0.2rem 0; }
code { background: var(--bg-soft); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.9em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* ---------- Buttons & Chips ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px;
  font: inherit; font-weight: 650; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-small); }
.btn-primary:hover { background: var(--primary-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary-deep); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--coral); color: #fff; }
.btn-danger:hover { background: #d4513b; color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--coral); border-color: var(--coral-soft); }
.btn-danger-ghost:hover { background: var(--coral-soft); }
.btn-small { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon {
  border: none; background: var(--bg-soft); color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 0.9rem;
}
.btn-icon:hover { background: var(--coral-soft); color: var(--coral); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 650; white-space: nowrap;
  background: var(--bg-soft); color: var(--ink);
}
.chip-cat { background: var(--sky-soft); color: #2b5e93; }
.chip-age { background: var(--accent-soft); color: #8a5a10; }
.chip-fit { background: var(--primary-soft); color: var(--primary-deep); }
.chip-bday { background: var(--coral-soft); color: #b04330; }
.chip-bezirk { background: var(--bg-soft); color: var(--muted); }
.chip-filter {
  text-decoration: none; padding: 7px 16px; font-size: 0.88rem;
  background: var(--card); border: 1.5px solid var(--line); color: var(--ink);
}
.chip-filter:hover { border-color: var(--primary); color: var(--primary-deep); }
.chip-active, .chip-filter.chip-active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

/* Datepicker als Chip in der Filterzeile */
.chip-date {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line);
  font-size: 0.88rem; font-weight: 650;
}
.chip-date-active { border-color: var(--primary); }
/* Zwei Platzierungen des Datepickers – am Desktop die Inline-Variante, am Handy die im
   Aufklapp-Bereich. Standard (Desktop): nur die Inline-Kopie zeigen. */
.chip-date-more { display: none; }
.chip-date-label { color: var(--muted); font-weight: 600; }
.chip-date-input {
  border: none; background: transparent; color: var(--ink);
  font: inherit; font-weight: 650; cursor: pointer; padding: 2px 0;
}
.chip-date-input:focus { outline: none; }
/* Reset-Link – dezent abgesetzt */
.chip-reset { color: var(--muted); }
.chip-reset:hover { border-color: var(--coral); color: var(--coral); }

/* Einklappbare Sekundär-Filter (Checkbox-Aufklapper – robust in allen Browsern, auch ohne JS).
   Standard (Desktop): Label aus, Inhalt immer sichtbar. */
.filter-more-check { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.filter-more > .filter-more-toggle { display: none; }
.filter-more-content { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.filter-more-count {
  background: var(--primary); color: #fff; border-radius: 999px;
  padding: 0 7px; font-size: 0.75rem; font-weight: 700; line-height: 18px;
}
.filter-more-chevron { margin-left: auto; transition: transform 0.15s; }
.filter-more-check:checked ~ .filter-more-toggle .filter-more-chevron { transform: rotate(180deg); }
.filter-more-check:focus-visible ~ .filter-more-toggle { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 1.22rem; font-weight: 800; text-decoration: none; color: var(--ink);
}
.brand-logo { width: 34px; height: 34px; }
.main-nav { display: flex; gap: 4px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
  padding: 7px 13px; border-radius: 999px;
}
.main-nav a:hover { background: var(--bg-soft); }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-deep); }
.kids-pill {
  background: var(--accent-soft); border: 1.5px dashed var(--accent);
}
.main-nav a.kids-pill:hover { background: var(--accent-soft); filter: brightness(0.97); }
.nav-toggle {
  display: none; margin-left: auto;
  font-size: 1.4rem; background: none; border: none; cursor: pointer; color: var(--ink);
  padding: 6px 10px;
}

/* ---------- Flash & Boxen ---------- */

.flash {
  margin: 14px 0; padding: 12px 18px; border-radius: var(--radius-small);
  font-weight: 600; font-size: 0.95rem;
}
.flash-ok { background: var(--primary-soft); color: var(--primary-deep); }
.flash-error { background: var(--coral-soft); color: #a23a28; }
.info-box {
  margin: 22px 0; padding: 16px 20px; border-radius: var(--radius);
  background: var(--sky-soft); font-size: 0.95rem;
}
.empty-state {
  padding: 36px 24px; text-align: center; color: var(--muted);
  background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius);
}

/* ---------- Hero (Startseite) ---------- */

.hero {
  background: linear-gradient(160deg, var(--primary-soft) 0%, var(--bg) 55%, var(--accent-soft) 130%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: center;
  padding-top: 52px; padding-bottom: 52px;
}
.hero h1 { font-size: 2.5rem; margin: 0 0 12px; }
.hero-sub { font-size: 1.15rem; color: var(--muted); margin: 0 0 22px; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-hint { margin-top: 18px; font-size: 0.93rem; color: var(--muted); }
.hero-art svg { width: 100%; max-width: 270px; display: block; margin: 0 auto; }

/* ---------- Abschnitte & Karten ---------- */

.section { margin: 44px auto; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0; }
.section-title-small { font-size: 1.15rem; margin: 0 0 14px; }
.more-link { font-weight: 650; text-decoration: none; font-size: 0.93rem; white-space: nowrap; }

.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(80,60,30,0.1), 0 16px 34px rgba(80,60,30,0.09); }
.card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { margin: 2px 0; }
.card-title a { text-decoration: none; color: var(--ink); }
.card-title a:hover { color: var(--primary-deep); }
.card-meta {
  margin: 0; font-size: 0.85rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 14px;
}
.card-meta a { color: inherit; }
.card-text { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* Veranstaltungs-Karte mit Datums-Badge */
.event-card { align-items: stretch; position: relative; }
/* Ganze Karte antippbar – der Titel-Link wird über die gesamte Karte gelegt
   (besonders praktisch am Handy: einfach irgendwo auf die Karte tippen).
   Der Titel bleibt der eigentliche Link, daher auch für Screenreader korrekt. */
.event-card .card-title a::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}
.date-badge {
  flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-deep); gap: 0; padding: 12px 4px;
}
.db-wd { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; opacity: 0.75; }
.db-day { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.db-mon { font-size: 0.78rem; font-weight: 700; }

/* Orte */
.place-card { flex-direction: column; position: relative; }
.place-image { height: 150px; overflow: hidden; }
.place-image img { width: 100%; height: 100%; object-fit: cover; }
.place-card .btn { align-self: flex-start; margin-top: 4px; }
/* Ganze Orte-Karte anklickbar – öffnet die Detailseite (auch gut am Handy) */
.place-card .card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-more { margin-top: auto; padding-top: 6px; font-size: 0.85rem; font-weight: 650; color: var(--primary-deep); }

/* Blog */
.blog-card { flex-direction: column; }
.blog-cover {
  display: flex; align-items: center; justify-content: center;
  height: 150px; background: linear-gradient(135deg, var(--accent-soft), var(--coral-soft));
  overflow: hidden; text-decoration: none;
}
.blog-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-cover-fallback { font-size: 3rem; }

/* Kachel-Grid (Orte-Kategorien) */
.tile-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-small);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
  border: 2px solid transparent; position: relative;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.tile:hover { border-color: var(--primary); transform: translateY(-2px); }
.tile-emoji { font-size: 1.7rem; }
.tile-label { font-weight: 700; font-size: 0.95rem; }
.tile-count {
  position: absolute; top: 12px; right: 14px;
  background: var(--bg-soft); border-radius: 999px; min-width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--muted); padding: 0 8px;
}
.tile-bday { background: linear-gradient(135deg, #fff, var(--coral-soft)); }

/* ---------- Seitenkopf & Filter ---------- */

.page-head { margin: 34px 0 22px; }
.page-head h1 { margin: 0 0 6px; }
.page-sub { color: var(--muted); margin: 0; }
.breadcrumb { margin: 26px 0 10px; font-size: 0.92rem; }
.breadcrumb a { text-decoration: none; font-weight: 600; }

.filter-bar {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-small);
  padding: 14px 18px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.filter-form { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.filter-select { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 600; }
.filter-select select {
  font: inherit; padding: 7px 10px; border-radius: var(--radius-small);
  border: 1.5px solid var(--line); background: #fff; max-width: 260px;
}
.filter-check { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 600; cursor: pointer; }
.filter-check input { width: 17px; height: 17px; accent-color: var(--primary); }
.result-info { color: var(--muted); font-size: 0.92rem; margin: 6px 2px 20px; }

/* Mehrfachauswahl-Menü (Kategorie, Tageszeit) – funktioniert auch ohne JS und am Handy */
.ms { position: relative; }
.ms-summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--radius-small);
  border: 1.5px solid var(--line); background: #fff;
  font-size: 0.92rem; font-weight: 600;
}
.ms-summary::-webkit-details-marker { display: none; }
.ms-summary:hover { border-color: var(--primary); }
.ms[open] .ms-summary { border-color: var(--primary); }
.ms-label { color: var(--muted); }
.ms-value-active { color: var(--primary-deep); }
.ms-caret { color: var(--muted); transition: transform 0.15s ease; }
.ms[open] .ms-caret { transform: rotate(180deg); }
.ms-panel {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  min-width: 230px; max-height: 320px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-small); box-shadow: var(--shadow);
  padding: 6px;
}
.ms-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  font-size: 0.95rem; font-weight: 500;
}
.ms-option:hover { background: var(--bg-soft); }
.ms-option input { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.ms-actions { display: flex; justify-content: space-between; gap: 8px; padding: 8px 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }

.day-group { margin-bottom: 34px; }
.day-heading {
  font-size: 1.12rem; margin: 0 0 13px;
  padding-bottom: 7px; border-bottom: 2px solid var(--line);
}

/* ---------- Kalender ---------- */

.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.cal-title { margin: 0; }
.calendar {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; border: 1px solid var(--line);
}
.cal-head {
  padding: 10px 8px; text-align: center; font-weight: 750; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg-soft); color: var(--muted);
}
.cal-cell {
  min-height: 108px; padding: 8px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0; /* erlaubt der Zelle, schmaler als ihr Inhalt zu werden (sonst sprengen lange Titel das Raster) */
}
.cal-cell:not(:nth-child(7n + 1)) { border-left: 1px solid var(--line); }
.cal-weekend { background: #fdfaf3; }
.cal-empty { background: var(--bg); }
.cal-today { background: var(--primary-soft); }
.cal-daynum {
  font-weight: 750; font-size: 0.92rem; text-decoration: none; color: var(--ink);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cal-daynum:hover { background: var(--accent-soft); }
.cal-today .cal-daynum { background: var(--primary); color: #fff; }
.cal-events { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-pill {
  display: block; font-size: 0.74rem; font-weight: 600; text-decoration: none;
  background: var(--sky-soft); color: #2b5e93;
  padding: 2px 8px; border-radius: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-pill:hover { background: var(--sky); color: #fff; }
.cal-more { font-size: 0.74rem; font-weight: 650; text-decoration: none; color: var(--muted); }
.cal-hint { color: var(--muted); font-size: 0.88rem; margin: 12px 4px; }

/* ---------- Detailseiten & Prosa ---------- */

.detail-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 30px; margin-bottom: 30px;
}
.detail-card h1 { margin: 12px 0 16px; font-size: 1.7rem; }
.detail-meta { margin: 0 0 8px; display: flex; flex-direction: column; gap: 9px; }
.detail-meta > div { display: flex; gap: 14px; align-items: baseline; }
.detail-meta dt { flex: 0 0 110px; font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.detail-meta dd { margin: 0; }
.detail-image { border-radius: var(--radius-small); margin: 14px 0; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.map-embed { margin: 10px 0 4px; border-radius: var(--radius-small); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }

.prose { font-size: 1.02rem; }
.prose h2 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius-small); }
.prose blockquote {
  margin: 1em 0; padding: 2px 18px; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.post { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; margin-bottom: 24px; }
.post h1 { margin: 4px 0 4px; }
.post-date { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.post-cover { border-radius: var(--radius-small); margin-bottom: 18px; width: 100%; max-height: 380px; object-fit: cover; }

.message-page { text-align: center; padding: 70px 0; }
.message-page h1 { font-size: 2.2rem; }
.message-page .btn { margin: 6px; }

/* ---------- Familie einstellen ---------- */

.family-form {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 26px; margin-bottom: 16px;
}
.family-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.family-row {
  display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 12px; align-items: end;
  padding-bottom: 14px; border-bottom: 1px dashed var(--line);
}
.family-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; font-weight: 650; }
.family-row input {
  font: inherit; padding: 9px 12px; border-radius: var(--radius-small);
  border: 1.5px solid var(--line); background: #fff;
}
.family-row input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.family-age { font-weight: 700; color: var(--primary-deep); padding-bottom: 9px; min-width: 48px; }
.family-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.family-reset { margin: 0 0 16px; }

/* ---------- Fußzeile ---------- */

.site-footer { margin-top: 70px; background: var(--ink); color: #d8d4cc; }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px;
  padding: 38px 20px 10px;
}
.footer-col { display: flex; flex-direction: column; gap: 7px; }
.footer-col strong { color: #fff; font-size: 1.05rem; }
.footer-col p { margin: 0; font-size: 0.9rem; }
.footer-col a { color: #d8d4cc; text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-meta { padding: 16px 20px 26px; font-size: 0.82rem; opacity: 0.65; }

/* ---------- Login ---------- */

.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--primary-soft), var(--bg) 50%, var(--accent-soft));
  margin: 0; padding: 20px;
}
.login-card {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  padding: 36px 38px; width: 100%; max-width: 400px; text-align: center;
}
.login-emoji { font-size: 2.6rem; }
.login-card h1 { margin: 8px 0 2px; font-size: 1.5rem; }
.login-sub { color: var(--muted); margin: 0 0 20px; }
.login-card form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-weight: 650; font-size: 0.9rem; }
.login-card input {
  font: inherit; padding: 11px 14px; border-radius: var(--radius-small);
  border: 1.5px solid var(--line);
}
.login-card input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.login-hint { font-size: 0.82rem; color: var(--muted); margin-top: 18px; }
.login-back { font-size: 0.88rem; }

/* ---------- Admin ---------- */

.admin-body { background: #f4f1ea; }
.admin-header { background: var(--ink); color: #fff; }
.admin-header-inner { display: flex; align-items: center; gap: 20px; min-height: 58px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand-small { font-size: 1rem; color: #fff; text-decoration: none; font-weight: 750; display: flex; gap: 7px; align-items: center; }
.admin-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.admin-nav a {
  color: #cfcbc2; text-decoration: none; font-size: 0.92rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.admin-nav a:hover { color: #fff; }
.admin-nav a.active { background: rgba(255,255,255,0.16); color: #fff; }
.admin-header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.admin-header-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.admin-header-actions .btn-ghost:hover { background: rgba(255,255,255,0.12); }
.admin-main { padding-top: 26px; padding-bottom: 60px; }

.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 4px 0 18px; }
.page-head-row h1 { margin: 0; }
.page-head-row > div { display: flex; gap: 10px; flex-wrap: wrap; }

/* Split-Button mit Chevron-Menü (z. B. „aufwerten“ mit Mengen-Auswahl) */
.split-btn { display: inline-flex; align-items: stretch; gap: 4px; }
.btn-menu { position: relative; display: inline-block; }
.btn-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; padding: 0 10px; }
.btn-menu > summary::-webkit-details-marker { display: none; }
.btn-menu > summary::marker { content: ''; }
.btn-menu[open] > summary .split-btn__chevron, .btn-menu[open] > summary svg { transform: rotate(180deg); }
.btn-menu > summary svg { transition: transform .15s ease; }
.btn-menu-panel {
  position: absolute; right: 0; z-index: 30; margin-top: 6px; min-width: 250px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-small); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.btn-menu-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 9px 11px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.btn-menu-item:hover { background: var(--bg-soft); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0 26px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-small);
  padding: 18px 20px; display: flex; flex-direction: column;
}
.stat-num { font-size: 1.9rem; font-weight: 800; color: var(--primary-deep); }
.stat-label { font-size: 0.88rem; color: var(--muted); font-weight: 600; }

.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.admin-panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-small);
  padding: 20px 22px; margin-bottom: 18px;
}
.admin-panel h2 { margin: 0 0 10px; font-size: 1.1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.panel-warn { border: 2px solid var(--accent); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table td, .admin-table th { padding: 9px 10px; text-align: left; vertical-align: top; }
.admin-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 2px solid var(--line); }
.admin-table-lines { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-small); overflow: hidden; }
.admin-table-lines td { border-top: 1px solid var(--line); }
.admin-table-lines thead th { background: var(--bg-soft); border-bottom: none; }
.admin-table a { text-decoration: none; }
.row-disabled { opacity: 0.6; }

/* Filterzeile in den Spaltenköpfen + Seiten-Fuß */
.admin-table .th-filter th { background: var(--bg-soft); border-bottom: 2px solid var(--line); padding-top: 0; padding-bottom: 8px; text-transform: none; }
.th-filter select {
  width: 100%; max-width: 200px; padding: 5px 7px; border: 1.5px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 0.82rem; background: var(--card); color: var(--ink);
}
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 2px 0; }
.pager { display: flex; align-items: center; gap: 12px; }
.actions-cell { text-align: right; }
.actions-cell form { display: inline-block; margin-left: 6px; }
.inline-form { display: inline-block; }
.settings-subhead { margin: 28px 0 4px; font-size: 1.15rem; }

/* Cookie-Banner (Analyse-Zustimmung) */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--ink); color: #f0ede7;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.22);
}
.cookie-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.cookie-text { margin: 0; font-size: 0.92rem; flex: 1 1 320px; }
.cookie-text a { color: #fff; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.cookie-banner .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 700;
}
.badge-ok { background: var(--primary-soft); color: var(--primary-deep); }
.badge-muted { background: var(--bg-soft); color: var(--muted); }
.login-google { background: #e8f0fe; color: #1a56c4; }
.login-apple { background: #f0f0f0; color: #111; }

/* Admin-Formulare */
.admin-form {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-small);
  padding: 24px 26px; margin-bottom: 22px;
}
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.form-grid label, .editor-label { display: flex; flex-direction: column; gap: 5px; font-size: 0.88rem; font-weight: 650; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid input[type="text"], .form-grid input[type="url"], .form-grid input[type="number"],
.form-grid input[type="datetime-local"], .form-grid select, .form-grid textarea,
.editor-label textarea, .config-details textarea {
  font: inherit; padding: 9px 12px; border-radius: var(--radius-small);
  border: 1.5px solid var(--line); background: #fff; width: 100%;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus,
.editor-label textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.check-label {
  flex-direction: row !important; align-items: center; gap: 9px !important;
  padding-top: 22px; cursor: pointer; font-weight: 600 !important;
}
.check-label input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.editor-label { margin-top: 18px; }
.editor-toolbar { display: flex; gap: 10px; align-items: center; margin: 4px 0; }
.editor-label textarea { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92rem; line-height: 1.55; }
.cover-preview img { max-height: 120px; border-radius: var(--radius-small); display: block; margin-bottom: 6px; }
.cover-preview .check-label { padding-top: 4px; }
.config-details { margin: 20px 0; }
.config-details summary { cursor: pointer; font-weight: 700; }
.config-details label { display: flex; flex-direction: column; gap: 5px; font-size: 0.88rem; font-weight: 650; margin-top: 10px; }
.code-sample {
  background: #2b3240; color: #d9e2ec; padding: 14px 18px; border-radius: var(--radius-small);
  font-size: 0.82rem; overflow-x: auto;
}

/* ---------- Responsiv ---------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 36px; padding-bottom: 36px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { display: none; }
  .admin-columns { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-3 { grid-column: span 2; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px; box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 14px; }
  h1 { font-size: 1.6rem; }
  .card-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
  .check-label { padding-top: 0; }
  /* Familie einstellen: jede Kind-Zeile wird eine kompakte Karte.
     Kopfzeile = Alters-Chip (links) + Entfernen-Knopf (rechts), darunter die Felder. */
  .family-rows { gap: 12px; margin-bottom: 16px; }
  .family-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "age   remove"
      "name  name"
      "birth birth";
    align-items: center; gap: 10px;
    background: var(--bg-soft); border-radius: var(--radius-small);
    padding: 12px 14px 14px; border-bottom: none;
  }
  .family-row label:first-of-type { grid-area: name; }
  .family-row label:last-of-type { grid-area: birth; }
  .family-row .btn-icon { grid-area: remove; justify-self: end; background: var(--card); }
  .family-age { grid-area: age; justify-self: start; padding-bottom: 0; min-width: 0; }
  .family-age:not(:empty) {
    background: var(--primary-soft); color: var(--primary-deep);
    border-radius: 999px; padding: 2px 12px; font-size: 0.85rem;
  }
  .family-age:empty::before { content: "Neues Kind"; color: var(--muted); font-weight: 600; font-size: 0.85rem; }
  .family-row input { background: var(--card); }
  /* Aktions-Knöpfe gleich breit nebeneinander */
  .family-actions .btn { flex: 1; justify-content: center; }
  .detail-meta dt { flex-basis: 90px; }
  .detail-card, .post { padding: 20px 18px; }
  .cal-cell { min-height: 64px; padding: 5px; gap: 4px; }
  /* Event-Pillen sind in den schmalen Zellen unlesbar → kleine Punkte.
     Angetippt wird stattdessen die (vergrößerte) Tageszahl → Tagesliste. */
  .cal-events { flex-direction: row; flex-wrap: wrap; gap: 4px; align-items: center; }
  .cal-pill {
    width: 9px; height: 9px; padding: 0; border-radius: 50%;
    font-size: 0; background: var(--sky); pointer-events: none;
  }
  .cal-daynum { width: 34px; height: 34px; }
  .cal-more-txt { display: none; } /* aus "+12 weitere" wird kompakt "+12" */
  .cal-nav .btn { font-size: 0.78rem; padding: 5px 10px; }
  .admin-header-actions { margin-left: 0; }
}

/* ---------- Vorschlag-Bubble ---------- */
.suggest-bubble { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.suggest-bubble > summary { list-style: none; }
.suggest-bubble > summary::-webkit-details-marker { display: none; }
.suggest-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 0.92rem;
  padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow);
  border: none; user-select: none;
}
.suggest-toggle:hover { background: var(--primary-deep); }
.suggest-icon { flex-shrink: 0; }
.suggest-panel {
  position: absolute; right: 0; bottom: calc(100% + 10px);
  width: min(340px, calc(100vw - 36px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 16px 18px;
}
.suggest-lead { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.4; }
.suggest-form { display: flex; flex-direction: column; gap: 10px; }
.suggest-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }
.suggest-field select, .suggest-field textarea, .suggest-field input {
  font: inherit; font-weight: 400; padding: 8px 10px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-soft); color: var(--ink);
}
.suggest-field textarea { resize: vertical; }
.suggest-opt { color: var(--muted); font-weight: 400; }
/* Honigtopf: für Menschen unsichtbar, für Bots ein Köder */
.suggest-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Zähler-Badge (Admin-Navigation) + "neu"-Badge in der Liste */
.nav-badge {
  display: inline-block; min-width: 18px; text-align: center;
  background: var(--coral); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0 6px; border-radius: 999px; line-height: 18px;
}
.badge-new { background: var(--coral); color: #fff; }
.suggest-msg { white-space: pre-line; }

/* Import-Verlauf (Datenquellen) */
.source-history-row > td { padding-top: 0; }
.import-history > summary {
  cursor: pointer; font-size: 0.82rem; font-weight: 650; color: var(--primary-deep);
  padding: 4px 0; width: fit-content; list-style: none;
}
.import-history > summary::-webkit-details-marker { display: none; }
.import-history > summary::before { content: '▸ '; }
.import-history[open] > summary::before { content: '▾ '; }
.run-list { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.run { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; }
.run-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.run-date { font-size: 0.8rem; color: var(--muted); }
.run-counts { display: inline-flex; gap: 8px; font-size: 0.78rem; font-weight: 700; }
.run-add { color: #1f7a4d; }
.run-remove { color: var(--coral); }
.run-added { list-style: none; margin: 5px 0 0; padding: 0; font-size: 0.82rem; }
.run-added li { padding: 1px 0; }
.run-ev-date { display: inline-block; min-width: 66px; color: var(--muted); }
/* entfernte Termine: durchgestrichen und gedämpft */
.run-removed-list li { color: var(--muted); }
.run-removed-list s { text-decoration-color: var(--coral); }

@media (max-width: 720px) {
  .suggest-toggle-label { display: none; }
  .suggest-toggle { padding: 12px; }
  .suggest-bubble { right: 12px; bottom: 12px; }
  /* 16px verhindert, dass iPhones beim Antippen der Felder automatisch hineinzoomen */
  .suggest-field select, .suggest-field textarea, .suggest-field input { font-size: 16px; }

  /* Filtermenü kompakter: Zeitraum-Chips kleiner … */
  .chip-row { gap: 6px; }
  .chip-filter { padding: 6px 13px; font-size: 0.82rem; }

  /* … und die Sekundär-Filter hinter „Mehr Filter" verstecken (per Checkbox aufklappbar) */
  .filter-more > .filter-more-toggle {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    font-weight: 650; font-size: 0.9rem; padding: 10px 16px; border-radius: 12px;
    border: 1.5px solid var(--line); background: var(--bg-soft); color: var(--ink);
  }
  .filter-more-content { display: none; }
  .filter-more-check:checked ~ .filter-more-content { display: flex; margin-top: 12px; }
  /* Felder im aufgeklappten Bereich volle Breite, damit nichts abgeschnitten wird */
  .filter-more-content .filter-form { width: 100%; flex-direction: column; align-items: stretch; gap: 12px; }
  /* Am Handy: die Inline-Kopie in der Chip-Zeile ausblenden, dafür die Kopie im
     Aufklapp-Bereich zeigen – kompakt (nur so breit wie Label + Datumsfeld). */
  .chip-date-inline { display: none; }
  .chip-date-more { display: inline-flex; }
}

/* ---------- Konto / Anmeldung ---------- */
.auth-form { display: flex; flex-direction: column; gap: 14px; max-width: 440px; margin: 8px 0 18px; }
.auth-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.auth-form input {
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; background: var(--card); color: var(--ink);
}
.auth-form input:focus { outline: none; border-color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }
.auth-alt { margin: 0 0 20px; color: var(--muted); }

/* Social-Login (Google / Facebook) */
.auth-or {
  display: flex; align-items: center; gap: 12px;
  max-width: 440px; margin: 4px 0 14px; color: var(--muted); font-size: .9rem;
}
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-social { display: flex; flex-direction: column; gap: 10px; max-width: 440px; margin: 0 0 18px; }
.btn-social {
  width: 100%; justify-content: center; gap: 10px; font-weight: 600;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
}
.btn-social .social-icon { flex: 0 0 auto; display: block; }
.btn-social:hover { border-color: var(--primary); }
.btn-social-apple { background: #000; border-color: #000; color: #fff; }
.btn-social-apple:hover { background: #1a1a1a; border-color: #1a1a1a; color: #fff; }

.profile-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 6px 0 18px; box-shadow: var(--shadow-small);
}
.profile-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.profile-card-head h2 { margin: 0; font-size: 1.15rem; }
.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Merken (Herz-Button) ---------- */
.event-card, .place-card { position: relative; }
.save-form { margin: 0; }
.event-card > .save-form, .place-card > .save-form { position: absolute; top: 10px; right: 10px; z-index: 3; }
.save-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.85rem; font-weight: 650;
}
.save-btn:hover { border-color: var(--coral); color: var(--coral); }
.save-btn .save-heart::before { content: '\2661'; font-size: 1.05rem; line-height: 1; }
.save-btn.is-saved { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); }
.save-btn.is-saved .save-heart::before { content: '\2665'; }
.save-btn[disabled] { opacity: 0.6; cursor: default; }
/* Auf Karten nur das Herz (kompakt), Beschriftung ausblenden */
.event-card > .save-form .save-label, .place-card > .save-form .save-label { display: none; }
.event-card > .save-form .save-btn, .place-card > .save-form .save-btn {
  width: 38px; height: 38px; padding: 0; justify-content: center; box-shadow: var(--shadow-small);
}
/* Platz für das Herz oben rechts freihalten – sonst laufen Chips/Titel darunter */
.event-card .chip-row, .place-card .chip-row { padding-right: 42px; }
.detail-save { margin: 4px 0 16px; }

/* Profil: Merklisten */
.saved-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.saved-list li {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 10px 4px; border-top: 1px solid var(--line);
}
.saved-list li:first-child { border-top: none; }
.saved-list .saved-title { font-weight: 650; text-decoration: none; }
.saved-list a.saved-title:hover { color: var(--primary); }
.saved-list .saved-sub { color: var(--muted); font-size: 0.9rem; }
.saved-list .save-form { margin-left: auto; }
.saved-list .saved-note {
  font-size: 0.78rem; font-weight: 700; color: var(--coral);
  background: var(--coral-soft); border-radius: 999px; padding: 2px 9px;
}
.saved-gone .saved-title { color: var(--muted); }
