/* ═══════════════════════════════════════════════════════════════
   MANDJE — Bold modern design
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:      #1DB954;
  --green-dark: #158a3e;
  --green-pale: #e8faf0;
  --blue:       #007AFF;
  --red:        #FF3B30;

  --bg:         #F5F5F7;
  --card:       #FFFFFF;
  --sep:        rgba(0,0,0,.08);
  --sep-strong: rgba(0,0,0,.14);

  --t1:  #0A0A0A;
  --t2:  #6E6E73;
  --t3:  #AEAEB2;
  --t4:  rgba(0,0,0,.08);

  --radius:    16px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%; width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--t1);
}

#app {
  position: fixed; inset: 0;
  overflow: hidden;
}

/* ═══ SCREEN MANAGEMENT ═══ */
.screen {
  position: absolute; inset: 0;
  display: none;               /* Hidden by default — JS shows/hides */
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.screen.is-active  { display: flex; }

/* ═══ SPLASH ═══ */
#screen-splash {
  background: #FFFBEE;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.splash-logo-wrap {
  width: 150px; height: 150px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.12));
}
.splash-logo-wrap svg { width: 100%; height: 100%; display: block; }

.splash-name {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.splash-sub {
  font-size: 1rem;
  font-weight: 400;
  color: #999;
  letter-spacing: -.1px;
}

/* ═══ NAV BAR ═══ */
.nav-bar {
  flex-shrink: 0;
  background: var(--card);
  border-bottom: .5px solid var(--sep-strong);
  padding-top: env(safe-area-inset-top, 44px);
  z-index: 10;
}

.nav-large-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -.6px;
  padding: 10px 20px 0;
  color: var(--t1);
  transition: opacity .2s, max-height .2s;
  max-height: 60px;
  overflow: hidden;
}
.nav-bar.compact .nav-large-title { opacity: 0; max-height: 0; padding-top: 0; }

.nav-bar-inner {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.nav-title-small {
  font-size: 1rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s;
  letter-spacing: -.2px;
}
.nav-bar.compact .nav-title-small { opacity: 1; }

.nav-btn-left, .nav-btn-right {
  background: rgba(0,122,255,.08);
  border: 1px solid rgba(0,122,255,.18);
  border-radius: 99px;
  color: var(--blue);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 3px;
  padding: 5px 12px;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
  white-space: nowrap;
}
.nav-btn-left:active, .nav-btn-right:active { background: rgba(0,122,255,.16); }

/* ═══ SCROLL ═══ */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 100px);
}

/* Extra ruimte voor de floating prijsbalk in de lijst */
#listScroll { padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 90px); }

/* ═══ HOME ═══ */
.home-section { padding: 24px 20px 0; }

.section-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 10px;
  padding: 0 2px;
}

/* List cards */
.list-cards { display: flex; flex-direction: column; gap: 12px; }

.list-card {
  background: var(--card);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

.list-card-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 12px 18px 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
  min-width: 0;
}
.list-card-main:active { background: var(--bg); }

.list-card-icon {
  width: 46px; height: 46px;
  background: var(--green);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.list-card-body { flex: 1; min-width: 0; }
.list-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.list-card-meta { font-size: .78rem; color: var(--t2); }

.list-card-pct {
  font-size: .95rem;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}

.list-card-del {
  background: none;
  border: none;
  border-left: .5px solid var(--sep);
  color: var(--t3);
  cursor: pointer;
  padding: 0 16px;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s, background .15s;
  min-height: 64px;
}
.list-card-del:active { color: var(--red); background: rgba(255,59,48,.06); }
.list-card-del svg { width: 17px; height: 17px; }

/* ═══ EMPTY ═══ */
.empty-home {
  padding: 80px 32px;
  text-align: center;
}
.empty-icon { font-size: 3.5rem; margin-bottom: 18px; }
.empty-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -.3px; margin-bottom: 8px; }
.empty-sub { font-size: .95rem; color: var(--t2); line-height: 1.6; }

/* ═══ FAB ═══ */
.fab {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 20px) + 24px);
  right: 20px;
  width: 58px; height: 58px;
  background: var(--green);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(29,185,84,.4);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, box-shadow .15s;
  z-index: 20;
}
.fab:active { transform: scale(.93); box-shadow: 0 2px 8px rgba(29,185,84,.3); }
.fab svg { width: 24px; height: 24px; }

/* ═══ ADD CARD ═══ */
.add-area {
  background: var(--card);
  border-radius: var(--radius);
  margin: 16px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.add-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-wrap { flex: 1; position: relative; }

.input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-xs);
  font-size: 1rem;
  color: var(--t1);
  outline: none;
  -webkit-appearance: none;
  transition: border-color .15s;
}
.input-wrap input:focus { border-color: var(--green); background: #fff; }
.input-wrap input::placeholder { color: var(--t3); }

.cat-select {
  height: 44px;
  padding: 0 10px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-xs);
  font-size: .82rem;
  color: var(--t1);
  outline: none;
  max-width: 130px;
  -webkit-appearance: none;
  cursor: pointer;
}

.add-btn {
  width: 44px; height: 44px;
  background: var(--green);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.add-btn:active { opacity: .8; }
.add-btn svg { width: 22px; height: 22px; }

/* Autocomplete */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 100;
  overflow: hidden;
  border: .5px solid var(--sep);
}

.autocomplete-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
  cursor: pointer;
  font-size: .95rem;
  -webkit-tap-highlight-color: transparent;
  border-bottom: .5px solid var(--sep);
  transition: background .1s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:active { background: var(--bg); }

.ac-icon { font-size: .8rem; color: var(--t3); }
.ac-name { flex: 1; font-weight: 500; }
.ac-count { font-size: .75rem; color: var(--t3); background: var(--bg); border-radius: 99px; padding: 2px 7px; }

/* ═══ QTY STAGE ═══ */
.qty-stage {
  margin-top: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1.5px solid var(--green);
}

.qty-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.qty-item-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.2px;
  margin-bottom: 14px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 99px;
  padding: 4px;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.qty-btn {
  width: 34px; height: 34px;
  background: none;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--green);
  font-weight: 300;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.qty-btn:active { background: var(--bg); }

.qty-number {
  width: 48px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 4px;
  border: none;
  background: none;
  color: var(--t1);
  outline: none;
  -webkit-appearance: none;
}

.qty-unit-toggle {
  display: flex;
  background: var(--card);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.unit-btn {
  padding: 6px 14px;
  background: none;
  border: none;
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.unit-btn.active {
  background: var(--green);
  color: #fff;
}

.qty-actions {
  display: flex;
  gap: 8px;
}

.qty-cancel {
  flex: 1;
  height: 42px;
  background: var(--card);
  border: none;
  border-radius: var(--radius-xs);
  font-size: .95rem;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
}

.qty-confirm {
  flex: 2;
  height: 42px;
  background: var(--green);
  border: none;
  border-radius: var(--radius-xs);
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  letter-spacing: -.1px;
}
.qty-confirm:active { opacity: .85; }

/* ═══ PROGRESS ═══ */
.progress-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px 8px;
}

.progress-track {
  flex: 1;
  height: 5px;
  background: var(--t4);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

.progress-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--t3);
  min-width: 40px;
  text-align: right;
}

/* ═══ CATEGORY GROUPS ═══ */
.cat-section { padding: 0 16px 0; }
.cat-section + .cat-section { margin-top: 20px; }

.cat-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px 8px;
}

.cat-emoji { font-size: .9rem; }

.cat-name {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--t3);
  flex: 1;
}

.cat-tally { font-size: .72rem; color: var(--t3); font-weight: 600; }

.cat-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* ═══ ITEM ROWS ═══ */
.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.item-row:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 54px; right: 0;
  height: .5px;
  background: var(--sep);
}
.item-row:active { background: var(--bg); }

.check-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--t4);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, border-color .15s, transform .15s;
}
.check-btn:active { transform: scale(.88); }
.check-btn.is-checked {
  background: var(--green);
  border-color: var(--green);
}
.check-btn svg { display: none; }
.check-btn.is-checked svg { display: block; }

/* Basis skip state */
.check-btn.is-skipped {
  background: var(--bg);
  border-color: var(--sep-strong);
}
.check-btn.is-skipped svg { display: block; color: var(--t3); }

.item-body { flex: 1; min-width: 0; }

.item-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--t1);
  letter-spacing: -.1px;
  transition: color .15s;
}

.item-qty {
  font-size: .78rem;
  color: var(--t2);
  margin-top: 2px;
}

.item-row.done .item-name {
  text-decoration: line-through;
  color: var(--t3);
}

.item-row.skipped .item-name { color: var(--t3); font-style: italic; }

.basis-tag {
  font-size: .68rem;
  font-weight: 700;
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 99px;
  padding: 3px 8px;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* Inline stepper in list rows */
.item-stepper {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 99px;
  padding: 2px;
  gap: 0;
  flex-shrink: 0;
}

.step-btn {
  width: 30px; height: 30px;
  background: none;
  border: none;
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s;
}
.step-btn:active { background: var(--sep); }

.step-val {
  min-width: 30px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--t1);
}

.item-del {
  background: none;
  border: none;
  color: var(--t4);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  transition: color .15s;
  margin-left: 2px;
}
.item-del:active { color: var(--red); }
.item-del svg { width: 14px; height: 14px; }

/* Autocomplete cat icon */
.ac-cat { font-size: .9rem; width: 20px; text-align: center; flex-shrink: 0; }

/* ═══ FOOTER ═══ */
.list-footer { display: flex; justify-content: center; padding: 16px; }

.footer-btn {
  background: none;
  border: none;
  color: var(--t2);
  font-size: .9rem;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 99px;
  -webkit-tap-highlight-color: transparent;
  font-weight: 500;
}
.footer-btn:active { background: var(--t4); }
.footer-btn svg { width: 15px; height: 15px; }

/* ═══ BOTTOM SHEET ═══ */
.bottom-sheet {
  position: fixed; inset: 0;
  z-index: 200;
  pointer-events: none;
}
.bottom-sheet.open { pointer-events: auto; }

.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background .3s;
}
.bottom-sheet.open .sheet-backdrop { background: rgba(0,0,0,.45); }

.sheet-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  padding-bottom: env(safe-area-inset-bottom, 20px);
}
.bottom-sheet.open .sheet-panel { transform: translateY(0); }

.sheet-handle {
  width: 40px; height: 5px;
  background: var(--t4);
  border-radius: 99px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}

.sheet-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; }

.sheet-done {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.sheet-hint {
  font-size: .82rem;
  color: var(--t2);
  padding: 0 20px 12px;
  line-height: 1.55;
  flex-shrink: 0;
}

.sheet-add {
  padding: 0 16px 12px;
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.sheet-add input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-xs);
  font-size: 1rem;
  color: var(--t1);
  outline: none;
  -webkit-appearance: none;
}
.sheet-add input:focus { border-color: var(--green); background: #fff; }
.sheet-add input::placeholder { color: var(--t3); }

.sheet-add .add-btn { flex-shrink: 0; }

.sheet-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 8px;
}

.sheet-empty {
  padding: 40px 16px;
  text-align: center;
  font-size: .9rem;
  color: var(--t2);
}

/* ═══ MODALS ═══ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  padding: 0;
}

.modal-sheet {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  padding: 24px 20px calc(env(safe-area-inset-bottom, 20px) + 12px);
}

.modal-sheet h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}

.modal-sheet p {
  font-size: .9rem;
  color: var(--t2);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 500;
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.modal-input:focus { border-color: var(--green); background: #fff; }
.modal-input::placeholder { color: var(--t3); }

.modal-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
}
.modal-check input { width: 18px; height: 18px; accent-color: var(--green); }

.modal-btns {
  display: flex;
  gap: 10px;
}

.btn-secondary, .btn-primary {
  flex: 1;
  height: 52px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary { background: var(--bg); color: var(--t2); }
.btn-primary   { background: var(--green); color: #fff; }
.btn-primary:active { opacity: .85; }

.btn-danger { background: rgba(255,59,48,.1); color: var(--red); }

/* ═══ SHEET: NIEUWE WEEK ═══ */
.sheet-week-wrap {
  padding: 12px 16px;
  border-top: .5px solid var(--sep);
  flex-shrink: 0;
}

.sheet-week-btn {
  width: 100%;
  height: 48px;
  background: var(--bg);
  border: 1.5px solid var(--sep-strong);
  border-radius: var(--radius-sm);
  color: var(--t2);
  font-size: .95rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s;
}
.sheet-week-btn:active { background: var(--sep); color: var(--t1); }

/* ═══ PRIJSBALK (floating sticky) ═══ */
.price-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 16px) + 10px);
  background: transparent;
  pointer-events: none;
}

.price-bar-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(29,185,84,.35), 0 1px 4px rgba(0,0,0,.1);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, box-shadow .15s;
}
.price-bar-btn:active {
  transform: scale(.97);
  box-shadow: 0 2px 8px rgba(29,185,84,.3);
}

.price-bar-trophy { font-size: 1.1rem; flex-shrink: 0; }

.price-bar-text {
  flex: 1;
  font-size: .95rem;
  font-weight: 500;
  text-align: left;
}
.price-bar-text strong { font-weight: 800; }

.price-bar-chevron {
  font-size: 1.2rem;
  opacity: .7;
  flex-shrink: 0;
}

/* ═══ PRIJS MODAL ═══ */
.price-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 350;
  display: flex;
  align-items: flex-end;
  padding: 0;
}

.price-modal-card {
  background: var(--card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.price-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: .5px solid var(--sep);
  flex-shrink: 0;
}

.price-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.3px;
}

.price-modal-close {
  background: var(--bg);
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--t2);
  -webkit-tap-highlight-color: transparent;
}
.price-modal-close:active { background: var(--sep); }

/* Modal content */
.pm-banner {
  background: #EDFAF3;
  color: #1a6e38;
  font-size: .9rem;
  font-weight: 500;
  padding: 14px 20px;
  line-height: 1.5;
  border-bottom: .5px solid rgba(29,185,84,.12);
}
.pm-banner strong { font-weight: 800; }

.pm-rows { padding: 6px 0; }

.pm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: .5px solid var(--sep);
  transition: background .1s;
}
.pm-row:last-child { border-bottom: none; }
.pm-row--best { background: #F5FDF8; }

.pm-rank {
  width: 24px;
  text-align: center;
  font-size: .78rem;
  color: var(--t3);
  font-weight: 700;
  flex-shrink: 0;
}
.pm-row--best .pm-rank { font-size: 1rem; }

.pm-label {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--t1);
}
.pm-row--best .pm-label { color: #1a6e38; font-weight: 700; }

.pm-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--t2);
  font-variant-numeric: tabular-nums;
}
.pm-row--best .pm-amount { color: var(--green); }

.pm-live {
  display: inline-block;
  margin-left: 4px;
  font-size: .65rem;
  font-weight: 600;
  color: var(--green);
  background: #e6f9ee;
  border-radius: 4px;
  padding: 1px 4px;
  vertical-align: middle;
}
.pm-est {
  display: inline-block;
  margin-left: 3px;
  font-size: .65rem;
  color: var(--t3);
  vertical-align: middle;
}

.pm-meta {
  font-size: .78rem;
  color: var(--t2);
  padding: 12px 20px 4px;
}

.pm-disclaimer {
  font-size: .72rem;
  color: var(--t3);
  padding: 4px 20px 16px;
  line-height: 1.5;
}

/* ═══ RECIPE SHEET ═══ */
.sheet-panel--tall { max-height: 90vh; }

.recipe-row-btn {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  background: var(--bg);
  border: 1.5px solid var(--sep-strong);
  border-radius: var(--radius-xs);
  color: var(--t2);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s;
}
.recipe-row-btn:active { background: var(--sep); color: var(--t1); }

.recipe-hint {
  font-size: .9rem;
  color: var(--t3);
  text-align: center;
  padding: 32px 20px;
  line-height: 1.6;
}

.recipe-loading {
  font-size: .95rem;
  color: var(--t3);
  text-align: center;
  padding: 40px 20px;
  font-style: italic;
}

.recipe-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
}
.recipe-card:active { background: #f0f0f2; }

.recipe-thumb {
  width: 60px; height: 60px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.recipe-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.recipe-card-body { flex: 1; min-width: 0; }

.recipe-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.recipe-meta {
  font-size: .78rem;
  color: var(--t2);
}

.recipe-arrow { color: var(--t3); flex-shrink: 0; }

.recipe-detail-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  display: block;
}

.recipe-detail-header {
  padding: 0 16px 12px;
}

.recipe-detail-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--t1);
  line-height: 1.35;
  margin-bottom: 6px;
}

.recipe-detail-meta {
  font-size: .8rem;
  color: var(--t2);
  margin-bottom: 8px;
}

.recipe-diet-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.recipe-diet-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  border-radius: 20px;
  padding: 2px 9px;
}

.recipe-ing-header {
  font-size: .82rem;
  font-weight: 700;
  color: var(--t2);
  letter-spacing: .3px;
  text-transform: uppercase;
  padding: 0 16px 6px;
}

.recipe-source-link {
  display: block;
  font-size: .82rem;
  color: var(--blue);
  text-decoration: none;
  padding: 10px 16px 6px;
}
.recipe-source-link:hover { text-decoration: underline; }

.recipe-ing-list {
  padding: 0 16px;
  margin-bottom: 16px;
}

.recipe-ing-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: .5px solid var(--sep);
  font-size: .92rem;
}
.recipe-ing-row:last-child { border-bottom: none; }

.recipe-ing-qty {
  min-width: 60px;
  font-weight: 600;
  color: var(--t2);
  font-size: .82rem;
}

.recipe-ing-name {
  flex: 1;
  color: var(--t1);
  font-weight: 500;
}

.recipe-add-all-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  height: 50px;
  background: var(--green);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
}
.recipe-add-all-btn:active { opacity: .85; }

.recipe-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--blue);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 16px 14px;
  -webkit-tap-highlight-color: transparent;
}

/* ═══ ITEM RECIPE TAG ═══ */
.item-recipe-tag {
  font-size: .7rem;
  color: var(--t3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══ TABS ═══ */
.list-tabs {
  display: flex;
  background: var(--bg);
  border-bottom: 1px solid var(--sep);
  flex-shrink: 0;
  padding: 0 16px;
  gap: 4px;
}
.list-tab {
  flex: 1;
  padding: 10px 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--t2);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s, border-color .15s;
}
.list-tab.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}
.list-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  position: relative;
}

/* ═══ RECEPTEN TOOLBAR ═══ */
.recept-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
}
.recipe-settings-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.recipe-settings-btn:active { opacity: .7; }

/* ═══ OPGESLAGEN RECEPTEN ═══ */
.saved-recipes-header {
  font-size: .75rem;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 16px 4px;
}
.saved-recipe-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 8px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--sep);
}
.saved-recipe-info { flex: 1; min-width: 0; }
.saved-recipe-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-recipe-meta { font-size: .78rem; color: var(--t3); margin-top: 2px; }
.saved-recipe-actions { display: flex; gap: 6px; flex-shrink: 0; }
.saved-recipe-add {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.saved-recipe-del {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0f0f5;
  color: var(--t2); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ═══ RECEPT INSTELLINGEN ═══ */
.settings-section {
  padding: 16px 20px 8px;
  border-bottom: 1px solid var(--sep);
}
.settings-section:last-child { border-bottom: none; }
.settings-section-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 10px;
}
.settings-section-hint {
  font-size: .78rem;
  color: var(--t3);
  margin-bottom: 10px;
  margin-top: -6px;
}
.settings-stepper-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.diet-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.diet-pill {
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--card);
  border: 1.5px solid var(--sep);
  color: var(--t2);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.diet-pill.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
