/* ============================================
   Gesichterskala (Seite und Embed)
   Der Widget-Teil (.fs-*) ist eigenständig und läuft auch ohne
   Bootstrap/style.css im iframe.
   ============================================ */

.fs {
  --fs-ink: #292827;
  --fs-muted: #6b6966;
  --fs-accent: #af73e6;
  --fs-deep: #5c2d91;
  --fs-border: #dcd7d3;
  --fs-cream: #e9e5dd;
  color: var(--fs-ink);
  max-width: 760px;
  margin: 0 auto;
}

.fs-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
  background: rgba(175, 115, 230, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.fs-prompt-text {
  flex: 1 1 260px;
  margin: 0;
  line-height: 1.5;
}
.fs-prompt-label {
  font-weight: 600;
}

.fs-btn {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 0;
  background: var(--fs-cream);
  color: var(--fs-ink);
  cursor: pointer;
}
.fs-btn:focus-visible {
  outline: 2px solid var(--fs-accent);
  outline-offset: 2px;
}

.fs-group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.fs-legend {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
}

/* 6 Gesichter: am Handy 3x2, ab Tablet in einer Reihe */
.fs-faces {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .fs-faces {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.fs-option {
  position: relative;
  margin: 0;
  cursor: pointer;
  display: block;
}
.fs-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.fs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  height: 100%;
  min-height: 132px;
  padding: 10px 6px;
  border: 2px solid var(--fs-border);
  border-radius: 16px;
  background: #fff;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.fs-face-svg {
  flex: 0 0 auto;
  width: 76px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
}
.fs-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.fs-kid {
  font-size: 13px;
  line-height: 1.25;
  color: var(--fs-muted);
}
.fs-option:hover .fs-card {
  border-color: var(--fs-accent);
}
.fs-option input:focus-visible + .fs-card {
  outline: 3px solid var(--fs-accent);
  outline-offset: 2px;
}
.fs-option input:checked + .fs-card {
  border-color: var(--fs-deep);
  background: rgba(175, 115, 230, 0.16);
}
.fs-option input:checked + .fs-card .fs-kid {
  color: var(--fs-ink);
}

.fs-result {
  margin-top: 16px;
  min-height: 92px;
  border-top: 1px solid var(--fs-border);
  padding-top: 12px;
}
.fs-result-empty {
  color: var(--fs-muted);
  margin: 0;
}
.fs-result-body[hidden] {
  display: none;
}
.fs-result-value {
  margin: 0;
  line-height: 1;
}
.fs-result-num {
  font-size: 48px;
  font-weight: 540;
  letter-spacing: -1px;
}
.fs-result-of {
  font-size: 18px;
  color: var(--fs-muted);
}
.fs-result-kid {
  font-size: 20px;
  font-weight: 540;
  margin: 8px 0 4px;
}
.fs-result-adult {
  margin: 0;
  color: var(--fs-muted);
  font-size: 15px;
}

/* --- Nur im Embed --- */
.fs-embed {
  margin: 0;
  padding: 12px;
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.fs-credit {
  max-width: 760px;
  margin: 10px auto 0;
  font-size: 13px;
  text-align: right;
}
.fs-credit a {
  color: #714cb6;
}

/* --- Seite --- */
.faces-card {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--color-parchment, #dcd7d3);
  border-radius: var(--radius-lg, 16px);
  padding: 24px;
}
.fs-hint {
  margin: 12px 0 0;
  font-size: 15px;
}
.faces-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.faces-actions .btn {
  border-radius: var(--radius-sm, 8px);
  font-weight: 600;
  min-height: 44px;
}
.faces-actions .btn-link {
  color: var(--color-text-muted, #6b6966);
}
.faces-note {
  max-width: 820px;
  margin: 12px auto 0;
}
.faces-ages th,
.faces-ages td {
  font-size: 15px;
  vertical-align: top;
}
.tool-sources li {
  margin-bottom: 0.4rem;
  font-size: 15px;
}
.faces-poster {
  display: none;
}

@media (max-width: 575.98px) {
  .faces-card {
    padding: 14px;
  }
  .fs-card {
    min-height: 120px;
  }
}

/* --- Druck: nur das A4-Poster --- */
@media print {
  @page {
    size: A4 portrait;
    margin: 14mm;
  }
  #mainNav,
  .site-footer,
  #cookieBanner,
  .faces-page > section {
    display: none !important;
  }
  body {
    padding-top: 0 !important;
  }
  .faces-poster {
    display: block !important;
    color: #000;
    text-align: center;
  }
  .faces-poster-title {
    font-size: 30pt;
    font-weight: 700;
    margin: 0 0 4mm;
  }
  .faces-poster-prompt {
    font-size: 15pt;
    margin: 0 0 10mm;
  }
  .faces-poster-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10mm 6mm;
  }
  .faces-poster-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2mm;
    break-inside: avoid;
  }
  .faces-poster-item svg {
    width: 50mm;
    height: 50mm;
  }
  .faces-poster-num {
    font-size: 26pt;
    font-weight: 700;
    line-height: 1;
  }
  .faces-poster-kid {
    font-size: 13pt;
    line-height: 1.25;
  }
  .faces-poster-adult {
    margin: 12mm 0 0;
    font-size: 11pt;
    text-align: left;
  }
  .faces-poster-foot {
    margin-top: 6mm;
    font-size: 9pt;
    color: #444;
    text-align: left;
  }
}
