/* ============================================================
   CHOOOD — geteiltes Design-System
   Basis für alle Seiten: Farben, Navigation, Filter, Karten,
   Footer und Kontakt-Panel.
   ============================================================ */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin.a78a2136bd2c.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext.504fb315d22c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/caveat-latin.1fde3bbfa795.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/caveat-latin-ext.f438d3567fa1.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/baloo2-latin.01fcdef17777.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/baloo2-latin-ext.d743a03c1c57.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/greatvibes-latin.6fc3675205ef.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/greatvibes-latin-ext.ae3a802aa562.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Only the Harry Potter and Meerjungfrau wordmarks use these two. A browser
   downloads a declared font only once a page uses it, so the other pages
   don't pay for them. */
@font-face {
  font-family: 'Almendra';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/almendra-latin.5f8bc943a579.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Almendra';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/almendra-latin-ext.b839539189c7.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bubblegum Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bubblegumsans-latin.18ad4cc0789b.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bubblegum Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bubblegumsans-latin-ext.7d20943d072a.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Text on light surfaces (panels, cards, pills). Text directly on the page
     gradient reads var(--on-bg, …) / var(--on-bg-soft, …) instead, with these
     as the fallback: only a theme sets --on-bg, and a dark theme sets only
     that pair, because its surfaces stay light (HANDOVER §4). */
  --text-primary: #6B3F9E;
  --text-secondary: #5C3A8C;
  --text-dark: #3D2E5C;
  /* Muster-Farben: sehr hell */
  --p-pink: #FCCFDE;
  --p-yellow: #FFEB95;
  --p-mint: #C0E8C0;
  --p-blue: #BDD8F0;
  --p-orange: #F8C8AB;
  --p-lila: #D5C4E8;
  /* Outline-Farben: pastellig aber sichtbar */
  --o-pink: #F0A5C0;
  --o-yellow: #F5CE45;
  --o-mint: #85CE85;
  --o-blue: #85B7E8;
  --o-orange: #EEA07A;
  --o-lila: #A88AD0;
  /* Filter-Farbcodes (kräftigere Version) */
  --pink-strong: #E8729F;
  --yellow-strong: #DDA830;
  --mint-strong: #5BA85B;
  --blue-strong: #4585CC;
  --peach-strong: #E47D5C;
  --lila-strong: #6B3F9E;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

/* Several components set an explicit `display`, which would beat the `hidden`
   attribute — JS relies on `el.hidden` to filter cards and stickers. */
[hidden] {
  display: none !important;
}

/* PAGE — horizontal gradient across the full height. --page-bg comes from the
   article's theme; the brand gradient is the fallback. Fixed attachment so the
   gradient never restarts while scrolling. */
body {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 16px;
  color: var(--on-bg, var(--text-primary));
  line-height: 1.5;
  min-height: 100vh;
  background: var(--page-bg, linear-gradient(100deg, #FBD2E8 0%, #F2D6F4 28%, #E2D6F8 52%, #D2DEF8 78%, #E6D8F6 100%));
  background-attachment: fixed;
}

.sr-only {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Off-screen until a keyboard user tabs onto it — it is the first stop on every page. */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-200%);
  font-weight: 600;
  color: #FFF;
  background: var(--lila-strong, #6B3F9E);
  border-radius: 12px;
  padding: 9px 16px;
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: none;
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.top-nav {
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.mini-brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--on-bg, var(--text-primary));
  letter-spacing: -0.5px;
}

.mini-brand a {
  color: inherit;
  text-decoration: none;
}

.top-nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 16px;
  color: var(--on-bg, var(--text-primary));
}

.top-nav-links a {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.top-nav-links a:hover {
  opacity: 0.7;
}

.top-nav-links a.active {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--on-bg-soft, var(--text-secondary));
  text-underline-offset: 4px;
}

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .85);
  border: 1.5px solid var(--o-lila);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--text-primary);
}

.nav-search svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.nav-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  width: 150px;
}

.nav-search input::placeholder {
  color: var(--text-secondary);
}

/* Safari's clear button sits inside the 96-150px field and runs into the
   placeholder. type="search" stays for the keyboard's search key; Esc still
   clears the field. */
.nav-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  max-width: 1200px;
  margin: 8px auto 0;
  padding: 0 32px;
  font-size: 16px;
  color: var(--on-bg-soft, var(--text-secondary));
}

.breadcrumb strong {
  color: var(--on-bg, var(--text-primary));
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ============================================================
   FILTER-BAR — dezent, kleine Felder, responsive
   ============================================================ */
.filter-panel {
  max-width: 1200px;
  margin: 12px auto 24px;
  padding: 0 20px;
}

.f-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.f-card {
  background: rgba(255, 254, 250, 0.85);
  border: 1px dashed rgba(184, 159, 224, 0.4);
  border-radius: 10px;
  padding: 8px 12px 10px;
  flex: 1 1 200px;
  min-width: 200px;
  box-shadow: 1px 1px 3px rgba(60, 30, 90, 0.05);
  color: var(--text-primary);
}

.f-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Caveat', cursive;
  font-size: 21px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 5px;
}

.f-header-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.f-gender-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.f-gender-btn {
  padding: 8px 16px;
  border-radius: 10px 10px 10px 2px;
  background: #FFF;
  border: 1.5px solid transparent;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  box-shadow: 1px 1px 2px rgba(60, 30, 90, 0.05);
  color: var(--text-secondary);
}

.f-gender-btn .em {
  font-size: 18px;
}

.f-gender-btn.g-all.active {
  background: #FCF1B8;
  border-color: #F5D858;
  color: #5C3F08;
}

.f-gender-btn.g-girls.active {
  background: #FCE0EC;
  border-color: #F096B8;
  color: #7A1F47;
}

.f-gender-btn.g-boys.active {
  background: #D8E8FA;
  border-color: #85B7EB;
  color: #163D6B;
}

.f-slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.f-endpoint {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  min-width: 34px;
}

.f-endpoint.left {
  text-align: right;
}

.f-endpoint.right {
  text-align: left;
}

.f-track-wrap {
  flex: 1;
  position: relative;
  height: 26px;
  display: flex;
  align-items: center;
  min-width: 50px;
}

.f-track {
  position: relative;
  height: 3px;
  width: 100%;
  border-radius: 999px;
  background: rgba(107, 63, 158, 0.14);
}

.f-fill {
  position: absolute;
  height: 100%;
  border-radius: 999px;
}

.f-input {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 26px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.f-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  pointer-events: all;
  cursor: pointer;
  border: 2px solid #FFF;
  box-shadow: 0 1px 3px rgba(60, 30, 90, 0.28);
}

.f-input::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  pointer-events: all;
  cursor: pointer;
  border: 2px solid #FFF;
  box-shadow: 0 1px 3px rgba(60, 30, 90, 0.28);
}

.f-values {
  position: relative;
  height: 26px;
  margin: 6px 20px 0;
}

.f-value-bubble {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid;
}

.f-select {
  width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(184, 159, 224, .55);
  background: #FFF;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  cursor: pointer;
}

/* Filter values carried over from the start page, as removable stickers. */
.f-inh {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.f-inh-label {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  color: var(--on-bg-soft, var(--text-secondary));
}

.f-inh-sticker {
  padding: 3px 6px 2px 10px;
  border-radius: 10px 10px 10px 3px;
  font-family: 'Caveat', cursive;
  font-size: 17px;
  font-weight: 600;
  border: 1.5px solid;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.f-inh-sticker.g-all {
  border-color: #F5D858;
  color: #5C3F08;
  background: #FCF1B8;
}

.f-inh-sticker.g-girls {
  border-color: #F096B8;
  color: #7A1F47;
  background: #FCE0EC;
}

.f-inh-sticker.g-boys {
  border-color: #85B7EB;
  color: #163D6B;
  background: #D8E8FA;
}

.f-inh-sticker.age {
  border-color: #F0A882;
  color: #6E2F12;
  background: #FCDFC9;
}

.f-inh-sticker-x {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid currentColor;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s;
}

.f-inh-sticker-x:hover {
  background: currentColor;
  transform: scale(1.15) rotate(90deg);
}

.f-inh-sticker-x:hover svg {
  color: #FFF;
}

.f-inh-sticker-x svg {
  width: 8px;
  height: 8px;
  transition: color 0.15s;
}

.f-inh-edit {
  margin-left: auto;
  font-family: 'Caveat', cursive;
  font-size: 17px;
  color: var(--on-bg, var(--text-primary));
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}

.sf-peach .f-header {
  color: #6E2F12;
}

.sf-peach .f-header-icon {
  background: #FCDFC9;
}

.sf-peach .f-fill {
  background: var(--peach-strong);
}

.sf-peach .f-input::-webkit-slider-thumb {
  background: var(--peach-strong);
}

.sf-peach .f-input::-moz-range-thumb {
  background: var(--peach-strong);
}

.sf-peach .f-value-bubble {
  background: #FCDFC9;
  color: #6E2F12;
  border-color: var(--peach-strong);
}

.sf-yellow .f-header {
  color: #5C3F08;
}

.sf-yellow .f-header-icon {
  background: #FCF1B8;
}

.sf-yellow .f-fill {
  background: var(--yellow-strong);
}

.sf-yellow .f-input::-webkit-slider-thumb {
  background: var(--yellow-strong);
}

.sf-yellow .f-input::-moz-range-thumb {
  background: var(--yellow-strong);
}

.sf-yellow .f-value-bubble {
  background: #FCF1B8;
  color: #5C3F08;
  border-color: var(--yellow-strong);
}

.sf-blue .f-header {
  color: #163D6B;
}

.sf-blue .f-header-icon {
  background: #D8E8FA;
}

.sf-blue .f-fill {
  background: var(--blue-strong);
}

.sf-blue .f-input::-webkit-slider-thumb {
  background: var(--blue-strong);
}

.sf-blue .f-input::-moz-range-thumb {
  background: var(--blue-strong);
}

.sf-blue .f-value-bubble {
  background: #D8E8FA;
  color: #163D6B;
  border-color: var(--blue-strong);
}

.sf-mint .f-header {
  color: #1F4A1F;
}

.sf-mint .f-header-icon {
  background: #D5EDDB;
}

.sf-mint .f-fill {
  background: var(--mint-strong);
}

.sf-mint .f-input::-webkit-slider-thumb {
  background: var(--mint-strong);
}

.sf-mint .f-input::-moz-range-thumb {
  background: var(--mint-strong);
}

.sf-mint .f-value-bubble {
  background: #D5EDDB;
  color: #1F4A1F;
  border-color: var(--mint-strong);
}

.sf-pink .f-header {
  color: #7A1F47;
}

.sf-pink .f-header-icon {
  background: #FCE0EC;
}

.sf-pink .f-fill {
  background: var(--pink-strong);
}

.sf-pink .f-input::-webkit-slider-thumb {
  background: var(--pink-strong);
}

.sf-pink .f-input::-moz-range-thumb {
  background: var(--pink-strong);
}

.sf-pink .f-value-bubble {
  background: #FCE0EC;
  color: #7A1F47;
  border-color: var(--pink-strong);
}

/* ============================================================
   ABSCHNITTS-ÜBERSCHRIFTEN
   ============================================================ */
.sec-head {
  font-family: 'Caveat', cursive;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--on-bg, var(--text-primary));
  margin: 26px 0 0;
}

.sec-sub {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  text-align: center;
  color: var(--on-bg-soft, var(--text-secondary));
  margin: 2px 0 0;
}

/* ============================================================
   ERGEBNISZEILE
   ============================================================ */
.result-row {
  max-width: 1200px;
  margin: 12px auto 8px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.result-count {
  font-size: 16px;
  color: var(--on-bg-soft, var(--text-secondary));
}

/* ============================================================
   MOTTO-KACHELN — Startseite und Suche
   ============================================================ */
.motto-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.motto-card {
  position: relative;
  background: var(--motto-bg);
  border-radius: 18px;
  padding: 16px 18px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: 2px 5px 14px rgba(60, 30, 90, .16);
  border: 2px solid rgba(255, 255, 255, .75);
  transform: rotate(-0.6deg);
  transition: transform .18s, box-shadow .18s;
}

.motto-card:nth-child(even) {
  transform: rotate(0.7deg);
}

.motto-card:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: 3px 9px 20px rgba(60, 30, 90, .22);
}

.motto-img {
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: rgba(255, 255, 255, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Caveat', cursive;
  font-size: 19px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  overflow: hidden;
  /* Anchors the AI label. */
  position: relative;
}

.motto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.motto-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--motto-text, #3A3A44);
  line-height: 1.15;
}

.motto-sub2 {
  font-family: 'Caveat', cursive;
  font-size: 19px;
  color: var(--motto-text-soft, rgba(58, 58, 68, .78));
  margin-top: 2px;
}

.motto-age {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, .85);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 16px;
  font-weight: 600;
  color: #3A3A44;
  z-index: 1;
}

.motto-soon {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(58, 58, 68, .82);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .4px;
}

/* Fallback-Verläufe für Mottos ohne Theme — rotieren per {% cycle %} über die
   Kacheln. Mit Theme setzt die Kachel --motto-bg. */
.mc-g1 {
  background: linear-gradient(135deg, #FCE8F0 0%, #FFF6D8 38%, #E0F2E4 72%, #E2ECFA 100%);
}

.mc-g2 {
  background: linear-gradient(135deg, #D8EFC2 0%, #F6F1D8 55%, #D8EAF0 100%);
}

.mc-g3 {
  background: linear-gradient(135deg, #FBD9E9 0%, #FCEFD2 100%);
}

.mc-g4 {
  background: linear-gradient(135deg, #FADCEC 0%, #EFE2F8 35%, #DEEAF8 65%, #E2F4E2 100%);
}

.mc-g5 {
  background: linear-gradient(135deg, #EAF2D8 0%, #F6E9CF 100%);
}

.mc-g6 {
  background: linear-gradient(135deg, #D6EFF2 0%, #E4E0F6 100%);
}

.mc-g7 {
  background: linear-gradient(135deg, #F6E4CF 0%, #E4D8F0 100%);
}

/* ============================================================
   KATEGORIE-FARBSYSTEM — gilt seitenweit
   Die Variablen setzt ausschließlich .cat-<slug>; Fallbacks stehen an den
   Verwendungsstellen, damit eine Karte ihre Kategoriefarbe an das Badge
   weitervererben kann.
   ============================================================ */
.cat-all {
  --cat-color: #DDA93C;
  --cat-bg: #FFF3CE;
}

.cat-deco {
  --cat-color: #E087AC;
  --cat-bg: #FADCEA;
}

.cat-food {
  --cat-color: #D9982F;
  --cat-bg: #FCEBC8;
}

.cat-cakes {
  --cat-color: #D9982F;
  --cat-bg: #FCEBC8;
}

.cat-snacks {
  --cat-color: #D9784A;
  --cat-bg: #FBE0D2;
}

.cat-balloons {
  --cat-color: #6B93CE;
  --cat-bg: #DCE8F8;
}

.cat-games {
  --cat-color: #5CA865;
  --cat-bg: #D6EEDB;
}

.cat-costumes {
  --cat-color: #8F6BC0;
  --cat-bg: #E7DCF5;
}

.cat-makeup {
  --cat-color: #D9679A;
  --cat-bg: #FBDDEA;
}

.cat-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  z-index: 2;
  background: var(--cat-color, var(--o-lila));
  color: #FFF;
}

.cat-badge svg {
  width: 13px;
  height: 13px;
}

.cat-badge svg .hole {
  fill: var(--cat-color, var(--o-lila));
}

/* Schwierigkeit als Farbpunkt */
.diff-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: -1px;
  background: var(--diff-color, var(--o-lila));
}

.diff-easy {
  --diff-color: #5CA865;
}

.diff-advanced {
  --diff-color: #DDA93C;
}

.diff-challenging {
  --diff-color: #E4762F;
}

.diff-expert {
  --diff-color: #D9536B;
}

/* ============================================================
   LEERZUSTÄNDE — nie eine leere Fläche zeigen
   ============================================================ */
.motto-empty,
.feed-empty {
  grid-column: 1/-1;
  display: none;
  text-align: center;
  background: rgba(255, 255, 255, .65);
  border: 1.5px dashed var(--o-lila);
  border-radius: 14px;
  padding: 22px 16px;
  font-size: 16px;
  color: var(--text-primary);
}

.motto-empty.show,
.feed-empty.show {
  display: block;
}

.motto-empty a,
.feed-empty a {
  color: var(--lila-strong);
  font-weight: 600;
}

/* ============================================================
   KARTEN-FEED — Polaroid-Style, responsive Grid
   ============================================================ */
.feed {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 50px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: #FFF;
  border-radius: 4px;
  padding: 12px 12px 14px;
  box-shadow: 2px 4px 12px rgba(60, 30, 90, 0.13);
  position: relative;
  transition: transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}

.card:hover {
  transform: translateY(-4px) rotate(0deg) !important;
}

/* The card colours rotate per article theme (--card-1 … --card-6, set on a
   container); the brand palette is the fallback. */
.card:nth-child(6n+1) {
  transform: rotate(-1.5deg);
  background: var(--card-1, #FCE0EC);
}

.card:nth-child(6n+2) {
  transform: rotate(1deg);
  background: var(--card-2, #FCF1B8);
}

.card:nth-child(6n+3) {
  transform: rotate(-0.5deg);
  background: var(--card-3, #D5EDDB);
}

.card:nth-child(6n+4) {
  transform: rotate(1.2deg);
  background: var(--card-4, #D8E8FA);
}

.card:nth-child(6n+5) {
  transform: rotate(-0.8deg);
  background: var(--card-5, #FCDFC9);
}

.card:nth-child(6n+6) {
  transform: rotate(0.5deg);
  background: var(--card-6, #EEE5F8);
}

/* Washi tape in the motto colour — derived from the theme accent. */
.card::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 44px;
  height: 13px;
  background: repeating-linear-gradient(45deg,
  color-mix(in srgb, var(--accent, #6B3F9E) 40%, transparent) 0 3px,
  color-mix(in srgb, var(--accent, #6B3F9E) 20%, transparent) 3px 6px);
  border-radius: 1px;
}

.card-reel {
  aspect-ratio: 9 / 16;
  background: var(--reel-bg, linear-gradient(135deg, #E0DAF0, #C8BFDD));
  border-radius: 3px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(107, 63, 158, 0.4);
  font-family: 'Caveat', cursive;
  font-size: 18px;
  overflow: hidden;
  position: relative;
}

.card-reel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.15;
}

.card-meta {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   RICH TEXT — gerenderte Strapi-Blocks (Ideen und Seiten)
   ============================================================ */
.rich-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--on-bg, #3A3A44);
}

.rich-text h2 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 30px;
  color: var(--on-bg, var(--text-primary));
  margin: 22px 0 8px;
}

.rich-text h3 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--on-bg, var(--text-primary));
  margin: 18px 0 6px;
}

.rich-text p {
  margin: 0 0 14px;
}

.rich-text ul, .rich-text ol {
  margin: 0 0 14px 22px;
}

.rich-text li {
  margin-bottom: 4px;
}

.rich-text a {
  color: var(--lila-strong);
}

.rich-text strong {
  font-weight: 600;
}

.rich-text blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--o-lila);
  background: rgba(255, 255, 255, .5);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.rich-text img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 8px 0 16px;
}

/* ============================================================
   AI LABEL
   ============================================================ */
.ai-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(61, 46, 92, .78);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
}

.ai-media {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}
.ai-media > img { display: block; }
.rich-text .ai-media { margin: 8px 0 16px; }
.rich-text .ai-media > img { margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 40px 20px 50px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: var(--on-bg-soft, var(--text-secondary));
  background: var(--footer-bg, rgba(255, 255, 255, 0.3));
}

.footer-brand {
  font-size: 22px;
  color: var(--on-bg, var(--text-primary));
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.footer-links a {
  color: var(--on-bg, var(--text-primary));
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Looks like its neighbours, which are links; it is a button because it
   opens the consent banner instead of going anywhere. */
.footer-consent {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--on-bg, var(--text-primary));
  cursor: pointer;
}

.footer-consent:hover {
  text-decoration: underline;
}

.footer-copyright {
  font-size: 16px;
  margin-top: 10px;
}

/* ============================================================
   CONSENT BANNER
   ============================================================ */
/* Visible only while unanswered (js/consent.js sets the attribute). It takes
   the contact panel's spot above the floating button, so the two never sit on
   top of each other: an open panel hides the banner until it closes again. */
.consent {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 61;
  width: min(350px, calc(100vw - 36px));
  background: #FFFDF8;
  border: 1.5px solid var(--o-lila);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(60, 30, 90, .3);
  padding: 16px;
  font-family: 'Fredoka', sans-serif;
  color: var(--text-primary);
}

html[data-consent="unset"] .consent,
.consent.is-open {
  display: block;
}

.chd-panel.open ~ .consent {
  display: none;
}

.consent__title {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 6px;
  padding-right: 24px; /* room for the close button */
}

.consent p {
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 12px;
}

.consent a {
  color: inherit;
}

.consent__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-primary);
  cursor: pointer;
}

.consent__status {
  font-weight: 600;
}

.consent__actions {
  display: flex;
  gap: 8px;
}

/* One style for both answers: refusing is as visible as agreeing. */
.consent__button {
  flex: 1;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #FFF;
  background: var(--lila-strong, #6B3F9E);
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  cursor: pointer;
}

.consent__button:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

/* ============================================================
   SCHWEBENDER KONTAKT-BUTTON + PANEL
   ============================================================ */
.chd-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 20px;
  color: #FFF;
  background: var(--lila-strong, #6B3F9E);
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(60, 30, 90, .35);
  transition: transform .15s;
}

.chd-fab:hover {
  transform: translateY(-2px);
}

.chd-panel {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 60;
  width: min(350px, 92vw);
  background: #FFFDF8;
  border: 1.5px solid var(--o-lila);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(60, 30, 90, .3);
  padding: 16px;
  display: none;
  color: var(--text-primary);
}

.chd-panel.open {
  display: block;
}

.chd-head {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 26px;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.chd-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.chd-row {
  display: flex;
  gap: 6px;
}

.chd-panel input, .chd-panel textarea {
  flex: 1;
  width: 100%;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  padding: 9px 12px;
  border: 1px dashed rgba(184, 159, 224, .6);
  border-radius: 12px;
  background: #FFF;
  color: var(--text-dark, #3D2E5C);
  outline: none;
  resize: vertical;
}

.chd-panel button {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #FFF;
  background: var(--lila-strong, #6B3F9E);
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  cursor: pointer;
}

.chd-send {
  margin-top: 8px;
  width: 100%;
}

.chd-div {
  height: 1px;
  background: rgba(184, 159, 224, .4);
  margin: 14px 0;
}

.chd-panel :disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* The line under the newsletter field that names the double opt-in and links
   the Datenschutzerklärung. Small and quiet, but it has to stay readable —
   this is the text somebody is agreeing to, so no grey below 14px. */
.chd-fine {
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-primary);
  margin-top: 8px;
}

.chd-fine a {
  color: inherit;
}

/* The idea box's label is a <label>, so inline — without this the margin
   below it does nothing. */
.chd-form .chd-label {
  display: block;
}

/* Honeypot: out of sight, but neither display:none nor visibility:hidden —
   bots check for both before they fill a field in. */
.chd-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* What the panel says after a submit. Empty until there is something to say,
   and :empty keeps its margin out of the way until then. */
.chd-status {
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-primary);
  margin-top: 8px;
}

.chd-status:empty {
  display: none;
}

.chd-status.is-error {
  color: #A33;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .nav-search input {
    width: 96px;
  }
}

@media (max-width: 500px) {
  .top-nav {
    padding: 12px 16px;
  }

  .top-nav-links {
    gap: 12px;
    font-size: 16px;
  }

  .top-nav-spare {
    display: none;
  }

  .breadcrumb {
    padding: 0 16px;
  }

  .filter-panel {
    padding: 0 12px;
  }

  .result-row {
    padding: 0 12px;
  }

  .feed {
    padding: 8px 12px 40px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
}
