/* =====================================================================
   VERON Katalog — Oberflaeche
   =====================================================================
   Eine Datei, keine Abhaengigkeiten, keine Webfonts von fremden Hosts.
   Die Content-Security-Policy der App laesst nichts Fremdes zu, und ein
   Font-Download waere ohnehin der langsamste Teil des ersten Aufbaus.
   ===================================================================== */

:root{
  --rot:#E7443C;
  --grund:#faf9f7;
  --flaeche:#ffffff;
  --schrift:#17181a;
  --leise:#6a6a66;
  --linie:#e5e2dc;
  --gut-bg:#e5f4ea;   --gut-fg:#0b6b3a;
  --warn-bg:#fef3d7;  --warn-fg:#8a5a00;
  --schlecht-bg:#fdeaea; --schlecht-fg:#a1221c;
  --schatten:0 1px 2px rgba(20,20,20,.05), 0 4px 14px rgba(20,20,20,.05);
  --radius:12px;
}

@media (prefers-color-scheme: dark){
  :root{
    --grund:#131315;
    --flaeche:#1b1c1f;
    --schrift:#ececed;
    --leise:#95958f;
    --linie:#2d2e33;
    --gut-bg:#12301f;   --gut-fg:#68d39a;
    --warn-bg:#332612;  --warn-fg:#e0b25e;
    --schlecht-bg:#331715; --schlecht-fg:#f08a83;
    --schatten:0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,
       "Helvetica Neue",Arial,sans-serif;
  color:var(--schrift);
  background:var(--grund);
}
a{color:inherit}
img{max-width:100%}

/* ---------------------------------------------------------------- Kopf */
.kopf{
  position:sticky; top:0; z-index:30;
  display:flex; gap:18px; align-items:center;
  padding:10px 20px;
  background:var(--flaeche);
  border-bottom:1px solid var(--linie);
}
.marke{
  font-weight:800; letter-spacing:.01em; text-decoration:none;
  font-size:16px; white-space:nowrap;
}
.marke span{color:var(--rot)}
.marke em{font-style:normal; font-weight:500; color:var(--leise)}
/* ® der Wortmarke — Werte kanonisch aus veron/branding, web/veron-wortmarke-r.css */
.marke-r{font-size:.3865em; vertical-align:1.0890em; letter-spacing:0;
  font-weight:inherit; font-style:normal}
@media (max-width:360px){.marke-r{display:none}}
.kopf-rechts{margin-left:auto; display:flex; gap:12px; align-items:center;
  font-size:13px; color:var(--leise); white-space:nowrap}
.abmelden{color:var(--leise)}
@media (max-width:760px){
  .kopf{flex-wrap:wrap}
  .nutzer{display:none}
}

/* ------------------------------------------------------------- Suchfeld */
.suche{position:relative; flex:1; max-width:680px}
.suchbox{position:relative; display:flex; align-items:center}
.lupe{
  position:absolute; left:12px; width:18px; height:18px;
  fill:var(--leise); pointer-events:none;
}
#q{
  width:100%; padding:11px 38px 11px 38px;
  border:1px solid var(--linie); border-radius:10px;
  background:var(--grund); color:var(--schrift);
  font-size:15px; font-family:inherit;
  transition:border-color .12s, box-shadow .12s;
}
#q:focus{
  outline:none; border-color:var(--rot);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--rot) 18%, transparent);
}
/* Das eigene Kreuz reicht; das des Browsers doppelt es nur. */
#q::-webkit-search-cancel-button{display:none}
.leeren{
  position:absolute; right:8px;
  border:0; background:none; color:var(--leise);
  font-size:20px; line-height:1; cursor:pointer; padding:4px 6px;
}

/* --------------------------------------------------------- Vorschlaege */
.vorschlaege{
  position:absolute; top:calc(100% + 6px); left:0; right:0;
  background:var(--flaeche);
  border:1px solid var(--linie); border-radius:var(--radius);
  box-shadow:var(--schatten);
  overflow:hidden; max-height:min(70vh,560px); overflow-y:auto;
}
.v-eintrag{
  display:flex; gap:10px; align-items:center;
  padding:8px 12px; text-decoration:none; cursor:pointer;
  border-bottom:1px solid var(--linie);
}
.v-eintrag:last-child{border-bottom:0}
.v-eintrag[aria-selected="true"]{background:color-mix(in srgb, var(--rot) 8%, transparent)}
.v-bild{
  width:40px; height:53px; flex:none; object-fit:cover;
  border-radius:5px; background:var(--grund);
}
.v-text{min-width:0; flex:1}
.v-marke{font-size:11px; color:var(--leise); text-transform:uppercase; letter-spacing:.03em}
.v-name{font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.v-meta{font-size:12px; color:var(--leise); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.v-rechts{text-align:right; flex:none; font-size:12px}
.v-preis{font-weight:600}
.v-eintrag mark{background:color-mix(in srgb, var(--rot) 22%, transparent);
  color:inherit; border-radius:2px; padding:0 1px}

.v-kopf{
  padding:7px 12px 5px; font-size:11px; color:var(--leise);
  text-transform:uppercase; letter-spacing:.05em;
  border-bottom:1px solid var(--linie); background:var(--grund);
}
.v-fuss{
  padding:7px 12px; font-size:12px; color:var(--leise);
  display:flex; justify-content:space-between; gap:10px;
  border-top:1px solid var(--linie); background:var(--grund);
}
.v-leer{padding:16px 12px; color:var(--leise); font-size:14px}

/* ------------------------------------------------------------- Inhalt */
.inhalt{max-width:1240px; margin:0 auto; padding:22px 20px 60px}
h1{font-size:22px; margin:0 0 4px}
h2{font-size:15px; margin:26px 0 10px; color:var(--leise); font-weight:600}
.hinweis{color:var(--leise); font-size:14px; margin:6px 0}

.start h1{font-size:26px; margin-bottom:8px}
.kennzahlen{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:12px; margin:22px 0 6px;
}
.kennzahlen div{
  background:var(--flaeche); border:1px solid var(--linie);
  border-radius:var(--radius); padding:14px 16px;
}
.kennzahlen b{display:block; font-size:22px; letter-spacing:-.01em}
.kennzahlen span{font-size:12.5px; color:var(--leise)}

/* --------------------------------------------------------------- Chips */
.chipreihe{display:flex; flex-wrap:wrap; gap:8px}
.chip{
  display:inline-flex; align-items:center; gap:7px;
  padding:6px 12px; border-radius:999px;
  border:1px solid var(--linie); background:var(--flaeche);
  font-size:13px; text-decoration:none; white-space:nowrap;
}
.chip:hover{border-color:var(--rot)}
.chip.stark{background:var(--rot); color:#fff; border-color:var(--rot); font-weight:600}
.chip.aktiv{background:color-mix(in srgb, var(--rot) 12%, transparent); border-color:var(--rot)}
.chip.klein{padding:4px 10px; font-size:12.5px}
.chip-zahl{color:var(--leise); font-size:11.5px; font-variant-numeric:tabular-nums}
.chip.stark .chip-zahl{color:rgba(255,255,255,.75)}

/* --------------------------------------------------------- Trefferkopf */
.trefferkopf{display:flex; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:14px}
.zaehler{margin:0; color:var(--leise); font-size:13.5px}
.dauer{
  margin-left:8px; font-variant-numeric:tabular-nums; font-size:12px;
  padding:1px 7px; border-radius:999px;
  background:var(--gut-bg); color:var(--gut-fg);
}
.filterform{margin-left:auto}
.schalter{display:inline-flex; align-items:center; gap:7px; font-size:13.5px;
  color:var(--leise); cursor:pointer}
.aktivfilter{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px}
.facetten{display:flex; flex-direction:column; gap:8px; margin-bottom:18px}
.facette{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.facette-titel{font-size:11.5px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--leise); min-width:72px}

/* -------------------------------------------------------------- Raster */
.raster{
  display:grid; gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
}
.karte{
  background:var(--flaeche); border:1px solid var(--linie);
  border-radius:var(--radius); overflow:hidden; text-decoration:none;
  display:flex; flex-direction:column;
  /* Hier stand einmal content-visibility:auto mit contain-intrinsic-size:340px.
     Das war ein Fehlgriff: der Einwertform von contain-intrinsic-size setzt
     BREITE und Hoehe auf 340px. Fuer ein Raster-Element, dessen Breite das
     Raster bestimmt, rechnet der Browser damit falsch, haelt die Karte fuer
     ausserhalb des Sichtbereichs und ueberspringt sie. Im Browser
     nachgesehen (05.09.2026): alle 24 Karten blieben leer, nur das
     "gelistet"-Faehnchen war zu sehen.
     Bei 24 Karten war ohnehin nichts zu holen — die Zeit geht in die
     Bilder, und die laden bereits verzoegert. */
  transition:border-color .12s, transform .12s;
}
.karte:hover{border-color:var(--rot); transform:translateY(-1px)}
.karte-bild{position:relative; background:var(--grund)}
/* height:auto ist hier PFLICHT, nicht Kosmetik.
   Die <img>-Tags tragen width/height als Attribute, damit der Browser den
   Platz schon vor dem Laden reservieren kann und nichts springt. Diese
   Attribute gelten aber als gesetzte Breite UND Hoehe — und aspect-ratio
   greift nur, wenn eine der beiden Dimensionen auto ist. Ohne height:auto
   blieb das Bild bei seinen 560px aus dem Attribut stehen: die Karte wurde
   689px hoch, der Text landete unter der Falz, und im Browser sah man
   scheinbar leere Karten (nachgesehen am 05.09.2026). */
.karte-bild img{display:block; width:100%; height:auto; aspect-ratio:3/4;
  object-fit:cover}
.fahne{
  position:absolute; top:8px; left:8px;
  font-size:10.5px; font-weight:600; letter-spacing:.02em;
  padding:3px 8px; border-radius:999px;
}
.fahne.gelistet{background:var(--gut-bg); color:var(--gut-fg)}
.fahne.listbar{background:var(--warn-bg); color:var(--warn-fg)}
.fahne.fehlt{background:var(--schlecht-bg); color:var(--schlecht-fg);
  position:static; display:inline-block}
.karte-text{padding:10px 12px 12px; display:flex; flex-direction:column; gap:2px; flex:1}
.karte-marke{font-size:11px; color:var(--leise); text-transform:uppercase; letter-spacing:.03em}
.karte-name{font-size:13.5px; font-weight:600; line-height:1.3}
.karte-meta{font-size:12px; color:var(--leise)}
.karte-fuss{margin-top:auto; padding-top:8px; display:flex;
  justify-content:space-between; align-items:baseline; font-size:12.5px}
.preis{font-weight:700}
.preis.fehlt{font-weight:400; color:var(--schlecht-fg)}
.groessen{color:var(--leise); font-size:11.5px}

.blaettern{display:flex; gap:16px; align-items:center; justify-content:center;
  margin:28px 0 0; font-size:14px; color:var(--leise)}
.leer{padding:50px 0; text-align:center}

/* ------------------------------------------------------------- Detail */
.zurueck{margin:0 0 10px; font-size:14px; color:var(--leise)}
.detail{display:grid; grid-template-columns:minmax(0,420px) minmax(0,1fr); gap:32px}
@media (max-width:820px){.detail{grid-template-columns:1fr}}
/* height:auto aus demselben Grund wie bei .karte-bild img — das Hero-Bild
   traegt width="1100" height="1466" als Attribute. */
.hero{width:100%; height:auto; border-radius:var(--radius);
  border:1px solid var(--linie); background:var(--flaeche);
  aspect-ratio:3/4; object-fit:cover}
.galerie{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.galerie-knopf{padding:0; border:1px solid var(--linie); border-radius:7px;
  background:none; cursor:pointer; overflow:hidden; line-height:0}
.galerie-knopf.aktiv{border-color:var(--rot)}
.galerie-knopf img{width:52px; height:69px; object-fit:cover}
.kein-bild{aspect-ratio:3/4; display:grid; place-items:center;
  border:1px dashed var(--linie); border-radius:var(--radius); color:var(--leise)}
.detail-kopf{font-size:12.5px; color:var(--leise)}
.detail h1{font-size:24px; margin:4px 0 6px}
.detail-meta{color:var(--leise); font-size:14px; margin:0 0 4px}

.kasten{
  background:var(--flaeche); border:1px solid var(--linie);
  border-radius:var(--radius); padding:16px; margin-top:14px;
}
.hinweis-gut{border-left:3px solid var(--gut-fg)}
.minitabelle,.groessentabelle{border-collapse:collapse; width:100%; font-size:14px}
.minitabelle td,.groessentabelle td,.groessentabelle th{
  border-bottom:1px solid var(--linie); padding:6px 8px; text-align:left;
}
.groessentabelle th{font-size:12px; color:var(--leise); font-weight:600}
.gr,.alle{display:flex; align-items:center; gap:8px; margin:0; cursor:pointer}
.ean{font-variant-numeric:tabular-nums; font-size:12.5px; color:var(--leise)}
.menge{width:76px}
.feldlabel{display:block; font-size:13px; color:var(--leise); margin:12px 0 4px}
input[type=number],input[type=text],select{
  padding:9px 11px; border:1px solid var(--linie); border-radius:8px;
  background:var(--grund); color:var(--schrift); font-size:14px; font-family:inherit;
}
.knopfreihe{margin-top:14px}
button,.knopf{
  background:var(--schrift); color:var(--grund); border:0; border-radius:9px;
  padding:10px 18px; font-weight:600; font-size:14px; cursor:pointer;
  font-family:inherit; text-decoration:none; display:inline-block;
}
button.rot,.knopf.rot{background:var(--rot); color:#fff}
.marke-punkt,.punkt{color:var(--rot)}

/* ---------------------------------------------------------- Anmeldung */
.anmeldung{max-width:420px; margin:70px auto; text-align:center;
  background:var(--flaeche); border:1px solid var(--linie);
  border-radius:var(--radius); padding:32px 28px}
.anmeldung h1{font-size:22px; font-weight:800}
.meldung{background:var(--schlecht-bg); color:var(--schlecht-fg);
  border-radius:8px; padding:10px 14px; margin:14px 0; font-size:14px}
.protokoll{
  background:var(--flaeche); border:1px solid var(--linie);
  border-left:3px solid var(--rot); border-radius:var(--radius);
  padding:14px 16px; white-space:pre-wrap; font-size:13px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  overflow-x:auto;
}

@media (prefers-reduced-motion: reduce){
  *{transition:none !important; animation:none !important}
}
