/* Gemeinsame Grundlage für Shop und Küche.
   Farben, Schrift und die Bausteine, die beide brauchen — damit eine
   Designänderung an EINER Stelle passiert und nicht an zweien. */

:root {
  color-scheme: dark;
  --bg: #0E0C0B;
  --flaeche: #1A1614;
  --flaeche-2: #241D19;
  --linie: #3A2E28;
  --text: #F5EFEA;
  --leise: #B3A69D;
  --akzent: #B04A38;
  --akzent-hell: #C85B46;
  --gut: #5F8F5A;
  --warnung: #D08A2C;
  /* Gold der vollen Stempelkarte. Eigene Namen und nicht --warnung
     mitbenutzt: eine volle Karte ist keine Warnung, und wer den
     Warnton eines Tages verstellt, soll nicht aus Versehen die
     Prämie umfärben. */
  --gold: #D8A03F;
  --gold-tief: #A2731E;
  --gold-weich: #2B2016;
  --auf-gold: #1B1309;
  --takt: 180ms;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.45 "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; }
h1, h2, h3 { letter-spacing: -0.01em; }

.marke { display: flex; align-items: center; gap: 10px; }
/* Das Logo als Kreis — überall dieselbe Datei, Größe je Stelle. */
.logo-rund { width: 36px; height: 36px; border-radius: 50%; flex: none; display: block; }
.logo-rund.gross { width: 96px; height: 96px; animation: pulsieren 1.4s ease-in-out infinite; }
.marke-name { font-weight: 800; font-size: 1.35rem; color: var(--akzent-hell); }
.marke-zusatz { color: var(--leise); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; }

.hinweis, .klein { color: var(--leise); font-size: 0.92rem; }
.fehlerzeile { color: var(--akzent-hell); margin: 6px 0; font-size: 0.95rem; }
.hinweiskasten {
  margin: 10px 0; padding: 10px 12px; background: var(--flaeche-2);
  border-left: 3px solid var(--warnung); border-radius: 0 8px 8px 0; font-size: 0.95rem;
}

.knopf {
  border: 1px solid var(--linie); background: var(--flaeche-2); color: var(--text);
  border-radius: 10px; padding: 12px 16px; cursor: pointer; min-height: 46px;
  transition: transform var(--takt) ease, background var(--takt) ease, border-color var(--takt) ease;
}
.knopf:active { transform: scale(0.97); }
.knopf:disabled { opacity: 0.45; cursor: default; }
.knopf-haupt { background: var(--akzent); border-color: var(--akzent); font-weight: 700; padding: 14px 22px; font-size: 1.05rem; }
.knopf-haupt:hover:not(:disabled) { background: var(--akzent-hell); }
.knopf-still.ist-aktiv { border-color: var(--warnung); color: var(--warnung); }
.knopf-storno { color: var(--leise); }
.knopf-storno:hover:not(:disabled) { color: var(--akzent-hell); border-color: var(--akzent); }
.breit { width: 100%; }

.feld {
  background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--text);
  border-radius: 10px; padding: 13px 15px; font-size: 1rem; width: 100%;
}
/* Ohne das erbt ein <textarea> die Schreibmaschinenschrift des Browsers
   und steht mitten im Formular wie ein Fremdkörper. */
.feld { font-family: inherit; }
.feld:focus-visible { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.feld::placeholder { color: var(--leise); }

.ueberlagerung {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72);
  display: grid; place-items: end center; z-index: 30;
  animation: auftauchen 160ms ease both;
}
.blatt {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 18px 18px 0 0; width: min(38rem, 100%); max-height: 92dvh;
  /* Ein Blatt ist nie breiter als das Fenster. Ohne min-width bestimmt
     der breiteste Inhalt die Mindestbreite und schiebt es hinaus. */
  min-width: 0;
  display: flex; flex-direction: column;
  animation: hochschieben 260ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.blatt-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 10px; }
.blatt-kopf h2 { margin: 0; font-size: 1.2rem; }
.blatt-koerper { overflow-y: auto; padding: 4px 18px 12px; display: flex; flex-direction: column; gap: 16px; }
.blatt-fuss { padding: 12px 18px 18px; display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--linie); }
.schliessen {
  background: none; border: 0; color: var(--leise); font-size: 1.8rem; line-height: 1;
  cursor: pointer; padding: 0 4px;
}

.mengenwahl { display: flex; align-items: center; gap: 4px; }
.mengenwahl button {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--flaeche-2); cursor: pointer; font-size: 1.2rem;
}
.mengenwahl span { min-width: 2.5ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.mengenwahl.klein button { width: 34px; height: 34px; font-size: 1rem; }

@media (min-width: 40rem) {
  .ueberlagerung { place-items: center; }
  .blatt { border-radius: 18px; }
}

@keyframes auftauchen { from { opacity: 0; } to { opacity: 1; } }
@keyframes hochschieben { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes hereinkommen {
  0% { opacity: 0; transform: translateY(-10px) scale(0.98); }
  60% { transform: translateY(0) scale(1.01); }
  100% { opacity: 1; transform: none; }
}
@keyframes pulsieren { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes huepfen { 0%, 100% { transform: none; } 30% { transform: translateY(-8px) scale(1.03); } }

/* Wer im System "Bewegung reduzieren" gesetzt hat, bekommt sie nicht. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important; }
}
