/* ── KaufWise — Dark Charcoal Theme ─────────────────────────────────────────
 * Farben aus dem Logo: Flaeche #1b1d21, Marke Lime → Gruen.
 * Farbrollen: Gruen = Marke/Hauptaktion · Bernstein = zeitlich ("ab Do.")
 *             Koralle = Rabatt/Warnung/Abmelden
 * Schriften (lokal, SIL Open Font License): Montserrat (Titel), Manrope (Text)
 */

@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url('/fonts/montserrat-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
}

:root {
  --bg: #141619;
  --bg-surface: #1b1d21;      /* Logo-Hintergrund: Leisten, Navigation */
  --bg-card: #1f2226;
  --bg-elevated: #2a2d32;     /* Zweitbuttons, aktive Segmente */
  --bg-media: #262a2f;        /* Bildflaechen */
  --border: #2a2d32;
  --border-strong: #2c3036;
  --divider: #22252a;

  --text: #eceef0;
  --text-soft: #cfd3d7;
  --text-muted: #9aa0a6;
  --text-dim: #6b7178;

  --brand: #a3e635;
  --brand-2: #22c55e;
  --brand-gradient: linear-gradient(160deg, #a3e635, #22c55e);
  --brand-ink: #10210f;       /* Text/Icons auf Markengruen */
  --brand-soft: rgba(163, 230, 53, 0.14);

  --amber: #f5b544;
  --amber-bg: #2e2818;
  --amber-border: #4a3f24;
  --coral: #ff6b5b;
  --coral-soft: #ff8a7a;
  --coral-ink: #1a0e0c;

  --radius: 14px;
  --radius-lg: 16px;
  --radius-sm: 10px;
  --nav-height: 72px;
  --font-title: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

body {
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }
a { color: var(--brand); text-decoration: none; }

/* ── Buttons ── */
.btn-primary {
  height: 48px; padding: 0 20px; border: none; border-radius: 12px;
  background: var(--brand-gradient); color: var(--brand-ink);
  font-size: 15px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: filter 0.15s, transform 0.1s;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  height: 44px; padding: 0 18px; border: none; border-radius: 12px;
  background: var(--bg-elevated); color: var(--text);
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-secondary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-secondary.accent { color: var(--brand); }

.btn-danger-outline {
  display: flex; align-items: center; justify-content: center;
  width: calc(100% - 32px); height: 48px; margin: 8px 16px 0;
  border-radius: var(--radius); background: transparent;
  border: 1px solid #4a2a28; color: var(--coral-soft);
  font-size: 15px; font-weight: 700; cursor: pointer;
}

.btn-text {
  display: block; margin: 12px auto 0; padding: 12px 16px;
  background: none; border: none; color: var(--text-muted);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-text:hover { color: var(--coral-soft); }

.btn-square {
  width: 48px; height: 48px; flex-shrink: 0; border: none; border-radius: var(--radius);
  background: var(--brand-gradient); color: var(--brand-ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; border: none; background: none;
  color: var(--text-soft); cursor: pointer; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn-boxed { background: var(--bg-card); border: 1px solid var(--border-strong); }

/* Runder Hinzufuegen-/Erledigt-Button (Karten, Vorschlaege) */
.round-btn {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--brand-gradient); color: var(--brand-ink);
  transition: transform 0.1s;
}
.round-btn:active { transform: scale(0.88); }
.round-btn.lg { width: 44px; height: 44px; }
.round-btn.done { background: var(--brand-ink); border: 2px solid var(--brand); color: var(--brand); }

/* ── Tags (Karten, Liste) ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.tag-inlist { background: var(--brand-ink); color: var(--brand); }
.tag-upcoming { background: var(--amber-bg); color: var(--amber); }
.tag-discount { background: var(--coral); color: var(--coral-ink); }
.tag-suggest { background: rgba(20, 22, 25, 0.85); color: var(--text); border: 1px solid #3a3f46; }
.tag-plus {
  height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10px;
  background: rgba(20, 22, 25, 0.8); border: 1px solid #3a3f46; color: var(--text);
}

/* ── Auth Screen ── */
.screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-container { width: 100%; max-width: 360px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.logo-icon { width: 88px; height: 88px; display: block; margin: 0 auto 14px; }
.auth-logo h1 { font-family: var(--font-title); font-size: 30px; font-weight: 800; letter-spacing: -0.6px; }
.auth-subtitle { color: var(--text-muted); font-size: 15px; margin-top: 4px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input,
.sheet input {
  height: 48px; background: var(--bg-card); border: 1px solid var(--border-strong);
  color: var(--text); padding: 0 16px; border-radius: 12px;
  font: inherit; font-size: 15px; outline: none; transition: border-color 0.2s;
}
.auth-form input:focus, .sheet input:focus { border-color: var(--brand); }
.auth-form input::placeholder, .sheet input::placeholder { color: var(--text-dim); }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-intro { text-align: center; font-size: 14px; color: var(--text-soft); line-height: 1.45; }
.auth-intro:empty { display: none; }
.auth-intro strong { color: var(--text); }
.auth-error { color: var(--coral-soft); font-size: 13px; text-align: center; min-height: 18px; }

/* "Wise" im Markengruen */
.brand-accent {
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ── App-Leiste ── */
.appbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 10px; padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: var(--bg);
}
.appbar-left { min-width: 0; }
.appbar-brand { display: flex; align-items: center; gap: 10px; }
.logo-small { width: 34px; height: 34px; display: block; }
.wordmark { font-family: var(--font-title); font-weight: 800; font-size: 20px; letter-spacing: -0.4px; }
.appbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.plz-chip {
  display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px;
  border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 700; color: var(--text-soft); cursor: pointer;
}
.plz-chip svg { color: var(--brand); }
.avatar-btn, .avatar {
  border-radius: 50%; background: var(--brand-gradient); color: var(--brand-ink);
  font-family: var(--font-title); font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-btn { width: 36px; height: 36px; font-size: 15px; border: none; cursor: pointer; }
.avatar { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; font-size: 26px; }

.page-title { font-family: var(--font-title); font-weight: 700; font-size: 24px; letter-spacing: -0.5px; }
.page-title-sm { font-size: 20px; letter-spacing: -0.3px; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-head { padding: 14px 16px 6px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head-back {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 8px 4px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

/* ── Views ── */
.view { padding-bottom: calc(var(--nav-height) + 24px + env(safe-area-inset-bottom, 0px)); max-width: 960px; margin: 0 auto; }

.section-title { font-family: var(--font-title); font-weight: 700; font-size: 17px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.section-link { font-size: 13px; font-weight: 700; color: var(--brand); background: none; border: none; cursor: pointer; }

/* ── Start ── */
.home { padding: 6px 16px 0; display: flex; flex-direction: column; gap: 22px; }
.home-greeting h2 { font-family: var(--font-title); font-weight: 700; font-size: 26px; letter-spacing: -0.5px; }
.home-greeting p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel-title { font-weight: 700; font-size: 16px; }
.panel-meta { font-size: 13px; color: var(--text-muted); }
.panel-meta b { color: var(--text); font-weight: 800; }
.progress { height: 6px; border-radius: 3px; background: var(--border-strong); overflow: hidden; }
.progress > div { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 0.3s; }
.note-amber { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--amber); }

.hscroll {
  display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar { display: none; }
.mini-card {
  width: 150px; flex-shrink: 0; background: var(--bg-card); border-radius: 12px;
  overflow: hidden; cursor: pointer; border: none; text-align: left; color: inherit;
}
.mini-card-media { height: 96px; background: var(--bg-media); position: relative; display: flex; align-items: center; justify-content: center; }
.mini-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.mini-card-media .tag { position: absolute; top: 8px; left: 8px; }
.mini-card-body { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.mini-card-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-card-price { font-size: 16px; font-weight: 800; }
.mini-card-meta { font-size: 11px; color: var(--text-muted); }
.mini-card-meta.upcoming { color: var(--amber); font-weight: 700; }

.rows-card { background: var(--bg-card); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.suggest-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.suggest-row:last-child { border-bottom: none; }
.thumb {
  width: 44px; height: 44px; border-radius: 10px; background: var(--bg-media);
  flex-shrink: 0; object-fit: contain; padding: 3px;
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
}
.row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-price { font-size: 15px; font-weight: 800; white-space: nowrap; }

.teaser {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%;
  border-radius: var(--radius); background: var(--bg-card); border: 1px solid #3a3222;
  cursor: pointer; text-align: left; color: inherit;
}
.teaser-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.teaser-chevron { color: var(--text-muted); flex-shrink: 0; }

.hint-card {
  padding: 14px 16px; border-radius: var(--radius); border: 1px dashed var(--border-strong);
  font-size: 13px; color: var(--text-muted); line-height: 1.45;
}

/* ── Angebote: Suche, Tabs, Chips ── */
.search-container { position: relative; display: flex; align-items: center; padding: 0 16px 12px; }
.search-icon { position: absolute; left: 30px; color: var(--text-muted); pointer-events: none; top: 14px; }
.search-container input {
  width: 100%; height: 46px; background: var(--bg-card);
  border: 1px solid var(--border-strong); color: var(--text);
  padding: 0 40px 0 44px; border-radius: var(--radius);
  font: inherit; font-size: 14px; outline: none; transition: border-color 0.2s;
}
.search-container input:focus { border-color: var(--brand); }
.search-container input::placeholder { color: var(--text-dim); }
.search-clear {
  position: absolute; right: 24px; top: 4px; width: 38px; height: 38px;
  background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer;
}

.segmented {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  margin: 0 16px 12px; padding: 4px; border-radius: var(--radius);
  background: var(--bg-surface); border: 1px solid var(--border);
}
.segmented:empty { display: none; }
.segmented.single { grid-template-columns: minmax(0, 1fr); }
.time-tab {
  height: 40px; border: none; border-radius: var(--radius-sm); background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.time-tab .tab-meta { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.time-tab.active { background: var(--bg-elevated); color: var(--text); font-weight: 700; }
.time-tab.active .tab-meta { color: var(--brand); font-weight: 800; }

.chip-bar {
  display: flex; gap: 8px; padding: 0 16px 12px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chip-bar::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 17px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-soft);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 5px; transition: all 0.15s;
}
.chip-count { color: var(--text-dim); font-weight: 600; }
.chip.active { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; }
.chip.active .chip-count { color: #5a5f66; }

.results-info {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px 10px; font-size: 13px; color: var(--text-muted);
}
.results-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* Aktiver Starttag-Filter (amber wie "ab Do."-Schilder), Tippen entfernt ihn */
.filter-pill {
  height: 28px; padding: 0 10px; border-radius: 14px; cursor: pointer; white-space: nowrap;
  background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border);
  font: inherit; font-size: 12px; font-weight: 700;
}
.filter-pill span { margin-left: 2px; font-size: 14px; }
.sort-toggle {
  display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px;
  background: none; border: none; color: var(--text-soft); font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ── Angebots-Raster + Karte ── */
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; padding: 0 12px 10px;
}
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-media {
  position: relative; aspect-ratio: 1 / 0.95; background: var(--bg-media);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.card-no-img { color: var(--text-dim); font-size: 12px; }
/* Bild nicht ladbar (offline ohne Kopie) → "?" in Groesse des Bildes (Klassen des Bildes bleiben) */
.img-fallback {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-family: var(--font-title); font-weight: 700; font-size: 20px;
  background: var(--bg-media);
}
:is(.mini-card-media, .prospekt-cover) > .img-fallback { width: 100%; height: 100%; }
.pv-offline { padding: 60px 20px; text-align: center; color: var(--text-muted); }
.card-tags { position: absolute; top: 8px; left: 8px; right: 46px; display: flex; flex-wrap: wrap; gap: 4px; }
.card-media .tag-plus { position: absolute; bottom: 8px; left: 8px; }
.card-fav-btn {
  position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(20, 22, 25, 0.7); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform 0.1s;
}
.card-fav-btn svg { width: 17px; height: 17px; fill: transparent; stroke: var(--text-soft); stroke-width: 2; }
.card-fav-btn.active svg { fill: var(--coral); stroke: var(--coral); }
.card-fav-btn:active { transform: scale(0.88); }

.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card-brand { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-name {
  font-size: 14px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { font-size: 11px; color: var(--text-muted); line-height: 1.35; }
.card-meta .urgent { color: var(--coral-soft); font-weight: 700; }
.card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 6px; }
.card-prices { display: flex; flex-direction: column; min-width: 0; }
.card-old-price { font-size: 11px; color: var(--text-dim); text-decoration: line-through; }
.card-price { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; }
.card-price.discount { color: var(--coral-soft); }

/* ── Offline-Banner (PWA) ── */
.offline-banner {
  position: sticky; top: 0; z-index: 150;
  padding: 7px 16px; padding-top: calc(7px + env(safe-area-inset-top, 0px));
  background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid var(--amber-border);
  font-size: 12px; font-weight: 700; text-align: center;
}

/* ── Laden ── */
.loading { display: flex; flex-direction: column; align-items: center; padding: 40px; color: var(--text-muted); font-size: 14px; }
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--border-strong);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Einkaufsliste ── */
.menu-anchor { position: relative; }
.menu {
  position: absolute; right: 0; top: 50px; z-index: 120; min-width: 200px;
  background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); padding: 6px; display: flex; flex-direction: column;
}
.menu-item {
  height: 44px; padding: 0 12px; border: none; border-radius: var(--radius-sm); background: none;
  text-align: left; font-size: 14px; font-weight: 600; color: var(--text-soft); cursor: pointer;
}
.menu-item:hover { background: var(--bg-elevated); }
.menu-item.active { color: var(--brand); font-weight: 800; }

.list-progress { padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.list-progress:empty { display: none; }
.list-progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-muted); }
.list-progress-row b { color: var(--text); font-weight: 800; }
.list-progress-row .total b { font-size: 15px; }

.list-add-custom { display: flex; gap: 8px; padding: 0 16px 14px; }
.list-add-custom input {
  flex: 1; min-width: 0; height: 48px; background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius); color: var(--text); padding: 0 14px;
  font: inherit; font-size: 15px; outline: none;
}
.list-add-custom input:focus { border-color: var(--brand); }
.list-add-custom input::placeholder { color: var(--text-dim); }

.list-group-title {
  padding: 12px 16px 6px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted);
}

.list-item {
  display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--divider);
  transition: opacity 0.2s, background 0.15s, transform 0.15s;
}
.list-item.dragging { opacity: 0.3; transform: scale(0.97); }
.list-item.drag-over { box-shadow: inset 0 2px 0 var(--brand); }
/* Griff: grosse Tippflaeche, kein Scrollen waehrend des Ziehens */
.list-item-grip {
  width: 28px; height: 44px; margin: 0 -8px 0 -10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: grab; color: var(--text-dim); font-size: 15px; user-select: none; touch-action: none;
}
.list-item-grip:active { cursor: grabbing; color: var(--brand); }
.list-item.dragging { background: var(--bg-card); }

.list-item-check {
  width: 44px; height: 44px; margin: -7px; flex-shrink: 0;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.list-item-check span {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #4a4f57;
  display: flex; align-items: center; justify-content: center; color: transparent;
  transition: all 0.15s;
}
.list-item.checked .list-item-check span { border: none; background: var(--brand-gradient); color: var(--brand-ink); }

.list-item-img {
  width: 44px; height: 44px; border-radius: 10px; object-fit: contain; padding: 3px;
  background: var(--bg-media); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
}
.list-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-item-name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-upcoming { font-size: 12px; font-weight: 700; color: var(--amber); }
.list-item-expired { font-size: 12px; font-weight: 700; color: var(--coral-soft); }
.list-item-price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.list-item-price.expired { text-decoration: line-through; color: var(--text-dim); }
.list-item-remove {
  width: 36px; height: 36px; flex-shrink: 0; border: none; background: none; border-radius: 50%;
  color: var(--text-dim); font-size: 20px; cursor: pointer;
}
.list-item-remove:hover { color: var(--coral-soft); background: var(--bg-card); }

/* Noch nicht erhaeltlich: eigener, gestrichelter Kasten in Bernstein */
.list-upcoming-box {
  margin: 18px 12px 0; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-surface); border: 1px dashed var(--amber-border);
}
.list-upcoming-title {
  display: flex; align-items: center; gap: 6px; padding: 12px 14px 4px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--amber);
}
.list-upcoming-box .list-item { border-bottom: none; padding-left: 14px; min-height: 60px; }
.list-item.upcoming .list-item-name { color: var(--text-soft); font-size: 15px; }
.list-item.upcoming .list-item-price { color: var(--text-muted); font-size: 14px; }
.list-item.upcoming .list-item-img { opacity: 0.6; filter: saturate(0.5); }
.list-item.upcoming .list-item-check span { border-style: dashed; border-color: #5a4d2c; }

/* Erledigt: einklappbar, gedaempft */
.list-done-toggle {
  display: flex; align-items: center; justify-content: space-between; width: calc(100% - 32px);
  margin: 16px 16px 0; padding: 12px 0 8px; border: none; border-top: 1px solid var(--divider);
  background: none; cursor: pointer;
  font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-dim);
}
.list-done-toggle svg { transition: transform 0.2s; }
.list-done-toggle.open svg { transform: rotate(180deg); }
.list-item.checked { opacity: 0.45; min-height: 56px; }
.list-item.checked .list-item-name, .list-item.checked .list-item-price { text-decoration: line-through; font-weight: 600; font-size: 15px; }

.list-empty { text-align: center; padding: 48px 24px; color: var(--text-dim); }
.list-empty svg { opacity: 0.4; }
.list-empty p { margin-top: 12px; font-size: 15px; color: var(--text-muted); font-weight: 600; }
.list-empty .list-empty-hint { font-size: 13px; color: var(--text-dim); font-weight: 500; margin-top: 4px; }

/* ── Profil ── */
.profile-person { display: flex; align-items: center; gap: 14px; padding: 12px 16px 20px; }
.profile-person h2 { font-family: var(--font-title); font-weight: 700; font-size: 20px; }
.profile-username { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.settings-group { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 20px; }
.settings-label { font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); padding: 0 4px; }
.settings-card { background: var(--bg-card); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.settings-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px;
  border: none; border-bottom: 1px solid var(--border); background: none; width: 100%;
  text-align: left; color: inherit;
}
.settings-row:last-child { border-bottom: none; }
button.settings-row { cursor: pointer; }
button.settings-row:hover { background: #23262b; }
.settings-row > svg:first-child { color: var(--brand); flex-shrink: 0; }
.settings-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.settings-title { font-size: 15px; font-weight: 600; }
.settings-sub { font-size: 12px; color: var(--text-muted); }
.settings-value { font-size: 15px; font-weight: 700; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.settings-chevron { color: var(--text-dim); flex-shrink: 0; }
.settings-row.action { color: var(--brand); font-weight: 700; font-size: 15px; }
.settings-row .dashed-circle {
  width: 32px; height: 32px; border-radius: 50%; border: 2px dashed #3a3f46;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.role-badge { height: 22px; padding: 0 8px; border-radius: 11px; background: var(--bg-elevated); color: var(--text-soft); font-size: 11px; font-weight: 700; display: flex; align-items: center; }
.app-footer { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px 8px; font-size: 12px; color: var(--text-dim); }
.app-footer img { width: 28px; height: 28px; opacity: 0.8; }

/* ── Bearbeiten-Sheet ── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 520px; background: var(--bg-surface);
  border-radius: 20px 20px 0 0; border: 1px solid var(--border-strong); border-bottom: none;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 12px;
}
.sheet h3 { font-family: var(--font-title); font-size: 18px; font-weight: 700; }
.sheet-hint { font-size: 13px; color: var(--text-muted); margin-top: -6px; }
.sheet-hint:empty { display: none; }
.sheet-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-soft); line-height: 1.4; }
.sheet-steps strong { color: var(--text); }
.sheet-steps .inline-icon { display: inline-block; vertical-align: -4px; color: var(--brand); }
.sheet-error { font-size: 13px; color: var(--coral-soft); min-height: 18px; }
.sheet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-actions:has(#sheet-cancel.hidden) { grid-template-columns: 1fr; }

/* ── Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-surface); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.nav-btn {
  border: none; background: none; cursor: pointer; color: #8b9096;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 600; transition: color 0.15s;
}
.nav-icon {
  position: relative; width: 52px; height: 30px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; transition: background 0.15s;
}
.nav-btn.active { color: var(--brand); font-weight: 700; }
.nav-btn.active .nav-icon { background: var(--brand-soft); }
.nav-badge {
  position: absolute; top: -3px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--brand); color: var(--brand-ink);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* ── Prospekte ── */
.prospekt-list { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 0; }
.prospekt-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px; display: flex; gap: 14px;
}
.prospekt-cover {
  width: 118px; height: 168px; flex-shrink: 0; border-radius: 10px;
  object-fit: cover; background: var(--bg-media); cursor: pointer; border: none; padding: 0; overflow: hidden;
}
.prospekt-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prospekt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.prospekt-info .tag { align-self: flex-start; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; }
.tag-current { background: var(--brand-soft); color: var(--brand); }
.prospekt-name { font-family: var(--font-title); font-weight: 700; font-size: 17px; }
.prospekt-dates { font-size: 14px; color: var(--text-soft); }
.prospekt-meta { font-size: 12px; color: var(--text-muted); }
.prospekt-info .spacer { flex: 1; }
.prospekt-info .btn-primary, .prospekt-info .btn-secondary { height: 40px; font-size: 14px; width: 100%; }

/* ── Seitenansicht (Vollbild) ── */
.page-viewer { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: flex; flex-direction: column; }
.page-viewer-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top, 0px));
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
}
.pv-title { font-family: var(--font-title); font-size: 15px; font-weight: 700; }
.pv-counter { font-size: 12px; color: var(--text-muted); text-align: right; padding-right: 6px; }
.page-viewer-body {
  flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center;
  padding: 8px; -webkit-overflow-scrolling: touch; position: relative;
}
.pv-img { max-width: 100%; height: auto; border-radius: 6px; }
.page-viewer-nav {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-surface); border-top: 1px solid var(--border);
}

/* ── Hotspots ── */
.pv-hotspot {
  border: 2px solid rgba(163, 230, 53, 0.55); border-radius: 8px;
  background: rgba(163, 230, 53, 0.06); transition: all 0.15s;
}
.pv-hotspot:hover { border-color: var(--brand); background: rgba(163, 230, 53, 0.16); box-shadow: 0 0 14px rgba(163, 230, 53, 0.35); }
.pv-hotspot-inlist { border-color: rgba(34, 197, 94, 0.9); background: rgba(34, 197, 94, 0.18); }

/* ── Hotspot-Popup ── */
.pv-popup {
  background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  overflow: hidden; max-width: 260px; min-width: 210px;
}
.pv-popup-img { width: 100%; height: 120px; object-fit: contain; background: var(--bg-media); display: block; padding: 8px; }
.pv-popup-info { padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.pv-popup-brand { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.pv-popup-name { font-size: 14px; font-weight: 700; }
.pv-popup-price { font-size: 17px; font-weight: 800; margin-top: 2px; }
.pv-popup-info .card-validity.upcoming { font-size: 12px; font-weight: 700; color: var(--amber); }
.pv-popup-add {
  display: block; width: 100%; height: 44px; border: none; cursor: pointer;
  background: var(--brand-gradient); color: var(--brand-ink); font-size: 14px; font-weight: 800;
}
.pv-popup-add.in-list { background: var(--brand-ink); color: var(--brand); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: var(--bg-elevated); color: var(--text); border: 1px solid #3a3f46;
  padding: 10px 18px; border-radius: 22px; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 500; opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── Breitere Bildschirme ── */
@media (min-width: 768px) {
  .grid { gap: 14px; padding: 0 16px 14px; }
}
