/* ── Tab-Bar ─────────────────────────────────────────────────────────────── */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1100px;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0));
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink-mute);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 12px;
  transition: color 0.2s;
}

.tab.active { color: var(--terracotta); }
.tab svg { width: 22px; height: 22px; }

.tab-fab {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--terracotta) 40%, transparent);
  margin-top: -22px;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tab-fab:hover { transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--terracotta) 50%, transparent); }
.tab-fab svg { width: 24px; height: 24px; }

/* ── Pills / Tags ───────────────────────────────────────────────────────────── */
.pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill.green {
  background: color-mix(in srgb, var(--green) 15%, transparent);
  color: var(--green);
}

.pill.blue {
  background: color-mix(in srgb, #4a90d9 15%, transparent);
  color: #2d6fb0;
}

.pill.source {
  background: color-mix(in srgb, #8b6abf 15%, transparent);
  color: #6a4a9e;
}

[data-theme="dark"] .pill.blue  { color: #7ab8f5; background: color-mix(in srgb, #4a90d9 20%, transparent); }
[data-theme="dark"] .pill.source { color: #b99ee0; background: color-mix(in srgb, #8b6abf 20%, transparent); }

.pill.stub {
  background: var(--bg-soft);
  color: var(--ink-mute);
}

[data-theme="dark"] .pill {
  color: #f0e6c8;
}

/* ── Filter-Chips ───────────────────────────────────────────────────────────── */
.chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  white-space: nowrap;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.chip:hover { background: var(--terracotta-soft); }

.chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ── Karten (Pinterest-Grid) ────────────────────────────────────────────────── */
.grid {
  column-count: 2;
  column-gap: 12px;
  padding: 16px 16px 100px;
}

@media (min-width: 640px) {
  .grid { column-count: 3; }
}

@media (min-width: 1024px) {
  .grid { column-count: 4; }
}

/* Wrapper übernimmt break-inside und margin vom alten .card */
.card-wrapper {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
}

.card {
  background: var(--bg-elev);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
  text-decoration: none;
  color: inherit;
}

.card:hover, .card:active { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Schnell-Hinzufügen Button auf der Karte */
.card-plan-details { position: absolute; top: 8px; right: 8px; z-index: 2; }
.card-plan-btn {
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; list-style: none; color: white;
  backdrop-filter: blur(4px);
}
.card-plan-btn::-webkit-details-marker { display: none; }
.card-plan-popup {
  position: absolute; right: 0; top: 34px;
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  border: 1px solid var(--border);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}
.card-plan-day {
  display: block;
  width: 100%;
  padding: 7px 12px;
  background: none; border: none;
  text-align: left; font-size: 13px; color: var(--ink);
  cursor: pointer; border-radius: 6px;
  white-space: nowrap;
}
.card-plan-day:hover { background: var(--bg-soft); }

/* Karte mit offenem Popup über alle Nachbarkarten heben */
.card-wrapper:has(.card-plan-details[open]) {
  z-index: 10;
}

/* Plan-Sektion in der Detailansicht */
.plan-section {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.plan-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--ink);
  list-style: none; user-select: none;
}
.plan-summary::-webkit-details-marker { display: none; }
.plan-section[open] .plan-chevron { transform: rotate(180deg); }
.plan-chevron { transition: transform 0.2s; }
.plan-tage {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.plan-tag-btn {
  padding: 6px 14px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 20px; font-size: 13px; color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.plan-tag-btn:hover { background: var(--terracotta); color: white; border-color: var(--terracotta); }

/* Wochenplan-Button in der Detailansicht */
.detail-plan-section {
  margin: 0 16px 16px;
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.detail-plan-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  cursor: pointer; list-style: none; user-select: none;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.detail-plan-summary::-webkit-details-marker { display: none; }
.detail-plan-section[open] .plan-chevron { transform: rotate(180deg); }
.detail-plan-tage {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 16px 16px;
  border-top: 1px solid var(--border);
}

/* Wochenplan Notiz-Textarea */
.wochenplan-notiz-wrap {
  margin: 0 16px 14px;
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.wochenplan-notiz-wrap:focus-within {
  border-color: var(--border);
  background: var(--bg);
}
.wochenplan-notiz-wrap svg { margin-top: 2px; flex-shrink: 0; color: var(--ink-mute); }
.wochenplan-notiz {
  flex: 1;
  padding: 0;
  border: none; background: transparent;
  font-size: 13px; color: var(--ink);
  font-family: inherit; resize: none; outline: none;
  line-height: 1.5;
  min-height: 20px;
}
.wochenplan-notiz:focus { color: var(--ink); }
.wochenplan-notiz::placeholder { color: var(--ink-mute); opacity: 0.7; }

.card-img {
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-soft);
}

.card-stub {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-soft), var(--terracotta-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--ink-mute);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  text-align: center;
  line-height: 1.3;
}

.card-body {
  padding: 12px 14px 14px;
}

.card-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.card-time {
  font-size: 11px;
  color: var(--ink-mute);
  margin-left: auto;
}

/* ── Desktop-Wrapper ────────────────────────────────────────────────────────── */
.page-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Listen-Header ──────────────────────────────────────────────────────────── */
.list-header {
  padding: 16px 16px 12px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

@media (min-width: 640px) {
  .list-header { padding: 16px 24px 12px; }
  .filters { padding: 8px 24px 4px; }
  .grid { padding: 16px 24px 100px; }
}

.greeting {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  font-style: italic;
}

.list-title {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.list-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--terracotta);
}

/* ── Suchleiste ─────────────────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 11px 14px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.search-bar:focus-within { border-color: var(--terracotta); }

.search-bar svg {
  width: 16px;
  height: 16px;
  color: var(--ink-mute);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}

.search-bar input::placeholder { color: var(--ink-mute); }

/* ── Filters-Zeile ──────────────────────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 4px;
}

/* ── Detail-Hero ────────────────────────────────────────────────────────────── */
.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 50%);
  pointer-events: none;
}

.detail-hero-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-soft), var(--terracotta-soft));
}

.btn-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.15s;
  text-decoration: none;
}

.btn-round:hover { transform: scale(1.05); }
.btn-round svg { width: 18px; height: 18px; }
.btn-round::-webkit-details-marker { display: none; }

.detail-back {
  position: absolute;
  top: 56px;
  left: 16px;
  z-index: 10;
}

.detail-actions {
  position: absolute;
  top: 56px;
  right: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.detail-fav { color: var(--terracotta); }
.detail-fav svg { fill: currentColor; }

/* ── Detail-Body ────────────────────────────────────────────────────────────── */
.detail-body {
  padding: 0 20px 120px;
  position: relative;
  margin-top: -60px;
  z-index: 5;
}

.detail-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.detail-title {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.detail-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 22px;
  font-style: italic;
  font-family: 'Fraunces', serif;
}

/* ── Meta-Box ───────────────────────────────────────────────────────────────── */
.detail-meta-row {
  display: flex;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 4px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.meta-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--line);
}
.meta-item:last-child { border-right: none; }

.meta-value {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  display: block;
}

.meta-label {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
  display: block;
}

/* ── Abschnitts-Kopf ────────────────────────────────────────────────────────── */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 12px;
}

.section-head h2 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ── Portionen-Steuerung ────────────────────────────────────────────────────── */
.portion-control {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 4px;
}

.portion-control button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: background 0.15s;
}

.portion-control button:hover { background: var(--terracotta-soft); }

.portion-control .portion-display {
  font-size: 13px;
  font-weight: 600;
  min-width: 52px;
  text-align: center;
}

/* ── Zutaten-Liste ──────────────────────────────────────────────────────────── */
.ingredients {
  list-style: none;
}

.ingredients li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  gap: 12px;
}

.ingredients li:last-child { border-bottom: none; }

.ing-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.ing-check.checked {
  background: var(--terracotta);
  border-color: var(--terracotta);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

.ing-amount {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: var(--terracotta);
  min-width: 62px;
  font-variant-numeric: tabular-nums;
}

.ing-name { flex: 1; }

/* ── Zubereitungs-Schritte ──────────────────────────────────────────────────── */
.steps {
  counter-reset: step;
  list-style: none;
}

.steps li {
  counter-increment: step;
  padding: 16px 0;
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.steps li:last-child { border-bottom: none; }

.steps li::before {
  content: counter(step);
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
  color: var(--terracotta);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
  min-width: 24px;
}

.step-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  flex: 1;
}

/* ── Kochmodus-CTA ──────────────────────────────────────────────────────────── */
.cook-cta {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 30;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cook-cta:hover { transform: translateX(-50%) translateY(-2px); box-shadow: var(--shadow-lg); }
.cook-cta svg { width: 16px; height: 16px; }

/* ── Kochmodus-Vollbild ─────────────────────────────────────────────────────── */
.cook-view {
  min-height: 100dvh;
  padding: 56px 24px calc(80px + env(safe-area-inset-bottom, 0));
  background: var(--bg);
}

.cook-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.cook-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
  text-decoration: none;
}

.cook-close svg { width: 16px; height: 16px; }

.cook-progress {
  display: flex;
  gap: 4px;
  flex: 1;
  margin: 0 14px;
}

.cook-progress span {
  flex: 1;
  height: 3px;
  background: var(--bg-soft);
  border-radius: 2px;
}

.cook-progress span.done { background: var(--terracotta); }
.cook-progress span.active { background: var(--ink); }

.cook-wake {
  font-size: 10px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 500;
  flex-shrink: 0;
}

.cook-wake .wake-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.cook-wake .wake-dot.pulsing {
  animation: pulse 2s infinite;
}

.cook-wake.inactive {
  color: var(--ink-mute);
  background: color-mix(in srgb, var(--ink-mute) 12%, transparent);
}

.cook-wake.inactive .wake-dot {
  background: var(--ink-mute);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.cook-step-num {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  color: var(--ink-mute);
  font-style: italic;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.cook-headline {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.cook-ingredients-mini {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 16px;
}

.cook-mini-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-bottom: 10px;
}

.cook-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cook-mini-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.cook-mini-item span:first-child { color: var(--ink); }
.cook-mini-item .cook-mini-amount {
  color: var(--terracotta);
  font-family: 'Fraunces', serif;
  font-weight: 500;
}

.cook-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.cook-nav a, .cook-nav button {
  flex: 1;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
}

.cook-nav a.primary, .cook-nav button.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  flex: 2;
}

.cook-nav a:hover, .cook-nav button:hover { transform: translateY(-1px); }

/* ── Formular ───────────────────────────────────────────────────────────────── */
.form-page {
  padding: 56px 20px 100px;
  max-width: 600px;
  margin: 0 auto;
}

.form-page h1 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin-bottom: 7px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--terracotta);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Zutaten + Schritte Dynamik-Liste */
.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zutat-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 32px;
  gap: 6px;
  align-items: center;
}

.schritt-row {
  display: grid;
  grid-template-columns: 1fr 32px;
  gap: 6px;
  align-items: start;
}

.btn-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  transition: all 0.15s;
}

.btn-remove:hover { background: var(--terracotta-soft); color: var(--terracotta-deep); border-color: var(--terracotta-soft); }
.btn-remove svg { width: 14px; height: 14px; }

.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s;
}

.btn-add:hover { background: color-mix(in srgb, var(--terracotta) 20%, transparent); }
.btn-add svg { width: 14px; height: 14px; }

/* Tags Checkboxen */
.tag-group {
  margin-bottom: 12px;
}

.tag-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin-bottom: 8px;
  display: block;
}

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transition: all 0.15s;
}

.tag-checkbox-label:hover { background: var(--terracotta-soft); }

.tag-checkbox-label input { display: none; }

.tag-checkbox-label.checked {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* Bild-Upload */
.image-upload-area {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.image-upload-area:hover { border-color: var(--terracotta); background: var(--terracotta-soft); }
.image-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.image-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.image-upload-hint {
  font-size: 13px;
  color: var(--ink-mute);
}

/* Formular-Aktionen */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--line);
}

.btn-primary {
  flex: 2;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--terracotta);
  color: white;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: var(--terracotta-deep); transform: translateY(-1px); }

.btn-secondary {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  line-height: 1.2;
  transition: background 0.15s;
}

.btn-secondary:hover { background: var(--line); }

/* ── Theme-Toggle ───────────────────────────────────────────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.theme-toggle:hover { background: var(--line); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ── Leer-Zustand ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  color: var(--ink-mute);
}

.empty-state p {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-style: italic;
  margin-top: 12px;
}

/* ── Kein-Bild Stub-Hero ────────────────────────────────────────────────────── */
.hero-stub {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-soft), var(--terracotta-soft));
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-stub svg { width: 64px; height: 64px; color: var(--terracotta); opacity: 0.4; }

/* ── Vorschläge-Modal ─────────────────────────────────────────────────────── */
.btn-vorschlaege {
  background: var(--terracotta);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.vorschlaege-modal[hidden] { display: none; }
.vorschlaege-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.vorschlaege-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.vorschlaege-dialog {
  position: relative;
  background: var(--bg, #fff);
  max-width: 560px; width: 92%; max-height: 86vh; overflow-y: auto;
  border-radius: var(--radius);
  padding: 18px;
}
.vorschlaege-dialog header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.vorschlaege-close {
  background: transparent; border: 0; font-size: 24px; cursor: pointer;
}
.vorschlaege-liste { list-style: none; padding: 0; margin: 0; }
.vorschlag-karte {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-soft);
}
.vorschlag-karte img,
.vorschlag-karte .kein-bild {
  width: 80px; height: 80px; object-fit: cover;
  border-radius: 6px; background: var(--bg-soft); flex-shrink: 0;
}
.karte-body { flex: 1; min-width: 0; }
.karte-quelle { font-size: 12px; color: var(--ink-mute); }
.karte-zutaten { font-size: 13px; margin: 4px 0 8px; }
.karte-body button {
  background: var(--terracotta); color: #fff; border: 0;
  padding: 6px 14px; border-radius: 6px; font-weight: 600; cursor: pointer;
}
.karte-luecken {
  font-size: 12px; color: #8a6d00; background: #fff7d6;
  padding: 4px 8px; border-radius: 4px; margin: 4px 0 8px;
}
.url-import {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--bg-soft);
  font-size: 14px;
}
.url-import label { display: block; margin-bottom: 6px; color: var(--ink-mute); }
.url-import-row { display: flex; gap: 8px; }
.url-import input[type="url"] {
  flex: 1; min-width: 0;
  padding: 8px 10px; border: 1px solid var(--bg-soft); border-radius: 6px;
  font: inherit;
}
.url-import button {
  background: var(--terracotta); color: #fff; border: 0;
  padding: 8px 14px; border-radius: 6px; font-weight: 600; cursor: pointer;
}
.url-import button:disabled { opacity: 0.6; cursor: wait; }
.url-import-status { font-size: 13px; color: var(--ink-mute); margin-top: 6px; }
