[hidden] { display: none !important; }
:root {
  --bg: #f4f5f6; --card: #ffffff; --ink: #15191c; --muted: #5d666c; --line: #e3e6e8; --chip: #eef0f1;
  --accent: #0e7c66; --accent-ink: #ffffff; --accent-soft: #e6f2ef;
  --warn: #9a5b00; --warn-soft: #fff4e0; --fav: #e09a00; --bad: #b42318; --bad-soft: #fdecea; --ok: #0e7c66;
  --bar: #15191c; --bar-ink: #ffffff;
  --radius: 16px; --shadow: 0 1px 2px rgba(16,24,28,.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1214; --card: #1a1f22; --ink: #e8ecee; --muted: #98a2a8; --line: #2a3135; --chip: #242a2e;
    --accent: #4cc2a4; --accent-ink: #06221b; --accent-soft: #16302a;
    --warn: #f2b33d; --warn-soft: #3a2f16; --fav: #f5bf42; --bad: #ff8a80; --bad-soft: #3b1f1d; --ok: #4cc2a4;
    --bar: #2a3135; --bar-ink: #ffffff; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1214; --card: #1a1f22; --ink: #e8ecee; --muted: #98a2a8; --line: #2a3135; --chip: #242a2e;
  --accent: #4cc2a4; --accent-ink: #06221b; --accent-soft: #16302a;
  --warn: #f2b33d; --warn-soft: #3a2f16; --fav: #f5bf42; --bad: #ff8a80; --bad-soft: #3b1f1d; --ok: #4cc2a4;
  --bar: #2a3135; --bar-ink: #ffffff; --shadow: none;
  color-scheme: dark;
}
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; }
h3 { font-size: 1.05rem; } h4 { font-size: .95rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.warn { color: var(--warn); } .ok { color: var(--ok); } .err { color: var(--bad); }
.center { text-align: center; } .nowrap { white-space: nowrap; }

input, select, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select {
  width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-height: 44px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: grid; gap: .3rem; font-size: .9rem; color: var(--muted); }
label > input, label > select { color: var(--ink); }

.btn { border: 1px solid var(--line); background: var(--card); padding: .65rem 1rem; border-radius: 10px; cursor: pointer; min-height: 44px; font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger, .danger { color: var(--bad); }
.btn.sm { min-height: 36px; padding: .35rem .7rem; font-size: .9rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.icon-btn { border: 1px solid var(--line); background: var(--card); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; font-size: 1.2rem; display: inline-grid; place-items: center; flex: none; }
.icon-btn.sm { width: 34px; height: 34px; font-size: 1rem; }
.icon-btn:disabled { opacity: .35; }
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: .25rem 0; font-size: .85rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: .75rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.row-end { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .75rem; }
.wrap { flex-wrap: wrap; } .gap { gap: .5rem; margin-bottom: .75rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; }
.empty { color: var(--muted); text-align: center; padding: 1.5rem 0; margin: 0; }

/* --- Login --- */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth { max-width: 420px; margin: 0 auto; padding: 2rem 16px; }
.auth.wide { max-width: 760px; }
.auth form { display: grid; gap: .85rem; }
.brand { text-align: center; margin-bottom: 1.25rem; }
.brand .logo { font-size: 2.5rem; }
.brand p { color: var(--muted); margin: .25rem 0 0; }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 700; text-align: center; }

/* --- Kopf --- */
.demo-bar { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: .85rem; padding: .35rem 16px; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 16px; padding-top: max(.5rem, env(safe-area-inset-top)); }
.top-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .5rem; max-width: 760px; margin: 0 auto; }   /* Datum immer genau in der Mitte */
.shop-select { width: auto; min-width: 0; max-width: 100%; justify-self: start; font-weight: 700; }
.date-nav { display: flex; align-items: center; gap: .25rem; justify-content: center; }
.date-label { border: 0; background: none; font-weight: 700; cursor: pointer; display: grid; line-height: 1.1; min-width: 92px; text-align: center; padding: .2rem; }
.date-label small { font-weight: 500; color: var(--accent); font-size: .72rem; }
.top-actions { display: flex; gap: .35rem; justify-self: end; }
.locked-bar { max-width: 760px; margin: .4rem auto 0; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: .35rem .6rem; font-size: .85rem; }

.content { max-width: 760px; margin: 0 auto; padding: .6rem 16px calc(32px + env(safe-area-inset-bottom)); }

/* --- Tabs --- */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs button { flex: 1; border: 0; background: none; padding: .45rem 0 .5rem; font-size: .72rem; color: var(--muted); display: grid; justify-items: center; gap: .1rem; cursor: pointer; min-height: 56px; }
.tabs button span { font-size: 1.25rem; filter: grayscale(1); opacity: .7; }
.tabs button.on { color: var(--accent); font-weight: 700; }
.tabs button.on span { filter: none; opacity: 1; }
.seg { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; padding-bottom: .25rem; }
.seg button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .45rem .9rem; white-space: nowrap; cursor: pointer; min-height: 40px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

/* --- Bestellen --- */
.for-select { margin-bottom: .75rem; }
.total-card { display: flex; justify-content: space-between; align-items: center; }
.big { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.add-box { display: grid; gap: .6rem; }
.add-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.results { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.result { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 0; border-bottom: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; min-height: 48px; }
.result:last-child { border-bottom: 0; }
.result span { display: grid; }
.result small { color: var(--muted); }
.result b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.result.new { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.result:active, .result:hover { background: var(--accent-soft); }
.new-item { border-top: 1px dashed var(--line); padding-top: .75rem; display: grid; gap: .6rem; }
.check { display: flex; align-items: center; gap: .45rem; color: var(--ink); font-size: .9rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.list { display: grid; gap: .5rem; }
.item { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; }
.item.no-price { border-color: var(--warn); background: var(--warn-soft); }
.item-name { font-weight: 600; overflow-wrap: anywhere; }
.item-sub { font-size: .8rem; color: var(--muted); }
.tag { background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 0 .35rem; font-size: .75rem; }
.qty { display: flex; align-items: center; gap: .3rem; font-variant-numeric: tabular-nums; }
.qty span { min-width: 1.4em; text-align: center; font-weight: 700; }
.item-price { display: grid; justify-items: end; gap: .15rem; font-variant-numeric: tabular-nums; min-width: 74px; }
.item-price .unit { font-size: .75rem; color: var(--muted); }
.item-price .was { font-size: .75rem; color: var(--muted); }
.price-in.promo-on { border-color: var(--ok) !important; color: var(--ok); font-weight: 600; }
.price-in { width: 82px !important; min-height: 34px !important; padding: .3rem .45rem !important; text-align: right; font-size: .9rem; }
.shared-row { background: var(--accent-soft); }
@media (max-width: 420px) {
  .item { grid-template-columns: 1fr auto; }
  .item-main { grid-column: 1 / -1; }
}

/* --- Übersicht --- */
.group { margin-bottom: 1rem; }
.group > h3 { color: var(--muted); text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; margin: .75rem 0 .5rem; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .5rem; padding: 0 .6rem; }
.person summary { display: flex; justify-content: space-between; padding: .75rem .1rem; cursor: pointer; font-weight: 600; list-style: none; }
.person summary::-webkit-details-marker { display: none; }
.person .item { margin-bottom: .5rem; }

/* --- Gemeinsam --- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .45rem .8rem; cursor: pointer; min-height: 40px; font-size: .9rem; }
.chip.static { cursor: default; min-height: 0; padding: .2rem .6rem; font-size: .8rem; }
.chip.me { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip-admin { border-color: var(--accent); }
.chip.toggle { display: inline-flex; align-items: center; color: var(--ink); padding: 0; }
.chip.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip.toggle span { padding: .45rem .8rem; border-radius: 999px; }
.chip.toggle input:checked + span { background: var(--accent); color: var(--accent-ink); }
.chip.toggle input:focus-visible + span { outline: 2px solid var(--accent); }
.small-chips { margin-top: .5rem; }
.shared-form { display: grid; gap: .65rem; }
.parts { display: grid; gap: .6rem; }
.part-group { display: grid; gap: .35rem; }
.shared-card .row-end { margin-top: .5rem; }

/* --- Einkauf --- */
.check-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.check-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list .q { display: inline-block; min-width: 2.6em; font-variant-numeric: tabular-nums; }
.sec-head { margin: .9rem 0 .2rem; color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: .4rem 0; gap: .5rem; font-variant-numeric: tabular-nums; }
.kv.total { border-top: 1px solid var(--line); margin-top: .25rem; padding-top: .6rem; }
.kv.diff { border-radius: 8px; padding: .5rem .6rem; margin-top: .4rem; }
.kv.diff.ok { background: var(--accent-soft); color: var(--ok); }
.kv.diff.bad { background: var(--bad-soft); color: var(--bad); }

/* --- Verwaltung --- */
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--ink); font-size: 1rem; }
.switch { appearance: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 25px; }
.inline-form { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.inline-form input:not(.price-in), .inline-form select { flex: 1; min-width: 0; }
.person-row { display: grid; gap: .5rem; }
.person-row.inactive, .prod-row.inactive { opacity: .55; }
.flags { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.code { letter-spacing: .15em; font-family: ui-monospace, monospace; }
#prod-list { display: grid; gap: .35rem; margin-top: .5rem; }
.prod-row { display: grid; grid-template-columns: 1fr 130px auto auto; gap: .35rem; align-items: center; }
.prod-row.no-price .price-in { border-color: var(--warn); background: var(--warn-soft); }
.prod-row input, .prod-row select { min-height: 38px; padding: .35rem .5rem; font-size: .9rem; }
@media (max-width: 480px) { .prod-row { grid-template-columns: 1fr auto auto; } .prod-row select { grid-column: 1; grid-row: 2; } }

/* --- Toast --- */
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: .65rem 1rem; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100% - 32px); font-size: .9rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }

/* --- Druck (A4) --- */
#print-root { display: none; }
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 12pt; }
  #app, .toast { display: none !important; }
  #print-root { display: block; }
  .print-page { page-break-after: always; break-after: page; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
  .print-page h1 { font-size: 20pt; border-bottom: 2px solid #000; padding-bottom: 4pt; margin-bottom: 8pt; display: flex; justify-content: space-between; align-items: baseline; }
  .print-page h1 span { font-size: 11pt; font-weight: 400; }
  .print-page h2 { font-size: 12pt; text-transform: uppercase; letter-spacing: .05em; margin: 10pt 0 2pt; border-bottom: 1px solid #999; }
  .print-page table { width: 100%; border-collapse: collapse; }
  .print-page td { padding: 3pt 4pt; border-bottom: 1px solid #ddd; vertical-align: top; }
  .print-page td.box { width: 14pt; }
  .print-page td.box::before { content: ""; display: inline-block; width: 10pt; height: 10pt; border: 1.2pt solid #000; }
  .print-page td.q { width: 34pt; font-weight: 700; }
  .print-page td.who { text-align: right; color: #444; font-size: 10pt; white-space: nowrap; }
  .print-page td.exp { text-align: right; color: #555; font-size: 9pt; white-space: nowrap; width: 46pt; }
  .print-page td.price { width: 62pt; text-align: right; vertical-align: bottom; }
  .print-page .write { display: inline-block; width: 54pt; height: 14pt; border-bottom: 1pt solid #000; }
  .print-page tr.th td { font-size: 8pt; color: #666; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #999; }
  .print-page .print-note { font-size: 8pt; color: #666; margin-top: 6pt; }
}
.person-row .grid2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
form.inline-form[data-submit="person-add"], form.inline-form[data-submit="product-add"] { flex-wrap: wrap; }
form.inline-form[data-submit="person-add"] input[name=name], form.inline-form[data-submit="product-add"] input[name=name] { flex: 1 1 100%; }
/* Druckvorschau am Bildschirm (Demo) */
#print-root.preview { display: block; position: fixed; inset: 0; z-index: 100; overflow: auto; background: var(--bg); padding: env(safe-area-inset-top, 0px) 16px 2rem; }
.preview-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 0; background: var(--bg); font-size: .9rem; color: var(--muted); }
#print-root.preview .print-page { background: #fff; color: #111; max-width: 640px; margin: 0 auto 1rem; padding: 1.5rem; border-radius: 4px; box-shadow: var(--shadow); }
#print-root.preview h1 { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #111; padding-bottom: .3rem; font-size: 1.3rem; }
#print-root.preview h1 span { font-size: .8rem; font-weight: 400; }
#print-root.preview h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #999; margin: .8rem 0 .2rem; }
#print-root.preview table { width: 100%; border-collapse: collapse; font-size: .9rem; }
#print-root.preview td { padding: .25rem; border-bottom: 1px solid #ddd; }
#print-root.preview td.box::before { content: ""; display: inline-block; width: 11px; height: 11px; border: 1.5px solid #111; }
#print-root.preview td.q { font-weight: 700; width: 2.5rem; }
#print-root.preview td.who { text-align: right; color: #555; font-size: .8rem; }
#print-root.preview td.box { width: 22px; }
/* Anmeldung mit Namen */
.auth.wide { display: grid; gap: .75rem; }
.auth.wide .card { margin-bottom: 0; }
.continue-btn { min-height: 52px; font-size: 1.05rem; }
.big-name { font-size: 1.4rem; font-weight: 800; }
.icon-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
form.card { display: grid; gap: .75rem; }
@media (max-width: 420px) {
  .top-row { gap: .3rem; }
  .shop-select { padding-left: .5rem; padding-right: .25rem; }
  .date-nav { gap: .15rem; }
  .date-label { min-width: 70px; font-size: .95rem; }
  .top-row .icon-btn { width: 40px; height: 40px; }
}
/* Billa-Sortiment & Aktionen */
.res-head { padding: .45rem .8rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.promo { display: inline-block; margin-top: .2rem; font-size: .75rem; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: .05rem .4rem; }
.promo.on { color: var(--ok); background: var(--accent-soft); }
.result s { color: var(--muted); font-weight: 400; font-size: .85em; }
.icon-btn.linked { border-color: var(--accent); background: var(--accent-soft); }
.prod-promo { grid-column: 1 / -1; margin-top: -.15rem; }
.link-panel { grid-column: 1 / -1; display: grid; gap: .45rem; background: var(--accent-soft); border-radius: 10px; padding: .6rem; margin-bottom: .35rem; }
.prod-row { grid-template-columns: 1fr 130px auto auto auto; }
@media (max-width: 480px) { .prod-row { grid-template-columns: 1fr auto auto auto; } .prod-row select { grid-column: 1; grid-row: 2; } }
.check-list .promo { margin-left: .4rem; }
.my-container { margin-top: .75rem; }
#print-root.preview td.exp { text-align: right; color: #666; font-size: .75rem; white-space: nowrap; }
#print-root.preview td.price { width: 5rem; text-align: right; vertical-align: bottom; }
#print-root.preview .write { display: inline-block; width: 4.2rem; height: 1rem; border-bottom: 1.5px solid #111; }
#print-root.preview tr.th td { font-size: .65rem; color: #777; text-transform: uppercase; letter-spacing: .05em; }
#print-root.preview .print-note { font-size: .7rem; color: #777; }
/* Bilder, Top-Artikel, Bearbeiten, wer hat bestellt */
textarea { width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.thumb.ph { display: grid; place-items: center; background: var(--accent-soft); font-size: 1.3rem; }
.result { justify-content: flex-start; }
.result .r-main { flex: 1; min-width: 0; }
.result b { margin-left: auto; }
.item.has-thumb { grid-template-columns: 44px 1fr auto auto; }
@media (max-width: 420px) {
  .item.has-thumb { grid-template-columns: 44px 1fr auto; }
  .item.has-thumb .item-main { grid-column: 2 / -1; }
  .item.has-thumb .qty { grid-column: 1 / 3; }
}
.edit-btn { font-size: .85rem; padding: 0 .2rem; }
.name-in { min-height: 38px !important; padding: .35rem .5rem !important; font-weight: 600; }
.top-box { display: grid; gap: .5rem; }
.res-head.plain { background: none; border: 0; padding: .2rem 0 0; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
.chips.scroll .chip { white-space: nowrap; flex: none; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* Top-Artikel: Ansicht Liste / Zwei Spalten / Große Bilder (v-list, v-cols, v-big) */
.top-tools { display: flex; align-items: center; gap: .6rem; }
.view-seg { display: flex; gap: 2px; background: var(--chip); border-radius: 10px; padding: 2px; }
.view-seg button { width: 34px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.view-seg button .ic { width: 17px; height: 17px; }
.view-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.top-grid { display: grid; gap: .45rem; }
.top-item { position: relative; display: grid; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; text-align: left; color: inherit; font: inherit; }
.top-item .t-txt { display: grid; min-width: 0; }
.top-item .t-name { font-size: .8rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; hyphens: auto; overflow-wrap: anywhere; }
.top-item b { font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.top-item .t-promo { position: absolute; top: .25rem; right: .3rem; font-size: .8rem; }
.top-grid.v-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v-cols .top-item { grid-template-columns: 40px minmax(0, 1fr); column-gap: .5rem; row-gap: .1rem; padding: .45rem .5rem; }
.v-cols .top-item .thumb { width: 40px; height: 40px; grid-row: span 2; }
.v-cols .top-item .t-txt { align-self: end; }
.v-cols .top-item b { align-self: start; color: var(--accent); }
.top-grid.v-list { gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.v-list .top-item { grid-template-columns: 44px minmax(0, 1fr) auto; gap: .75rem; padding: .5rem .8rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 56px; }
.v-list .top-item:last-child { border-bottom: 0; }
.v-list .top-item .thumb { width: 44px; height: 44px; }
.v-list .top-item .t-name { font-size: .92rem; }
.v-list .top-item b { font-size: .92rem; }
.v-list .top-item .t-promo { position: static; grid-column: 4; }
.v-list .top-item:has(.t-promo) { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
.top-grid.v-big { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v-big .top-item { justify-items: center; text-align: center; gap: .3rem; padding: .6rem .4rem; border-radius: 12px; align-content: start; }
.v-big .top-item .thumb { width: 72px; height: 72px; }
.v-big .top-item .t-name { font-size: .78rem; }
.top-more { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: .55rem; min-height: 44px; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.top-item:hover, .top-item:active, .top-more:active { background: var(--accent-soft); }
.who-line { font-size: .78rem; color: var(--muted); margin-left: 2.6em; }
@media print { .print-page small.who { color: #333; font-size: 8.5pt; } }
#print-root.preview small.who { color: #555; }
/* Feinkost-Vorschläge */
.fk-sugg { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 0; }
.fk-sugg .chip { min-height: 36px; padding: .3rem .7rem; font-size: .88rem; background: var(--accent-soft); border-color: transparent; }
.fk-sugg .chip.line { background: var(--card); border-color: var(--accent); }
/* Suchbegriffe in der Artikelverwaltung */
.terms-in { grid-column: 1 / -1; min-height: 34px !important; font-size: .82rem !important; padding: .25rem .5rem !important; color: var(--muted) !important; }
/* Bereich verschieben in der Einkaufsliste */
.li-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.sec-move { width: auto !important; min-height: 30px !important; padding: .15rem .3rem !important; font-size: .75rem !important; max-width: 42%; color: var(--muted) !important; }
/* Abhaken */
.pick-head .bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: .5rem 0; }
.pick-head .bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.pick-list { display: grid; gap: .4rem; margin-bottom: .5rem; }
.pick { display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; padding: .7rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; min-height: 56px; }
.pick .cb { width: 26px; height: 26px; border: 2px solid var(--muted); border-radius: 7px; flex: none; display: grid; place-items: center; }
.pick .p-main { display: grid; min-width: 0; }
.pick .p-main small { color: var(--muted); font-size: .78rem; }
.pick.done { background: var(--accent-soft); border-color: transparent; }
.pick.done .cb { background: var(--accent); border-color: var(--accent); }
.pick.done .cb::after { content: "✓"; color: var(--accent-ink); font-weight: 800; }
.pick.done .p-main > span { text-decoration: line-through; color: var(--muted); }
.tabs button { font-size: .68rem; }
/* Weckerl bauen */
.btn.on { background: var(--accent-soft); border-color: var(--accent); }
.wb { border-top: 1px dashed var(--line); padding-top: .75rem; display: grid; gap: .6rem; }
.wb h4 { margin: 0; }
.wb-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: .2rem; }
.wb-recent { display: grid; gap: .4rem; }
.wb-again { text-align: left; padding: .65rem .75rem; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); cursor: pointer; font-size: .92rem; min-height: 48px; }
.wb-nums { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; }
.wb-num { min-height: 56px; font-size: 1.4rem; font-weight: 800; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.wb-num:hover, .wb-opt:hover { border-color: var(--accent); }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .4rem; }
.wb-opt { position: relative; min-height: 52px; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font-weight: 600; }
.wb-opt .star { position: absolute; top: .2rem; right: .4rem; color: var(--warn); font-size: .8rem; }
.wb-fill.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.wb-preview { background: var(--accent-soft); border-radius: 10px; padding: .6rem .75rem; font-size: .95rem; }
.chip.inspo.on { background: linear-gradient(135deg, var(--accent), #2f8f62); }
/* Erinnerung */
.reminder-row { display: flex; align-items: center; gap: .6rem; }
.reminder-row .switch-row { flex: 0 0 auto; }
.time-in { width: auto !important; min-width: 110px; font-variant-numeric: tabular-nums; }
.reminder-row .switch { margin-left: auto; }
.del-btn { margin-left: .2rem; }
.wd-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; margin-bottom: .6rem; }
.chip.wd { padding: .4rem 0; text-align: center; font-weight: 600; min-height: 40px; }
/* Personen-Verwaltung */
.p-toolbar { display: flex; gap: .5rem; margin-bottom: .6rem; }
.p-toolbar input { flex: 1; min-width: 0; }
.p-add { display: grid; gap: .6rem; }
.p-filters { margin-bottom: .5rem; }
.cnt { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 99px; background: var(--line); color: var(--muted); font-size: .75em; text-align: center; font-weight: 600; }
.chip.on .cnt { background: rgba(255,255,255,.25); color: inherit; }
.p-group { margin-bottom: .9rem; }
.p-group > h3 { color: var(--muted); text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; margin: .4rem 0; display: flex; gap: .4rem; align-items: center; }
.p-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.p-row + .p-row { border-top: 1px solid var(--line); }
.p-row.inactive { opacity: .55; }
.p-head { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "name meta chev" "badges badges badges"; gap: .15rem .5rem; width: 100%; padding: .65rem .8rem; border: 0; background: none; text-align: left; cursor: pointer; align-items: center; min-height: 52px; }
.p-head:hover { background: var(--bg); }
.p-name { grid-area: name; font-weight: 600; overflow-wrap: anywhere; }
.p-badges { grid-area: badges; display: flex; flex-wrap: wrap; gap: .25rem; }
.p-badges:empty { display: none; }
.p-meta { grid-area: meta; font-size: .78rem; white-space: nowrap; }
.chev { grid-area: chev; color: var(--muted); }
.badge { font-size: .7rem; padding: .05rem .45rem; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); }
.badge.admin { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.badge.shop { background: var(--accent-soft); border-color: transparent; }
.p-row.open { background: var(--bg); }
.p-edit { display: grid; gap: .6rem; padding: 0 .8rem .8rem; }
.p-flags { display: grid; gap: .45rem; }
.p-flags .check { align-items: flex-start; }
.p-flags .check span { display: grid; }
.p-flags .check small { color: var(--muted); font-size: .76rem; }

/* Baustellen + Abwesenheit */
.site-row { max-width: 760px; margin: .35rem auto 0; display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.site-row select { flex: 1; max-width: 260px; padding: .3rem .5rem; min-height: 34px; }
.shopper-row { max-width: 760px; margin: .35rem auto 0; display: flex; align-items: center; gap: .4rem; font-size: .9rem; flex-wrap: wrap; }
.shopper-row select { flex: 1; max-width: 260px; padding: .3rem .5rem; min-height: 34px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: .4rem; }
.abs-box { display: grid; gap: .6rem; }
.abs-form { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: end; }
.abs-form label:nth-child(3) { grid-column: 1 / 2; }
.abs-form button { grid-column: 2 / 3; }
.abs-list { display: grid; gap: .3rem; }
.abs-item { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; }
.p-abs summary { cursor: pointer; font-size: .9rem; padding: .3rem 0; }
.p-abs[open] summary { margin-bottom: .4rem; }
.away-card { font-size: .9rem; }

/* ☕ Spielgeld */
.kasse-head .big.neg, .k-row .neg { color: var(--bad, #b3261e); }
.k-row .pos { color: var(--ok, #1d7a46); }
.k-items { display: grid; gap: .4rem; margin-top: .5rem; }
.k-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: .4rem; align-items: center; }
.k-iname { min-width: 0; overflow-wrap: anywhere; }
.k-qty { display: flex; align-items: center; gap: .2rem; font-size: .9rem; }
.k-qty input { width: 3.2rem; text-align: center; }
.k-list { display: grid; }
.k-row { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto auto 2.2rem; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.k-row:last-child { border-bottom: 0; }
.k-date { color: var(--muted); font-size: .8rem; }
.k-note { min-width: 0; overflow-wrap: anywhere; }
.k-bal { color: var(--muted); font-size: .8rem; text-align: right; min-width: 4.5rem; }
@media (max-width: 420px) { .k-row { grid-template-columns: 3.9rem minmax(0, 1fr) auto 2.2rem; } .k-bal { display: none; } }
.k-payout { color: var(--muted); }
.k-cash { margin-top: .25rem; }
/* Update 057: Spielgeld-Konto je Einkaufsmeister (wie eine Person) */
.k-acct .k-list { margin-top: .2rem; }
.k-acct .hist-day { margin-top: .4rem; }
.tag.kasse { background: rgba(214, 140, 30, .16); color: #a8670f; }
.kasse-paid { color: var(--muted); font-weight: 500; }
.kasse-tog { white-space: nowrap; }
.rc-line.kasse .rc-price { color: var(--muted); font-size: .85rem; }

.t-theme { font-size: .68rem; color: var(--muted); }

/* 🏷️ Aktionen */
.t-pct { display: inline-block; background: var(--bad); color: #fff; border-radius: 6px; padding: 0 .3rem; font-size: .72rem; font-weight: 700; }
.top-item .t-pct { position: absolute; top: .3rem; left: .35rem; }
.top-item s, .sale-row s { color: var(--muted); font-weight: 400; font-size: .75rem; }
.sale-bar { margin: .25rem .25rem .5rem; }
.sale-list { display: grid; gap: .4rem; }
.sale-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 44px; gap: .55rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .45rem .55rem; }
.sale-row.hl { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sale-row .thumb { width: 48px; height: 48px; }
.s-main { min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.s-main small { display: block; color: var(--muted); font-size: .76rem; }
.s-price { display: grid; justify-items: end; gap: .1rem; font-variant-numeric: tabular-nums; }
.icon-btn.star { font-size: 1.3rem; width: 44px; height: 44px; }
.tabs button { min-width: 0; }
.tabs.many button { font-size: .58rem; letter-spacing: -.02em; padding-left: 0; padding-right: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs.many button span { font-size: 1.1rem; }

.route-row { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.route-row select { flex: 1; min-width: 0; }

/* Suchbegriffe Billa-Sortiment */
.p-mode { margin-bottom: .6rem; }
.cat-terms-list { display: grid; gap: .45rem; }
.ct-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .3rem .55rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .6rem; }
.ct-row .thumb { width: 44px; height: 44px; grid-row: span 2; }
.ct-main { min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.ct-main small { display: block; color: var(--muted); font-size: .76rem; }
.ct-row .terms-in { grid-column: 2; width: 100%; }

/* Geschäft (nur Anzeige), Feedback */
.shop-label { font-weight: 700; padding: .45rem .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-self: start; max-width: 100%; }
.fb-list { display: grid; gap: .5rem; }
.fb-item { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; display: grid; gap: .3rem; }
.fb-item.done { opacity: .55; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-item textarea { width: 100%; }
.fb-item .row-end .link-btn.small { font-size: .8rem; }
.fb-hist { border-left: 3px solid var(--line); padding-left: .6rem; display: grid; gap: .45rem; margin-top: .2rem; }
.fb-ver .fb-text { font-size: .92rem; }
.fb-done-head { margin: .9rem 0 .4rem; color: var(--muted); }

/* Admin-Vorschau, Datenbank-Auswahl, Geschäft des Tages */
.viewas-bar { background: var(--accent); color: var(--accent-ink, #fff); text-align: center; padding: .4rem 16px; font-size: .85rem; }
.viewas-bar a { color: inherit; font-weight: 700; }
.db-pick { align-items: center; margin-bottom: .6rem; }
.day-shop select { margin-top: .3rem; }

/* Ersetzt / Schnell-Tausch */
.warn-card { border-color: var(--warn); background: var(--warn-soft); }
.repl-list { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: .35rem; }
.repl-list li { display: flex; justify-content: space-between; gap: .5rem; align-items: center; font-size: .9rem; }
.repl-list li > span { min-width: 0; overflow-wrap: anywhere; }
.swap-panel { background: var(--card); border: 2px solid var(--accent); border-radius: 14px; padding: .7rem; display: grid; gap: .5rem; margin-bottom: .75rem; }
.swap-search { display: flex; gap: .4rem; }
.swap-search input { flex: 1; min-width: 0; }
.scan-btn { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.scan-btn svg { width: 20px; height: 20px; }
.scan-msg { font-size: .88rem; background: var(--accent-soft); border-radius: 10px; padding: .5rem .65rem; }
.scan-top { display: grid; gap: .6rem; }
.scan-shop { display: inline-flex; align-items: center; gap: .4rem; }
.scan-shop select { width: auto; }
.scan-go { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-size: 1.1rem; min-height: 56px; }
.scan-go svg { width: 24px; height: 24px; }
.scan-result { display: grid; gap: .6rem; }
.scan-card { display: flex; align-items: center; gap: .75rem; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; }
.scan-card .thumb { width: 72px; height: 72px; }
.scan-card .r-main { flex: 1; min-width: 0; display: grid; }
.scan-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.scan-yesno .btn { min-height: 56px; font-size: 1.1rem; }
.scan-no { color: var(--bad, #c0392b); }
.scan-log { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .3rem; }
.scan-log li { display: flex; justify-content: space-between; gap: .5rem; }
.scan-pop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 16px; }
.scan-box { position: relative; width: min(100%, 480px); aspect-ratio: 3 / 4; max-height: 70vh; border-radius: 16px; overflow: hidden; background: #000; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 10%; right: 10%; top: 35%; bottom: 35%; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-hint { color: #fff; margin: 0; text-align: center; }
.pick-wrap { position: relative; }
.pick-wrap .pick { width: 100%; padding-right: 8.6rem; }
.pick-tools { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: .35rem; }
.pick-tools .swap-btn { background: var(--card); }
/* Preis in der Einkaufsliste (Einkaufsmeister) */
.pick-price { min-width: 4.6rem; min-height: 34px; padding: .2rem .5rem; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; font-size: .88rem; font-weight: 600; text-align: right; cursor: pointer; white-space: nowrap; }
.pick-price.open { border-color: var(--warn); background: var(--warn-soft); color: var(--muted); font-weight: 500; }
.pick-wrap .pick-price-in { width: 4.6rem !important; }
.pick.done ~ .pick-tools .pick-price { background: transparent; }
/* ↶ Rückgängig */
.undo-bar { position: fixed; left: 12px; right: 12px; bottom: max(10px, calc(env(safe-area-inset-bottom) - 16px)); z-index: 20; max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: var(--bar); color: var(--bar-ink); border-radius: 999px; padding: .35rem .4rem .35rem 1rem; box-shadow: 0 6px 24px rgba(16,24,28,.22); font-size: .88rem; }
.undo-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.undo-bar .btn { background: var(--bar-ink); color: var(--bar); border: 0; min-height: 40px; border-radius: 999px; padding: 0 .9rem; white-space: nowrap; flex: none; }

/* 💶 Konto */
.bad-txt { color: var(--bad); }
.pay-list { display: grid; gap: .4rem; margin-top: .6rem; }
.pay-form { display: grid; gap: .5rem; }
.k-row.acc { grid-template-columns: 4.6rem minmax(0, 1fr) auto 2.2rem; }

/* ♻️ Pfand */
.block { display: block; }
.kv.ret { align-items: flex-end; gap: .5rem; }
.ret-grid { display: grid; gap: .3rem; margin-top: .35rem; font-size: .88rem; }
.ret-in { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.ret-in input { width: 3.4rem; text-align: center; padding: .3rem; }
.pfand-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pfand-row select { flex: 0 1 auto; }
.crate-in { width: 3rem; text-align: center; padding: .25rem; margin: 0 .25rem; }

/* Anmeldung über die Baustelle */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.site-card { display: grid; gap: .2rem; padding: 0 0 .7rem; border: 1px solid var(--line); background: var(--card); border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.site-card > .small { padding: 0 .75rem; }
.site-card-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--accent-soft); }
.site-card-img.ph { display: grid; place-items: center; font-size: 2.6rem; }
.site-card-name { font-weight: 700; padding: .45rem .75rem 0; }
.login-site-img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: 12px; margin: 0 auto .5rem; }
.login-site-img.ph { display: grid; place-items: center; font-size: 2.5rem; background: var(--accent-soft); }
.site-admin { display: grid; gap: .4rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.site-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.site-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; }
.site-thumb.ph { display: grid; place-items: center; background: var(--accent-soft); }

/* Kopf: Baustelle · Einkauf · Konto bündig untereinander */
.head-grid { max-width: 760px; margin: .4rem auto 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: .35rem .6rem; font-size: .9rem; }
.head-grid .hg-label { white-space: nowrap; color: var(--muted); }
.head-grid .hg-ctl { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; min-width: 0; }
.head-grid select { width: 100%; max-width: 320px; padding: .3rem .5rem; min-height: 34px; }
.head-bal { font-weight: 700; padding: 0; text-align: left; }

/* 🧾 Rechnungsfotos (Update 028) */
.receipt-files { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.receipt-file { display: flex; align-items: center; gap: 8px; }
.receipt-file .link-btn { flex: 1; text-align: left; }
.receipt-files label.btn { align-self: flex-start; cursor: pointer; }
.receipt-view { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px; }
.receipt-view img { max-width: 100%; max-height: 85vh; object-fit: contain; background: #fff; }

/* ☰ Menü (statt Leiste unten) + nach unten ziehen zum Aktualisieren */
html, body { overscroll-behavior-y: contain; }
.page-title { font-size: 1.05rem; margin: 0 0 .6rem; }
.menu-btn { font-size: 1.3rem; }
.menu-back { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
.menu { position: fixed; top: 0; right: 0; bottom: 0; width: min(78vw, 300px); background: var(--card); z-index: 31; display: flex; flex-direction: column; padding: calc(.8rem + env(safe-area-inset-top)) .6rem calc(.8rem + env(safe-area-inset-bottom)); gap: .15rem; overflow-y: auto; box-shadow: -4px 0 16px rgba(0,0,0,.18); }
.menu button { display: flex; align-items: center; gap: .7rem; border: 0; background: none; text-align: left; padding: .75rem .7rem; border-radius: 10px; font-size: 1rem; color: var(--ink); cursor: pointer; }
.menu button span { font-size: 1.3rem; width: 1.6rem; text-align: center; }
.menu button.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: .4rem .3rem; }
.ptr { position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -60px); z-index: 25; width: 36px; height: 36px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.2); display: grid; place-items: center; color: var(--muted); opacity: 0; pointer-events: none; transition: opacity .15s; }
.ptr.pull { opacity: 1; transition: none; }
.ptr.ready { color: var(--accent); }
.ptr.spin { opacity: 1; transform: translate(-50%, 30px); animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: translate(-50%, 30px) rotate(360deg); } }
/* Konto: Einkauf antippen → Artikel des Tages */
.k-row.tap { cursor: pointer; }
.k-row.tap:active, .k-row.tap.open { background: var(--accent-soft); }
.k-chev { color: var(--muted); font-size: .8rem; text-align: center; }
.hist-day { margin: 0 0 .5rem; padding: .5rem .75rem; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 8px 8px 0; display: grid; gap: .3rem; }
.hd-row { display: flex; justify-content: space-between; gap: .75rem; font-size: .92rem; }
.hd-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd-row.sum { border-top: 1px solid var(--line); padding-top: .3rem; }
.hd-receipts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }

/* =====================================================================
   Design „Klar“ (v39): ruhig, weiß, eine Akzentfarbe, Linien-Icons,
   Produktbilder links, dunkle Summen-Leiste unten beim Bestellen
   ===================================================================== */
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
h1, h2, h3 { letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 700; }
.card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; margin-bottom: .9rem; }
.btn { border-radius: 12px; border-color: var(--line); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn.block { display: flex; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { border: 0; background: var(--chip); border-radius: 12px; color: var(--ink); }
.icon-btn.plain { background: transparent; color: var(--muted); }
.icon-btn .ic { width: 20px; height: 20px; }
input:not([type=checkbox]):not(.switch), select, textarea { border-radius: 12px; }
.seg button, .chip { border-color: transparent; background: var(--chip); }
.seg button.on, .chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.chip.me { background: var(--accent-soft); border-color: transparent; }
.tag { background: var(--chip); color: var(--muted); }

/* Kopf: weiß, Datum in der Mitte, Infos als Chips */
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: .55rem 16px .7rem; padding-top: max(.55rem, env(safe-area-inset-top)); }
.date-nav { gap: 0; }
.date-label { font-size: 1.05rem; gap: .05rem; }
.date-label small { color: var(--accent); font-weight: 600; font-size: .78rem; }
.shop-label, .shop-select { font-weight: 600; font-size: .95rem; color: var(--muted); }
.shop-select { border: 0; background: var(--chip); min-height: 36px; padding: .25rem .5rem; }
.menu-btn { font-size: 1rem; }
.head-grid { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; font-size: .88rem; }
.head-grid .hg { display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .3rem 0 .75rem; border-radius: 999px; background: var(--chip); max-width: 100%; min-width: 0; }
.head-grid .hg-label { color: var(--muted); font-size: .8rem; }
.head-grid .hg-ctl { flex-wrap: nowrap; gap: .3rem; min-width: 0; }
.head-grid .hg-ctl > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: .45rem; }
.head-grid select { border: 0; background: transparent; min-height: 32px; padding: 0 .3rem; width: auto; max-width: 52vw; font-weight: 600; outline-offset: 2px; }
.head-grid .btn.sm { min-height: 28px; padding: 0 .6rem; font-size: .8rem; background: var(--card); }
.head-grid .hg.bal { padding-right: .75rem; }
.head-grid .hg.bal.neg { background: var(--bad-soft); }
.head-bal { font-weight: 700; font-size: .88rem; }
.locked-bar { background: var(--warn-soft); border-radius: 10px; margin-top: .55rem; }

.content { padding-top: 1rem; }
.page-title { font-size: 1.45rem; font-weight: 700; margin: 0 0 .8rem; }

/* Menü */
.menu { padding-left: .5rem; padding-right: .5rem; }
.menu button { gap: .8rem; font-weight: 500; }
.menu button .ic { color: var(--muted); }
.menu button.on { background: var(--chip); color: var(--ink); font-weight: 700; }
.menu button.on .ic { color: var(--accent); }

/* Bestellen: Suche, Treffer, Liste */
.add-box { background: transparent; box-shadow: none; padding: 0; gap: .75rem; }
.search-wrap { position: relative; }
.search-wrap .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap input { min-height: 52px; padding-left: 44px; font-size: 1.05rem; border: 0; box-shadow: var(--shadow); background: var(--card); }
.results { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.result { border-bottom-color: var(--line); gap: .8rem; padding: .6rem .8rem; }
.result:active, .result:hover { background: var(--chip); }
.result.new { background: var(--card); color: var(--accent); }
#catalog-results, #search-more { display: grid; }
.result.more { justify-content: center; color: var(--accent); font-weight: 600; background: var(--card); }
.res-head { background: var(--card); font-weight: 600; }
.res-head.plain { color: var(--muted); }
.add-actions .btn { background: var(--card); border-color: transparent; box-shadow: var(--shadow); }
.add-actions .btn.on { background: var(--chip); }
.top-item, .top-more { border: 0; box-shadow: var(--shadow); }
.top-item:hover, .top-item:active, .top-more:active { background: var(--chip); }
.top-grid.v-list { border: 0; box-shadow: var(--shadow); }
.v-list .top-item { box-shadow: none; border-bottom: 1px solid var(--line); }
.v-list .top-item:last-child { border-bottom: 0; }
.new-item, .wb { background: var(--card); border: 0; border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }

/* Produktbild links – Platzhalter, wenn es keins gibt */
.thumb { width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.thumb.ph { background: var(--chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2a8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='M3.3 7 12 12l8.7-5M12 22V12'/%3E%3C/svg%3E") center / 22px no-repeat; border-color: transparent; }
.thumb.ph.fk { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2a8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2M7 2v20M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7'/%3E%3C/svg%3E"); }
.thumb.ph.sh { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2a8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.21 15.89A10 10 0 1 1 8 2.83'/%3E%3Cpath d='M22 12A10 10 0 0 0 12 2v10z'/%3E%3C/svg%3E"); }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin: 1.25rem .25rem .5rem; scroll-margin-top: 140px; }
.list-head h3 { margin: 0; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.list-head span { font-size: .8rem; color: var(--muted); }
.list-notes { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .85rem; margin: -.2rem .25rem .5rem; }
.list { gap: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list > .empty { padding: 1.5rem 1rem; }
.item { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: .7rem .8rem; background: var(--card); }
.list > .item:last-child { border-bottom: 0; }
.item.no-price { background: var(--warn-soft); }
.item.has-thumb { grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: .35rem .75rem; }
.item.has-thumb > .thumb { align-self: start; }
.item-name { font-weight: 600; }
.item-sub { font-size: .82rem; }
.edit-btn { color: var(--muted); vertical-align: -2px; }
.edit-btn .ic { width: 16px; height: 16px; }
.qty { background: var(--chip); border-radius: 10px; gap: 0; }
.qty .icon-btn.sm { background: transparent; width: 36px; height: 36px; font-size: 1.15rem; }
.qty .del-btn { color: var(--muted); }
.qty .del-btn .ic { width: 17px; height: 17px; }
.item-price b { font-weight: 600; }
.shared-row { background: var(--card); }
.person { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); padding: 0 .8rem; }
.person .item { padding-left: 0; padding-right: 0; margin: 0; }
.person .item:last-child { border-bottom: 0; }
@media (max-width: 420px) {
  .item.has-thumb { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "thumb main price" "thumb qty qty"; }
  .item.has-thumb > .thumb { grid-area: thumb; }
  .item.has-thumb .item-main { grid-area: main; grid-column: auto; }
  .item.has-thumb .item-price { grid-area: price; align-self: start; }
  .item.has-thumb .qty { grid-area: qty; grid-column: auto; justify-self: start; }
}

/* Summen-Leiste unten (aus Entwurf „Markt“, in ruhigen Farben) */
.content.has-bar { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.sum-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; max-width: 736px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: var(--bar); color: var(--bar-ink); border-radius: 20px; padding: .7rem .75rem .7rem 1.1rem; box-shadow: 0 6px 24px rgba(16,24,28,.22); }
.sum-bar small { opacity: .75; font-size: .8rem; }
.sum-bar .big { font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.sum-bar .btn { background: var(--bar-ink); color: var(--bar); border: 0; min-height: 46px; border-radius: 14px; padding: 0 1rem; white-space: nowrap; }
.sum-bar .cnt { background: var(--chip); color: var(--ink); }
.toast { bottom: calc(104px + env(safe-area-inset-bottom)); border-radius: 12px; }

/* Einkaufsliste, Konto, Verwaltung: weniger Rahmen */
.pick { border: 0; box-shadow: var(--shadow); }
.pick .thumb { width: 40px; height: 40px; }
.pick.done { background: var(--chip); box-shadow: none; }
.pick-head .bar span { background: var(--ink); }
.sec-head { color: var(--muted); font-weight: 600; }
.p-list, .sale-row, .ct-row, .fb-item, .abs-item { border-color: var(--line); }
.sale-row, .ct-row { border: 0; box-shadow: var(--shadow); }
.badge.admin { background: var(--ink); border-color: var(--ink); color: var(--card); }
.viewas-bar { background: var(--ink); color: var(--card); }
.hist-day { border-left-color: var(--line); }
.site-card { border: 0; box-shadow: var(--shadow); }
.site-card-img.ph, .login-site-img.ph, .site-thumb.ph { background: var(--chip); }
.wb-again { background: var(--card); border-color: var(--line); }
.wb-preview { background: var(--chip); }
.chip.inspo.on { background: var(--ink); }
.ptr .ic { width: 18px; height: 18px; }

/* Summen-Leiste: beim Runterscrollen klein (wie Safari), Antippen macht sie wieder groß
   iPhone: nicht über dem ganzen Home-Balken-Abstand schweben, sondern weiter unten */
.sum-bar { bottom: max(10px, calc(env(safe-area-inset-bottom) - 16px)); }
.content.has-bar { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.sum-bar { transition: padding .2s, border-radius .2s, left .2s, right .2s, bottom .2s; }
.sum-bar small, .sum-bar .big, .sum-bar .btn { transition: font-size .2s, min-height .2s, padding .2s, opacity .2s; }
.sum-bar.mini { left: 25%; right: 25%; min-width: 220px; bottom: max(8px, calc(env(safe-area-inset-bottom) - 22px)); padding: .3rem .35rem .3rem .9rem; border-radius: 999px; cursor: pointer; }
.sum-bar.mini small { display: none; }
.sum-bar.mini .big { font-size: 1rem; }
.sum-bar.mini .btn { min-height: 32px; font-size: .85rem; padding: 0 .7rem; border-radius: 999px; }
@media (max-width: 480px) { .sum-bar.mini { left: 18%; right: 18%; } }

/* 🧾 Bestellung als Kassenbon */
.pop-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
.receipt-pop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 41; width: min(calc(100% - 32px), 420px); max-height: calc(100% - 48px); display: flex; flex-direction: column; background: var(--card); color: var(--ink); border-radius: 18px; padding: 1rem 1.1rem; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.rc-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--line); }
.rc-head span { color: var(--muted); font-size: .85rem; }
.rc-lines { overflow-y: auto; padding: .4rem 0; font-variant-numeric: tabular-nums; }
.rc-line { display: flex; align-items: baseline; gap: .35rem; padding: .22rem 0; font-size: .95rem; }
.rc-qty { flex: none; min-width: 2.6rem; text-align: right; color: var(--muted); padding-right: .35rem; border-right: 1px solid var(--line); }
.rc-name { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-dots { flex: 1 1 1.2rem; min-width: 1.2rem; border-bottom: 2px dotted var(--muted); opacity: .45; transform: translateY(-.25em); }
.rc-price { flex: none; white-space: nowrap; font-weight: 600; }
.rc-line.open .rc-price { color: var(--warn, #b45309); font-weight: 500; font-size: .85rem; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: .5rem; margin-top: .2rem; font-size: 1.15rem; }
.rc-note { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.rc-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }

/* 👥 Teilen beim Bestellen: aus = eine Person grau, an = Gruppe rot */
.search-wrap input { padding-right: 58px; }
.share-tog { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--chip); color: var(--muted); }
.share-tog .ic { width: 21px; height: 21px; }
.share-tog.on { background: var(--bad); color: #fff; }
.share-line { display: flex; align-items: center; gap: .45rem; margin: .5rem .2rem 0; font-size: .88rem; color: var(--bad); }
.share-line .ic { width: 17px; height: 17px; }
.share-line span { flex: 1; }
.share-line .link-btn { color: var(--bad); text-decoration: underline; }
.share-pop .share-people { overflow-y: auto; padding: .3rem 0; }
.share-pop .part-group { margin: .5rem 0; }
.share-pop .chips { margin-top: .3rem; }
.share-pop .btn[disabled] { opacity: .45; }
.share-hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 30; width: min(calc(100% - 32px), 420px); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: 14px; padding: .7rem .8rem; box-shadow: 0 8px 28px rgba(0,0,0,.2); font-size: .92rem; }
.share-hint .row-end { margin-top: .5rem; gap: .4rem; }
.item-sub .sub-ic { width: 14px; height: 14px; vertical-align: -2px; }
.search-wrap .share-tog .ic { position: static; transform: none; color: inherit; }
.share-pop .rc-head { flex-direction: column; align-items: flex-start; gap: .15rem; }
/* Kategorie-Knöpfe über den Sortiment-Treffern (Update 034) */
.cat-chips { flex-wrap: nowrap; overflow-x: auto; padding: .5rem .8rem; background: var(--card); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.cat-chips .chip { white-space: nowrap; flex: none; min-height: 34px; padding: .3rem .75rem; }
.cat-chips .chip.me { background: var(--accent); color: var(--accent-ink); }

/* --- Ladebild: Einkaufswagen --- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); }
.splash.go { pointer-events: none; animation: sp-fade .3s ease-in .8s forwards; }
@keyframes sp-fade { to { opacity: 0; } }
.sp-stage { position: relative; width: 150px; height: 125px; }
.sp-cart, .sp-lines, .sp-dust { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-cart { animation: sp-rev .3s ease-in-out infinite alternate; transform-origin: 50% 90%; z-index: 1; }
.sp-cart path, .sp-cart circle { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.sp-cart .sp-frame { stroke-width: 3; }
.sp-cart .sp-wire { stroke-width: 1.6; opacity: .7; }
.sp-cart .sp-grip { fill: var(--accent); stroke: var(--accent); stroke-width: 1; }
.sp-cart .sp-wheel circle { fill: var(--card); }
.sp-cart .sp-wheel { animation: spin .35s linear infinite; }
.sp-cart .sp-wheel path { stroke-width: 1.6; }
.sp-cart .sp-wheel { transform-box: view-box; }
.sp-lines path { stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; fill: none; opacity: 0; }
/* Staubwolke: weiche, halbdurchsichtige Wölkchen ohne Umriss */
.sp-dust { z-index: 2; }
.sp-dust .pf { transform: translate(75px, 112px) scale(0); opacity: 0; }
.sp-dust .o { display: none; }
.sp-dust .f { fill: var(--muted); opacity: .22; filter: blur(2px); }
@keyframes sp-rev { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
/* Abflug: kurz ausholen, dann klein werdend nach hinten-oben wegsausen */
.splash.go .sp-cart { animation: sp-zoom .55s linear forwards; }
.splash.go .sp-wheel { animation-duration: .12s; }
@keyframes sp-zoom {
  0%   { transform: translate(0,0) scale(1); animation-timing-function: ease-out; }
  25%  { transform: translate(-6px,1px) rotate(-3deg); animation-timing-function: cubic-bezier(.4,0,.85,.6); }
  90%  { opacity: 1; }
  100% { transform: translate(60px,-120px) scale(.03); opacity: 0; }
}
.splash.go .sp-lines path { animation: sp-whoosh .45s ease-out .18s forwards; }
@keyframes sp-whoosh { 0% { opacity: 0; transform: translateX(10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(-30px); } }
.splash.go .sp-dust .pf { animation: sp-puff .9s cubic-bezier(.2,.8,.3,1) .16s forwards; }
.splash.go .sp-dust .pf:nth-of-type(2), .splash.go .sp-dust .pf:nth-of-type(4) { animation-delay: .2s; }
.splash.go .sp-dust .pf:nth-of-type(1), .splash.go .sp-dust .pf:nth-of-type(5) { animation-delay: .25s; }
.splash.go .sp-dust .pf:nth-of-type(6) { animation-delay: .12s; }
@keyframes sp-puff {
  0%   { opacity: 1; transform: translate(75px, 112px) scale(0); }
  45%  { opacity: 1; transform: translate(calc(75px + var(--dx)), calc(112px + var(--dy))) scale(var(--s)); }
  100% { opacity: 0; transform: translate(calc(75px + var(--dx) * 1.25), calc(104px + var(--dy) * 1.25)) scale(calc(var(--s) * .7)); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-cart, .sp-cart .sp-wheel { animation: none; }
  .splash.go .sp-cart, .splash.go .sp-dust .pf, .splash.go .sp-lines path { animation: none; }
  .splash.go { animation: sp-fade .3s forwards; }
}

/* Zum Home-Bildschirm */
#install .pop-back { z-index: 60; }
.install-pop { z-index: 61; gap: .2rem; }
.inst-head { display: flex; gap: .8rem; align-items: flex-start; }
.inst-head img { border-radius: 13px; flex: none; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.inst-head b { font-size: 1.05rem; }
.inst-head p { margin: .25rem 0 0; }
.inst-steps { list-style: none; margin: .8rem 0 0; padding: .7rem 0 0; border-top: 1px dashed var(--line); display: grid; gap: .6rem; }
.inst-steps li { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.35; }
.inst-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.inst-ic .ic { width: 1.1em; height: 1.1em; vertical-align: -.2em; color: #0a84ff; }

/* ☆ Favoriten (Update 037) */
.fav-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; margin: -6px -6px -6px 0; border-radius: 50%; color: var(--muted); cursor: pointer; opacity: .55; }
.fav-btn .ic { width: 20px; height: 20px; }
.fav-btn.on { color: var(--fav); opacity: 1; }
.fav-btn.on .ic { fill: currentColor; }
.fav-btn:active { background: var(--chip); }
.result .fav-btn { margin-left: -.2rem; }
.item-name .fav-btn { width: 28px; height: 28px; margin: -6px 0 -6px -2px; vertical-align: middle; }
.item-name .fav-btn .ic { width: 17px; height: 17px; }
.item-name .fav-btn:not(.on) { opacity: .35; }
.top-item .fav-btn { position: absolute; right: .1rem; bottom: .1rem; margin: 0; width: 32px; height: 32px; }
.top-item .fav-btn .ic { width: 18px; height: 18px; }
.v-cols .top-item { padding-right: 1.9rem; }
.v-big .top-item { padding-bottom: 1.6rem; }
.v-big .top-item .fav-btn { right: 50%; transform: translateX(50%); bottom: 0; }
.v-list .top-item { grid-auto-flow: column; grid-auto-columns: auto; }
.v-list .top-item .fav-btn { position: static; margin: -6px -8px -6px -4px; }
.chip.fav-chip { display: inline-flex; align-items: center; gap: .3rem; }
.chip.fav-chip .ic { width: 15px; height: 15px; color: var(--fav); fill: currentColor; }
.fav-empty .ic { width: 15px; height: 15px; vertical-align: -2px; }
/* 🧾 Mehrere Rechnungen (Update 040) */
.rc-list { display: grid; gap: .4rem; margin: .4rem 0; }
.rc-row { display: flex; align-items: center; gap: .45rem; }
.rc-row .rc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-row .rc-photo { cursor: pointer; font-size: 1rem; }
.rc-add { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.rc-add label.btn { cursor: pointer; }
.date-nav .icon-btn[disabled] { opacity: .25; pointer-events: none; }
.day-hint p { margin: .6rem 0; }
/* Rechnung per „Teilen“ (Android) */
#share-in .pop-back { z-index: 60; }
.share-in-pop { z-index: 61; gap: .6rem; }
.share-in-pop label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.share-in-img { max-height: 40vh; object-fit: contain; border-radius: 10px; background: var(--bg); }
.share-tip { margin: .25rem 0 0; }

/* Update 043: ± beim Betrag, Ausgeborgt */
.amt-wrap { display: flex; gap: .35rem; align-items: stretch; }
.amt-wrap input { flex: 1; min-width: 0; }
.sign-btn { flex: none; width: 2.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--chip, var(--card)); color: var(--ink); font-size: 1.1rem; font-weight: 600; cursor: pointer; }
.loan-form .seg { margin-bottom: .5rem; flex-wrap: nowrap; }
.loan-form .seg button { flex: 1; padding: .45rem .6rem; }
.k-row.loan-row { grid-template-columns: 3.9rem minmax(0, 1fr) auto; }
.loan-row .loan-acts { grid-column: 2 / -1; justify-self: end; display: flex; gap: .4rem; align-items: center; }
.loan-row.done .k-note { color: var(--muted); }
/* Update 044: Ausgeborgt im Konto, Smart abrechnen */
.tag-konto { display: inline-block; padding: 0 .4rem; border-radius: 999px; background: var(--accent-soft, var(--chip)); color: var(--ink); font-size: .75rem; }
.smart-card .k-row.acc { grid-template-columns: 1.6rem minmax(0, 1fr) auto; }
.smart-card .k-row.acc > span:last-child { display: none; }

/* ✎ Änderungen durch andere (Update 046) */
.chg-note { display: flex; align-items: center; gap: .45rem; width: 100%; margin: -.2rem 0 .6rem; padding: .5rem .7rem; border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.chg-note .ic { flex: none; width: 17px; height: 17px; color: var(--warn); }
.chg-note span { flex: 1; }
.chg-note u { flex: none; color: var(--muted); font-size: .82rem; }
.chg-tag { color: var(--warn); text-decoration: none; white-space: nowrap; }
.chg-line { padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.chg-line:last-child { border-bottom: 0; }
.chg-add { color: var(--ok, #15803d); font-weight: 600; }
.chg-del { color: var(--bad); font-weight: 600; }
/* (i)-Knopf: Erklärungen erst auf Antippen */
.info-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; width: 28px; height: 28px; display: inline-grid; place-items: center; vertical-align: middle; flex: none; border-radius: 50%; margin: -4px 0; }
.info-btn .ic { width: 18px; height: 18px; }
.info-btn.on { color: var(--accent); }
.info-txt { display: block; margin: .2rem 0 .5rem; font-weight: 400; }
.switch-row .info-txt { margin-bottom: 0; }
.info-row { display: flex; justify-content: flex-end; margin: -.25rem 0 0; }
.route-row .info-btn { margin: 0; }

/* ♻️ Pfand-Verlauf im Konto (Update 051) */
.k-row.pf-day { grid-template-columns: 4.6rem minmax(0, 1fr) auto; }
.pf-amt { text-align: right; white-space: nowrap; }
.pfand-who .kv b, .pfand-head .big { white-space: nowrap; }
/* Karten zuklappen (Titel antippen) */
.fold-h { display: flex; align-items: center; gap: .4rem; cursor: pointer; user-select: none; }
.fold-h > span { flex: 1; }
.fold-h .fold-chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.card.folded > :not(.fold-h) { display: none; }
.card.folded > .fold-h { margin-bottom: 0; }
/* ☰ Menü: Reihenfolge ändern */
.menu .menu-sort { margin-top: auto; font-size: .9rem; color: var(--muted); }
.menu .menu-sort .ic { width: 18px; height: 18px; }
.menu-hint { margin: .2rem .7rem .4rem; }
.menu-row { display: flex; align-items: center; gap: .6rem; padding: .35rem .2rem .35rem .7rem; border-radius: 10px; }
.menu-row > .ic { color: var(--muted); }
.menu-row > span { flex: 1; }
.menu-row .icon-btn:disabled { opacity: .25; }
.menu-edit-btns { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .8rem; padding: 0 .3rem; }
.menu .menu-row .icon-btn { padding: 0; width: 36px; height: 36px; justify-content: center; flex: none; }
.menu .menu-edit-btns .btn { padding: .6rem 1rem; font-size: .95rem; }
.menu .menu-edit-btns .btn.ghost { border: 1px solid var(--line); }

/* Update 060: Notiz je Artikel */
.item-note { font-size: .82rem; margin-top: .15rem; font-weight: 600; color: var(--warn); }
.item-note .note-add { font-size: .8rem; font-weight: 400; color: var(--muted); }
.item-note .note-in { width: 100%; font-size: .9rem; padding: .3rem .5rem; }
.note-line { font-size: .8rem; font-weight: 600; color: var(--warn); margin-left: 2.6em; }
.pick .p-main small.note-line { margin-left: 0; color: var(--warn); }
.check-list .note-line { margin-left: 2.6em; }

/* Update 061: Einkauf als Guthaben rechnen */
.xfer-form .row-end { align-items: center; gap: .6rem; flex-wrap: wrap; }
.xfer-row { display: flex; align-items: center; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.xfer-row .k-note { flex: 1; min-width: 0; }
/* Tag wechseln: solange der neue Tag lädt, Inhalt gedimmt (Kopfzeile zeigt schon das neue Datum) */
body.day-loading header.top ~ * { opacity: .45; transition: opacity .15s .1s; pointer-events: none; }
body.day-loading .date-label { animation: day-pulse 1s ease-in-out infinite; }
@keyframes day-pulse { 50% { opacity: .5; } }

/* Leiste unten: schwebende Glas-Pille (Bestellen · Gemeinsam · Kontostand · Profil/Mehr)
   Klares Glas: wenig Tönung + leichte Unschärfe, damit der Inhalt dahinter durchscheint;
   Lichtkante (Rand-Verlauf) + Glanz oben machen den Glas-Eindruck, Schrift-Schein hält es lesbar. */
:root {
  --tb-h: 64px; --tb-b: max(10px, calc(env(safe-area-inset-bottom) - 14px)); --tb-top: calc(var(--tb-b) + var(--tb-h));
  --glass: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.08));
  --glass-blur: blur(4px) saturate(200%) brightness(1.05);
  --glass-rim: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.25) 35%, rgba(255,255,255,0) 55%, rgba(255,255,255,.55));
  --glass-sheen: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0));
  --glass-edge: rgba(255,255,255,.8); --glass-line: rgba(16,24,28,.1);
  --glass-on: rgba(255,255,255,.5); --glass-glow: rgba(255,255,255,.85);
  --glass-shadow: 0 10px 30px rgba(16,24,28,.16), 0 1px 3px rgba(16,24,28,.1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glass: linear-gradient(180deg, rgba(60,68,72,.22), rgba(24,30,33,.16));
    --glass-blur: blur(4px) saturate(180%) brightness(.85);
    --glass-rim: linear-gradient(135deg, rgba(255,255,255,.45), rgba(255,255,255,.08) 35%, rgba(255,255,255,0) 55%, rgba(255,255,255,.22));
    --glass-sheen: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
    --glass-edge: rgba(255,255,255,.22); --glass-line: rgba(0,0,0,.3);
    --glass-on: rgba(255,255,255,.14); --glass-glow: rgba(0,0,0,.75);
    --glass-shadow: 0 10px 30px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --glass: linear-gradient(180deg, rgba(60,68,72,.22), rgba(24,30,33,.16));
  --glass-blur: blur(4px) saturate(180%) brightness(.85);
  --glass-rim: linear-gradient(135deg, rgba(255,255,255,.45), rgba(255,255,255,.08) 35%, rgba(255,255,255,0) 55%, rgba(255,255,255,.22));
  --glass-sheen: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  --glass-edge: rgba(255,255,255,.22); --glass-line: rgba(0,0,0,.3);
  --glass-on: rgba(255,255,255,.14); --glass-glow: rgba(0,0,0,.75);
  --glass-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.tabbar {
  position: fixed; left: 50%; bottom: var(--tb-b); transform: translateX(-50%); z-index: 22;
  width: min(calc(100% - 24px), 460px); height: var(--tb-h); padding: 5px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--glass); border-radius: 999px; isolation: isolate;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge), inset 0 -1px 1px rgba(255,255,255,.12);
}
/* Lichtkante: heller Rand oben links / unten rechts wie bei geschliffenem Glas */
.tabbar::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: -1;
  background: var(--glass-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Glanz in der oberen Hälfte */
.tabbar::after {
  content: ""; position: absolute; left: 14px; right: 14px; top: 2px; height: 45%; border-radius: 999px 999px 40% 40% / 999px 999px 100% 100%;
  background: var(--glass-sheen); pointer-events: none; z-index: -1;
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0;
  border: 0; background: transparent; border-radius: 999px; padding: 0 2px; cursor: pointer;
  color: var(--ink); font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  text-shadow: 0 0 6px var(--glass-glow), 0 0 2px var(--glass-glow);
  -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s, box-shadow .2s;
}
.tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar button .ic { width: 23px; height: 23px; filter: drop-shadow(0 0 3px var(--glass-glow)); }
.tabbar button.on {
  color: var(--accent); font-weight: 700; background: var(--glass-on);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 4px rgba(16,24,28,.1);
}
.tabbar button:active { transform: scale(.95); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tabbar { background: var(--card); } }
/* alles andere, was unten schwebt, sitzt über der Leiste */
body.tb .content { padding-bottom: calc(var(--tb-top) + 28px); }
body.tb .content.has-bar { padding-bottom: calc(var(--tb-top) + 96px); }
body.tb .sum-bar, body.tb .undo-bar { bottom: calc(var(--tb-top) + 10px); }
body.tb .sum-bar.mini { bottom: calc(var(--tb-top) + 10px); }
body.tb .toast { bottom: calc(var(--tb-top) + 16px); }
body.tb:has(.sum-bar) .toast, body.tb:has(.undo-bar) .toast { bottom: calc(var(--tb-top) + 92px); }
body.tb .share-hint { bottom: calc(var(--tb-top) + 84px); }
/* Einkaufsmeister: 5 Knöpfe (mit Einkaufsliste) */
.tabbar.five { grid-template-columns: repeat(5, 1fr); width: min(calc(100% - 16px), 520px); }
.tabbar.five button { font-size: .66rem; padding: 0 1px; letter-spacing: 0; }
.print-lock { margin-bottom: 12px; }
@media print { .tabbar { display: none; } }
