/* 10-einkauf.css — Einkaufsliste, Läden (Ordner), Laden-Fenster. Teil der geordneten Kaskade: in index.html in Nummern-Reihenfolge geladen; Regeln NICHT zwischen Dateien verschieben, ohne die Reihenfolge zu bedenken. */
/* ─── SHOPPING LIST – Liquid-Glass Header + V1-Body ─────────────────────── */
/* Header übernimmt den shared Liquid-Glass-Stil (hero-caption + hero-title +
   hero-stat). Body (Folder-Bar, Items, Add-Btn) bleibt im V1-Look. */
#shopPage { display: none; flex-direction: column; min-height: 100vh; }
/* padding-bottom reserviert Platz für die schwebende Bottom-Nav (sticky) + Gesten-
   Navigation (env(safe-area-inset-bottom)) → letzte Einträge sind erreichbar (wie .stats-body). */
.shop-body { padding: 16px 24px; padding-bottom: max(100px, calc(40px + env(safe-area-inset-bottom))); flex: 1; overflow-y: auto; }

.shop-add-row {
  display: flex; gap: 0; margin-bottom: 12px;
  align-items: stretch;
}
/* autocomplete-wrap ist flex-child der add-row; muss selbst flex sein,
   damit das input drin den ganzen Wrap füllt — sonst klafft eine Lücke
   zwischen Input-Right-Edge und Add-Button. */
.shop-add-row .autocomplete-wrap {
  display: flex !important;
  flex-direction: column;
}
.shop-input {
  width: 100%;
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border-radius: 13px 0 0 13px;
  border: 1px solid rgba(255,255,255,0.16);
  border-right: none;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--text); outline: none;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 1px 3px rgba(0,0,0,0.30);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.shop-input::placeholder {
  color: var(--text-muted); opacity: 0.75; font-weight: 700;
}
.shop-input:focus {
  /* Border/Background-Wechsel bleibt – Outer-Glow kommt von .shop-add-row:focus-within */
  border-color: color-mix(in srgb, var(--blue) 70%, white);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12);
}
/* Focus-Within: der gesamte Compound (Input + Mic + Plus) bekommt einen
   gemeinsamen Outer-Glow + Akzent-Borders, statt nur das Input. */
.shop-add-row {
  border-radius: 13px;
  transition: box-shadow 0.22s ease;
}
.shop-add-row:focus-within {
  box-shadow:
    0 0 0 3px rgba(var(--blue-rgb), 0.18),
    0 4px 14px rgba(var(--blue-rgb), 0.22);
}
.shop-add-row:focus-within .shop-mic-btn {
  border-color: color-mix(in srgb, var(--blue) 70%, white);
  background: rgba(var(--cell-glow-rgb), 0.16);
}
.shop-add-row:focus-within .shop-add-btn {
  border-color: color-mix(in srgb, var(--blue) 70%, white);
  border-left-color: color-mix(in srgb, var(--blue) 50%, white);
  background: rgba(var(--cell-glow-rgb), 0.26);
}
/* Mic + Plus bilden eine zusammenhängende Action-Group rechts vom Input
   (compound pill). Beide haben Akzent-Tint, nur unterschiedliche Intensität:
   Mic = sekundäre Action (etwas dimmer), Plus = primäre Action (voll). */
.shop-mic-btn {
  width: 42px; height: 42px;
  border-radius: 0;
  border: 1px solid rgba(var(--cell-glow-rgb), 0.28);
  border-right: none; /* Trenner zwischen Mic und Plus kommt von Plus:border-left */
  background: rgba(var(--cell-glow-rgb), 0.10);
  color: color-mix(in srgb, var(--blue) 80%, white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 1px 2px rgba(0,0,0,0.20);
  transition: background 0.2s, color 0.2s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.shop-mic-btn svg { width: 17px; height: 17px; }
.shop-mic-btn:hover {
  background: rgba(var(--cell-glow-rgb), 0.16);
}
.shop-mic-btn:active { transform: scale(0.92); }

.shop-add-btn {
  width: 48px; height: 42px;
  border-radius: 0 13px 13px 0;
  border: 1px solid rgba(var(--cell-glow-rgb), 0.32);
  border-left: 1px solid rgba(var(--cell-glow-rgb), 0.22); /* feine Trennlinie zum Mic */
  background: rgba(var(--cell-glow-rgb), 0.20);
  color: var(--text-accent); font-size: 24px; font-weight: 400; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 1px 3px rgba(0,0,0,0.25);
  transition: background 0.2s, border-color 0.2s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.shop-add-btn:active {
  background: rgba(var(--cell-glow-rgb), 0.34);
  border-color: rgba(var(--cell-glow-rgb), 0.50);
  transform: scale(0.94);
}

.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 16px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: opacity 0.2s;
  position: relative;   /* für die Halte-Fortschritts-Leiste */
}
.shop-item.done { opacity: 0.45; }
/* Halte-Fortschritt (Produkt mittig gedrückt halten → Produktbild-Check):
   Ripple in transparenter App-Farbe, der GENAU am Berührungspunkt startet und
   über die 4s nach außen wächst (Radius via JS / clip-path). */
/* ── Cookidoo-Keks: Abbeiß-Animation ──
   Alle 5s ein Biss: voller Keks (ck-full) → kurzer „Chomp"-Ruck des ganzen
   Icons → Biss-Lücke (ck-bitten) erscheint, Krümel (ck-crumbs) fliegen schräg
   nach außen davon → am Zyklusanfang ist der Keks wieder ganz. Reine
   Opacity-/Transform-Animation; Reduced-Motion stoppt sie global. */
#shopCookidooBtn .ck-full   { animation: ckFull 5s ease-in-out infinite; }
#shopCookidooBtn .ck-bitten { animation: ckBitten 5s ease-in-out infinite; }
/* Schoko-Stückchen im Biss-Bereich: exakt dieselbe Phase wie der volle Keks —
   da, solange er ganz ist; weg, sobald abgebissen wurde. */
#shopCookidooBtn .ck-biss-chips { animation: ckFull 5s ease-in-out infinite; }
#shopCookidooBtn svg        { animation: ckChomp 5s ease-in-out infinite; }
#shopCookidooBtn .ck-crumbs circle {
  opacity: 0;
  animation: ckCrumbs 5s ease-out infinite;
}
#shopCookidooBtn .ck-crumbs circle:nth-of-type(2) { animation-delay: 0.06s; }
#shopCookidooBtn .ck-crumbs circle:nth-of-type(3) { animation-delay: 0.12s; }
@keyframes ckFull   { 0%, 44% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes ckBitten { 0%, 44% { opacity: 0; } 46%, 100% { opacity: 1; } }
@keyframes ckChomp {
  0%, 41%, 54%, 100% { transform: scale(1) rotate(0); }
  45%                { transform: scale(0.86) rotate(-8deg); }
  49%                { transform: scale(1.05) rotate(2deg); }
}
@keyframes ckCrumbs {
  0%, 44% { opacity: 0; transform: translate(0, 0) scale(1); }
  47%     { opacity: 1; transform: translate(0.4px, -0.4px) scale(1); }
  64%     { opacity: 0; transform: translate(3px, -3px) scale(0.4); }
  100%    { opacity: 0; transform: translate(3px, -3px) scale(0.4); }
}

/* ── Stern-Pin-Modus ──
   Button aktiv = KOMPLETT gefüllter Stern in App-Farbe + Klick-Pop;
   gepinnte Produkte stehen oben mit ROTEM Feld (Schrift bleibt normal);
   der Halte-Ripple ist im Stern-Modus rot statt blau (gleiche Geste). */
/* Verschieben-Modus AKTIV: deutlicher Akzent-Zustand (im Modus ist das „×"
   ausgeblendet und ein Tap verschiebt — der Button muss klar „an" wirken). */
#moveModeBtn.active {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.20) 0%, transparent 60%),
    linear-gradient(150deg,
      color-mix(in srgb, rgb(var(--cell-glow-rgb)) 38%, transparent),
      color-mix(in srgb, rgb(var(--cell-glow-rgb)) 20%, transparent));
  border-color: color-mix(in srgb, rgb(var(--cell-glow-rgb)) 55%, transparent);
  color: rgb(var(--cell-glow-rgb));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px color-mix(in srgb, rgb(var(--cell-glow-rgb)) 25%, transparent),
    0 4px 12px rgba(var(--cell-glow-rgb), 0.28);
}
#moveModeBtn.flash svg { animation: starPop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes starPop {
  0%   { transform: scale(1)    rotate(0); }
  40%  { transform: scale(1.35) rotate(-14deg); }
  100% { transform: scale(1)    rotate(0); }
}
/* Stern-Modus-Ripple: App-Farbe (Pin nach oben) — Bild-Markierung ist ROT (s.u.).
   Doppelklasse nötig: die Basis-Regel .shop-flag-fill steht WEITER UNTEN und
   würde bei gleicher Spezifität sonst gewinnen (Reihenfolge im Stylesheet). */
.shop-flag-fill.shop-flag-fill--star {
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%),
              rgba(var(--blue-rgb, 2,132,199), 0.45) 0%,
              rgba(var(--blue-rgb, 2,132,199), 0.26) 70%,
              rgba(var(--blue-rgb, 2,132,199), 0.16) 100%);
}
.shop-flag-fill {
  position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none; z-index: 0;
  /* Weiches radiales Glühen vom Berührungspunkt (--fx/--fy via JS) – Tiefe statt
     flacher Fläche. ROT = Produktbild-Check (kaputtes Bild markieren). */
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%),
              rgba(248,113,113,0.42) 0%,
              rgba(248,113,113,0.24) 70%,
              rgba(248,113,113,0.16) 100%);
  clip-path: circle(0px at 50% 50%);            /* JS setzt echten Mittelpunkt + Radius */
  -webkit-clip-path: circle(0px at 50% 50%);
  /* lebendiges „Atmen", damit die langsame Füllung nie statisch wirkt */
  animation: shopFlagBreathe 1.3s ease-in-out infinite;
}
/* Entfernen nutzt denselben blauen Ripple wie das Hinzufügen – nur die Richtung ist
   umgekehrt: das Blau läuft zum Finger zusammen (blau→grau). Steuerung per JS (clip-path). */
@keyframes shopFlagBreathe {
  /* FPS: opacity statt filter — kompositierbar (GPU), kein Layer-Repaint pro Frame */
  0%, 100% { opacity: 0.88; }
  50%      { opacity: 1; }
}
/* Satter, weicher Abschluss-Blitz, sobald nach 4s übertragen wird. */
.shop-flag-fill.flag-done { animation: shopFlagDone 0.5s cubic-bezier(0.32, 0.72, 0, 1) forwards; }
@keyframes shopFlagDone {
  0%   { filter: brightness(1.45); opacity: 1; }
  100% { filter: brightness(1);    opacity: 0; }
}
/* Zeile gibt beim Abschluss einen kurzen, federnden „Pop" – gleiche Spring-Kurve wie der Tab-Wechsel. */
.shop-item.flag-pop { animation: shopFlagPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes shopFlagPop {
  0%   { transform: scale(1);     }
  35%  { transform: scale(1.035); }
  100% { transform: scale(1);     }
}
/* Bleibendes ROTES Feld, sobald das Produkt im Produktbild-Check gelandet ist. */
.shop-item.flagged::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(248,113,113,0.12);
  border-radius: inherit; pointer-events: none; z-index: 0;
}
/* ── Verschieben-Modus ── Im Modus ist das „×"/Löschen ausgeblendet (ein Tap
   verschiebt das Produkt, statt es zu löschen); die Zeilen wirken antippbar. */
.shop-page--move .shop-delete { display: none !important; }
.shop-page--move .shop-item { cursor: pointer; }
.shop-page--move .shop-item:active { background: rgba(var(--cell-glow-rgb), 0.10); }
/* Ziel-Laden-Liste im Verschieben-Sheet: Chips umbrechend + zentriert. */
.move-folders {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 4px 0 12px;
}
.move-folder-chip.is-source { opacity: 0.45; cursor: default; }
.move-folder-here { font-size: 11px; font-weight: 800; opacity: 0.8; margin-left: 2px; }

/* Favoriten-Pin: gepinnte Produkte bekommen ein Feld in APP-FARBE (Schrift bleibt
   normal). Steht NACH .flagged — ist ein Produkt beides, gewinnt das Pin-Feld. */
.shop-item.pinned::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(var(--blue-rgb, 2,132,199), 0.16);
  border-radius: inherit; pointer-events: none; z-index: 0;
}
.shop-item.pinned { box-shadow: inset 0 0 0 1px rgba(var(--blue-rgb, 2,132,199), 0.38); }
.shop-item > *:not(.shop-flag-fill) { position: relative; z-index: 1; }
.shop-check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.8px solid rgba(var(--blue-rgb), 0.55);
  background: rgba(255,255,255,0.04);
  flex-shrink: 0; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  color: #fff; font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.shop-item.done .shop-check {
  background: rgba(var(--blue-rgb), 0.65);
  border-color: rgba(var(--blue-rgb), 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.20),
    0 0 8px rgba(var(--blue-rgb), 0.25);
}
/* Favorit (gepinnt, nicht erledigt): Stern in dynamischer App-Farbe IM Abhak-Kreis.
   Der Kreis-Text ist bei nicht-erledigten Items leer → der ★ per ::after passt rein.
   Bei erledigt (.done) gewinnt weiter das ✓ (Regel greift nur :not(.done)). */
.shop-item.pinned:not(.done) .shop-check {
  border-color: rgba(var(--cell-glow-rgb), 0.7);
}
.shop-item.pinned:not(.done) .shop-check::after {
  content: '★';
  color: rgb(var(--cell-glow-rgb));
  font-size: 15px; line-height: 1;
}
.shop-item-img-wrap {
  position: relative;
  width: 48px; height: 48px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.10);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, border-color 0.18s;
  /* iOS: beim Gedrückt-Halten KEIN natives „Bild sichern/kopieren"-Menü (sonst
     bricht es unseren Long-Press ab, bevor das eigene Menü aufgeht). */
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
.shop-item-img-wrap:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}
/* Kamera-Hint: erscheint nur wenn das innere <img> noch hidden ist (= kein Foto da) */
.shop-item-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: center / 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
  opacity: 1;
  transition: opacity 0.18s;
}
/* Bild geladen: Hint ausblenden + Border weg */
.shop-item-img-wrap:has(.shop-item-img[style*="display: block"])::after,
.shop-item-img-wrap.has-img::after {
  opacity: 0;
}
.shop-item-img-wrap:has(.shop-item-img[style*="display: block"]),
.shop-item-img-wrap.has-img {
  border-style: solid;
  border-color: transparent;
  background: none;
  cursor: zoom-in;
}
/* Upload-State: Spinner */
.shop-item-img-wrap.uploading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2;
}
.shop-item-img-wrap.uploading::after {
  /* Override: zeigen wir Spinner statt Camera-Hint */
  background:
    conic-gradient(from 0deg, rgba(255,255,255,0.10), rgba(255,255,255,0.85));
  border-radius: 50%;
  width: 22px; height: 22px;
  inset: auto; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: shopImgSpin 0.8s linear infinite;
  -webkit-mask: radial-gradient(circle at center, transparent 6px, #000 7px);
          mask: radial-gradient(circle at center, transparent 6px, #000 7px);
  opacity: 1 !important;
  z-index: 3;
}
@keyframes shopImgSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.shop-item-img {
  width: 48px; height: 48px; object-fit: contain;
  display: none; border-radius: 10px;
  position: relative; z-index: 1;
  /* iOS: kein natives Bild-Menü / Drag-Ghost beim Langdrücken */
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none; user-select: none;
}
/* Name + Mengen-Regler in einem umbrechenden Block: passt beides nicht
   nebeneinander (schmales Display + „20 Stück"), rutscht der Regler UNTER den
   voll ausgeschriebenen Namen — statt den Namen Buchstabe für Buchstabe zu
   zerquetschen. Der ✕-Button bleibt außerhalb (rechts). */
.shop-item-body {
  flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap;
  align-items: center; gap: 4px 10px;
}
.shop-item-text {
  flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; color: var(--text);
  text-decoration: none; overflow-wrap: break-word; word-break: normal;
  /* Long-Press mittig (→ Produktbild-Check): keine iOS-Textauswahl/Lupe dazwischen */
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.shop-item.done .shop-item-text { text-decoration: line-through; color: var(--text-muted); }

/* ── „Geplant hinzufügen"-Bottom-Sheet (Long-Press aufs Eingabefeld) ── */
/* Immer gerendert (kein display:none) → die Slide-Up-Transition greift zuverlässig.
   Geschlossen: nicht anklickbar + Backdrop unsichtbar + Karte unter dem Viewport. */
/* Unter dem App-Picker (mcPicker = --z-modal), damit der Datums-/Zeit-Picker DRÜBER erscheint. */
.planned-sheet { position: fixed; inset: 0; z-index: calc(var(--z-modal, 200) - 20); pointer-events: none; }
.planned-sheet.open { pointer-events: auto; }
.planned-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(calc(2px * var(--glass-mult, 1) * var(--glass-scroll, 1)));
  opacity: 0; transition: opacity 0.3s ease;
}
.planned-sheet.open .planned-sheet-backdrop { opacity: 1; }
.planned-sheet-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 520px; margin: 0 auto;
  background: var(--bg-modal, #16181d);
  border-radius: 20px 20px 0 0; border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 20px);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.45);
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.planned-sheet.open .planned-sheet-card { transform: translateY(0); }
.planned-sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.2); margin: 4px auto 14px; }
.planned-sheet-title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; color: var(--text, #fff); margin-bottom: 14px; }
.planned-title-ic { width: 20px; height: 20px; flex-shrink: 0; color: rgba(var(--cell-glow-rgb, 56,189,248), 0.95); }
.planned-name-wrap { position: relative; margin-bottom: 12px; }
.planned-name {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 12px 14px; color: var(--text, #fff);
  /* Schrift wie beim normalen Suchfeld (.shop-input) */
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  outline: none;
}
.planned-name::placeholder { color: var(--text-muted, rgba(255,255,255,0.6)); opacity: 0.75; font-weight: 700; }
.planned-when-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted, rgba(255,255,255,0.6)); margin: 2px 0 6px; }
/* Datums-/Zeit-Felder öffnen den App-eigenen Picker (kein natives datetime-local mehr) */
.planned-when-row { display: flex; gap: 10px; margin-bottom: 12px; }
.planned-field {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 12px 14px; color: var(--text, #fff);
  font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.15s, transform 0.12s;
}
.planned-field:active { transform: scale(0.98); background: rgba(255,255,255,0.10); }
.planned-field svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.75; }
.planned-field-txt { flex: 1; }
/* Ordner-Auswahl (Ziel-Laden): kompakte, horizontal scrollbare Chip-Reihe —
   Logo/Farbpunkt wie in der Tab-Leiste; der gewählte trägt den Akzent-Ring. */
.planned-folders {
  display: flex; gap: 8px; margin-bottom: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 2px; scrollbar-width: none;
}
.planned-folders::-webkit-scrollbar { display: none; }
.planned-folder-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; padding: 7px 13px 7px 9px; color: var(--text, #fff);
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800; white-space: nowrap;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.planned-folder-chip:active { transform: scale(0.96); }
.planned-folder-chip.selected {
  background: rgba(var(--cell-glow-rgb), 0.16);
  border-color: rgba(var(--cell-glow-rgb), 0.60);
  box-shadow: inset 0 0 0 1px rgba(var(--cell-glow-rgb), 0.35);
}
.planned-folder-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
.planned-folder-dot--flag { width: 18px; height: 18px; }
.planned-folder-logo {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.planned-folder-logo img { width: 84%; height: 84%; object-fit: contain; display: block; }
/* Liste der bereits geplanten (noch nicht fälligen) Artikel */
.planned-list { margin: 2px 0 10px; max-height: 34vh; overflow-y: auto; }
.planned-list-title { font-size: 11px; font-weight: 800; color: var(--text-muted, rgba(255,255,255,0.55)); margin: 6px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.planned-list-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; margin-bottom: 6px; }
.planned-list-info { flex: 1; min-width: 0; }
.planned-list-name { font-size: 14px; font-weight: 700; color: var(--text, #fff); overflow-wrap: break-word; }
.planned-list-when { font-size: 12px; color: var(--text-muted, rgba(255,255,255,0.55)); margin-top: 1px; }
.planned-list-x { flex-shrink: 0; width: 28px; height: 28px; border: none; border-radius: 50%; background: rgba(239,68,68,0.12); color: #F87171; font-size: 13px; cursor: pointer; }
.planned-list-x:active { background: rgba(239,68,68,0.25); }
.planned-sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.planned-btn { flex: 1; border: none; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 800; cursor: pointer; transition: transform 0.12s; }
.planned-btn:active { transform: scale(0.97); }
.planned-btn-cancel { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: var(--text, #fff); }
.planned-btn-ok {
  background: linear-gradient(135deg, rgba(var(--cell-glow-rgb, 56,189,248), 0.55), rgba(var(--cell-glow-rgb, 56,189,248), 0.32));
  border: 1px solid rgba(var(--cell-glow-rgb, 56,189,248), 0.65);
  color: #fff; box-shadow: 0 0 12px -3px rgba(var(--cell-glow-rgb, 56,189,248), 0.6);
}
/* Damit der Long-Press aufs Eingabefeld nicht von Androids Text-Auswahl / iOS-
   Callout gekapert wird (die sonst pointercancel auslösen und das Öffnen killen).
   Tippen bleibt möglich (verifiziert) — nur das Markieren im Feld entfällt. */
.shop-input { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.shop-delete {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(239,68,68,0.1); color: #F87171;
  font-size: 16px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.2s;
  /* „×" nicht als Text markierbar — sonst wird es beim Abhaken eines Produkts
     versehentlich mit ausgewählt (blaue Markierung). */
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.shop-delete:active { background: rgba(239,68,68,0.25); }
/* ── Mengen-Stepper / -Badge pro Einkaufs-Zeile ── */
.shop-qty {
  display: flex; align-items: center; gap: 1px; flex-shrink: 0;
  background: rgba(255,255,255,0.05); border-radius: 9px; padding: 2px;
}
.shop-qty-btn {
  width: 26px; height: 26px; border: none; border-radius: 7px;
  background: transparent; color: var(--text); font-size: 17px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s; padding: 0;
}
.shop-qty-btn:active { background: rgba(255,255,255,0.15); }
.shop-qty-num {
  min-width: 18px; text-align: center; font-size: 13px; font-weight: 800;
  color: var(--text); font-variant-numeric: tabular-nums;
  white-space: nowrap; padding: 0 5px;
  cursor: pointer; border-radius: 7px; transition: background 0.15s;
  -webkit-tap-highlight-color: transparent; align-self: stretch;
  display: flex; align-items: center; justify-content: center;
}
.shop-qty-num:active { background: rgba(255,255,255,0.15); }
.shop-qty-badge {
  flex-shrink: 0; font-size: 13px; font-weight: 800; color: var(--text-muted);
  font-variant-numeric: tabular-nums; padding: 0 6px; white-space: nowrap;
  text-decoration: none;
}

/* Section-Card: alle Items eines Folders in einem gemeinsamen Container,
   dezent in der Folder-Color umrandet (iOS-Listen-Stil). */
.shop-folder-section {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 6px 10px 10px;
  margin-top: 8px;
  display: flex; flex-direction: column; gap: 6px;
  /* border-color, background, box-shadow werden inline pro Folder gesetzt */
}
.shop-folder-section:first-child { margin-top: 0; }
/* Italien-Flaggen-Section: grün-weiß-roter Rahmen als maskierter Verlaufs-Ring.
   Ein einzelner border-color kann nur EINE Farbe, border-image würde die 18px-Ecken
   kanten — der ::before-Ring ist dreifarbig UND behält die runden Ecken. Statisch
   (kein Blur, keine Animation) → kein Adreno-Flackern am Android. */
.shop-folder-section--italien { position: relative; }
.shop-folder-section--italien::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(90deg,
    rgba(0,146,70,0.6)   0    33.4%,
    rgba(246,246,246,0.6) 33.4% 66.7%,
    rgba(206,43,55,0.6)  66.7% 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.shop-folder-section-header {
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 4px 4px;
  opacity: 0.85;
  /* color wird inline gesetzt mit der Folder-Color */
}
/* Items innerhalb einer Section: keine eigene Border (die kommt vom Container) */
.shop-item.shop-item--in-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.shop-empty {
  text-align: center; padding: 60px 20px;
  color: var(--text); opacity: 0.55; font-size: 15px; font-weight: 700;
}
.shop-empty-hint { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; opacity: 0.75; }
.shop-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.40;
}
.shop-empty-icon svg { width: 100%; height: 100%; display: block; }

/* Shop-Header-Actions: Container für Live-Dot + Action-Buttons rechts */
.shop-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Glass-Icon-Button im Shop-Header (Voice, Hide-Done) */
.shop-header-btn {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 1px 2px rgba(0,0,0,0.20);
  transition:
    background 0.20s,
    border-color 0.20s,
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.22s;
}

/* Live-Status-Dot so klein wie ein typografischer Bullet-Point (•) –
   sitzt vor dem hero-stat-Text als unaufdringlicher Indikator.
   Doppel-Klasse für höhere Specificity, damit base-`.live-status-dot`
   weiter unten im File die Werte nicht überschreibt. */
.live-status-dot.live-status-dot--inline {
  width: 5px;
  height: 5px;
  margin: 0 6px 1px 0;
  vertical-align: middle;
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  border-radius: 50%;
  box-shadow: none;
}
.live-status-dot.live-status-dot--inline::after  { display: none; }
.live-status-dot.live-status-dot--inline::before { display: none; }
/* Hero-Stat als flexbox damit der Dot sauber vor dem Text sitzt */
.hero-stat {
  display: flex;
  align-items: center;
  gap: 0;
}
.shop-header-btn svg { width: 17px; height: 17px; }
/* Hero-Header-Buttons (Auge + Keks): etwas größer, damit die Icons besser wirken */
.shop-header-btn--hero { width: 40px; height: 40px; }
.shop-header-btn--hero svg { width: 21px; height: 21px; }
.shop-header-btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border-color: rgba(255,255,255,0.20);
}
.shop-header-btn:active { transform: scale(0.92); }

/* Hide-Done-Toggle: bei aria-pressed=true wechselt Icon-Sichtbarkeit */
#shopHideDoneBtn .icon-eye-off { display: none; }
#shopHideDoneBtn[aria-pressed="true"] .icon-eye    { display: none; }
#shopHideDoneBtn[aria-pressed="true"] .icon-eye-off { display: block; }
/* Aktiver Zustand: Theme-Akzent */
#shopHideDoneBtn[aria-pressed="true"] {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.20) 0%, transparent 60%),
    linear-gradient(150deg,
      color-mix(in srgb, var(--blue) 35%, transparent),
      color-mix(in srgb, var(--blue) 18%, transparent));
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
  color: var(--text-accent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px color-mix(in srgb, var(--blue) 25%, transparent),
    0 4px 12px rgba(var(--blue-rgb), 0.28);
}

/* Voice-Recording: pulsierender Ring während Aufnahme */
#shopVoiceBtn.recording {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.25) 0%, transparent 60%),
    linear-gradient(150deg,
      rgba(248, 113, 113, 0.50),
      rgba(248, 113, 113, 0.22));
  border-color: rgba(248, 113, 113, 0.65);
  color: #fff;
  animation: voiceRecPulse 1.2s ease-in-out infinite;
}
@keyframes voiceRecPulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.22),
      0 0 0 0 rgba(248, 113, 113, 0.60),
      0 4px 14px rgba(248, 113, 113, 0.40);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.30),
      0 0 0 8px rgba(248, 113, 113, 0.00),
      0 6px 18px rgba(248, 113, 113, 0.55);
  }
}

/* Live-Status-Indicator im Shop-Header (rechts) – iOS-Activity-Style.
   Pulse-Ring ist ein eigenes Pseudo-Element damit der Glow groß werden
   kann ohne den Dot zu verzerren. */
.live-status-dot {
  position: relative;
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255,255,255,0.30);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.25);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.live-status-dot::before,
.live-status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}
/* Innerer Highlight für Tiefe */
.live-status-dot::before {
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 60%);
}
/* Online: Theme-Akzent, kräftiger pulsierender Ring */
.live-status-dot[data-state="online"] {
  background: color-mix(in srgb, var(--blue) 90%, white);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.40),
    0 0 8px rgba(var(--blue-rgb), 0.55);
}
.live-status-dot[data-state="online"]::after {
  /* Pulsierender Outer-Ring */
  box-shadow: 0 0 0 0 rgba(var(--blue-rgb), 0.70);
  animation: liveDotPulseRing 1.6s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}
/* Offline: grau, statisch */
.live-status-dot[data-state="offline"] {
  background: rgba(160,160,160,0.65);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.20);
}
.live-status-dot[data-state="offline"]::after { animation: none; box-shadow: none; }
/* Loading: dim, atmender Opacity */
.live-status-dot[data-state="loading"] {
  background: rgba(255,255,255,0.28);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.20);
  animation: liveDotBreathe 1.4s ease-in-out infinite;
}
.live-status-dot[data-state="loading"]::after { animation: none; box-shadow: none; }
@keyframes liveDotPulseRing {
  0%   { box-shadow: 0 0 0 0   rgba(var(--blue-rgb), 0.75); opacity: 1; }
  70%  { box-shadow: 0 0 0 14px rgba(var(--blue-rgb), 0.00); opacity: 0; }
  100% { box-shadow: 0 0 0 0   rgba(var(--blue-rgb), 0.00); opacity: 0; }
}
@keyframes liveDotBreathe {
  0%,100% { opacity: 0.5; }
  50%     { opacity: 1; }
}

/* ─── SHOP FOLDERS – Variante A: Color-Dot + Counter-Badge (Liquid-Glass) ─── */
.shop-folder-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 1; /* explizit unter dem sticky Header (z-index:100) */
  isolation: isolate; /* Pseudo-Elements (::before/::after mit z-index:2)
                         im eigenen Stacking-Context halten */
}
/* Edge-Fade als Scroll-Affordance — nur sichtbar wenn überlauf vorhanden.
   Die at-start/at-end Klassen werden per JS gesetzt. */
.shop-folder-wrap::before,
.shop-folder-wrap::after {
  content: '';
  position: absolute; top: 0; bottom: 8px;
  width: 28px; pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.shop-folder-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 10%, transparent 100%);
}
.shop-folder-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 10%, transparent 100%);
}
.shop-folder-wrap.has-overflow-left::before { opacity: 1; }
.shop-folder-wrap.has-overflow-right::after { opacity: 1; }

.shop-folder-bar {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  padding: 10px 24px 14px;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  /* Sichtbare Scrollbar – auf Desktop greifbar, auf Mobile irrelevant */
  scrollbar-width: auto;
  scrollbar-color: rgba(255,255,255,0.30) transparent;
}
.shop-folder-bar.dragging { cursor: grabbing; scroll-behavior: auto; }
.shop-folder-bar::-webkit-scrollbar { height: 8px; }
.shop-folder-bar::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  margin: 0 24px;
}
.shop-folder-bar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.30);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.shop-folder-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.45);
  background-clip: padding-box;
}

/* ── Zweite Ordner-Zeile („…"-Pill): restliche Läden, UMBRECHEND statt scrollend —
   der Sinn des Aufklappens ist ja, alles auf einen Blick zu sehen. Standard zu;
   die „…"-Pill (toggle-folder-more) klappt sie auf. Sitzt AUSSERHALB des
   Fade-Wrappers (nur Zeile 1 hat Edge-Fades + Scrollbar). */
.shop-folder-bar2 {
  display: none;
  flex-wrap: wrap;
  overflow: visible;
  cursor: default;
  touch-action: auto;
  padding: 0 24px 12px;
  margin-top: -4px;   /* kompakt an Zeile 1 (14px Bodenluft) anschließen */
}
.shop-folder-bar2.open { display: flex; animation: folderRowIn 0.18s ease-out; }
@keyframes folderRowIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
html.anims-off .shop-folder-bar2.open { animation: none; }
/* Die „…"-Pill selbst: gleiche Optik wie ein Ordner-Tab, nur mit fetten Punkten. */
.shop-folder-more { flex-shrink: 0; }
.shop-folder-more .folder-more-dots {
  font-weight: var(--fw-heavy);
  letter-spacing: 2px;
  line-height: 1;
  transform: translateY(-1px);
  display: inline-block;
}

.shop-folder-tab {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 2px rgba(0,0,0,0.20);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.shop-folder-tab:active { transform: scale(0.96); }

.shop-folder-tab.active {
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--blue) 22%, transparent),
      color-mix(in srgb, var(--blue) 10%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 0 0 1px color-mix(in srgb, var(--blue) 25%, transparent),
    0 4px 14px rgba(var(--blue-rgb),0.28);
}

.folder-tab-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25),
    0 0 6px rgba(0,0,0,0.30);
}
/* Flaggen-Punkt (z.B. Trikolore): gleiche Chip-Größe wie die Laden-Logos —
   im 9px-Standardpunkt war die Flagge unkenntlich klein. */
.folder-tab-dot--flagge { width: 18px; height: 18px; }
/* Laden-Logo statt Farbpunkt (Ordnername = bekannter Laden): weißer Rund-Chip,
   Logo eingepasst — 9px wären unlesbar, 18px bleibt schlank in der Pill. */
.folder-tab-dot--logo {
  width: 18px; height: 18px;
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.folder-tab-dot--logo img {
  width: 84%; height: 84%;
  object-fit: contain; display: block;
  -webkit-user-drag: none;
}
.shop-folder-tab.active .folder-tab-dot {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.35),
    0 0 8px rgba(255,255,255,0.18);
}

.folder-tab-name {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}
/* Favoriten-Tab: dynamische App-Farbe (Akzent-Stern statt Punkt + Akzent-Name/Rahmen). */
.folder-tab-dot--fav {
  color: rgb(var(--cell-glow-rgb));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; box-shadow: none;
}
.shop-folder-tab--fav { border-color: rgba(var(--cell-glow-rgb), 0.45); }
.shop-folder-tab--fav .folder-tab-name { color: rgb(var(--cell-glow-rgb)); }
.shop-folder-tab.active .folder-tab-name { font-weight: 800; }

.folder-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 999px;
  font-size: 11px; font-weight: 800;
  line-height: 1;
  color: var(--text);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  margin-left: 2px;
}
.shop-folder-tab.active .folder-tab-count {
  background: color-mix(in srgb, var(--blue) 30%, rgba(255,255,255,0.10));
  border-color: color-mix(in srgb, var(--blue) 40%, transparent);
  color: #fff;
}

.shop-folder-add {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  color: var(--text); font-size: 20px; font-weight: 400;
  cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.shop-folder-add:hover {
  border-style: solid;
  border-color: rgba(255,255,255,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.shop-folder-add:active { transform: scale(0.92); }
.folder-color-dot {
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.10);
  transition:
    transform 0.20s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.20s,
    box-shadow 0.20s;
  flex-shrink: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.20),
    0 2px 6px rgba(0,0,0,0.30);
}
.folder-color-dot.selected {
  border-color: var(--text);
  transform: scale(1.18);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.35),
    0 0 0 3px rgba(var(--blue-rgb), 0.25),
    0 4px 14px rgba(var(--blue-rgb), 0.35);
}
.folder-color-dot:active { transform: scale(0.92); }

/* ─── FOLDER-MODAL – Glass-Design ──────────────────────────────────────── */
.folder-modal {
  display: none;
  position: fixed; inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(calc(8px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(140%);
  -webkit-backdrop-filter: blur(calc(8px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(140%);
  align-items: center; justify-content: center;
  padding: 20px;
}
.folder-modal-card {
  width: min(360px, 100%);
  background:
    radial-gradient(circle at 15% -10%, rgba(var(--blue-rgb), 0.12) 0%, transparent 55%),
    linear-gradient(150deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 100%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  padding: 22px 20px;
  backdrop-filter: blur(calc(18px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(180%);
  -webkit-backdrop-filter: blur(calc(18px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(180%);
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.65),
    0 6px 18px -6px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.18);
  color: var(--text);
}
.folder-modal-title {
  font-size: 18px;
  font-weight: var(--fw-heavy);
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.folder-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: var(--fw-bold);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 2px rgba(0,0,0,0.25);
  transition: border-color 0.22s, background 0.22s, box-shadow 0.22s;
  margin-bottom: 16px;
}
.folder-modal-input::placeholder { color: var(--text-muted); opacity: 0.70; font-weight: var(--fw-med); }
.folder-modal-input:focus {
  border-color: color-mix(in srgb, var(--blue) 70%, white);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 0 3px rgba(var(--blue-rgb), 0.20),
    0 3px 12px rgba(var(--blue-rgb), 0.22);
}
.folder-modal-section-label {
  font-size: 11px;
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.folder-modal-presets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.folder-modal-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.folder-modal-color-input {
  width: 34px; height: 34px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  background: none;
  -webkit-appearance: none;
}
.folder-modal-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.folder-modal-color-input::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; }
.folder-modal-color-hex {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.folder-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.folder-modal-delete {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(248,113,113,0.30);
  background:
    linear-gradient(180deg, rgba(248,113,113,0.14), rgba(248,113,113,0.06));
  color: #F87171;
  cursor: pointer;
  display: none; /* nur im Edit-Modus sichtbar — JS toggelt */
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 1px 3px rgba(0,0,0,0.25);
  transition: background 0.20s, border-color 0.20s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.folder-modal-delete svg { width: 18px; height: 18px; }
.folder-modal-delete:hover {
  background:
    linear-gradient(180deg, rgba(248,113,113,0.22), rgba(248,113,113,0.10));
  border-color: rgba(248,113,113,0.50);
}
.folder-modal-delete:active { transform: scale(0.92); }
.folder-modal-cancel,
.folder-modal-save {
  flex: 1;
  padding: 12px;
  border-radius: 13px;
  font-family: inherit;
  font-size: 14px;
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: background 0.20s, border-color 0.20s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.folder-modal-cancel {
  border: 1px solid rgba(255,255,255,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 2px rgba(0,0,0,0.20);
}
.folder-modal-cancel:active { transform: scale(0.97); background: rgba(255,255,255,0.10); }
.folder-modal-save {
  border: 1px solid rgba(var(--blue-rgb), 0.45);
  background:
    radial-gradient(circle at 30% 15%, rgba(255,255,255,0.30) 0%, transparent 55%),
    linear-gradient(150deg,
      color-mix(in srgb, var(--blue) 85%, white) 0%,
      var(--blue) 55%,
      color-mix(in srgb, var(--blue) 80%, black) 100%);
  color: #fff;
  font-weight: var(--fw-heavy);
  letter-spacing: 0.005em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 8px 22px -8px rgba(var(--blue-rgb), 0.60);
}
.folder-modal-save:active { transform: scale(0.97); filter: brightness(0.96); }

