/* =========================================================
   WillkommVision – Oberfläche
   CI verbindlich: Primärgrün #00694C · Akzentgelb #F6B600
   Schriften: Fraunces (Display) + Manrope (UI) – selbst gehostet
   Gestaltungsidee: heller, ruhiger Rahmen für die Lesbarkeit im
   Freien; dunkelgrüne Bühne, damit die Fotos leuchten. Das Bild
   ist der Held, die Bedienung tritt zurück.
   ========================================================= */

:root {
  --gruen: #00694C;
  --gruen-tief: #063019;
  --gruen-nacht: #04210F;
  --gruen-hell: #e8f0e2;
  --gelb: #F6B600;
  --gelb-tief: #d9a100;
  --beige: #f7f5ef;
  --weiss: #ffffff;
  --text: #1a1a1a;
  --text-leise: #5c5c5c;
  --telegrau: #8D9295;
  --grenze: #e6e3da;

  --radius: 20px;
  --radius-klein: 12px;
  --maxw: 940px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --schatten: 0 1px 2px rgba(6, 48, 25, 0.04), 0 8px 24px rgba(6, 48, 25, 0.06);
  --schatten-hoch: 0 2px 4px rgba(6, 48, 25, 0.06), 0 18px 48px rgba(6, 48, 25, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Muss vor allen Layout-Regeln stehen: display:grid/flex hier im Stylesheet
   schlägt sonst das hidden-Attribut, und versteckte Bereiche wären sichtbar. */
[hidden] { display: none !important; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--beige);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; display: block; }

h1, h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
em { font-style: italic; }

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
}

/* === KOPF ============================================== */
.kopf {
  background: var(--weiss);
  border-bottom: 1px solid var(--grenze);
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
}
.kopf-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kopf-logo { height: 34px; width: auto; }
.kopf-wort {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  color: var(--gruen);
  letter-spacing: -0.01em;
  padding-left: 12px;
  border-left: 1px solid var(--grenze);
  line-height: 1;
}

/* === BÜHNE ============================================= */
.buehne {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 0%, #0b4526 0%, var(--gruen-tief) 55%, var(--gruen-nacht) 100%);
  color: var(--weiss);
  min-height: 58vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* Das Wellen-Motiv aus der Bildmarke, sehr zurückgenommen – gibt der dunklen
   Fläche Tiefe, ohne mit dem Foto zu konkurrieren. */
.buehne::after {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -2%;
  height: 30%;
  background: url('../assets/wellen.svg') no-repeat center bottom / 150% auto;
  opacity: 0.05;
  filter: blur(0.4px);
  pointer-events: none;
  z-index: 0;
}
.zustand, .arbeit, .zugang { position: relative; z-index: 1; }
.zustand { width: 100%; }

/* Startzustand */
.zustand-start {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 60px;
  text-align: center;
  animation: auf 0.6s var(--ease) both;
}
.zustand-start .eyebrow { color: var(--gelb); margin-bottom: 18px; }
.zustand-start h1 {
  font-size: clamp(2.3rem, 8vw, 3.8rem);
  margin-bottom: 18px;
}
.lead {
  max-width: 30rem;
  margin: 0 auto 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}
.start-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Foto- und Ergebniszustand.
   Die Breite richtet sich nach dem Bild (fit-content), damit Schaltflächen
   am Bildrand kleben und nicht am Bildschirmrand. */
.zustand-foto, .zustand-ergebnis {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.zustand-foto img, .vergleich img { width: 100%; height: auto; }
.bild-tausch {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(4, 33, 15, 0.72);
  backdrop-filter: blur(8px);
  color: var(--weiss);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.zustand-video { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; line-height: 0; }
.zustand-video video { max-height: 74vh; width: auto; max-width: 100%; display: block; background: #000; }

/* Verlauf (Rückgängig / Fassungen) */
.verlauf-leiste {
  max-width: var(--maxw);
  margin: 14px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.verlauf-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--grenze);
  background: var(--weiss);
  color: var(--gruen);
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.verlauf-btn:hover:not(:disabled) { border-color: var(--gruen); background: var(--gruen-hell); }
.verlauf-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.verlauf-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-leise);
  min-width: 8rem;
  text-align: center;
}

/* Varianten zur Auswahl: eine groß, mit Blättern (Details besser erkennbar) */
.zustand-varianten { width: fit-content; max-width: 100%; margin: 0 auto; line-height: 0; }
.varianten-buehne { position: relative; display: inline-block; }
#variante-bild { max-height: 74vh; width: auto; max-width: 100%; display: block; }
.varianten-pfeil {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(4, 33, 15, 0.66);
  backdrop-filter: blur(8px);
  color: var(--weiss);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease);
}
.varianten-pfeil:hover { background: rgba(4, 33, 15, 0.85); }
.varianten-prev { left: 12px; }
.varianten-next { right: 12px; }
.varianten-zaehler {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(4, 33, 15, 0.66);
  backdrop-filter: blur(8px);
  color: var(--weiss);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  line-height: 1.2;
}

/* Auswahl-Pult unter der Bühne */
.varianten-pult {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 20px 0;
  display: grid;
  gap: 12px;
}
.varianten-pult-titel { text-align: center; color: var(--text-leise); font-size: 0.9rem; }

/* Anpassen: Zeichenfläche liegt deckungsgleich über dem Entwurf */
.zustand-anpassen { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; line-height: 0; }
.anpassen-buehne { position: relative; display: inline-block; }
#anpassen-bild { max-height: 74vh; width: auto; max-width: 100%; display: block; }
#anpassen-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none; /* Finger malt, statt die Seite zu scrollen */
}

/* Anpassen-Pult unter der Bühne */
.anpassen-pult {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 0;
  display: grid;
  gap: 12px;
}
.anpassen-hinweis { font-size: 0.9rem; color: var(--text-leise); }
.anpassen-hinweis strong { color: var(--text); }
.anpassen-werkzeuge { display: flex; gap: 10px; }
.anpassen-werkzeuge .btn { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.anpassen-aktionen { display: flex; gap: 10px; justify-content: flex-end; }

/* === VORHER/NACHHER ==================================== */
.vergleich {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  line-height: 0; /* sonst entsteht unter dem Bild eine Textzeilen-Lücke */
}
/* Das Entwurfsbild bestimmt die Größe der Box – nur so sitzen Trenner und
   Beschriftungen am Bildrand statt am Bildschirmrand. */
#img-nachher { max-height: 74vh; width: auto; max-width: 100%; }
.vorher-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  clip-path: inset(0 50% 0 0);
}
.vorher-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trenner {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--weiss);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.griff {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--weiss);
  box-shadow: var(--schatten-hoch);
  display: grid;
  place-items: center;
}
.griff::before,
.griff::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-block: 6px solid transparent;
}
.griff::before {
  left: 14px;
  border-right: 8px solid var(--gruen);
}
.griff::after {
  right: 14px;
  border-left: 8px solid var(--gruen);
}
.marke {
  position: absolute;
  top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(4, 33, 15, 0.66);
  backdrop-filter: blur(8px);
  color: var(--weiss);
  pointer-events: none;
}
.marke-vorher { left: 14px; }
.marke-nachher { right: 14px; background: var(--gruen); }
/* Der Regler liegt unsichtbar über dem Bild – so lässt sich überall ziehen. */
#slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
#slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 64px;
  height: 100vh;
  cursor: ew-resize;
}
#slider::-moz-range-thumb {
  width: 64px;
  height: 100vh;
  border: 0;
  background: transparent;
}

/* === ARBEITSANZEIGE ==================================== */
.arbeit {
  position: fixed; /* über dem ganzen Bildschirm, nicht nur in der Bühne –
                      sonst öffnet ein aus gescrollter Position aufgerufenes
                      Overlay (z. B. Materialliste) unsichtbar oben */
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 33, 15, 0.82);
  backdrop-filter: blur(6px);
  z-index: 30; /* über der Kopfleiste (z-index 20) */
  animation: auf 0.3s var(--ease) both;
}
.arbeit-box { text-align: center; padding: 24px; }
.puls { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.puls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gelb);
  animation: huepf 1.1s infinite var(--ease);
}
.puls span:nth-child(2) { animation-delay: 0.16s; }
.puls span:nth-child(3) { animation-delay: 0.32s; }
.arbeit-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  color: var(--weiss);
  margin-bottom: 6px;
}
.arbeit-klein { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }

@keyframes huepf {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
  30% { transform: translateY(-9px); opacity: 1; }
}
@keyframes auf {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Zugangsdialog – ersetzt das blockierende prompt() des Browsers */
.zugang { z-index: 34; }
.zugang-box {
  background: var(--weiss);
  color: var(--text);
  border-radius: var(--radius);
  padding: 28px 26px;
  width: min(360px, calc(100vw - 44px));
  box-shadow: var(--schatten-hoch);
  display: grid;
  gap: 14px;
  text-align: left;
}
.zugang-box h2 { font-size: 1.4rem; }
.zugang-box p { font-size: 0.9rem; color: var(--text-leise); }
.zugang-feld {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--grenze);
  border-radius: var(--radius-klein);
  font: inherit;
  font-size: 1rem;
}
.zugang-feld:focus {
  outline: none;
  border-color: var(--gruen);
  box-shadow: 0 0 0 3px rgba(0, 105, 76, 0.12);
}

/* Aufnahme-Hilfe: kurze Tipps, bevor die Kamera öffnet */
.hilfe { z-index: 32; }
.hilfe-box {
  background: var(--weiss);
  color: var(--text);
  border-radius: var(--radius);
  padding: 26px 24px;
  width: min(400px, calc(100vw - 44px));
  box-shadow: var(--schatten-hoch);
  text-align: left;
}
.hilfe-box h2 { font-size: 1.4rem; margin-bottom: 16px; }
.hilfe-tipps { list-style: none; display: grid; gap: 12px; margin-bottom: 22px; }
.hilfe-tipps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.4;
}
.hilfe-tipps li span { font-size: 1.2rem; flex: none; line-height: 1.2; }
.hilfe-aktionen { display: flex; gap: 10px; justify-content: flex-end; }

/* Material- & Pflanzliste (Overlay) */
.liste-overlay { z-index: 32; }
.liste-box {
  background: var(--weiss);
  color: var(--text);
  border-radius: var(--radius);
  width: min(560px, calc(100vw - 36px));
  max-height: min(80vh, 720px);
  box-shadow: var(--schatten-hoch);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}
.liste-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--grenze);
}
.liste-kopf h2 { font-size: 1.35rem; }
.liste-schliessen {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--beige);
  color: var(--text-leise);
  font-size: 16px;
  cursor: pointer;
}
.liste-schliessen:hover { background: var(--grenze); }
.liste-inhalt { overflow-y: auto; padding: 8px 20px; }
.liste-gruppe { margin: 12px 0 4px; }
.liste-gruppe-titel {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gruen);
  padding: 6px 0;
  border-bottom: 1px solid var(--grenze);
}
.liste-zeile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--grenze);
}
.liste-bez { font-weight: 600; font-size: 0.95rem; }
.liste-menge { font-weight: 700; color: var(--gruen); white-space: nowrap; }
.liste-hinweis-zeile { grid-column: 1 / -1; font-size: 0.82rem; color: var(--text-leise); }
.liste-export {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px 4px;
  border-top: 1px solid var(--grenze);
}
.mappe-felder { display: flex; gap: 10px; }
.mappe-feld {
  flex: 1;
  min-height: 42px;
  padding: 8px 12px;
  border: 1.5px solid var(--grenze);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--weiss);
}
.mappe-feld:focus { outline: none; border-color: var(--gruen); }
.liste-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; }
.liste-knoepfe .btn { flex: 1; min-height: 46px; }

/* === VERWANDLUNG (Drohnen-Einflug) ==================== */
.einflug {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(6, 20, 12, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}
.einflug-rahmen {
  position: relative;
  width: min(92vw, 1080px);
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.einflug-cam { position: absolute; inset: 0; will-change: transform; }
.einflug-bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#einflug-nachher { z-index: 1; }
#einflug-vorher { z-index: 2; } /* liegt oben und blendet aus */
.einflug-label {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.einflug-aktionen { display: flex; gap: 10px; }
.einflug-aktionen .btn { min-height: 46px; padding: 10px 22px; }

/* === KUNDENMAPPE-DIALOG ================================ */
.mappe-dialog {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: rgba(6, 20, 12, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mappe-dialog-box {
  width: min(92vw, 460px);
  background: var(--weiss);
  color: var(--text);
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.mappe-dialog-box h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--gruen-tief, #063019);
}
.mappe-dialog-sub { margin: 0 0 16px; font-size: 0.85rem; color: var(--text-leise, #7d7a71); }
.mappe-feld-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.mappe-feld-label .mappe-feld { margin-top: 5px; }
.mappe-feld {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1.5px solid var(--grenze);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--weiss);
}
.mappe-feld:focus { outline: none; border-color: var(--gruen); }
.mappe-auto {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.mappe-auto input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gruen); }
.mappe-auto small { display: block; font-weight: 400; color: var(--text-leise, #7d7a71); margin-top: 2px; }
.mappe-dialog-aktionen { display: flex; gap: 10px; justify-content: flex-end; }
.mappe-dialog-aktionen .btn { min-height: 46px; padding: 10px 20px; }
.liste-hinweis {
  margin: 0;
  padding: 14px 20px;
  background: var(--beige);
  font-size: 0.82rem;
  color: var(--text-leise);
}
.liste-hinweis strong { color: var(--text); }
.liste-leer { padding: 24px 0; text-align: center; color: var(--telegrau); }

/* === BUTTONS =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              box-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
}
.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.btn-gross { padding: 16px 30px; min-height: 58px; }
.btn-breit { width: 100%; }
.btn-gelb { background: var(--gelb); color: var(--text); box-shadow: var(--schatten); }
.btn-gelb:hover:not(:disabled) { background: var(--gelb-tief); transform: translateY(-2px); }
.btn-gruen { background: var(--gruen); color: var(--weiss); }
.btn-gruen:hover { background: var(--gruen-tief); transform: translateY(-2px); }
.btn-linie {
  background: transparent;
  color: currentColor;
  border: 1.5px solid currentColor;
}
.buehne .btn-linie { color: var(--weiss); }
.buehne .btn-linie:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.aktionen .btn-linie { color: var(--gruen); border-color: var(--gruen); }
.aktionen .btn-linie:hover { background: var(--gruen-hell); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--gruen); outline-offset: 3px; }

/* === ERGEBNIS-AKTIONEN ================================= */
.aktionen {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aktion-gruppe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.aktion-gruppe .btn { flex: 1 1 150px; }
.aktion-gruppe + .aktion-gruppe {
  padding-top: 12px;
  border-top: 1px solid var(--grenze);
}

/* Erste Reihe farblich, aber dezent (gedämpfte Töne, kein Schatten) */
.btn-akzent-gruen { background: #3f7d66; color: #fff; box-shadow: none; }
.btn-akzent-gruen:hover:not(:disabled) { background: #356b58; transform: translateY(-1px); }
.btn-akzent-rot { background: #b26150; color: #fff; box-shadow: none; }
.btn-akzent-rot:hover:not(:disabled) { background: #9d5344; transform: translateY(-1px); }
/* Teilen/Speichern – ganz leichtes Grau, zurückgenommen */
.btn-grau { background: #ededec; color: #5f6360; box-shadow: none; }
.btn-grau:hover:not(:disabled) { background: #e3e4e2; transform: translateY(-1px); }

/* === STIMMUNGEN ======================================== */
.stimmungen {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 20px 0;
}
.stimmungen-titel { display: block; text-align: center; font-size: 0.86rem; color: var(--text-leise); margin-bottom: 10px; }
/* Fünf Stimmungen in einer Reihe – gleiche Breite und bündige Kanten wie das Stil-Raster. */
.stimmung-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stimmung-chip {
  background: var(--weiss);
  border: 1.5px solid var(--grenze);
  border-radius: var(--radius-klein);
  padding: 10px 6px;
  min-height: 52px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.stimmung-chip:hover:not(:disabled) { border-color: var(--gruen); transform: translateY(-1px); }
.stimmung-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.stimmung-chip small { font-weight: 500; color: var(--text-leise); font-size: 0.72rem; line-height: 1.15; }

/* Schmale Handys: Stile zwei Reihen, Stimmungen ohne Beschreibung kompakter. */
@media (max-width: 560px) {
  .stil-grid { grid-template-columns: repeat(2, 1fr); }
  .stimmung-chip { font-size: 0.8rem; padding: 9px 4px; }
  .stimmung-chip small { display: none; }
}

/* === PULT (Steuerung) ================================== */
.pult {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 20px 8px;
  display: grid;
  gap: 22px;
}
.block { animation: auf 0.5s var(--ease) both; }
.block-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ziffer {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gruen);
  color: var(--weiss);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.block-kopf h2 { font-size: 1.25rem; }
.optional {
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--telegrau);
  letter-spacing: 0;
}

/* Stil-Kacheln */
.stil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 6 Stile -> zwei Reihen à drei, bündig */
  gap: 10px;
}
.stil-kachel {
  position: relative;
  text-align: left;
  background: var(--weiss);
  border: 1.5px solid var(--grenze);
  border-radius: var(--radius-klein);
  padding: 14px 14px 14px 16px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease),
              transform 0.22s var(--ease);
  overflow: hidden;
}
.stil-kachel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--ton, var(--gruen));
}
.stil-kachel:hover { border-color: var(--telegrau); transform: translateY(-2px); }
.stil-kachel strong { display: block; font-size: 0.98rem; margin-bottom: 2px; }
.stil-kachel small { color: var(--text-leise); font-size: 0.82rem; line-height: 1.4; display: block; }
.stil-kachel.aktiv {
  border-color: var(--gruen);
  background: var(--gruen-hell);
  box-shadow: var(--schatten);
}
.stil-kachel.aktiv strong { color: var(--gruen); }
.stil-kachel.aktiv::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gruen);
  color: var(--weiss);
  font-size: 13px;
  display: grid;
  place-items: center;
}

/* Bereiche: Kacheln oben, Materialien gesammelt darunter */
.block-hinweis { color: var(--text-leise); font-size: 0.86rem; margin: -6px 0 12px; }

.bereich-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}
.bereich-kachel {
  background: var(--weiss);
  border: 1.5px solid var(--grenze);
  border-radius: var(--radius-klein);
  padding: 12px 8px;
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.bereich-kachel svg {
  width: 22px; height: 22px; fill: none; stroke: var(--telegrau);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.2s var(--ease);
}
.bereich-kachel:hover { border-color: var(--telegrau); transform: translateY(-2px); }
.bereich-kachel.aktiv { border-color: var(--gruen); background: var(--gruen-hell); color: var(--gruen); }
.bereich-kachel.aktiv svg { stroke: var(--gruen); }

.material-bloecke { display: grid; gap: 8px; margin-top: 12px; }
.material-block {
  background: var(--weiss);
  border: 1px solid var(--grenze);
  border-radius: var(--radius-klein);
  padding: 12px 14px;
  animation: auf 0.35s var(--ease) both;
}
.material-titel {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gruen);
  margin-bottom: 9px;
}
.material-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.material-chip {
  background: var(--weiss);
  border: 1.5px solid var(--grenze);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.material-chip:hover { border-color: var(--telegrau); }
.material-chip.aktiv { background: var(--gruen); border-color: var(--gruen); color: var(--weiss); }

/* Wunsch-Freitext */
.wunsch {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--grenze);
  border-radius: var(--radius-klein);
  background: var(--weiss);
  font: inherit;
  font-size: 0.98rem;
  resize: vertical;
  min-height: 76px;
}
.wunsch::placeholder { color: var(--telegrau); }

/* Diktier-Knopf im Textfeld (Sprache-zu-Text, geräteeigenes Mikrofon) */
.feld-mit-mikro { position: relative; }
.feld-mit-mikro .wunsch { padding-right: 54px; } /* Platz für den Knopf */
.mikro-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--grenze);
  background: var(--weiss);
  color: var(--gruen);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.mikro-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mikro-btn:hover { border-color: var(--gruen); background: var(--gruen-hell); }
/* Während des Zuhörens: rot und pulsierend. */
.mikro-btn.hoert {
  background: #c0392b;
  border-color: #c0392b;
  color: var(--weiss);
  animation: mikroPuls 1.2s infinite var(--ease);
}
@keyframes mikroPuls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); }
}

/* Anzahl-Dropdown */
.anzahl-wahl {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--grenze);
  border-radius: var(--radius-klein);
  background: var(--weiss);
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
}
.anzahl-wahl:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px rgba(0, 105, 76, 0.12); }
.wunsch:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px rgba(0, 105, 76, 0.12); }

/* Auflösungs-Schalter */
.schalter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.schalter-teil { cursor: pointer; }
.schalter-teil input { position: absolute; opacity: 0; pointer-events: none; }
.schalter-inhalt {
  display: block;
  padding: 13px 16px;
  background: var(--weiss);
  border: 1.5px solid var(--grenze);
  border-radius: var(--radius-klein);
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.schalter-inhalt strong { display: block; font-size: 0.98rem; }
.schalter-inhalt small { color: var(--text-leise); font-size: 0.82rem; }
.schalter-teil input:checked + .schalter-inhalt {
  border-color: var(--gruen);
  box-shadow: 0 0 0 2px var(--gruen) inset;
}
.schalter-teil input:focus-visible + .schalter-inhalt { outline: 3px solid var(--gruen); outline-offset: 2px; }

.fehler {
  background: #fdeceb;
  border-left: 4px solid #c0392b;
  color: #8c2b20;
  padding: 12px 16px;
  border-radius: var(--radius-klein);
  font-size: 0.92rem;
}

/* === ARCHIV ============================================ */
.archiv {
  max-width: var(--maxw);
  margin: 30px auto 0;
  padding: 0 20px;
}
.archiv details {
  background: var(--weiss);
  border: 1px solid var(--grenze);
  border-radius: var(--radius);
  overflow: hidden;
}
.archiv summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
}
.archiv summary::-webkit-details-marker { display: none; }
.archiv-zahl { color: var(--telegrau); font-weight: 500; font-size: 0.9rem; }
.archiv-liste { list-style: none; padding: 0 20px; }
.archiv-liste li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--grenze);
  font-size: 0.92rem;
}
.archiv-liste a { color: var(--gruen); font-weight: 600; text-decoration: none; }
.archiv-liste a:hover { text-decoration: underline; }
.archiv-liste .datum { margin-left: auto; color: var(--telegrau); font-size: 0.85rem; }
.archiv-leer { color: var(--telegrau); padding: 4px 0 16px; font-size: 0.92rem; }
.archiv-loeschen {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 8px;
  border-radius: 8px;
  color: var(--telegrau);
}
.archiv-loeschen:hover { background: var(--beige); color: #c0392b; }
.archiv-hinweis {
  color: var(--telegrau);
  font-size: 0.82rem;
  padding: 12px 0 18px;
  border-top: 1px solid var(--grenze);
}

/* === FUSS ============================================== */
.fuss {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 20px 40px;
  text-align: center;
  color: var(--text-leise);
  font-size: 0.85rem;
  display: grid;
  gap: 8px;
}
.fuss strong { color: var(--gruen); }
.fuss-klein { color: var(--telegrau); font-size: 0.78rem; }
.link-btn {
  background: none;
  border: 0;
  color: var(--telegrau);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  justify-self: center;
  padding: 8px;
}

/* === GRÖSSERE BILDSCHIRME ============================== */
@media (min-width: 700px) {
  body { font-size: 17px; }
  .kopf-logo { height: 40px; }
  .kopf-wort { font-size: 23px; }
  .buehne { min-height: 62vh; }
  .zustand-foto img { max-height: 74vh; width: auto; max-width: 100%; }
  .pult { padding-top: 34px; gap: 26px; }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* === DRUCK / PDF-EXPORT (gebrandet) ==================== */
#druck-bereich { display: none; }
.druck-kopf {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 3px solid #00694C;
  padding-bottom: 12px;
  margin-bottom: 6px;
}
.druck-kopf img { height: 46px; width: auto; }
.druck-kopf .druck-titel {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  color: #00694C;
}
.druck-datum { font-size: 12px; color: #5c5c5c; margin-bottom: 14px; }
.druck-bild { width: 100%; max-height: 320px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.druck-tabelle { width: 100%; border-collapse: collapse; font-size: 12px; }
.druck-tabelle th {
  text-align: left;
  background: #e8f0e2;
  color: #00694C;
  padding: 6px 8px;
  border-bottom: 2px solid #00694C;
}
.druck-tabelle td { padding: 6px 8px; border-bottom: 1px solid #ddd; vertical-align: top; }
.druck-tabelle td.menge { white-space: nowrap; font-weight: 700; color: #00694C; text-align: right; }
.druck-hinweis {
  margin-top: 16px;
  padding: 10px 12px;
  background: #f7f5ef;
  border-left: 4px solid #F6B600;
  font-size: 11px;
  color: #444;
}
.druck-fuss { margin-top: 18px; font-size: 11px; color: #5c5c5c; text-align: center; }

@media print {
  /* Beim Drucken nur den Druckbereich zeigen, alles andere ausblenden. */
  body > *:not(#druck-bereich) { display: none !important; }
  #druck-bereich { display: block !important; padding: 0; color: #000; }
  @page { margin: 16mm; }
}

.druck-cta {
  margin-top: 12px;
  padding: 12px 14px;
  background: #e8f0e2;
  border-radius: 8px;
  font-size: 12px;
  color: #00694C;
  font-weight: 600;
}
