/* Pflanzenplaner - ruhige, helle Gestaltung, Systemschrift (keine Webfonts), Handy zuerst */
:root {
  --bg: #f4f1ea; --karte: #fffdf8; --text: #23302a; --leise: #647064; --linie: #ddd6c7;
  --gruen: #2e6b3f; --gruen-hell: #e3eddf; --erde: #8a5a3a; --warn: #9a4b12; --warn-bg: #fbeedc;
  --radius: 14px; --tipp: 46px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #1f5a31; outline-offset: 2px; }
[hidden] { display: none !important; }

#app { height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; max-width: 1400px; margin: 0 auto; }

.kopf { display: flex; align-items: center; gap: 10px; padding: 6px 14px; padding-top: max(6px, env(safe-area-inset-top)); min-height: 48px; }
.kopf h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .1px; color: var(--gruen); }
.kopf-info { flex: 1; color: var(--leise); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.hilfe { width: var(--tipp); height: var(--tipp); border-radius: 50%; border: 1px solid var(--linie); background: var(--karte); font-weight: 650; color: var(--gruen); margin-right: -6px; }

.buehne { position: relative; min-height: 0; margin: 0 10px; border-radius: var(--radius); overflow: hidden; background: #e3e6e4; border: 1px solid var(--linie); }
#canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.ansichtwahl { position: absolute; left: 10px; top: 10px; display: flex; background: rgba(255,253,248,.94); border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ansichtwahl button { min-width: 74px; height: var(--tipp); padding: 0 14px; border: 0; background: transparent; font-weight: 600; font-size: 15px; }
.ansichtwahl button[aria-pressed="true"] { background: var(--gruen); color: #fff; }
.zentrieren { position: absolute; right: 10px; top: 10px; width: var(--tipp); height: var(--tipp); border-radius: 12px; border: 1px solid var(--linie); background: rgba(255,253,248,.94); font-size: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.rundum { position: absolute; right: 10px; bottom: 10px; min-height: var(--tipp); padding: 0 14px; border-radius: 12px; border: 1px solid var(--linie); background: rgba(255,253,248,.94); font-size: 14px; font-weight: 600; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.rundum[aria-pressed="true"] { background: #2e6b3f; color: #fff; border-color: #2e6b3f; }
body[data-ansicht="draufsicht"] .rundum { display: none; }
.masslabel { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 190px); padding: 4px 10px; border-radius: 10px; background: rgba(255,253,248,.9); font-size: 13px; color: var(--text); pointer-events: none; }
.toast { position: absolute; left: 10px; right: 10px; bottom: 44px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); border: 1px solid #ecc99a; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.ladefehler { position: absolute; inset: 0; display: grid; place-content: center; padding: 20px; text-align: center; background: var(--bg); color: var(--warn); }
.hilfetext { position: absolute; left: 10px; right: 10px; top: 64px; padding: 4px 14px; border-radius: 12px; background: rgba(255,253,248,.97); border: 1px solid var(--linie); font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

.sheet { background: var(--karte); border-top: 1px solid var(--linie); border-radius: 18px 18px 0 0; margin-top: 10px; display: flex; flex-direction: column; box-shadow: 0 -2px 10px rgba(60,50,30,.08); padding-bottom: env(safe-area-inset-bottom); }
.panels { max-height: 40dvh; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 6px; }
.sheet.zu .panels { display: none; }
.panel h2 { margin: 12px 0 10px; font-size: 17px; font-weight: 650; }
.beschr { font-size: 13px; color: var(--leise); margin: 10px 0 6px; font-weight: 600; text-transform: none; }
.klein { font-size: 13px; color: var(--leise); }

.reiter { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--linie); }
.reiter button { min-height: 54px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; color: var(--leise); font-weight: 600; padding: 4px 2px; }
.reiter button i { font-style: normal; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--linie); font-size: 12px; background: #fff; }
.reiter button[aria-selected="true"] { color: var(--gruen); }
.reiter button[aria-selected="true"] i { background: var(--gruen); color: #fff; border-color: var(--gruen); }

.kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kachel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: 8px 6px; border-radius: var(--radius); border: 1.5px solid var(--linie); background: #fff; font-weight: 600; font-size: 15px; text-align: center; }
.kachel svg { width: 58px; height: 42px; }
.kachel small { font-weight: 400; color: var(--leise); font-size: 12px; }
.kachel[aria-pressed="true"] { border-color: var(--gruen); background: var(--gruen-hell); box-shadow: inset 0 0 0 1px var(--gruen); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1.5px solid var(--linie); background: #fff; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.chip[aria-pressed="true"] { border-color: var(--gruen); background: var(--gruen-hell); font-weight: 600; }
.chip .farbe { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); flex: none; }

.regler { display: grid; grid-template-columns: 92px 1fr 92px; align-items: center; gap: 10px; min-height: var(--tipp); }
.regler label { font-weight: 600; font-size: 15px; }
.regler input[type=range] { width: 100%; height: var(--tipp); accent-color: var(--gruen); margin: 0; }
.zahl { display: flex; align-items: center; gap: 4px; }
.zahl input { width: 64px; height: 44px; text-align: right; padding: 0 6px; border-radius: 10px; border: 1.5px solid var(--linie); background: #fff; font-size: 16px; }
.zahl span { font-size: 13px; color: var(--leise); }
.flaeche { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--gruen-hell); font-size: 14px; }
.flaeche b { color: var(--gruen); }
.meldungen:empty { display: none; }
.meldungen { margin: 10px 0; display: grid; gap: 6px; }
.meldung { padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 14px; border: 1px solid #ecc99a; }
.shopinfo { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--gruen-hell); font-size: 14px; }
.weiter { width: 100%; min-height: var(--tipp); margin: 12px 0 8px; border-radius: 12px; border: 0; background: var(--gruen); color: #fff; font-weight: 650; font-size: 16px; }
.platzhalter { margin: 6px 0; padding: 14px; border-radius: var(--radius); border: 1.5px dashed var(--linie); background: #faf7f0; }
.platzhalter p { margin: 0 0 8px; }

/* PC: zweispaltig, Reiter oben in der Bedienspalte */
@media (min-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: auto minmax(0, 1fr); column-gap: 14px; padding: 0 14px 14px; }
  .kopf { grid-column: 1 / -1; padding: 10px 4px; }
  .buehne { margin: 0; grid-column: 1; grid-row: 2; }
  .sheet { grid-column: 2; grid-row: 2; margin: 0; border-radius: var(--radius); border: 1px solid var(--linie); flex-direction: column-reverse; justify-content: flex-end; box-shadow: none; min-height: 0; }
  .panels { max-height: none; flex: 1; padding: 6px 18px 12px; }
  .reiter { border-top: 0; border-bottom: 1px solid var(--linie); }
  .sheet.zu .panels { display: block; }
  .kacheln { grid-template-columns: repeat(3, 1fr); }
}
@media (max-height: 640px) and (max-width: 899px) { .panels { max-height: 34dvh; } }
@media (prefers-reduced-motion: no-preference) { .chip, .kachel, .weiter { transition: background .15s, border-color .15s; } }

/* ---- Paket C: Pflanzen setzen ---- */
.pkopf { position: sticky; top: -4px; z-index: 3; background: var(--karte); padding-top: 4px; }
.werkzeugleiste { display: flex; flex-wrap: nowrap; gap: 6px; padding: 2px 0 6px; overflow-x: auto; scrollbar-width: none; }
.werkzeugleiste::-webkit-scrollbar { display: none; }
.wz { flex: none; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--linie); background: #fff; font-weight: 600; font-size: 15px; }
.wz[aria-pressed="true"] { border-color: var(--gruen); background: var(--gruen-hell); color: var(--gruen); }
.wz.aktion { font-weight: 500; }
.wz:disabled { opacity: .4; cursor: default; }
.wz.aussen { width: 100%; border-color: #e68a00; background: var(--warn-bg); color: var(--warn); margin-bottom: 8px; }
.pinfo { font-size: 13px; margin: 0 0 6px; padding: 6px 10px; border-radius: 10px; background: var(--gruen-hell); min-height: 20px; }
.meldung.info { background: #eef4ee; color: var(--text); border-color: var(--linie); }
.pschalter { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.schalter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.schalter input { width: 22px; height: 22px; accent-color: var(--gruen); }
.pkurz { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.pk { font-size: 12.5px; padding: 3px 9px; border-radius: 12px; background: #f0ece1; color: var(--text); }
.suchzeile { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; }
.suchzeile input[type=search] { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--linie); background: #fff; font-size: 16px; }
.pkatalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.ptile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 12px; border: 1.5px solid var(--linie); background: #fff; text-align: center; position: relative; min-height: 150px; }
.ptile img { width: 96px; height: 96px; object-fit: contain; border-radius: 8px; background: #f3f1ea; }
.ptile .pname { font-weight: 650; font-size: 14px; line-height: 1.2; }
.ptile .pmeta { font-size: 12px; color: var(--leise); }
.ptile .ptag { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #e8efe6; color: var(--gruen); }
.ptile .ptag.vorl { background: #fbeedc; color: var(--warn); }
.ptile .ptag.nein { background: #eee; color: #595959; }
.ptile[aria-pressed="true"] { border-color: var(--gruen); background: var(--gruen-hell); box-shadow: inset 0 0 0 1px var(--gruen); }
.ptile.unpassend { opacity: .45; filter: grayscale(.7); }
@media (min-width: 900px) { .pkatalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { body[data-reiter="pflanzen"] .panels { max-height: none; } }
#gruppenChips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#gruppenChips::-webkit-scrollbar { display: none; }
#gruppenChips .chip { flex: none; }
.pschalter .schalter { min-height: 40px; }
body[data-reiter="pflanzen"] .panels { max-height: 52dvh; }
@media (min-width: 900px) { .werkzeugleiste { flex-wrap: wrap; overflow: visible; } #gruppenChips { flex-wrap: wrap; overflow: visible; } body[data-reiter="pflanzen"] .panels { max-height: none; } }

/* ---- Paket D: Liste, Teilen, Anfrage, Druck ---- */
.zurueck { display: block; margin: 4px 0 10px; padding: 12px 14px; min-height: 44px; border-radius: 12px; background: var(--gruen-hell); color: var(--gruen); font-weight: 650; text-decoration: none; border: 1.5px solid var(--gruen); }
.zurueck.unten { margin-top: 14px; }
.fortsetzen { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff7e0; border: 1px solid #ecd9a0; font-size: 14px; }
.fortsetzen .fknoepfe { display: flex; gap: 8px; margin-top: 8px; }
.lgef { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--gruen-hell); }
.ltitel { font-weight: 650; font-size: 16px; margin-bottom: 4px; }
.ldaten { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: 14px; }
.ldaten dt { color: var(--leise); } .ldaten dd { margin: 0; font-weight: 600; }
.lueber { margin: 14px 0 4px; font-size: 15px; }
.lgruppe { margin: 10px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gruen); }
.lrow { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); align-items: start; }
.lrow .nr { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1e502d; color: #fff; font-size: 13px; font-weight: 700; }
.lname { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lanz { font-weight: 650; color: var(--gruen); white-space: nowrap; font-size: 14px; }
.ldet { font-size: 12.5px; color: var(--leise); margin-top: 2px; }
.lhinweise { margin: 10px 0; display: grid; gap: 6px; }
.laktionen { display: grid; gap: 8px; margin: 12px 0 6px; }
.laktionen .weiter { margin: 0; }
.wz.breit { width: 100%; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--text); }
.wz.anfrage { border-color: var(--gruen); color: var(--gruen); }
.lteilen { margin-top: 10px; }
.teilenzeile { display: flex; gap: 8px; }
.teilenzeile input { flex: 1; min-width: 0; height: 44px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--linie); background: #fff; font-size: 14px; }
body[data-reiter="liste"] .panels { max-height: 56dvh; }
@media (min-width: 900px) { body[data-reiter="liste"] .panels { max-height: none; } }
#druck { display: none; }

/* Handy: Pflanzen-Reiter kompakter, der Katalog kommt frueher ins Bild */
@media (max-width: 899px) {
  #p-pflanzen h2 { display: none; }
  #p-pflanzen .pschalter { flex-wrap: nowrap; gap: 0 14px; }
  #p-pflanzen .pschalter .schalter { min-height: 44px; font-size: 13.5px; }
  #p-pflanzen .pinfo { display: none; }
  #p-pflanzen .pkurz { display: none; }
  #p-pflanzen > .beschr { display: none; }
  #p-pflanzen .suchzeile { margin: 4px 0; }
}

/* Auftrag 50: Hochbeet nach dem Shop (Formskizze, Grenzen, Oberkante, Artikelnummer) */
.regler label small.grenz { display: block; font-weight: 400; font-size: 11px; color: var(--leise); }
.skizze { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--linie); }
.skizze[hidden] { display: none; }
.skizze svg { width: 84px; height: 84px; flex: none; color: #7a3f21; }
.skizze p { margin: 0; font-size: 12px; line-height: 1.35; }
.regelhinweis:empty { display: none; }
.regelhinweis { margin: 6px 0 2px; }
.hinweise:empty { display: none; }
.hinweise { margin: 8px 0; display: grid; gap: 6px; }
.hinweis { padding: 8px 10px; border-radius: 10px; background: #eef4ee; color: var(--text); font-size: 13px; border: 1px solid var(--linie); }
.artikelbox { margin: 12px 0 4px; padding: 8px 12px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--linie); }
.artikelbox[hidden] { display: none; }
.artikelzeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.artikelzeile code { font-size: 15px; font-weight: 650; word-break: break-all; flex: 1 1 200px; user-select: all; }
