:root {
  --green: #1E6B47;
  --green-dark: #17553A;
  --green-tint: #E7F1EB;
  --warm: #C96A1B;
  --warm-ink: #9A4A0B;
  --warm-tint: #FDF0E1;
  --ink: #1B1F1C;
  --muted: #505A53;
  --line: #D6DDD8;
  --field: #9AA59E;
  --surface: #F4F7F5;
  --search: #F1F3F1;
  --danger: #A3261B;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 31, 28, .06), 0 4px 14px rgba(27, 31, 28, .06);
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #FFFFFF;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; background: #E9ECEA; font-size: 17px; line-height: 1.4; }
a { color: var(--green); }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(30, 107, 71, .45); outline-offset: 2px; }

.app {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
}

/* Marke */
.logo-mark { display: inline-flex; align-items: center; justify-content: center; background: var(--green); color: #FFFFFF; flex-shrink: 0; }
.brandbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px 6px; padding-top: max(14px, env(safe-area-inset-top)); }
.brandname { flex: 1; font-size: 23px; font-weight: 700; letter-spacing: -.01em; }

/* Kopfzeilen */
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: #FFFFFF; position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 20px; font-weight: 700; flex: 1; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0; }
.iconbtn.plain { border: 0; }
.iconbtn.solid { border: 0; background: var(--green); color: #FFFFFF; }

.address { display: flex; align-items: center; gap: 10px; margin: 4px 20px 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); }
.address small { display: block; font-size: 13px; color: var(--muted); line-height: 1.2; }
.address strong { display: block; font-size: 16px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { position: relative; padding: 0 20px 14px; }
.search svg { position: absolute; left: 34px; top: 15px; color: var(--muted); }
.search input { width: 100%; height: 52px; padding: 0 16px 0 46px; border: 0; border-radius: 26px; background: var(--search); font-size: 17px; }

.page { flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 18px 20px 28px; }
.page.tight { gap: 16px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section h2 { font-size: 20px; font-weight: 700; }
.section h3 { font-size: 17px; font-weight: 700; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hint { font-size: 15px; color: var(--muted); }
.textlink { font-weight: 700; text-decoration: none; }

/* Banner */
.banner { border-radius: 20px; background: var(--green); color: #FFFFFF; overflow: hidden; box-shadow: var(--shadow); }
.banner-photo { width: 100%; height: 168px; object-fit: cover; }
.banner-body { display: flex; gap: 12px; padding: 18px 18px 20px 20px; }
.banner h1 { font-size: 23px; line-height: 1.2; }
.banner p { font-size: 15px; margin-top: 6px; opacity: .95; }
.banner .pill { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 22px; background: #FFFFFF; color: var(--green); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.banner-body > svg { flex-shrink: 0; opacity: .5; }

/* Kategorien */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.2; }
.cat .bubble { width: 64px; height: 64px; border-radius: 32px; background: var(--green-tint); color: var(--green); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat .bubble.photo img { width: 100%; height: 100%; object-fit: cover; }
.cat.wish .bubble { background: var(--warm-tint); border: 2px solid var(--warm); color: var(--warm-ink); }
.cat.wish { font-weight: 700; }

/* Läden */
.scroller { display: flex; gap: 12px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 8px; scroll-snap-type: x mandatory; scroll-padding: 0 20px; }
.storecard { flex: 0 0 190px; scroll-snap-align: start; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--ink); text-decoration: none; background: #FFFFFF; }
.storecard .pic { height: 96px; background: var(--search); display: flex; align-items: center; justify-content: center; color: var(--green); }
.storecard .pic img { width: 100%; height: 100%; object-fit: cover; }
.storecard .txt { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.storecard strong { font-size: 17px; }
.storecard span { font-size: 14px; color: var(--muted); }

.list-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; background: #FFFFFF; border: 0; width: 100%; text-align: left; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row.card-row { border: 1px solid var(--line); border-radius: 16px; }
.list-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-row .grow strong { font-size: 17px; }
.list-row .grow span { font-size: 14px; color: var(--muted); }
.roundicon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; background: var(--green-tint); color: var(--green); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.roundicon img { width: 100%; height: 100%; object-fit: cover; }
.roundicon.big { width: 50px; height: 50px; border-radius: 25px; font-weight: 700; font-size: 20px; }
.roundicon.warmicon { width: 52px; height: 52px; border-radius: 26px; background: #FFFFFF; color: var(--warm-ink); border: 2px solid var(--warm); }

/* So geht's */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.how li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.how li > span:last-child { display: flex; flex-direction: column; }
.hownum { width: 34px; height: 34px; flex-shrink: 0; border-radius: 17px; background: var(--green); color: #FFFFFF; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Laden-Kopf */
.storehead { background: var(--search); padding: 12px 16px 16px; padding-top: max(12px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 12px; position: relative; }
.storehead.has-photo { padding-top: 0; }
.storehead-photo { width: calc(100% + 32px); margin: 0 -16px; height: 170px; object-fit: cover; }
.storehead.has-photo .storehead-top { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 16px; }
.storehead .iconbtn { border: 0; box-shadow: var(--shadow); }
.storehead .who { display: flex; align-items: center; gap: 14px; padding: 0 4px; }
.storehead .logo { width: 60px; height: 60px; border-radius: 16px; background: #FFFFFF; color: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.storehead h1 { font-size: 26px; line-height: 1.15; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 4px; }
.chip { padding: 6px 12px; border-radius: 16px; background: #FFFFFF; font-size: 14px; font-weight: 700; white-space: nowrap; }
.chip.solid { background: var(--green); color: #FFFFFF; }

/* Formulare */
label.lbl { font-size: 16px; font-weight: 700; display: block; margin-bottom: 6px; }
.field { width: 100%; height: 52px; padding: 0 14px; border: 1.5px solid var(--field); border-radius: 12px; background: #FFFFFF; font-size: 17px; }
textarea.field { height: auto; padding: 12px 14px; resize: none; line-height: 1.4; }
.field:focus, .search input:focus { outline: 3px solid rgba(30, 107, 71, .35); outline-offset: 1px; border-color: var(--green); }
.zipcity { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.okmsg { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 700; font-size: 15px; }
.warnmsg { color: var(--danger); font-weight: 700; font-size: 15px; }
.addrow { display: flex; gap: 8px; }
.addrow .field { flex: 1; min-width: 0; }
.addbtn { width: 52px; height: 52px; flex-shrink: 0; border: 0; border-radius: 12px; background: var(--green); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.addbtn:disabled { background: var(--field); }
.dashed { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1.5px dashed var(--field); border-radius: 12px; background: var(--surface); font-size: 16px; font-weight: 700; width: 100%; cursor: pointer; }
.photo-preview { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--muted); }
.photo-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* Auswahl-Knöpfe */
.opts { display: grid; gap: 8px; }
.opts.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt { min-height: 52px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.opt.round { border-radius: 24px; min-height: 48px; }
.opt[aria-pressed="true"] { border: 2px solid var(--green); background: var(--green-tint); }
.twobtn { display: flex; gap: 8px; margin-top: 4px; }
.twobtn > * { flex: 1; }
.linkbtn { display: flex; align-items: center; justify-content: center; text-decoration: none; }

.qchips { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); background: #FFFFFF; font-size: 16px; }
.qchip b { color: var(--green); }
.qchip[aria-pressed="true"] { border: 2px solid var(--green); background: var(--green-tint); }

/* Liste mit Menge */
.items { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.items li { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; }
.items li + li { border-top: 1px solid var(--line); }
.items .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qty { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 22px; background: #FFFFFF; font-size: 22px; line-height: 1; }
.qtyn { width: 26px; text-align: center; font-weight: 700; }

/* Unten fixierte Leiste */
.bottombar { position: sticky; bottom: 0; background: #FFFFFF; border-top: 1px solid var(--line); padding: 10px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--green); color: #FFFFFF; font-size: 18px; font-weight: 700; text-decoration: none; width: 100%; }
.cta.compact { min-height: 52px; font-size: 17px; }
.cta:disabled, .cta[aria-disabled="true"] { background: #9AA59E; }
.cta .count { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; background: #FFFFFF; color: var(--green); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.cta .grow { flex: 1; text-align: left; }
.ghost { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--field); background: #FFFFFF; font-weight: 700; font-size: 17px; width: 100%; color: var(--ink); text-decoration: none; }
.ghost.small-ghost { min-height: 46px; font-size: 16px; }
.ghost.danger { color: var(--danger); border-color: #E0B4AF; }

/* Navigation */
.tabbar { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #FFFFFF; padding: 6px 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted); text-decoration: none; font-size: 13px; position: relative; }
.tab[aria-current="page"] { color: var(--green); font-weight: 700; }
.tab .badge { position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--warm); color: #FFFFFF; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* Kästen */
.box { border-radius: var(--radius); background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.box.warm { background: var(--warm-tint); border: 1.5px solid #E2B76E; }
.box.line { background: #FFFFFF; border: 1px solid var(--line); }
.sum { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-weight: 700; }
.switch { position: relative; width: 56px; height: 32px; flex-shrink: 0; border: 0; border-radius: 16px; background: #9AA59E; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #FFFFFF; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { left: 27px; }
.error { color: var(--danger); font-weight: 700; font-size: 15px; }
.error:empty { display: none; }
.summary-link { cursor: pointer; font-weight: 700; color: var(--green); min-height: 32px; }
.bonimg { width: 100%; border-radius: 10px; margin-top: 8px; border: 1px solid var(--line); }

/* Verfolgen */
.map { position: relative; height: 260px; background: #E8ECE8; flex-shrink: 0; }
.map svg { display: block; width: 100%; height: 100%; }
.map .iconbtn { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; border: 0; box-shadow: var(--shadow); }
.sheet { margin-top: -22px; position: relative; background: #FFFFFF; border-radius: 22px 22px 0 0; }
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.progress span { height: 6px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--green); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font-size: 13px; color: var(--muted); }
.steps .on { color: var(--green); font-weight: 700; }
.stars { display: flex; gap: 6px; justify-content: center; }
.star { width: 48px; height: 48px; border: 0; background: none; padding: 0; color: #9AA59E; display: flex; align-items: center; justify-content: center; }
.star.on { color: var(--warm); }

/* Mehr */
.aboutcard { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--surface); }

/* Hilfe */
.chatbox { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 12px; border-radius: 16px; background: var(--surface); }
.bubble-row { display: flex; }
.bubble-row.me { justify-content: flex-end; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 16px; background: #FFFFFF; border: 1px solid var(--line); }
.bubble-row.me .msg { background: var(--green); color: #FFFFFF; border-color: var(--green); border-bottom-right-radius: 4px; }
.bubble-row.them .msg { border-bottom-left-radius: 4px; }
.msg-src { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.msg.typing { color: var(--muted); font-style: italic; }
.faqlist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq + .faq { border-top: 1px solid var(--line); }
.faq summary { padding: 14px 16px; font-weight: 700; cursor: pointer; list-style-position: inside; }
.faq p { padding: 0 16px 14px; color: var(--muted); font-size: 16px; }
.cbform { gap: 10px; }

/* Rechtliches */
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.legal-links a { color: var(--muted); }
.legaltext { font-size: 16px; line-height: 1.55; }
.legaltext p + p { margin-top: 10px; }
.legallist { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; }

.empty { text-align: center; padding: 40px 10px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty svg { color: var(--green); }

/* Konto: Willkommen, Anmelden, Registrieren */
.welcome { justify-content: center; gap: 20px; padding-top: max(40px, env(safe-area-inset-top)); }
.welcome-top { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.welcome-top h1 { font-size: 32px; letter-spacing: -.01em; }
.welcome-slogan { font-size: 19px; color: var(--muted); }
.welcome-photo { width: 100%; height: 190px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.benefits li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-weight: 700; }
.benefits svg { color: var(--green); flex-shrink: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.auth { gap: 18px; }
.center { text-align: center; align-self: center; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.checkline input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--green); flex-shrink: 0; }
.codefield { font-size: 26px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.cta.danger-cta { background: var(--danger); }

/* Test-Zahlung */
.overlay { position: fixed; inset: 0; background: rgba(27, 31, 28, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.paysheet { background: #FFFFFF; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 22px 20px; padding-bottom: max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.paysheet h2 { font-size: 22px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 24px; font-size: 16px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; text-align: center; z-index: 50; }
.toast.show { opacity: 1; }

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

/* Bestellliste: Nochmal bestellen */
.orderrow + .orderrow { border-top: 1px solid var(--line); }
.orderrow .list-row + .reorder { margin: -4px 14px 12px 70px; }
.reorder { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: #FFFFFF; color: var(--green); font-weight: 700; font-size: 15px; }
