/* Kuechenhandbuch — Oberflaeche fuer das iPad.
 *
 * Corporate Design aus dem Dach-CLAUDE.md: Playfair Display fuer
 * Ueberschriften, Karla fuer den Fliesstext, Tinte/Gold/Creme.
 *
 * Gebaut fuers iPad im Querformat, benutzbar mit fettigen Fingern: grosse
 * Trefferflaechen (min. 44 px), keine Schwebe-Effekte, kein Scrollen in
 * Scrollflaechen.
 */

:root {
  --tinte:    #201d17;
  --gold:     #a5813a;
  --gedaempft:#8a8073;
  --linie:    #e8e1d3;
  --gruen:    #6f8c4e;
  --creme:    #faf6ea;
  --papier:   #fffdf7;

  --rot:      #a4462f;   /* nur fuer „Achtung" und „unklar" */
  --rand:     18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--creme);
  color: var(--tinte);
  font-family: Karla, -apple-system, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; margin: 0; }

/* --- Kopf ---------------------------------------------------------------- */

.kopf {
  background: var(--papier);
  border-bottom: 1px solid var(--linie);
  padding: env(safe-area-inset-top) 0 0;
}
.kopf-innen {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 14px var(--rand) 12px; max-width: 1100px; margin: 0 auto;
}
.marke-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px; letter-spacing: .01em;
}
.marke-zusatz {
  margin-left: 10px; color: var(--gedaempft);
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
}
.kopf-rechts { color: var(--gedaempft); font-size: 13px; }

/* --- Reiter -------------------------------------------------------------- */

.reiter {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  background: var(--papier); border-bottom: 1px solid var(--linie);
  padding: 0 calc(var(--rand) - 4px);
  position: sticky; top: 0; z-index: 10;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter button {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 15px; color: var(--gedaempft);
  padding: 13px 14px; min-height: 46px; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.reiter button.aktiv { color: var(--tinte); border-bottom-color: var(--gold); }
.reiter button:disabled { opacity: .38; cursor: default; }

/* --- Filter -------------------------------------------------------------- */

main { max-width: 1100px; margin: 0 auto; padding: var(--rand); }

.filterzeile { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filterzeile button {
  appearance: none; cursor: pointer; font: inherit; font-size: 15px;
  background: var(--papier); color: var(--gedaempft);
  border: 1px solid var(--linie); border-radius: 999px;
  padding: 9px 16px; min-height: 42px;
}
.filterzeile button.aktiv {
  background: var(--tinte); border-color: var(--tinte); color: var(--creme);
}

/* --- Kacheln ------------------------------------------------------------- */

.kacheln {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.kachel {
  display: flex; flex-direction: column; text-align: left;
  appearance: none; font: inherit; color: inherit; cursor: pointer;
  background: var(--papier); border: 1px solid var(--linie);
  border-radius: 4px; overflow: hidden; padding: 0;
}
.kachel:active { border-color: var(--gold); }

.kachel-bild {
  aspect-ratio: 4 / 3; width: 100%; object-fit: cover;
  background: var(--linie); display: block;
}
.kachel-leer {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #f2ece0, #f2ece0 8px, #eee7d9 8px, #eee7d9 16px);
  color: var(--gedaempft); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.kachel-text { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kachel-name { font-family: 'Playfair Display', Georgia, serif; font-size: 19px; line-height: 1.25; }
.kachel-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.kachel-platz { color: var(--gedaempft); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.preis { font-variant-numeric: tabular-nums; font-size: 17px; }

/* Statuspunkt: macht sichtbar, was noch fehlt — die Ehrlichkeit gegenüber dem
 * eigenen Stand ist eine Stärke des alten Handbuchs und bleibt. */
.punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.punkt-ok   { background: var(--gruen); }
.punkt-teil { background: var(--gold); }
.punkt-todo { background: var(--rot); }

.marker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gedaempft); }

.badge {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold); border-radius: 2px;
  padding: 2px 7px; align-self: flex-start;
}

/* --- Detail -------------------------------------------------------------- */

.zurueck {
  appearance: none; border: 0; background: none; cursor: pointer; font: inherit;
  color: var(--gedaempft); padding: 8px 0; min-height: 44px; font-size: 15px;
}

.detail-kopf { display: grid; gap: 20px; margin-bottom: 26px; }
@media (min-width: 720px) { .detail-kopf { grid-template-columns: 320px 1fr; align-items: start; } }

.detail-bild { width: 100%; border-radius: 4px; display: block; }
.detail-titel { font-size: 30px; line-height: 1.15; margin-bottom: 8px; }
.detail-kartentext { color: var(--gedaempft); margin-bottom: 14px; }
.detail-daten { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--gedaempft); }

.block { margin-bottom: 28px; }
.block h3 {
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gedaempft); font-family: Karla, sans-serif; font-weight: 700;
  padding-bottom: 8px; border-bottom: 1px solid var(--linie); margin-bottom: 14px;
}

.zutaten { list-style: none; margin: 0; padding: 0; }
.zutaten li {
  display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--linie);
}
.zutaten li:last-child { border-bottom: 0; }
.zutaten .menge { flex: none; width: 96px; font-variant-numeric: tabular-nums; color: var(--gedaempft); }
/* Toppings tragen keine Menge — dann faellt die Spalte weg, statt eine leere
 * Lücke zu hinterlassen, die wie ein Fehler aussieht. */
.zutaten .menge:empty { display: none; }

.schritte { margin: 0; padding-left: 24px; }
.schritte li { padding: 5px 0; }

.achtung {
  background: #fbf1ec; border-left: 3px solid var(--rot);
  padding: 14px 16px; border-radius: 0 3px 3px 0;
}
.achtung ul { margin: 0; padding-left: 20px; }
.achtung li { padding: 3px 0; }

/* Allergene: „null" heißt nie angesehen, nicht frei. Die Anzeige muss das
 * ehrlich zeigen — hier wird der Schaden nicht in Cent gemessen. */
.allergene-unklar {
  display: flex; gap: 10px; align-items: baseline;
  background: #fbf1ec; border-left: 3px solid var(--rot);
  padding: 14px 16px; border-radius: 0 3px 3px 0;
}
.allergene-frei { color: var(--gruen); }

.hinweis { color: var(--gedaempft); font-size: 15px; }

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

.fuss {
  max-width: 1100px; margin: 0 auto;
  padding: 30px var(--rand) calc(30px + env(safe-area-inset-bottom));
  color: var(--gedaempft); font-size: 13px;
}
