:root {
  --green: #16a34a;
  --green-dark: #128040;
  --green-light: #dcfce7;
  --green-grad: linear-gradient(135deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #8a94a6;
  --border: #edf0f4;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow: 0 4px 16px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 34px rgba(16,24,40,.16);
  --r: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button { font-family: inherit; }
input { font-family: inherit; }

/* ---------------- Header ---------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--green-grad);
  color: #fff;
  padding: calc(var(--safe-t) + 16px) 18px 16px;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 20px rgba(22,163,74,.28);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.logo {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,255,255,.2);
  border-radius: 11px;
  font-size: 1.2rem;
}
.logo svg { width: 20px; height: 20px; }
.list-name {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  color: #fff;
  font-size: 1.22rem;
  font-weight: 750;
  letter-spacing: -.01em;
  padding: 2px 0;
  min-width: 0;
  flex: 1;
  outline: none;
}
.list-name:focus { border-bottom-color: rgba(255,255,255,.7); }
.list-name::placeholder { color: rgba(255,255,255,.65); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .08s ease, background .15s ease;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:active { transform: scale(.95); }
.icon-btn.primary { background: #fff; color: var(--green-dark); box-shadow: var(--shadow-sm); }
.icon-btn.ghost { background: transparent; }

.sync-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.5); flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}
.sync-dot.online { background: #d9f99d; animation: livePulse 1.8s ease-out infinite; }
.sync-dot.offline { background: #fecaca; box-shadow: 0 0 0 4px rgba(254,202,202,.25); animation: none; }
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(217,249,157,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(217,249,157,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,249,157,0); }
}
@media (prefers-reduced-motion: reduce) { .sync-dot.online { animation: none; box-shadow: 0 0 0 4px rgba(217,249,157,.3); } }

/* Fortschrittsbalken */
.progress {
  margin-top: 14px;
  height: 7px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0;
  background: #fff;
  border-radius: 999px;
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}
.progress-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: .8rem; color: rgba(255,255,255,.92);
}
.progress-label .done-check { font-weight: 700; }

/* ---------------- Main ---------------- */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 14px calc(var(--safe-b) + 104px);
}

/* Presence */
.presence {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 4px 4px 12px; color: var(--muted); font-size: .84rem;
}
.presence .avatars { display: inline-flex; }
.presence .who { color: var(--text); font-weight: 650; }
.avatar {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green-grad); color: #fff; font-size: .72rem; font-weight: 700;
  margin-left: -7px; border: 2px solid var(--bg);
  box-shadow: var(--shadow-sm);
}
.avatar:first-child { margin-left: 0; }

/* Liste */
.list { list-style: none; margin: 0; padding: 0; }
.section-label {
  font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin: 18px 6px 8px;
}
.item {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 14px;
  margin-bottom: 9px;
  box-shadow: var(--shadow-sm);
  transition: opacity .2s, transform .12s;
}
.item.enter { animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: 0; } }
.item:active { transform: scale(.995); }
.item .check {
  width: 38px; height: 38px;
  border: 3px solid #d5dae2;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.25rem;
  transition: background .18s, border-color .18s, transform .12s;
}
.item .check:active { transform: scale(.85); }
.item.done .check {
  background: var(--green); border-color: var(--green);
  animation: checkpop .28s cubic-bezier(.2,1.4,.5,1);
}
@keyframes checkpop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.item .label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item .line { display: flex; align-items: baseline; gap: 8px; }
.item .name { font-size: 1.02rem; font-weight: 550; word-break: break-word; line-height: 1.25; }
.item .qty-tag {
  font-size: .74rem; font-weight: 650; color: var(--green-dark);
  background: var(--green-light); padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.item.done { opacity: .62; }
.item.done .name { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.by-tag { font-size: .74rem; color: var(--muted); }
.item .del {
  background: none; border: none; color: #c7cdd6;
  font-size: 1.15rem; cursor: pointer; padding: 6px; flex-shrink: 0; line-height: 1;
  border-radius: 8px; transition: color .15s, background .15s;
}
.item .del:active { color: var(--danger); background: #fef2f2; }

/* Empty state */
.empty {
  text-align: center; color: var(--muted); margin-top: 12vh;
  padding: 0 30px;
}
.empty .emoji { font-size: 3.4rem; display: block; margin-bottom: 12px; }
.empty .big { font-size: 1.05rem; font-weight: 650; color: var(--text); margin-bottom: 4px; }
.empty .sub { font-size: .9rem; line-height: 1.5; }

/* Footer-Aktionen */
.list-footer {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 4px 6px; flex-wrap: wrap;
}
.list-footer .spacer { flex: 1; }
.text-btn {
  background: none; border: none; color: var(--muted);
  font-size: .84rem; font-weight: 650; cursor: pointer; padding: 8px 10px;
  border-radius: 10px; transition: background .15s, color .15s;
}
.text-btn:active { background: #eef1f5; }
.text-btn.danger { color: var(--danger); }
.text-btn.danger:active { background: #fef2f2; }

/* ---------------- Fixierte Eingabeleiste (Daumenzone) ---------------- */
.add-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  padding: 10px 12px calc(var(--safe-b) + 10px);
  background: linear-gradient(to top, var(--bg) 62%, rgba(246,247,249,0));
}
.add-row {
  display: flex;
  gap: 8px;
  background: var(--card);
  padding: 8px;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  max-width: 616px;
  margin: 0 auto;
}
.add-row input {
  border: none;
  background: #f3f5f8;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 1rem;
  outline: none;
  transition: box-shadow .15s;
}
.add-row input:focus { box-shadow: inset 0 0 0 2px var(--green); background: #fff; }
#itemInput { flex: 1; min-width: 0; }
.qty { width: 92px; }
.add-btn {
  background: var(--green-grad);
  color: #fff; border: none;
  width: 50px; flex-shrink: 0;
  border-radius: 12px;
  font-size: 1.7rem; line-height: 1; font-weight: 400;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(22,163,74,.35);
  transition: transform .08s;
}
.add-btn:active { transform: scale(.93); }

/* ---------------- Bottom-Sheet & Modal ---------------- */
.sheet {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(17,24,39,.5);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet-card {
  background: var(--card);
  width: 100%; max-width: 640px;
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(var(--safe-b) + 20px);
  box-shadow: var(--shadow-lg);
  animation: slideUp .28s cubic-bezier(.2,.9,.25,1);
  max-height: 90dvh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(100%); } }
.grabber {
  width: 40px; height: 5px; border-radius: 999px;
  background: #e2e6ec; margin: 6px auto 14px;
}
.sheet-card h2 { margin: 0 0 18px; font-size: 1.3rem; letter-spacing: -.01em; }
.share-block { margin-bottom: 22px; }
.share-block h3 { margin: 0 0 6px; font-size: .95rem; font-weight: 700; }
.sheet-sub { margin: 0 0 12px; color: var(--muted); font-size: .88rem; line-height: 1.45; }

.icon-btn.block {
  display: flex; justify-content: center; width: 100%; padding: 15px;
  font-size: 1rem; background: var(--green-grad); color: #fff;
  box-shadow: 0 4px 12px rgba(22,163,74,.3);
}

.code-display {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--green-light);
  border-radius: 16px; padding: 18px 22px; margin-bottom: 12px;
}
.code-value {
  font-size: 2.4rem; font-weight: 800; letter-spacing: .18em;
  color: var(--green-dark); font-variant-numeric: tabular-nums;
}
.code-timer { color: var(--green-dark); font-size: .82rem; font-weight: 600; opacity: .8; text-align: right; }

.join-row { display: flex; gap: 8px; }
.join-row input {
  flex: 1; min-width: 0; text-align: center;
  font-size: 1.5rem; font-weight: 800; letter-spacing: .3em;
  border: 2px solid var(--border); border-radius: 14px; padding: 12px;
  font-variant-numeric: tabular-nums; outline: none;
  transition: border-color .15s;
}
.join-row input:focus { border-color: var(--green); }
.join-row .icon-btn { background: var(--green-grad); color: #fff; padding: 0 20px; }

.share-link-row { display: flex; gap: 8px; }
.share-link-row input {
  flex: 1; min-width: 0;
  border: 2px solid var(--border); border-radius: 14px;
  padding: 13px 15px; font-size: .88rem; color: var(--text);
  background: #f7f9fb; outline: none;
}
.share-link-row .add-btn { width: 52px; border-radius: 14px; font-size: 1.2rem; }

.sheet-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 6px;
}
.sheet-actions .icon-btn { background: #f0f2f5; color: var(--text); }
.sheet-actions .text-btn { margin-left: auto; }

.divider { text-align: center; color: var(--muted); font-size: .8rem; margin: 4px 0 16px; position: relative; }
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--border);
}
.divider::before { left: 0; } .divider::after { right: 0; }

/* Modal (Name-Onboarding) */
.modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(17,24,39,.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 22px; animation: fade .2s ease;
}
.modal-card {
  background: var(--card); border-radius: 26px; padding: 30px 24px;
  width: 100%; max-width: 380px; box-shadow: var(--shadow-lg);
  text-align: center;
  animation: popIn .3s cubic-bezier(.2,.9,.25,1);
}
@keyframes popIn { from { transform: scale(.94); opacity: 0; } }
.modal-card .big-logo {
  width: 68px; height: 68px; margin: 0 auto 6px;
  display: grid; place-items: center;
  background: var(--green-light); border-radius: 20px; font-size: 2.2rem;
}
.modal-card .big-logo svg { width: 36px; height: 36px; }
.modal-card h2 { margin: 12px 0 6px; font-size: 1.4rem; letter-spacing: -.01em; }
.modal-card p { color: var(--muted); font-size: .92rem; line-height: 1.5; margin: 0 0 20px; }
.modal-card input {
  width: 100%; border: 2px solid var(--border); border-radius: 14px;
  padding: 15px 16px; font-size: 1.08rem; text-align: center; outline: none;
  transition: border-color .15s;
}
.modal-card input:focus { border-color: var(--green); }
.modal-card .add-btn {
  width: 100%; height: 52px; margin-top: 14px;
  font-size: 1.05rem; font-weight: 750; border-radius: 14px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--safe-b) + 92px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #111827; color: #fff;
  padding: 13px 22px; border-radius: 999px;
  font-size: .9rem; font-weight: 550;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 250; max-width: 92vw; text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 560px) {
  .code-value { font-size: 2.6rem; }
}

/* ================= Neue Features ================= */
.icon-btn.square { padding: 9px; }
.icon-btn.square svg { width: 20px; height: 20px; }

/* Emoji-Badge pro Artikel */
.item .emoji-badge { font-size: 1.1rem; line-height: 1; margin-right: 2px; }

/* Häufig-Chips */
.chips-row { display: flex; align-items: center; gap: 8px; padding: 0 4px 6px; }
.chips-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); flex-shrink: 0; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; white-space: nowrap;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px; padding: 7px 13px;
  font-size: .86rem; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .08s, background .12s;
}
.chip:active { transform: scale(.94); background: var(--green-light); }
.chip .c-emoji { margin-right: 4px; }

/* Duplikat-Highlight */
.item.flash { animation: flashRow 1s ease; }
@keyframes flashRow {
  0%,100% { background: var(--card); }
  30% { background: var(--green-light); }
}

/* Menü-Einträge */
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: none; border: none; cursor: pointer;
  padding: 15px 6px; font-size: 1.02rem; color: var(--text);
  border-bottom: 1px solid var(--border); text-align: left;
}
.menu-item:last-of-type { border-bottom: none; }
.menu-item:active { background: var(--bg); border-radius: 12px; }
.mi-ic { font-size: 1.25rem; width: 26px; text-align: center; flex-shrink: 0; }
.mi-tx { flex: 1; font-weight: 550; }
.mi-ar { color: var(--muted); font-size: 1.3rem; }
.mi-state { color: var(--green-dark); font-weight: 700; font-size: .82rem; background: var(--green-light); padding: 4px 11px; border-radius: 999px; }

/* Meine Listen */
.lists-container { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; max-height: 46vh; overflow-y: auto; }
.list-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border-radius: 14px; padding: 13px 14px; cursor: pointer;
  border: 2px solid transparent; transition: border-color .12s;
}
.list-card.active { border-color: var(--green); background: var(--green-light); }
.list-card .lc-body { flex: 1; min-width: 0; }
.list-card .lc-name { font-weight: 650; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card .lc-sub { font-size: .78rem; color: var(--muted); }
.list-card .lc-leave { background: none; border: none; color: var(--muted); font-size: 1.1rem; padding: 6px; cursor: pointer; border-radius: 8px; }
.list-card .lc-leave:active { color: var(--danger); background: #fef2f2; }
.list-card .lc-badge { background: var(--green); color:#fff; font-size:.7rem; font-weight:700; padding:2px 8px; border-radius:999px; }

/* Verlauf */
.history-container { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; max-height: 60vh; overflow-y: auto; }
.hist-item { display: flex; align-items: baseline; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.hist-item:last-child { border-bottom: none; }
.hist-ic { font-size: 1rem; flex-shrink: 0; }
.hist-tx { flex: 1; font-size: .92rem; line-height: 1.35; }
.hist-tx b { font-weight: 700; }
.hist-time { font-size: .74rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.hist-empty { text-align: center; color: var(--muted); padding: 30px; font-size: .9rem; }

/* Snackbar */
.snackbar {
  position: fixed;
  bottom: calc(var(--safe-b) + 92px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #111827; color: #fff;
  padding: 12px 14px 12px 20px; border-radius: 14px;
  font-size: .9rem; font-weight: 550;
  display: flex; align-items: center; gap: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 260; max-width: 92vw;
  box-shadow: var(--shadow-lg);
}
.snackbar.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.snack-action {
  background: none; border: none; color: #6ee7a0; font-weight: 800;
  font-size: .9rem; cursor: pointer; padding: 6px 8px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .03em;
}

/* ================= Dark Mode ================= */
:root[data-theme="dark"] {
  --bg: #0f1420;
  --card: #1a2131;
  --text: #eef1f6;
  --muted: #8b95a7;
  --border: #263042;
  --green-light: #12351f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 12px 34px rgba(0,0,0,.6);
}
:root[data-theme="dark"] .add-row input { background: #232c3e; color: var(--text); }
:root[data-theme="dark"] .add-row input:focus { background: #2a3346; }
:root[data-theme="dark"] .share-link-row input { background: #232c3e; }
:root[data-theme="dark"] .join-row input,
:root[data-theme="dark"] .modal-card input { background: #232c3e; color: var(--text); border-color: #2c3648; }
:root[data-theme="dark"] .item .check { border-color: #3a4560; }
:root[data-theme="dark"] .chip { background: #232c3e; border-color: #2c3648; }
:root[data-theme="dark"] .add-bar { background: linear-gradient(to top, var(--bg) 62%, rgba(15,20,32,0)); }
:root[data-theme="dark"] .item { border: 1px solid #232c3e; }
:root[data-theme="dark"] .list-card { background: #232c3e; }
:root[data-theme="dark"] .mi-state, :root[data-theme="dark"] .item .qty-tag { color: #6ee7a0; }

/* ================= Install-Banner & iOS-Anleitung ================= */
.install-banner {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--safe-b) + 84px);
  z-index: 240;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 16px;
  padding: 12px 12px 12px 14px;
  box-shadow: var(--shadow-lg);
  max-width: 616px; margin: 0 auto;
  animation: slideUp .3s cubic-bezier(.2,.9,.25,1);
  border: 1px solid var(--border);
}
.install-banner .ib-ic {
  font-size: 1.5rem; width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--green-light); border-radius: 12px;
}
.install-banner .ib-tx { flex: 1; min-width: 0; }
.install-banner .ib-title { font-weight: 700; font-size: .95rem; }
.install-banner .ib-sub { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.install-banner .icon-btn.primary { background: var(--green); color: #fff; }
.install-banner .ib-close {
  background: none; border: none; color: var(--muted); font-size: 1rem;
  cursor: pointer; padding: 4px 6px; align-self: flex-start; flex-shrink: 0;
}

.ios-step { display: flex; align-items: center; gap: 14px; padding: 12px 4px; }
.ios-num {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 800; font-size: .95rem;
}
.ios-tx { font-size: 1rem; line-height: 1.4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ios-share {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  background: #eaf4ff; border-radius: 8px; vertical-align: middle;
}
.ios-share svg { width: 17px; height: 17px; }
.ios-plus {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 1.1rem; color: var(--text);
}

/* ================= Einstellungen / Segmented / Geschäft ================= */
.setting { margin-bottom: 22px; }
.setting-label { font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.setting-hint { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 10px 2px 0; }

.segmented {
  display: flex; gap: 4px; background: var(--bg);
  border-radius: 12px; padding: 4px;
}
.segmented button {
  flex: 1; border: none; background: none; cursor: pointer;
  padding: 11px 8px; border-radius: 9px;
  font-size: .9rem; font-weight: 650; color: var(--muted);
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.segmented button.active {
  background: var(--card); color: var(--text); box-shadow: var(--shadow-sm);
}
:root[data-theme="dark"] .segmented { background: #0c111c; }
:root[data-theme="dark"] .segmented button.active { background: #2a3346; }

/* Geschäft-Tag am Artikel */
.item .store-tag {
  font-size: .72rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 3px;
}
.item .store-tag .st-emoji { font-size: .8rem; }

/* Geschäft-Auswahl im Bearbeiten-Modal */
.edit-store-label { text-align: left; font-size: .82rem; font-weight: 700; color: var(--muted); margin: 16px 2px 8px; }
.store-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.store-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px solid var(--border); background: var(--card);
  border-radius: 12px; padding: 10px 4px; cursor: pointer;
  font-size: .74rem; font-weight: 600; color: var(--text);
  transition: border-color .12s, background .12s;
}
.store-opt .so-emoji { font-size: 1.3rem; }
.store-opt.active { border-color: var(--green); background: var(--green-light); }
:root[data-theme="dark"] .store-opt { background: #232c3e; border-color: #2c3648; }
:root[data-theme="dark"] .store-opt.active { border-color: var(--green); background: #12351f; }
