/* =========================================================
   Waschi – Styles
   Mobile first, ab 720 px etwas breiter.
   ========================================================= */

/* ---------- Design-Tokens ---------- */
:root {
  --ink: #2B2350;        /* Text & Konturen */
  --muted: #5C557A;      /* Nebentext */
  --bg: #F4F6FB;         /* Seitenhintergrund */
  --card: #FFFFFF;
  --blue: #eaeef8;       /* Wasser, Programme */
  --blue-2: #c3cbe8;
  --pink: #FFEDF2;       /* Warnungen */
  --pink-2: #FFD6E0;
  --akzent: #FF9FB5;     /* rosa Button-Kante */
  --line: #E3DDF0;

  --radius-s: 16px;
  --radius: 22px;
  --radius-l: 30px;

  --font-head: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--font-head); margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Seitenrahmen */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stack { display: flex; flex-direction: column; gap: 24px; }
.grow { flex: 1; min-width: 0; }

/* ---------- Kopfzeile ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.topbar--title { justify-content: flex-start; }
.topbar h1 { font-size: 25px; }
.logo { font-family: var(--font-head); font-size: 26px; font-weight: 700; text-decoration: none; }

.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center; flex-shrink: 0;
  border: 0; border-radius: var(--radius-s);
  background: var(--card); color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] svg { fill: var(--ink); }

/* ---------- Hero mit Waschi ---------- */
.hero {
  display: flex; align-items: center; gap: 16px; flex-direction: column;
  background: var(--blue); border-radius: var(--radius-l);
  padding: 16px;
}
.hero img { width: 128px; height: auto; flex-shrink: 0; margin-top: -16px;     margin-left: -6px; }
.hero h1 { font-size: 30px; }
.hero p { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.hero-content { display: flex; align-items: center; gap: 8px; }

/* ---------- Haupt-Button mit rosa Kante ---------- */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 20px;
  border: 0; border-radius: 20px;
  background: var(--ink); color: #fff;
  font-weight: 700; text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 var(--akzent);
  transition: transform .1s, box-shadow .1s;
  width: 100%;
  margin-bottom: 6px;
}
.btn-primary svg { width: 22px; height: 22px; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--akzent); }

/* ---------- Suche ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px;
  background: var(--card); border-radius: var(--radius-s); color: var(--muted);
}
.search svg { width: 20px; height: 20px; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; color: var(--ink);
}
.search:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

  /* Such-Button: Lupe ↔ X */
  .icon-btn .ic-offen, .icon-btn .ic-zu { display: grid; place-items: center; }
  .icon-btn .ic-zu { display: none; }
  .icon-btn[aria-expanded="true"] .ic-offen { display: none; }
  .icon-btn[aria-expanded="true"] .ic-zu { display: grid; }

  /* Während der Suche nur Suchfeld + Ergebnisse zeigen */
  .suche-aktiv .hero,
  .suche-aktiv #merkliste { display: none !important; 
}

/* ---------- Kacheln ---------- */
.section-title { font-size: 21px; font-weight: 600; margin: 6px 0 10px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile {
  min-height: 86px; padding: 10px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--card); border-radius: var(--radius);
  text-decoration: none; text-align: center;
  font-size: 13px; font-weight: 700; line-height: 1.2;
  transition: transform .15s;
}
.tile:hover { transform: translateY(-2px); }
.tile-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue);
}
.tile-icon svg { width: 22px; height: 22px; }
.tile:nth-child(even) .tile-icon { background: var(--pink); }
.empty { grid-column: 1 / -1; color: var(--muted); padding: 8px 0; }

/* ---------- Detailseite ---------- */
.detail-head {
  margin: -20px -20px 0; padding: 20px 20px 26px;
  background: var(--blue); border-radius: 0 0 36px 36px;
  display: flex; flex-direction: column; gap: 32px;
}
.detail-head .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-head h1 { font-size: 44px; }
.examples { margin-top: 6px; font-weight: 600; color: var(--muted); }
.detail-badge {
  width: 96px; height: 96px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 3px solid var(--ink);
}
.detail-badge svg { width: 50px; height: 50px; stroke-width: 1.6; }

.kurz {
  background: var(--ink); color: #fff;
  border-radius: 26px; padding: 18px 20px;
  box-shadow: 0 5px 0 var(--akzent);
}
.kurz .label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pink-2); }
.kurz p { margin-top: 6px; font-family: var(--font-head); font-size: 22px; font-weight: 600; line-height: 1.2; }

.info-list { background: var(--card); border-radius: 26px; padding: 4px 18px; }
.info-row { display: flex; gap: 14px; padding: 14px 0; }
.info-row + .info-row { border-top: 1.5px dashed var(--line); }
.info-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue);
}
.info-icon svg { width: 21px; height: 21px; }
.info-label {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.4;
}
.info-text { font-weight: 600; }
.badge { font-size: 12px; font-weight: 800; padding: 2px 12px; border-radius: 999px; color: var(--ink); }
.badge--nein { background: var(--pink-2); }
.badge--ja { background: var(--blue-2); }

.fehler {
  background: var(--pink); border: 2.5px solid var(--pink-2);
  border-radius: 26px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.fehler-head { display: flex; align-items: center; gap: 10px; }
.fehler h2 { font-size: 21px; font-weight: 600; }
.fehler ol { margin: 0; padding: 0; list-style: none; counter-reset: f; display: flex; flex-direction: column; gap: 10px; }
.fehler li { counter-increment: f; display: flex; gap: 10px; font-size: 15px; font-weight: 600; }
.fehler li::before {
  content: counter(f);
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--akzent); font-size: 12px; font-weight: 800;
}

.hinweis {
  display: flex; gap: 12px; align-items: flex-start;
  border: 2px dashed #C9C1DD; border-radius: var(--radius); padding: 16px 18px;
  font-size: 15px; font-weight: 600;
}
.hinweis svg, .note svg { width: 22px; height: 22px; margin-top: 1px; }
.hinweis a { font-weight: 800; }
.quellen { font-size: 13px; color: var(--muted); }

.nicht-gefunden { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 40px; }
.nicht-gefunden .btn-primary { align-self: stretch; }

/* ---------- Etikett-Übersetzer ---------- */
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 8px; }
.choices { display: grid; gap: 8px; }
.choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choices--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.choice {
  min-height: 56px; padding: 0 6px;
  border: 2.5px solid var(--line); border-radius: 18px;
  background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer;
}
.choice--temp { font-family: var(--font-head); font-size: 21px; font-weight: 600; }

/* Etikett-Symbole in den Buttons */
.choice:has(.symbol) {
  min-height: 84px; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.symbol {
  width: 40px; height: 40px; overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.symbol text {
  fill: currentColor; stroke: none;
  font-family: var(--font-body); font-size: 6px; font-weight: 800;
  text-anchor: middle;
}
.choice-label { font-size: 12px; line-height: 1.2; }
.choice[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.result {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--blue); border: 3px solid var(--ink);
  border-radius: 28px; padding: 18px;
}
.result--warn { background: var(--pink); }
.result .label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.result h2 { font-size: 28px; margin: 6px 0; }
.result .sub { font-weight: 700; margin-bottom: 4px; }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  background: #ffd7e0; border-radius: 18px; padding: 12px 14px;
  font-size: 14px; font-weight: 600;
}
.footnote { font-size: 13px; color: var(--muted); }

/* ---------- Größere Bildschirme ---------- */
@media (min-width: 720px) {
  .page { max-width: 720px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-head { margin: 0; border-radius: 36px; }
}

/* Weniger Bewegung, wenn im System eingestellt */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
