/* Office & Snacks – Kassensystem */

:root {
  --blue: #1d4f91;
  --blue-600: #17427a;
  --blue-50: #eaf1fb;
  --blue-100: #d4e2f6;
  --ink: #15233b;
  --muted: #64748b;
  --line: #e3e8ef;
  --bg: #f2f5f9;
  --card: #fff;
  --green: #138a4b;
  --green-50: #e6f6ed;
  --red: #c93535;
  --red-50: #fdecec;
  --amber: #b26b00;
  --amber-50: #fff4e0;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(16 32 64 / .06), 0 4px 14px rgb(16 32 64 / .06);
  --topbar-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; min-height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.empty { color: var(--muted); padding: 1rem 0; margin: 0; }
.is-neg { color: var(--red) !important; }
.is-pos { color: var(--green) !important; }
kbd { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 6px; padding: 0 .35em; font-family: inherit; font-size: .9em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }

/* ---------- Kopfzeile ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(1.25rem, env(safe-area-inset-right)) 0 max(1.25rem, env(safe-area-inset-left));
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 54px; width: auto; display: block; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 14px; }
.tabs a {
  padding: .6rem 1.1rem; border-radius: 10px; text-decoration: none; color: var(--muted);
  font-weight: 600; white-space: nowrap; transition: background .15s, color .15s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--card); color: var(--blue); box-shadow: var(--shadow); }

.status { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.status-item { display: flex; flex-direction: column; align-items: flex-end; padding: .3rem .8rem; border-radius: 12px; }
.status-item span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.status-item strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.status-item.main { background: var(--blue); color: #fff; }
.status-item.main span { color: rgb(255 255 255 / .75); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { border-color: var(--blue-100); background: var(--blue-50); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #a92a2a; border-color: #a92a2a; }
.btn-danger-ghost { color: var(--red); background: transparent; }
.btn-danger-ghost:hover { background: var(--red-50); border-color: #f5c6c6; }
.btn-pay {
  width: 100%; min-height: 60px; font-size: 1.2rem; border: 0; border-radius: 16px;
  background: var(--green); color: #fff; font-weight: 700;
}
.btn-pay:hover { background: #0f7540; }
.btn-pay:disabled { background: #b8c4d2; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.link { background: none; border: 0; padding: .3rem; color: var(--blue); font-weight: 600; }
.link.danger { color: var(--red); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  display: inline-grid; place-items: center; font-size: 1rem; color: var(--muted);
}
.icon-btn:hover:not(:disabled) { background: var(--blue-50); color: var(--blue); }
.icon-btn.danger:hover { background: var(--red-50); color: var(--red); }
.icon-btn:disabled { opacity: .35; }

.chip {
  min-height: 40px; padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; color: var(--muted);
}
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ---------- Kasse ---------- */

.register {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.25rem;
  padding: 1.25rem max(1.25rem, env(safe-area-inset-right)) 1.25rem max(1.25rem, env(safe-area-inset-left));
  align-items: start;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 1rem; }

.tile {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .7rem .7rem .85rem; display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 2px solid transparent; transition: border-color .15s, box-shadow .15s;
  user-select: none; -webkit-user-select: none;
}
.tile.in-cart { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50), var(--shadow); }
.tile-img {
  position: relative; width: 100%; aspect-ratio: 1; border: 0; border-radius: 14px;
  background: #fff; padding: .35rem; display: grid; place-items: center; overflow: hidden;
  transition: transform .1s;
}
.tile-img:active { transform: scale(.96); }
.tile-img .thumb { position: absolute; inset: .35rem; width: calc(100% - .7rem); height: calc(100% - .7rem); }
.tile-name { font-size: 1.02rem; font-weight: 700; margin-top: .45rem; }
.tile-price { font-size: 1.1rem; color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; margin: .15rem 0 .55rem; }
.badge {
  position: absolute; top: 6px; right: 6px; min-width: 34px; height: 34px; padding: 0 .5rem;
  display: grid; place-items: center; border-radius: 999px; background: var(--blue); color: #fff;
  font-weight: 800; font-size: 1.05rem; box-shadow: 0 2px 6px rgb(29 79 145 / .4);
}
.tag { position: absolute; left: 6px; bottom: 6px; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.tag-red { background: var(--red); color: #fff; }
.tag-amber { background: var(--amber-50); color: var(--amber); border: 1px solid #f5d39a; }
.sorts {
  margin-top: auto; width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--blue-100);
  background: var(--blue-50); color: var(--blue); font-weight: 700;
}

.thumb { display: block; object-fit: contain; border-radius: 10px; }
.thumb-emoji { display: grid; place-items: center; font-size: 4rem; background: linear-gradient(145deg, var(--blue-50), #fff); }
.thumb.sm { width: 56px; height: 56px; flex: none; }
.thumb.sm.thumb-emoji { font-size: 1.8rem; }
.thumb.xs { width: 44px; height: 44px; flex: none; }
.thumb.xs.thumb-emoji { font-size: 1.4rem; }

.stepper { margin-top: auto; display: flex; align-items: center; justify-content: space-between; width: 100%; gap: .4rem; }
.step {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg);
  font-size: 1.5rem; font-weight: 600; line-height: 1; display: grid; place-items: center; flex: none;
}
.step:active:not(:disabled) { transform: scale(.94); }
.step-plus { background: var(--blue); border-color: var(--blue); color: #fff; }
.step:disabled { opacity: .35; }
.step.sm { width: 38px; height: 38px; border-radius: 10px; font-size: 1.2rem; }
.qty { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* Warenkorb */
.cart {
  position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 1.25rem);
  max-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top, 0px) - 2.5rem);
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.cart-handle { display: none; }
.cart-body { display: flex; flex-direction: column; min-height: 0; padding: 1.1rem; gap: .9rem; flex: 1; }
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 60px; flex: 1; -webkit-overflow-scrolling: touch; }
.cart-items li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main total" "actions actions"; gap: .35rem .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-items li.empty { display: block; border: 0; text-align: center; padding: 2rem .5rem; }
.ci-main { grid-area: main; display: flex; flex-direction: column; }
.ci-name { font-weight: 600; }
.ci-sub { color: var(--muted); font-size: .88rem; }
.ci-total { grid-area: total; font-weight: 700; font-variant-numeric: tabular-nums; }
.ci-actions { grid-area: actions; display: flex; align-items: center; gap: .5rem; }
.cart-sum { display: flex; justify-content: space-between; align-items: baseline; padding-top: .2rem; }
.cart-sum span { font-weight: 600; color: var(--muted); }
.cart-sum strong { font-size: 2rem; font-variant-numeric: tabular-nums; }

.given { background: var(--bg); border-radius: 16px; padding: .8rem; display: flex; flex-direction: column; gap: .6rem; }
.given-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bills { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.bills.center { display: flex; justify-content: center; flex-wrap: wrap; margin: .8rem 0 1.2rem; }
.bill {
  min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  font-weight: 700; padding: 0 .6rem; font-variant-numeric: tabular-nums;
}
.bill.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.bill:disabled { opacity: .35; }
.bills .bill:first-child { grid-column: span 2; }
.given-input { display: flex; align-items: center; gap: .4rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 .8rem; }
.given-input input { border: 0; outline: 0; background: none; min-height: 44px; flex: 1; min-width: 0; font-size: 1.05rem; }
.change { font-size: 1.05rem; }
.change strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }

/* ---------- Seiten (Lager / Tag) ---------- */

.page { max-width: 1200px; margin: 0 auto; padding: 1.5rem max(1.25rem, env(safe-area-inset-right)) calc(2rem + var(--safe-b)) max(1.25rem, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 1.25rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head p { max-width: 60ch; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem; }
.stat span { color: var(--muted); font-weight: 600; font-size: .88rem; }
.stat strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.stat.highlight { background: var(--blue); color: #fff; }
.stat.highlight span, .stat.highlight small { color: rgb(255 255 255 / .8); }
.stat.warn { background: var(--amber-50); }
.stat.warn strong { color: var(--amber); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; }
.card > h2 { margin-bottom: .8rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; align-items: start; }

.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; }
.search input { width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); padding: 0 1rem; background: var(--card); }

.stock-list { display: flex; flex-direction: column; gap: 1rem; }
.stock-group { padding: 0; overflow: hidden; }
.sg-head { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sg-title { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.sg-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.sg-row {
  display: grid; grid-template-columns: 44px minmax(120px, 1.4fr) 130px 170px 120px 92px;
  align-items: center; gap: .8rem; padding: .55rem 1.2rem; border-bottom: 1px solid var(--line);
}
.sg-row:last-child { border-bottom: 0; }
.sg-labels { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: .7rem; padding-bottom: .3rem; }
.field-inline input, .stock-stepper input {
  width: 100%; min-height: 42px; border: 1px solid transparent; border-radius: 10px; padding: 0 .6rem; background: var(--bg);
}
.field-inline input:hover, .stock-stepper input:hover { border-color: var(--line); }
.field-inline input:focus, .stock-stepper input:focus { background: #fff; border-color: var(--blue); outline: 0; }
.field-inline.money { display: flex; align-items: center; gap: .3rem; }
.field-inline.money input { text-align: right; font-variant-numeric: tabular-nums; }
.stock-stepper { display: flex; align-items: center; gap: .35rem; }
.stock-stepper input { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.pill { justify-self: start; font-size: .8rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill-green { background: var(--green-50); color: var(--green); }
.pill-amber { background: var(--amber-50); color: var(--amber); }
.pill-red { background: var(--red-50); color: var(--red); }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: .6rem; }

.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
.table td { padding: .65rem .4rem; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }

.journal { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.journal li { display: grid; grid-template-columns: 52px 1fr auto auto; gap: .7rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.journal li:last-child { border-bottom: 0; }
.j-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.j-text { font-size: .95rem; }
.j-amount { font-variant-numeric: tabular-nums; }
.j-move { background: linear-gradient(90deg, var(--blue-50), transparent); }

/* ---------- Formulare ---------- */

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.field > span:first-child { font-weight: 600; font-size: .92rem; color: var(--muted); }
.field input, .field select, .field .money {
  min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 .9rem; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field .money:focus-within { border-color: var(--blue); outline: 3px solid var(--blue-50); }
.field .money { display: flex; align-items: center; gap: .5rem; }
.field .money input { border: 0; outline: 0; padding: 0; min-height: 46px; font-variant-numeric: tabular-nums; }
.field.big .money { min-height: 72px; }
.field.big .money input { font-size: 2.2rem; font-weight: 700; text-align: center; }
.field.big .money span { font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.field.big > span:first-child { text-align: center; font-size: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.img-pick { display: flex; align-items: center; gap: .8rem; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); padding: 4px; border-radius: 12px; margin-bottom: .9rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; text-align: center; padding: .65rem; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 3px solid var(--blue-100); }

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgb(15 25 45 / .45);
  display: grid; place-items: center; padding: 1rem; animation: fade .15s ease;
}
.modal {
  background: #fff; border-radius: 24px; width: min(520px, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto;
  padding: 1.5rem; box-shadow: 0 20px 60px rgb(0 0 0 / .25); animation: pop .18s ease;
}
.modal > h2 { margin-bottom: .6rem; font-size: 1.35rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }
.modal-actions .spacer { flex: 1; }
.modal.sheet { width: min(980px, 100%); padding: 0; display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.sheet-head h2 { flex: 1; font-size: 1.35rem; }
.sheet-grid { padding: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sheet-grid .tile { box-shadow: none; border-color: var(--line); }
.sheet-grid .tile.in-cart { border-color: var(--blue); }
.sheet-foot { padding: 1rem 1.25rem calc(1rem + var(--safe-b)); border-top: 1px solid var(--line); text-align: center; color: var(--muted); position: sticky; bottom: 0; background: #fff; }
.sheet-foot strong { color: var(--ink); }

.welcome { text-align: center; margin-bottom: 1rem; }
.welcome-logo { width: 190px; margin-bottom: .6rem; }
.welcome h2 { font-size: 1.6rem; }
.notice { background: var(--amber-50); color: #7a4a00; border-radius: 12px; padding: .75rem 1rem; }

.summary { margin: .8rem 0 1.2rem; background: var(--bg); border-radius: 14px; padding: .4rem 1rem; }
.summary div { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary .total dt { color: var(--ink); font-weight: 700; }
.summary .total dd { font-size: 1.25rem; color: var(--blue); }
.diff { min-height: 1.5rem; font-size: 1.05rem; }
.diff.ok { color: var(--green); font-weight: 700; }
.diff.is-neg, .diff.is-pos { font-weight: 600; }

.modal-change { width: auto; padding: 0; background: var(--green); color: #fff; }
.change-pop { display: flex; flex-direction: column; align-items: center; padding: 2.5rem 4rem; cursor: pointer; }
.change-pop span { font-size: 1.2rem; font-weight: 600; opacity: .85; }
.change-pop strong { font-size: 4rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.change-pop small { opacity: .7; margin-top: .5rem; }

/* ---------- Toast ---------- */

#toast {
  position: fixed; left: 50%; bottom: calc(1.5rem + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 150%); opacity: 0;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgb(0 0 0 / .25); transition: transform .25s ease, opacity .25s ease; pointer-events: none;
  max-width: calc(100vw - 2rem); text-align: center;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.success { background: var(--green); }
#toast.error { background: var(--red); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */

/* iPad hochkant / kleine Laptops */
@media (max-width: 1100px) {
  .register { grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
  .status-item:not(.main) { display: none; }
  .sg-row { grid-template-columns: 44px minmax(110px, 1fr) 120px 160px 92px; }
  .sg-row .pill { display: none; }
  .sg-labels span:nth-child(5) { display: none; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 64px; }
  .brand img { height: 46px; }
  .tabs a { padding: .55rem .8rem; }
  .sg-row { grid-template-columns: 44px 1fr 1fr; grid-template-areas: "img name name" "img price stock" "img actions actions"; row-gap: .4rem; }
  .sg-row > .thumb { grid-area: img; align-self: start; }
  .sg-row > .field-inline:not(.money) { grid-area: name; }
  .sg-row > .money { grid-area: price; }
  .sg-row > .stock-stepper { grid-area: stock; }
  .sg-row > .row-actions { grid-area: actions; }
  .sg-labels { display: none; }
}

/* Schmale Bildschirme: Warenkorb als Leiste unten */
@media (max-width: 760px) {
  .register { grid-template-columns: 1fr; padding-bottom: calc(110px + var(--safe-b)); }
  .tabs a { padding: .5rem .65rem; font-size: .92rem; }
  .tabs a[data-view="tag"] { font-size: 0; }
  .tabs a[data-view="tag"]::after { content: "Tag"; font-size: .92rem; }
  .status-item.main { padding: .25rem .6rem; }
  .status-item.main span { display: none; }
  .cart {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30; max-height: 85dvh;
    border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgb(0 0 0 / .18);
  }
  .cart-handle {
    display: flex; align-items: center; gap: 1rem; width: 100%; border: 0; background: var(--blue); color: #fff;
    padding: 1rem 1.25rem calc(1rem + var(--safe-b)); font-size: 1.05rem;
  }
  .cart.open .cart-handle { padding-bottom: 1rem; }
  .cart-handle-total { margin-left: auto; font-size: 1.4rem; font-weight: 800; }
  .chev { transition: transform .2s; }
  .cart.open .chev { transform: rotate(180deg); }
  .cart:not(.open) .cart-body { display: none; }
  .cart-body { overflow-y: auto; padding-bottom: calc(1rem + var(--safe-b)); }
  .cart-items { overflow: visible; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .step { width: 42px; height: 42px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand img { height: 40px; }
  .topbar { gap: .6rem; }
  .grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
}

/* ---------- Pfand ---------- */

.pfand-note { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-top: .1rem; }
.tile-pfand { background: linear-gradient(180deg, var(--green-50), #fff 70%); }
.tile-pfand .tile-img { background: transparent; }
.tile-pfand .step-plus { background: var(--green); border-color: var(--green); }
.tile-pfand.in-cart { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-50), var(--shadow); }
.tile-pfand .badge { background: var(--green); box-shadow: 0 2px 6px rgb(19 138 75 / .4); }
.tile-pfand .tile-price { color: var(--green); }
.pfand-symbol {
  width: 82%; aspect-ratio: 1; border-radius: 50%; background: var(--green); color: var(--green);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  box-shadow: inset 0 0 0 6px rgb(255 255 255 / .25);
}
.pfand-icon { width: 52%; height: auto; color: var(--green); filter: drop-shadow(0 0 0 #fff); }
.pfand-icon path:first-child { fill: #fff; stroke: #fff; }
.pfand-symbol > span { color: #fff; font-weight: 800; letter-spacing: .12em; font-size: .95rem; }
.ci-pfand .ci-name { color: var(--green); }
.cart-sum.payout strong { color: var(--green); }
.check { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }
.pfand-icon rect { fill: #fff; }
[hidden] { display: none !important; }
.bill { white-space: nowrap; }
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
  .bill { padding: 0 .3rem; font-size: .92rem; }
}
@media (max-width: 1100px) {
  .register { grid-template-columns: minmax(0, 1fr) 300px; }
  .step:not(.sm) { width: 40px; height: 40px; border-radius: 12px; font-size: 1.35rem; }
}
