/* Einkauf – Styles. Mobile first, hell/dunkel automatisch. */
:root {
  --bg: #f5f5f4; --surface: #ffffff; --surface2: #f0efed; --text: #1c1917; --muted: #78716c;
  --line: #e7e5e4; --accent: #16a34a; --accent-ink: #ffffff; --danger: #dc2626; --warn: #f59e0b;
  --tile-open: #ffffff; --tile-done: #ecebea; --shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211; --surface: #1f1d1b; --surface2: #292725; --text: #f5f5f4; --muted: #a8a29e;
    --line: #34312e; --tile-open: #262422; --tile-done: #1b1a18; --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
body.sheet-open, body.scanning { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: .6rem 1rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-small { padding: .3rem .6rem; font-size: .85rem; border-radius: 8px; }
.icon-btn {
  border: 0; background: transparent; width: 42px; height: 42px; border-radius: 12px;
  display: inline-grid; place-items: center; font-size: 1.25rem;
}
.icon-btn svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
.icon-btn:active, .icon-btn.active { background: var(--surface2); }
.icon-btn.active { box-shadow: inset 0 0 0 2px var(--accent); }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: inherit; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .4rem;
  padding: calc(.5rem + env(safe-area-inset-top)) .75rem .5rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
}
.list-switch {
  border: 0; background: none; font-size: 1.3rem; font-weight: 750; padding: .2rem .1rem;
  max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.caret { color: var(--muted); font-size: .9rem; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; transition: background .3s; }
.live.off { background: var(--danger); }
.top-actions { margin-left: auto; display: flex; gap: .15rem; }

/* ---------- Reiter ---------- */
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem .75rem .5rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  --tab-color: var(--accent);
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: .35rem .85rem; font-weight: 600; font-size: .92rem; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; gap: .35rem;
}
.tab.active { background: var(--tab-color); border-color: var(--tab-color); color: #fff; }
.tab-count {
  font-size: .75rem; min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; text-align: center;
  background: color-mix(in srgb, var(--tab-color) 18%, transparent);
}
.tab.active .tab-count { background: rgba(255,255,255,.28); }

/* ---------- Eingabe ---------- */
.add-bar { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 15; padding: 0 .75rem .5rem; background: var(--bg); }
#addForm { display: flex; gap: .5rem; }
#addInput {
  flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: .75rem .9rem; font-size: 1.05rem; outline: none;
}
#addInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.add-go { width: 50px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-size: 1.6rem; font-weight: 300; }
.suggest {
  position: absolute; left: .75rem; right: .75rem; margin-top: .35rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.18); overflow: hidden;
}
.sug {
  width: 100%; display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 0;
  border-bottom: 1px solid var(--line); background: none; text-align: left;
}
.sug:last-child { border-bottom: 0; }
.sug.sel, .sug:hover { background: var(--surface2); }
.sug-icon { width: 1.5rem; text-align: center; }
.sug-name { flex: 1; font-weight: 600; }
.sug-new .sug-name { font-weight: 500; }
.sug-tag { font-size: .75rem; color: var(--muted); }
.sug-store, .tile-store {
  --store: var(--muted);
  font-size: .72rem; font-weight: 650; padding: .05rem .45rem; border-radius: 999px;
  background: color-mix(in srgb, var(--store) 18%, transparent); color: color-mix(in srgb, var(--store) 75%, var(--text));
}

/* ---------- Liste ---------- */
main { padding: 0 .75rem 2rem; max-width: 1100px; margin: 0 auto; }
.cat-title {
  --cat: var(--muted);
  margin: 1rem 0 .45rem; font-size: .88rem; font-weight: 700; letter-spacing: .02em; color: var(--muted);
  display: flex; align-items: center; gap: .15rem;
}
.cat-title::after { content: ""; flex: 1; height: 2px; margin-left: .5rem; border-radius: 2px; background: color-mix(in srgb, var(--cat) 35%, transparent); }
.cat-title small { font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; }
.tile {
  --cat: var(--accent);
  position: relative; aspect-ratio: 1 / 1; border: 0; border-radius: var(--radius); padding: .5rem .35rem .45rem;
  background: var(--tile-open); box-shadow: var(--shadow); border-top: 4px solid var(--cat);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  text-align: center; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overflow: hidden;
  transition: transform .16s ease, opacity .16s ease;
}
.tile:active { transform: scale(.95); }
.tile.leaving { transform: scale(.6); opacity: 0; }
.tile-icon { font-size: 1.9rem; line-height: 1; }
.tile-img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; }
.tile-name { font-weight: 650; font-size: .92rem; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-sub { font-size: .75rem; color: var(--muted); line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-store { margin-top: .1rem; }
.tile-by { font-size: .62rem; color: var(--muted); opacity: .85; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: auto; }
.tile .tile-icon, .tile .tile-img { margin-top: auto; }
.tile > :last-child:not(.tile-by) { margin-bottom: auto; }
.tile.unknown { border-top-color: var(--warn); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 45%, transparent); } }

.recent-sec { margin-top: 1.6rem; }
.sec-title { font-size: .9rem; color: var(--muted); margin: 0 0 .5rem; }
.grid-recent { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.tile.done { background: var(--tile-done); box-shadow: none; border-top-color: transparent; opacity: .82; aspect-ratio: auto; min-height: 84px; }
.tile.done .tile-icon { font-size: 1.4rem; filter: grayscale(.4); }
.tile.done .tile-img { width: 32px; height: 32px; }
.tile.done .tile-name { font-weight: 550; font-size: .82rem; }
.empty { text-align: center; color: var(--muted); font-size: 1.1rem; padding: 3rem 0 1rem; }

/* ---------- Laden-Modus ---------- */
body.shop .add-bar { display: none; }
body.shop .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .65rem; }
body.shop .tile-name { font-size: 1.1rem; }
body.shop .tile-sub { font-size: .88rem; }
body.shop .tile-icon { font-size: 2.3rem; }
body.shop .topbar { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: #1c1917; color: #fff; padding: .7rem 1rem; border-radius: 12px; display: flex; gap: 1rem; align-items: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.3); max-width: calc(100vw - 2rem); font-size: .95rem;
}
.toast-btn { border: 0; background: none; color: #86efac; font-weight: 700; padding: 0; }

/* ---------- Sheet ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: .5rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.2); max-width: 640px; margin: 0 auto; animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: .4; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: .2rem auto .6rem; }
.sheet-title { margin: .2rem 0 .8rem; font-size: 1.2rem; }
.sheet-img { display: block; max-height: 110px; max-width: 50%; margin: 0 auto .8rem; border-radius: 10px; background: #fff; }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .7rem; font-size: .85rem; color: var(--muted); }
.field input, .field select, .inline-add input, .inline-add select, .store-row input, .auth-card input, .form-grid input, .form-grid select, .search-row input, .cat-row input {
  border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: .6rem .7rem; font-size: 1rem; color: var(--text); min-width: 0;
}
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; }
.field input, .field select { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.3rem 0 .8rem; }
.chip { border: 1px solid var(--line); background: var(--surface2); border-radius: 999px; padding: .25rem .65rem; font-size: .85rem; }
.chip-clear { color: var(--muted); }
.row-bc { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .2rem 0 .6rem; font-size: .9rem; }
.sheet-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .8rem; }
.sheet-actions .btn-danger { margin-right: auto; }
.menu { display: flex; flex-direction: column; }
.menu-item { text-align: left; border: 0; background: none; padding: .85rem .25rem; border-bottom: 1px solid var(--line); font-size: 1rem; color: inherit; text-decoration: none; }
.menu-item.danger { color: var(--danger); }
.menu hr { border: 0; height: .5rem; }
.list-rows { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .8rem; }
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; text-align: left;
  border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: .7rem .8rem; font-weight: 600;
}
.list-row.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.list-row .muted { font-weight: 400; font-size: .85rem; }
.row-btns { display: inline-flex; gap: .3rem; flex: none; }
.inline-add { display: flex; gap: .5rem; }
.inline-add input, .inline-add select { flex: 1; }
.store-row { display: flex; gap: .35rem; align-items: center; margin-bottom: .45rem; }
.store-row input[type=text], .store-row input:not([type]) { flex: 1; }
.store-row input[type=color], .cat-row input[type=color] { width: 44px; height: 40px; padding: 2px; }
.badge { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.badge-off { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }

/* ---------- Scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 70; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: absolute; left: 10%; right: 10%; top: 50%; height: 30%; transform: translateY(-50%);
  border: 3px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45);
}
.scan-frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%,100% { transform: translateY(-40px); } 50% { transform: translateY(40px); } }
.scan-top { position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: .75rem; }
.scan-mode { color: #fff; font-weight: 700; background: rgba(0,0,0,.45); padding: .35rem .8rem; border-radius: 999px; }
.icon-btn.light, .btn.light { color: #fff; }
.scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .7rem; }
.scan-msg { align-self: center; background: rgba(0,0,0,.65); color: #fff; padding: .6rem 1rem; border-radius: 12px; font-weight: 600; text-align: center; }
.scan-msg.ok { background: rgba(22,163,74,.9); }
.scan-msg.warn { background: rgba(217,119,6,.92); }
.scan-controls { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; align-items: center; }
.switch { color: #fff; display: inline-flex; gap: .4rem; align-items: center; background: rgba(0,0,0,.45); padding: .45rem .8rem; border-radius: 999px; }
.scan-controls .btn { background: rgba(0,0,0,.45); }

/* ---------- Login & Verwaltung ---------- */
.page-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; padding: 1rem; }
.auth-card { width: min(360px, 100%); background: var(--surface); border-radius: 18px; padding: 1.6rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .8rem; }
.auth-card h1 { margin: 0 0 .3rem; text-align: center; }
.auth-logo { width: 88px; height: 88px; margin: 0 auto .2rem; border-radius: 20px; }
.auth-card label, .form-grid label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
.auth-card label.check, .form-grid label.check { flex-direction: row; align-items: center; gap: .5rem; color: var(--text); font-size: .95rem; }
.alert { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); padding: .6rem .8rem; border-radius: 10px; margin: 0 0 .8rem; }
.notice { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); padding: .6rem .8rem; border-radius: 10px; margin: 0 0 .8rem; }
.admin-head { display: flex; align-items: center; gap: .5rem; padding: calc(.6rem + env(safe-area-inset-top)) .75rem .2rem; }
.admin-head h1 { font-size: 1.3rem; margin: 0; }
.admin-main { padding: .5rem .75rem 3rem; max-width: 860px; margin: 0 auto; }
.card { background: var(--surface); border-radius: 16px; padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card h2 { margin: 0 0 .8rem; font-size: 1.1rem; }
.form-grid { display: grid; gap: .7rem; }
.form-grid fieldset { border: 1px solid var(--line); border-radius: 10px; }
.form-grid .btn { justify-self: start; }
.row-details { border-top: 1px solid var(--line); padding: .6rem 0; }
.row-details summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.row-details summary small.muted { flex-basis: 100%; }
.row-details[open] { padding-bottom: 1rem; }
.row-details .form-grid { margin: .8rem 0; }
.inline-form { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.cat-row { display: flex; gap: .35rem; align-items: center; margin-bottom: .45rem; }
.cat-row input[name=name] { flex: 1; }
.in-icon { width: 3.2rem; text-align: center; }
.in-sort { width: 4.5rem; }
.search-row { display: flex; gap: .5rem; margin-bottom: .6rem; }
.search-row input { flex: 1; }
.admin-tabs { padding-top: .5rem; }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
  .sheet { bottom: auto; top: 8vh; border-radius: 20px; }
}

/* ---------- Branding ---------- */
.top-logo { width: 34px; height: 34px; border-radius: 9px; flex: none; margin-left: .2rem; }
.admin-head .top-logo { margin-left: auto; }
.site-footer {
  text-align: center; font-size: .85rem; color: var(--muted);
  padding: 1.2rem 1rem calc(4.5rem + env(safe-area-inset-bottom));
}
.page-auth .site-footer, .page-admin .site-footer { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
.site-footer a { color: inherit; font-weight: 600; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); }
.site-footer a:hover { color: var(--text); }
.heart { width: 1em; height: 1em; fill: #e11d48; vertical-align: -.14em; animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .heart { animation: none; } }
body.shop .site-footer { display: none; }

/* ---------- Listen & Geschäfte ---------- */
.sheet-sub { font-size: .95rem; margin: 1.2rem 0 .5rem; }
.list-row-2 { flex-direction: column; align-items: stretch; gap: .15rem; }
.lr-main { display: flex; justify-content: space-between; gap: .5rem; }
.lr-stores { font-weight: 400; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-preset { font-weight: 600; }
.new-list .chips { margin-top: -.3rem; }
.store-row input[name], .store-row input:not([type]) { flex: 1; }
.updown { flex-direction: column; gap: 2px; }
.updown .btn-small { padding: 0 .45rem; font-size: .7rem; line-height: 1.35; }

/* =====================================================================
   Listenansicht im Stil der HA-Einkaufslisten-Karte
   ===================================================================== */
:root { --blue: #0ea5e9; --note-bg: #fef3c7; --note-ink: #78350f; --fresh-bg: #e0f2fe; }
@media (prefers-color-scheme: dark) {
  :root { --note-bg: #3a2e12; --note-ink: #fcd34d; --fresh-bg: #0c2a3a; }
}

/* Kopfzeile: Zähler offener Artikel */
.open-count {
  background: var(--blue); color: #fff; font-weight: 700; font-size: .8rem;
  min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; border-radius: 999px;
  display: inline-grid; place-items: center; flex: none;
}

/* Reiter: umrandet in Geschäftsfarbe, aktiv gefüllt */
.tab { border: 1.5px solid color-mix(in srgb, var(--tab-color) 55%, var(--line)); }
.tab-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--tab-color, var(--store, var(--muted))); flex: none; }
.tab.active .tab-dot { background: #fff; }
.tab-count { background: transparent !important; color: var(--muted); font-weight: 500; padding: 0; min-width: 0; }
.tab.active .tab-count { color: rgba(255,255,255,.85); }
.badge-new { background: #e11d48; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .05rem .4rem; line-height: 1.3; }

/* Klapp-Pfeil */
.chev { width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; flex: none; opacity: .7; }
.closed > .cat-head .chev, .recent-sec.closed .recent-head .chev { transform: rotate(-45deg); }

/* Kategorie-Kopf */
.cat-sec { margin-top: .9rem; }
.cat-head {
  width: 100%; display: flex; align-items: center; gap: .5rem; border: 0; background: none; padding: .4rem .15rem;
  color: var(--muted); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left;
}
.cat-head .cat-icon { font-size: 1rem; letter-spacing: 0; }
.cat-head .cat-name { flex: 1; }
.cat-count { font-weight: 500; letter-spacing: 0; color: var(--muted); }
.cat-sec.closed { margin-bottom: -.2rem; }

/* Zeilen */
.rows { display: flex; flex-direction: column; gap: .4rem; }
.row {
  position: relative; display: flex; align-items: center; gap: .75rem; padding: .6rem .5rem .6rem .8rem;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow);
  border-left: 4px solid var(--cat); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .16s ease, opacity .16s ease, background .2s;
}
.row:active { transform: scale(.985); }
.row.leaving { transform: translateX(40%); opacity: 0; }
.row:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.row-check { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--blue); flex: none; display: grid; place-items: center; }
.row-body { flex: 1; min-width: 0; }
.row-line { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.row-name { font-size: 1.08rem; font-weight: 550; overflow-wrap: anywhere; }
.qty { font-size: .85rem; background: var(--surface2); border-radius: 7px; padding: .05rem .45rem; font-variant-numeric: tabular-nums; }
.row-img { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; background: #fff; }
.row-meta { display: flex; align-items: center; gap: .35rem .5rem; flex-wrap: wrap; margin-top: .2rem; font-size: .8rem; color: var(--muted); }
.pill { border-radius: 6px; padding: .02rem .45rem; font-weight: 550; font-size: .78rem; line-height: 1.45; }
.pill-store { background: color-mix(in srgb, var(--store) 20%, transparent); color: color-mix(in srgb, var(--store) 70%, var(--text)); }
.pill-note { background: var(--note-bg); color: var(--note-ink); }
.meta-bc { opacity: .75; }
.spark { font-size: 1rem; }
.row-move {
  border: 0; background: none; color: var(--muted); font-size: 1.25rem; width: 40px; height: 40px; border-radius: 10px; flex: none;
}
.row-move:active { background: var(--surface2); }
.row.fresh { background: var(--fresh-bg); }
.row.unknown { border-left-color: var(--warn); animation: pulse 1.6s ease-in-out infinite; }

/* Erledigt-Bereich */
.recent-sec { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.recent-head {
  width: 100%; display: flex; align-items: center; gap: .55rem; border: 0; background: none; padding: .5rem .15rem;
  color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left;
}
.recent-title { flex: 1; }
.recent-hint { margin: -.2rem 0 .3rem .15rem; font-size: .82rem; color: var(--muted); }
.cat-sec-done { margin-top: .2rem; padding-left: .5rem; }
.cat-sec-done .cat-head { font-size: .75rem; }
.row.done { box-shadow: none; background: var(--tile-done); border-left-color: color-mix(in srgb, var(--cat) 45%, transparent); }
.row.done .row-name { color: var(--muted); font-weight: 500; }
.row.done .row-check { border-color: var(--muted); background: var(--muted); opacity: .55; }
.row.done .row-check::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }

/* Laden-Modus */
.shop-banner {
  display: flex; align-items: center; gap: .75rem; margin: .4rem 0 .2rem; padding: .7rem .9rem; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); font-weight: 700;
}
.shop-banner-text { flex: 1; }
.shop-banner-icon { font-size: 1.4rem; }
body.shop .row { padding: 1rem .6rem 1rem .9rem; }
body.shop .row-name { font-size: 1.3rem; font-weight: 650; }
body.shop .row-check { width: 36px; height: 36px; border-width: 3px; }
body.shop .row-move { font-size: 1.45rem; }

/* Kacheln-Ansicht: Kategorie-Köpfe teilen sich die Klapp-Logik */
body.view-tiles .cat-sec .grid { margin-top: .2rem; }

/* ⇄ Geschäft wählen */
.store-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.store-pick-btn {
  --store: var(--muted);
  display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1rem; border-radius: 999px; font-weight: 650;
  border: 1.5px solid color-mix(in srgb, var(--store) 55%, var(--line)); background: var(--surface);
}
.store-pick-btn .tab-dot { background: var(--store); }
.store-pick-btn.active { background: var(--store); color: #fff; border-color: var(--store); }
.store-pick-btn.active .tab-dot { background: #fff; }

/* ---------- Offline & Abgleich ---------- */
.sync-bar { margin: .4rem 0 .2rem; padding: .6rem .85rem; border-radius: 12px; font-size: .9rem; font-weight: 600; }
.sync-bar.offline { background: color-mix(in srgb, var(--warn) 20%, var(--surface)); color: color-mix(in srgb, var(--warn) 55%, var(--text)); }
.sync-bar.pending { background: color-mix(in srgb, var(--blue) 14%, var(--surface)); }
.meta-pending { font-size: .8rem; }
.live.off { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }

/* ---------- Doppelt-Finder ---------- */
.dupe-bar {
  margin: .5rem 0 .2rem; padding: .7rem .85rem; border-radius: 12px; display: flex; flex-direction: column; gap: .5rem;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); font-size: .92rem;
}
.dupe-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Vorschläge ---------- */
.sug-dym { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.sug-dym .sug-name { font-weight: 600; }
.sug-alias { color: var(--muted); font-weight: 500; }

/* ---------- Verlauf ---------- */
.hist-search { margin: .6rem 0 .3rem; }
.hist-search input, .sheet .row2 select { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: .55rem .7rem; font-size: .95rem; color: var(--text); }
.hist { display: flex; flex-direction: column; }
.hist-day { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .3rem; }
.hist-row { display: grid; grid-template-columns: 3rem 1.6rem 1fr; gap: .3rem; align-items: start; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hist-time { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .05rem; }
.hist-icon { text-align: center; }
.hist-detail { color: var(--muted); font-size: .82rem; margin-top: .1rem; overflow-wrap: anywhere; }
.hist-deleted .hist-body > div:first-child { color: var(--danger); }

/* ---------- "Steht schon drauf" ---------- */
.exist-info { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: -.3rem 0 1rem; font-size: .9rem; }
.exist-actions { display: flex; flex-direction: column; gap: .5rem; }
.btn-big { justify-content: flex-start; padding: .8rem 1rem; font-size: 1rem; width: 100%; }
.exist-edit { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.exist-edit .sheet-actions { margin-top: 0; }
.exist-more { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.exist-more p { margin: 0 0 .5rem; }

/* ---------- Produkt-Icons ---------- */
.row-icon { font-size: 1.25rem; line-height: 1; flex: none; }
body.shop .row-icon { font-size: 1.55rem; }
.row.done .row-icon { filter: grayscale(.5); opacity: .75; }
.edit-icon { font-size: 1.4rem; }
.icon-box { margin: .2rem 0 .8rem; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .75rem; }
.icon-box summary { cursor: pointer; font-size: .9rem; color: var(--muted); font-weight: 600; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: .3rem; margin-top: .6rem; max-height: 220px; overflow-y: auto; }
.icon-pick { height: 42px; border: 1px solid transparent; border-radius: 10px; background: var(--bg); font-size: 1.35rem; display: grid; place-items: center; padding: 0; }
.icon-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.icon-auto { display: flex; flex-direction: column; align-items: center; line-height: 1; font-size: 1.1rem; }
.icon-auto small { font-size: .55rem; color: var(--muted); margin-top: 1px; }

/* ---------- Angebote ---------- */
:root { --offer: #ea580c; }
@media (prefers-color-scheme: dark) { :root { --offer: #fb923c; } }
.pill-offer { background: color-mix(in srgb, var(--offer) 16%, transparent); color: var(--offer); font-weight: 700; }
.fav-box { margin: .2rem 0 .8rem; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .75rem; }
.fav-box summary { cursor: pointer; font-size: .9rem; color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
.fav-box[open] summary { margin-bottom: .7rem; }
.offer-mini { list-style: none; padding: 0; margin: .2rem 0 .2rem; display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.offer-mini strong { color: var(--offer); }
.check-line { display: flex; align-items: center; gap: .5rem; font-size: .92rem; margin: -.3rem 0 .6rem; }
.offer-store { display: flex; align-items: center; gap: .45rem; margin: 1rem 0 .4rem; font-size: .95rem; }
.offer-store .tab-dot { background: var(--store); }
.offer-store small { color: var(--muted); font-weight: 500; }
.offer-rows { display: flex; flex-direction: column; gap: .35rem; }
.offer-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 12px; background: var(--bg); }
.offer-icon { font-size: 1.35rem; flex: none; }
.offer-main { flex: 1; min-width: 0; font-size: .92rem; }
.offer-main > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; margin-top: .15rem; font-size: .82rem; }
.offer-price { font-weight: 800; color: var(--offer); font-size: .95rem; }
.offer-without { margin-top: 1rem; }
.offer-without summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.offer-foot { margin-top: 1rem; }
.empty-offers { color: var(--muted); text-align: center; padding: 1.2rem 0; }

/* ---------- Verwaltung: Angebote ---------- */
.retailer-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.form-grid label.retailer-chip { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; background: var(--bg); font-size: .92rem; gap: .4rem; }
.form-grid label.retailer-chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.card code { font-size: .85em; background: var(--surface2); padding: .05rem .3rem; border-radius: 4px; }

/* Checkboxen/Radios nicht wie Textfelder behandeln (sonst in Flex-Zeilen 0 px breit) */
input[type=checkbox], input[type=radio] { flex: none; width: 18px; height: 18px; min-width: 18px; padding: 0; margin: 0; accent-color: var(--accent); }

/* ---------- Favoriten ---------- */
.fav-sync { margin: -.3rem 0 .6rem; font-size: .9rem; line-height: 1.45; }
.fav-sync.old { color: var(--warn); }
.fav-filter { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.fav-filter .tab { font-size: .85rem; }
.fav-bulk { margin: .2rem 0 .5rem; }
.fav-bulk-btn { width: 100%; justify-content: center; }
.fav-list { display: flex; flex-direction: column; gap: .4rem; }
.fav-row { background: var(--bg); border-radius: 12px; padding: .55rem .5rem .55rem .6rem; border-left: 4px solid transparent; }
.fav-row.has-offer { border-left-color: var(--offer); }
.fav-row.on-list { opacity: .78; }
.fav-top { display: flex; align-items: center; gap: .55rem; }
.fav-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-star { font-size: .85rem; }
.fav-on { color: var(--accent); }
.fav-dots { font-size: 1.2rem; padding: .2rem .45rem; color: var(--muted); }
.fav-more { margin: .55rem 0 .1rem 2rem; display: flex; flex-direction: column; gap: .5rem; }
.fav-more-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.fav-more .chip { cursor: pointer; }

/* ---------- Ausgaben & Kassenbons ---------- */
.price-box summary { color: var(--text); font-weight: 600; }
.price-hist { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; grid-template-columns: auto 1fr auto; gap: .25rem .8rem; font-size: .9rem; }
.price-hist li { display: contents; }
.price-normal.cheaper { text-decoration: line-through; }
.spend-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.spend-nav strong { font-size: 1.05rem; }
.spend-nav .btn { min-width: 44px; justify-content: center; font-size: 1.1rem; }
.spend-total { display: flex; flex-direction: column; align-items: center; margin: .2rem 0 1rem; }
.spend-total strong { font-size: 2rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.spend-bars { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1rem; }
.spend-bar { display: grid; grid-template-columns: minmax(4.5rem, 7rem) 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.spend-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spend-bar-track { height: 10px; background: var(--surface2); border-radius: 5px; overflow: hidden; }
.spend-bar-fill { display: block; height: 100%; background: var(--store, var(--accent)); border-radius: 5px; }
.spend-bar-sum { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; min-width: 4.5rem; }
.spend-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 84px; align-items: end; margin: .4rem 0 .8rem; }
.spend-col { border: 0; background: transparent; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 3px; }
.spend-col-bar { display: block; background: color-mix(in srgb, var(--accent) 35%, var(--surface2)); border-radius: 4px 4px 2px 2px; min-height: 2px; }
.spend-col.on .spend-col-bar { background: var(--accent); }
.spend-col-label { font-size: .68rem; color: var(--muted); text-align: center; }
.spend-col.on .spend-col-label { color: var(--text); font-weight: 700; }
.spend-actions { flex-wrap: wrap; }
.spend-actions .btn { flex: 1 1 auto; justify-content: center; }
.spend-mail { margin-top: 1rem; }
.spend-mail.bad { color: var(--danger); }
.receipt-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.receipt-row { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: .6rem; align-items: center; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: .6rem .75rem; width: 100%; }
.receipt-row:last-child { border-bottom: 0; }
.receipt-date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.receipt-date small { color: var(--muted); font-size: .72rem; }
.receipt-main { display: flex; flex-direction: column; min-width: 0; }
.receipt-main small { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.receipt-sum, .bon-price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.store-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; vertical-align: .05em; }
.pill-warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: color-mix(in srgb, var(--warn) 65%, var(--text)); }
.pill-prod { background: color-mix(in srgb, var(--accent) 14%, transparent); color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.warn-text { color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.bon-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .4rem; }
.bon-total { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.bon-lines { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: .4rem; }
.bon-line { display: flex; justify-content: space-between; gap: .8rem; align-items: center; text-align: left; width: 100%;
  border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: .5rem .75rem; }
.bon-line:last-child { border-bottom: 0; }
.bon-line.extra { background: var(--surface2); }
.bon-line.ignored .bon-name > span:first-child { color: var(--muted); text-decoration: line-through; }
.bon-name { display: flex; flex-wrap: wrap; gap: .25rem .45rem; align-items: center; min-width: 0; }
.map-results { display: flex; flex-direction: column; gap: .35rem; margin: .2rem 0 .6rem; }
.map-opt { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: .55rem .75rem; }
.map-opt.on { border-color: var(--accent); }
.map-opt.new { border-style: dashed; color: var(--accent); font-weight: 600; }

/* ---------- Verwaltung: Status ---------- */
.status-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: .4rem 0 .8rem; }
.status-table th, .status-table td { text-align: left; vertical-align: top; padding: .45rem .4rem; border-bottom: 1px solid var(--line); }
.status-table th { font-weight: 600; white-space: nowrap; padding-right: .8rem; }
.status-table .st-dot { width: 1.6rem; }
.status-table tr.st-crit td:last-child { color: var(--danger); font-weight: 600; }
.status-table tr.st-info td:last-child { color: var(--muted); }
@media (max-width: 520px) {
  .status-table tr { display: grid; grid-template-columns: 1.6rem 1fr; }
  .status-table td:last-child { grid-column: 2; padding-top: 0; }
  .status-table th, .status-table td { border-bottom: 0; }
  .status-table tr { border-bottom: 1px solid var(--line); }
}
.err-list { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .8rem; }
.err-row { border: 1px solid var(--line); border-radius: 10px; padding: .45rem .65rem; }
.err-row summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.err-msg { flex: 1 1 14rem; overflow-wrap: anywhere; }
.err-server { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.err-cron { background: color-mix(in srgb, var(--warn) 22%, transparent); color: color-mix(in srgb, var(--warn) 65%, var(--text)); }
.err-client { background: var(--surface2); color: var(--muted); }
.cron-box { background: var(--surface2); border-radius: 10px; padding: .7rem .8rem; overflow-x: auto; font-size: .8rem; white-space: pre; }

/* ---------- Bon-Foto & Kontrollansicht ---------- */
.photo-strip { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem 0 .6rem; }
.photo-thumb { position: relative; flex: none; width: 92px; height: 128px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface2); padding: 0; }
.photo-strip.small .photo-thumb { width: 64px; height: 88px; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-no { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 6px; padding: 0 .35rem; }
.photo-del { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; line-height: 1; }
.photo-viewer { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: calc(2.6rem + env(safe-area-inset-top)) .5rem 1rem; }
.photo-viewer img { max-width: 100%; height: auto; }
.photo-viewer-close { position: fixed; top: calc(.6rem + env(safe-area-inset-top)); right: .8rem; color: #fff; font-weight: 600; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
.edit-check { border-radius: 10px; padding: .5rem .7rem; font-size: .9rem; font-weight: 600; margin: .2rem 0 .4rem; background: var(--surface2); }
.edit-check.ok { background: color-mix(in srgb, var(--accent) 14%, transparent); color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.edit-check.bad { background: color-mix(in srgb, var(--warn) 22%, transparent); color: color-mix(in srgb, var(--warn) 60%, var(--text)); }
.edit-lines { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .5rem; }
.edit-line { display: grid; grid-template-columns: 2.2rem 1fr 5.2rem 2rem; gap: .35rem; align-items: center; }
.edit-line input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .5rem; background: var(--surface); }
.edit-kind, .edit-del { border: 0; background: transparent; padding: 0; height: 2.2rem; font-size: 1.05rem; border-radius: 8px; }
.edit-kind { background: var(--surface2); }
.edit-del { color: var(--muted); font-size: 1.3rem; }
.edit-qty { grid-column: 2 / 4; margin-top: -.25rem; }
.row-shop { display: grid; grid-template-columns: 1fr 6.5rem; gap: .5rem; }
.row-shop input, .row2 input { min-width: 0; width: 100%; }
.ocr-raw { margin: .8rem 0; font-size: .85rem; }
.ocr-raw pre { white-space: pre-wrap; background: var(--surface2); border-radius: 8px; padding: .6rem; max-height: 40vh; overflow: auto; font-size: .78rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: .6rem 0 calc(.4rem + env(safe-area-inset-bottom)); margin-bottom: 0; }

/* ---------- API-Zugänge ---------- */
.token-new { border: 1.5px solid var(--accent); border-radius: 12px; padding: .7rem; margin: .5rem 0 1rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.token-code { display: block; width: 100%; word-break: break-all; background: var(--surface2); border-radius: 8px; padding: .5rem .6rem; font-size: .85rem; user-select: all; }
.token-add { align-self: end; margin-bottom: .35rem; }

/* ======================================================================
   2026-11-18: Rückruf, Laufweg, Öffnungszeiten, War nicht da, Karten, Menge, Apps
   ====================================================================== */

/* ⚠️ Rückruf-Warnung */
.recall-bar { display: flex; flex-direction: column; gap: .5rem; margin: .4rem 0 .6rem; }
.recall {
  border-radius: 14px; padding: .75rem .9rem; border: 1.5px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
}
.recall-hot { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, var(--surface)); }
.recall-title { font-weight: 700; line-height: 1.3; }
.recall-meta { font-size: .85rem; margin-top: .2rem; font-weight: 600; color: color-mix(in srgb, var(--danger) 75%, var(--text)); }
.recall-reason { font-size: .85rem; color: var(--muted); margin-top: .15rem; }
.recall-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .55rem; }

/* 🕐 Öffnungszeiten im Reiter */
.tab-hours { font-size: .72rem; font-weight: 650; border-radius: 999px; padding: .02rem .4rem; line-height: 1.35; }
.tab-hours.open { background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.tab-hours.soon { background: color-mix(in srgb, var(--warn) 25%, transparent); color: color-mix(in srgb, var(--warn) 55%, var(--text)); }
.tab-hours.closed { background: var(--surface2); color: var(--muted); }
.tab.active .tab-hours { background: rgba(255,255,255,.25); color: #fff; }

/* ⚙️ Geschäft: Zeiten & Laufweg */
.sheet-sub { font-size: 1rem; margin: 1.1rem 0 .3rem; }
.hours { display: flex; flex-direction: column; gap: .35rem; }
.hours-row { display: grid; grid-template-columns: 4.2rem 1fr auto 1fr; gap: .4rem; align-items: center; }
.hours-row input[type=time] {
  min-width: 0; width: 100%; padding: .4rem .45rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.hours-row input[type=time]:disabled { opacity: .4; }
.hours-day { display: flex; align-items: center; gap: .35rem; font-weight: 650; }
.hours-tools { margin: .5rem 0; }
label.check { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; font-size: .95rem; }
.walk { display: flex; flex-direction: column; gap: .3rem; }
.walk-row {
  display: flex; align-items: center; gap: .55rem; padding: .35rem .5rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--cat);
}
.walk-n { width: 1.5rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.walk-name { flex: 1; font-weight: 550; }
.walk-row .btn:disabled { opacity: .3; }

/* ❌ War nicht da */
.pill-missing { background: color-mix(in srgb, var(--danger) 13%, transparent); color: color-mix(in srgb, var(--danger) 75%, var(--text)); }
.btn-missing { width: 100%; justify-content: center; margin: .2rem 0 .8rem; border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.btn-missing:disabled { color: var(--accent); border-color: var(--accent); }
.miss-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }

/* ➕➖ Menge per Tippen */
.qty-tap { border: 1px dashed color-mix(in srgb, var(--muted) 60%, transparent); color: inherit; cursor: pointer; }
.stepper {
  display: inline-flex; align-items: center; gap: .15rem; background: var(--surface2); border-radius: 999px; padding: .1rem;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.stepper-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface); font-size: 1.15rem; font-weight: 700;
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.stepper-btn:active { background: var(--accent); color: var(--accent-ink); }
.stepper-val { min-width: 3.4rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }

/* 💳 Kundenkarten */
.lcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.lcard-wrap { position: relative; }
.lcard {
  --card: #2563eb;
  width: 100%; aspect-ratio: 1.586; border: 0; border-radius: 14px; padding: .75rem; text-align: left; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--card) 60%, #000)); box-shadow: var(--shadow);
}
.lcard-name { font-weight: 750; font-size: 1.05rem; text-shadow: 0 1px 2px rgba(0,0,0,.3); overflow-wrap: anywhere; }
.lcard-sub { font-size: .75rem; opacity: .9; }
.lcard-edit { position: absolute; top: .4rem; right: .4rem; background: rgba(255,255,255,.85); color: #111; border: 0; }
.card-preview { background: #fff; border-radius: 10px; padding: .5rem; margin-bottom: .4rem; min-height: 1rem; }
.card-preview:empty { display: none; }
.card-preview .bc-1d { width: 100%; height: 90px; display: block; }
.card-preview .bc-2d { width: 140px; height: 140px; display: block; margin: 0 auto; }
.card-err { color: #b91c1c; margin: .3rem; font-size: .85rem; }
.form-2 { display: grid; grid-template-columns: 1fr 64px; gap: .6rem; align-items: end; }
.form-2 input[type=color] { height: 42px; padding: 2px; }
.card-view {
  position: fixed; inset: 0; z-index: 200; background: #fff; color: #111; display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + .5rem) 1rem calc(env(safe-area-inset-bottom) + 1rem); color-scheme: light;
}
.card-view-head {
  --card: #2563eb;
  align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  background: var(--card); color: #fff; border-radius: 14px; padding: .4rem .5rem .4rem 1rem; font-weight: 750; font-size: 1.15rem;
}
.card-view-head .icon-btn { color: #fff; }
.card-code { flex: 1; width: 100%; display: grid; place-items: center; padding: 1rem 0; }
.card-code .bc-1d { width: 100%; max-width: 640px; height: min(38vh, 220px); }
.card-code .bc-2d { width: min(78vw, 46vh, 360px); height: auto; aspect-ratio: 1; }
.card-view-num { font: 600 1.35rem/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; text-align: center; overflow-wrap: anywhere; }
.card-view-hint { color: #666; font-size: .85rem; margin: .6rem 0 0; }
.shop-banner #shopCard { white-space: nowrap; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; }

/* 🏠 App-Umschalter */
.top-logo.logo-link { cursor: pointer; }
.top-logo.logo-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; margin-bottom: .6rem; }
.app-link {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .8rem .4rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 600; font-size: .85rem; text-align: center;
}
.app-link:active { background: var(--surface2); }
.app-icon { font-size: 1.7rem; line-height: 1; }
.recall-sum { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: left; font: inherit; color: inherit; position: relative; padding-right: 6rem; }
.recall-more { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: .85rem; color: var(--danger); }
.recall-fold { align-self: flex-end; }
.recall-actions a.btn { color: inherit; }
.qty-empty { opacity: .45; min-width: 1.9rem; text-align: center; font-weight: 700; }
.qty-empty:hover, .qty-empty:focus-visible { opacity: 1; }
.qty-tap { padding: .25rem .6rem; font-size: .9rem; }
/* Laden-Modus: aktuelles Geschäft */
.shop-store {
  flex: 1; min-width: 0; font: inherit; font-weight: 700; padding: .45rem .6rem; border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 60%, var(--line)); background: var(--surface); color: var(--text);
  text-overflow: ellipsis;
}
.shop-store.chosen { border-style: solid; border-color: var(--accent); }
.shop-banner-text:empty { display: none; }
.shop-banner { gap: .5rem; }
.shop-store { min-width: 6.5rem; }
.shop-banner #shopCard { max-width: 32vw; }
.shop-banner-icon { font-size: 1.25rem; }
