/* ---------------------------------------------------------------
   Einkaufsliste Frankreich-Urlaub – Mobile-first
   Palette: Azur, Sand, Terrakotta (Côte d'Azur)
   --------------------------------------------------------------- */

:root {
  --sand-50:  #fdfbf7;
  --sand-100: #f6f1e8;
  --sand-200: #ece4d6;
  --ink:      #1d2a33;
  --ink-soft: #5b6b76;
  --ink-mute: #8b9aa4;
  --azur:     #0b3d5c;
  --azur-mid: #1a6ea0;
  --azur-lit: #3ea0d8;
  --terra:    #c2564b;
  --surface:  #ffffff;
  --line:     rgba(29, 42, 51, .09);
  --shadow:   0 1px 2px rgba(11,61,92,.05), 0 6px 20px -8px rgba(11,61,92,.18);
  --shadow-lg:0 2px 6px rgba(11,61,92,.07), 0 18px 40px -16px rgba(11,61,92,.32);
  --radius:   18px;
  --accent:   var(--azur-mid);
  --safe-b:   env(safe-area-inset-bottom, 0px);
  --safe-t:   env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand-50:  #10161b;
    --sand-100: #141c22;
    --sand-200: #1c262e;
    --ink:      #e8eef2;
    --ink-soft: #9fb0bc;
    --ink-mute: #6d808e;
    --surface:  #18222a;
    --line:     rgba(255,255,255,.08);
    --shadow:   0 1px 2px rgba(0,0,0,.3), 0 6px 20px -8px rgba(0,0,0,.5);
    --shadow-lg:0 2px 6px rgba(0,0,0,.35), 0 18px 40px -16px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sand-50);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }

button { font: inherit; color: inherit; }

a { color: var(--azur-mid); }

/* Kein blaues Tap-Highlight auf iOS/Android */
a, button, input { -webkit-tap-highlight-color: transparent; }

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px calc(40px + var(--safe-b));
}

/* ============================= Login ============================= */

.page-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: linear-gradient(165deg, #0b3d5c 0%, #12557d 42%, #1f7fa8 100%);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

/* weiche Lichtflecken im Hintergrund */
.login-bg { position: absolute; inset: 0; pointer-events: none; }
.login-bg span {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5;
}
.login-bg span:nth-child(1) { width: 320px; height: 320px; background: #4fc3d9; top: -80px;  left: -60px; }
.login-bg span:nth-child(2) { width: 260px; height: 260px; background: #f2b880; bottom: -60px; right: -50px; opacity: .38; }
.login-bg span:nth-child(3) { width: 220px; height: 220px; background: #7fd1a8; bottom: 28%; left: -70px; opacity: .28; }

.login { width: 100%; max-width: 400px; position: relative; z-index: 1; }

.login-card {
  background: var(--surface);
  border-radius: 26px;
  padding: 34px 24px 28px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.45);
  text-align: center;
  animation: rise .5s cubic-bezier(.2,.8,.25,1) both;
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.login-emblem {
  font-size: 40px; line-height: 1;
  width: 74px; height: 74px; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--sand-100), var(--sand-200));
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.login-sub { color: var(--ink-soft); margin: 6px 0 26px; font-size: .95rem; }

.login-form { display: grid; gap: 12px; text-align: left; }
.login-form label { font-size: .82rem; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .06em; }

input[type="text"], input[type="search"], input[type="password"] {
  width: 100%;
  padding: 15px 16px;
  font-size: 17px;              /* >=16px verhindert Auto-Zoom auf iOS */
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--sand-50);
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
input:focus {
  outline: none;
  border-color: var(--azur-lit);
  box-shadow: 0 0 0 4px rgba(62,160,216,.18);
}

.btn-primary {
  margin-top: 4px;
  padding: 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--azur-mid), var(--azur));
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(26,110,160,.9);
  transition: transform .12s, filter .18s;
}
.btn-primary:active { transform: scale(.978); filter: brightness(1.06); }
.btn-primary:disabled { opacity: .72; transform: none; cursor: default; }

.login-hint { font-size: .82rem; color: var(--ink-mute); margin: 2px 0 0; text-align: center; }
.login-error { color: var(--terra); font-size: .85rem; margin: -4px 0 0; }

.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-mute); font-size: .78rem; margin: 24px 0 14px;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  border: 1.5px solid var(--line);
  background: var(--sand-50);
  padding: 9px 15px;
  border-radius: 999px;
  font-weight: 600; font-size: .9rem;
  cursor: pointer;
  transition: border-color .16s, transform .12s, background .16s;
}
.chip:active { transform: scale(.96); }
.chip:hover { border-color: var(--azur-lit); background: var(--surface); }

/* ============================= Hero ============================= */

.hero {
  background: linear-gradient(160deg, #0b3d5c 0%, #14608c 55%, #1f86b4 100%);
  color: #fff;
  padding: calc(18px + var(--safe-t)) 16px 26px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 14px 34px -22px rgba(11,61,92,.9);
  position: relative;
  overflow: hidden;
}
.hero::after {                     /* sanfter Lichtkegel oben rechts */
  content: ""; position: absolute; width: 260px; height: 260px;
  top: -130px; right: -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
}
.hero-inner { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }

.hero-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.hero-kicker {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .14em;
  font-weight: 700; opacity: .75;
}

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  font-size: .84rem; font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .16s, transform .12s;
}
.user-chip:active { transform: scale(.96); }
.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--azur);
  display: grid; place-items: center;
  font-weight: 800; font-size: .8rem; text-transform: uppercase;
}

.hero h1 { font-size: 2rem; }
.hero-sub { margin: 4px 0 0; opacity: .85; font-size: .95rem; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-meta span {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.16);
  padding: 5px 11px; border-radius: 999px;
  font-size: .78rem; font-weight: 500;
}

.hero-progress { margin-top: 20px; }
.hero-progress-head {
  display: flex; align-items: baseline; gap: 4px;
  font-size: .88rem; opacity: .92; margin-bottom: 8px;
}
.hero-progress-head strong { font-size: 1.05rem; font-weight: 800; }
.hero-progress-head em { margin-left: auto; font-style: normal; font-weight: 700; opacity: .8; }

/* ============================ Balken ============================ */

.bar {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: rgba(29,42,51,.1);
  overflow: hidden;
}
.hero .bar, .cat-hero .bar { background: rgba(255,255,255,.22); }
.bar-lg { height: 8px; }
.bar i {
  display: block; height: 100%; border-radius: 99px;
  background: var(--accent);
  transition: width .42s cubic-bezier(.25,.9,.3,1);
}
.hero .bar i, .cat-hero .bar i {
  background: linear-gradient(90deg, #8fe3c4, #f7d488);
}

/* ============================ Suche ============================= */

.search-wrap { position: relative; margin: 18px 0 14px; }
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; fill: none; stroke: var(--ink-mute);
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.search-wrap input {
  padding-left: 42px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-color: transparent;
}
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.empty-search { text-align: center; color: var(--ink-mute); padding: 28px 0; }

/* ========================= Kategorieliste ======================= */

.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.cat a {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 13px 12px 13px 13px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: transform .13s cubic-bezier(.2,.8,.3,1), box-shadow .2s;
}
.cat a:active { transform: scale(.985); box-shadow: var(--shadow-lg); }
/* Der Tipp wird kurz festgehalten (siehe app.js), damit die Rückmeldung auch
   dann sichtbar ist, wenn die nächste Seite sofort aus dem Cache kommt. */
.cat a.is-pressed { transform: scale(.955); box-shadow: var(--shadow-lg); }

.cat-tile {
  flex: none;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  font-size: 25px; line-height: 1;
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.cat-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cat-name {
  font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 7px;
}
.cat-fr { color: var(--ink-mute); font-size: .81rem; }
.cat-body .bar { margin-top: 5px; }

.done-badge {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  padding: 2px 7px; border-radius: 99px;
}
@media (prefers-color-scheme: dark) {
  .done-badge { color: color-mix(in srgb, var(--accent) 70%, white); }
}

.cat-count { flex: none; font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.cat-count strong { color: var(--ink); font-size: .95rem; }

.chev { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--ink-mute);
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ====================== Kategorie-Kopfzeile ===================== */

.cat-hero {
  background: linear-gradient(158deg,
    color-mix(in srgb, var(--accent) 92%, black 12%),
    color-mix(in srgb, var(--accent) 78%, white 6%));
  color: #fff;
  padding: calc(12px + var(--safe-t)) 16px 22px;
  border-radius: 0 0 26px 26px;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 10px 26px -18px rgba(0,0,0,.8);
}
.cat-hero-inner { max-width: 640px; margin: 0 auto; }
.cat-hero-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-hero-emoji { font-size: 22px; margin-left: auto; margin-right: auto; }

.back, .icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.14);
  color: #fff; cursor: pointer;
  transition: background .16s, transform .12s;
}
.back:active, .icon-btn:active { transform: scale(.93); }
.back svg, .icon-btn svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn[aria-pressed="true"] { background: #fff; color: var(--accent); }

.cat-hero h1 { font-size: 1.55rem; }
.cat-hero-fr { margin: 2px 0 0; opacity: .8; font-size: .88rem; }
.cat-hero-progress { margin-top: 14px; font-size: .84rem; }
.cat-hero-progress span { display: block; margin-bottom: 7px; opacity: .92; }
.cat-hero-progress strong { font-weight: 800; }

/* ========================== Artikelliste ======================== */

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.item {
  display: flex; align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: transform .13s cubic-bezier(.2,.8,.3,1), background .2s;
}
.item:has(.item-btn:active) { transform: scale(.985); }

.item-btn {
  flex: 1; min-width: 0;
  display: flex; align-items: flex-start; gap: 13px;
  background: none;
  border: 0;
  border-radius: 15px;
  padding: 14px 13px;
  min-height: 60px;                 /* großzügiges Tap-Ziel */
  text-align: left;
  cursor: pointer;
  transition: opacity .22s;
}

.box {
  flex: none; margin-top: 1px;
  width: 26px; height: 26px;
  border-radius: 9px;
  border: 2px solid color-mix(in srgb, var(--ink-mute) 45%, transparent);
  display: grid; place-items: center;
  transition: background .18s, border-color .18s, transform .18s;
}
.box svg {
  width: 17px; height: 17px; fill: none; stroke: #fff;
  stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
  transition: stroke-dashoffset .25s ease .04s;
}

.item-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.item-de { font-weight: 650; font-size: 1rem; letter-spacing: -.005em; }
.item-fr { color: var(--ink-mute); font-size: .82rem; }
.item-note { color: var(--ink-soft); font-size: .76rem; font-style: italic; margin-top: 2px; }

.item-by {
  font-size: .7rem; font-weight: 700; color: var(--accent);
  margin-top: 3px;
}
.item-by:empty { display: none; }

.qty {
  flex: none;
  font-size: .78rem; font-weight: 700;
  color: var(--ink-soft);
  background: var(--sand-100);
  border-radius: 9px;
  padding: 5px 9px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --- abgehakt --- */
.item.is-checked { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.item.is-checked .box {
  background: var(--accent);
  border-color: var(--accent);
}
.item.is-checked .box svg { stroke-dashoffset: 0; }
.item.is-checked .item-de { text-decoration: line-through; color: var(--ink-mute); text-decoration-thickness: 1.5px; }
.item.is-checked .item-fr, .item.is-checked .item-note { opacity: .55; }
.item.is-checked .qty { opacity: .55; }

.item.is-hidden { display: none; }

@keyframes pop { 50% { transform: scale(1.22); } }
.item.just-checked .box { animation: pop .3s cubic-bezier(.3,1.5,.5,1); }

.all-done {
  text-align: center; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: 14px; padding: 16px; margin-top: 14px;
}

/* ======================== Tipps & Fußzeile ====================== */

.tips {
  margin-top: 20px;
  background: var(--sand-100);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 14px 15px;
  font-size: .85rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.tips p { margin: 0; }

.foot {
  margin-top: 26px;
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  justify-content: center; align-items: center;
  font-size: .82rem;
}
.link-danger {
  background: none; border: 0; padding: 0;
  color: var(--terra); font-size: .82rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ============================= Toast ============================ */

.toast {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-b));
  transform: translate(-50%, 130%);
  background: var(--ink); color: var(--sand-50);
  padding: 11px 18px; border-radius: 999px;
  font-size: .85rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform .32s cubic-bezier(.2,.9,.3,1), opacity .3s;
  opacity: 0; pointer-events: none; z-index: 90;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (prefers-color-scheme: dark) {
  .toast { background: var(--sand-200); color: var(--ink); }
}

/* ====================== Tablet / Desktop ======================== */

@media (min-width: 700px) {
  .hero { border-radius: 0 0 34px 34px; padding-bottom: 30px; }
  .hero h1 { font-size: 2.3rem; }
  .cat-list { grid-template-columns: 1fr 1fr; }
  .items { grid-template-columns: 1fr 1fr; }
  .wrap { max-width: 860px; }
  .hero-inner, .cat-hero-inner { max-width: 860px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================
   Seitenwechsel
   ================================================================

   Die neue Ansicht blendet sich kurz ein. Bewusst als schlichte Animation auf
   dem neuen Inhalt statt als View Transition: ein laufender Übergang friert
   die Seite ein und schluckt Tipper – beim Durchtippen einer Liste merkt man
   das sofort. So bleibt alles jederzeit anfassbar.                          */

.view { animation: page-in .22s cubic-bezier(.2,.8,.3,1) both; }

@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}

/* ================================================================
   Menüplan
   ================================================================ */

/* --- Tab-Leiste im Hero --- */

.tabs {
  display: flex; gap: 6px;
  margin-top: 18px;
  background: rgba(0,0,0,.16);
  border-radius: 14px;
  padding: 4px;
}
.tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 8px;
  border-radius: 11px;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .88rem; font-weight: 650;
  transition: background .2s, color .2s, transform .12s;
}
.tab span { font-size: 1rem; }
.tab:active { transform: scale(.97); }
.tab.is-active {
  background: rgba(255,255,255,.95);
  color: var(--azur);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.28);
}

.lead {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.5;
}

/* --- Tagesliste --- */

.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }

.day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 13px 13px;
  box-shadow: var(--shadow);
}

.day-head { display: flex; align-items: center; gap: 12px; }

.day-tile {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 23px; line-height: 1;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.day-titles { flex: 1; min-width: 0; }
.day-label {
  display: block;
  font-size: .68rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  .day-label { color: color-mix(in srgb, var(--accent) 65%, white); }
}
.day-titles h2 {
  margin: 1px 0 0;
  font-size: 1.05rem; font-weight: 750; letter-spacing: -.01em;
}

.day-count { flex: none; font-size: .78rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.day-count strong { color: var(--ink); font-size: .92rem; }

.day-bar { margin: 11px 0 0; }

.day-note {
  margin: 10px 0 0;
  font-size: .78rem; color: var(--ink-soft); font-style: italic;
}

/* --- Gerichte innerhalb eines Tages --- */

.meals { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }

.meal-row a {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 10px 12px 12px;
  border-radius: 14px;
  background: var(--sand-100);
  border: 1px solid transparent;
  text-decoration: none; color: inherit;
  transition: transform .13s cubic-bezier(.2,.8,.3,1), border-color .2s;
}
.meal-row a:active { transform: scale(.985); }
.meal-row a.is-pressed { transform: scale(.955); }
.meal-row a:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

.meal-emoji { flex: none; font-size: 22px; line-height: 1.3; }
.meal-body { flex: 1; min-width: 0; display: grid; gap: 2px; }

.meal-slot {
  font-size: .67rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-mute);
}
.meal-title {
  font-weight: 700; font-size: 1rem; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.meal-sub { color: var(--ink-soft); font-size: .8rem; }

.meal-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tag {
  font-size: .68rem; font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 2px 8px; border-radius: 99px;
  white-space: nowrap;
}

.meal-count { flex: none; font-size: .75rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; margin-top: 2px; }
.meal-count strong { color: var(--ink); font-size: .88rem; }
.meal-row .chev { margin-top: 4px; }

/* ---------------------- Rezeptseite ---------------------- */

.meal-crumb {
  margin: 0 0 3px;
  font-size: .7rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; opacity: .75;
}

.meal-note {
  margin: 18px 0 0;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: .85rem; line-height: 1.5;
  color: var(--ink-soft);
}

.sec-head {
  margin: 26px 0 11px;
  font-size: .74rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-mute);
  display: flex; align-items: baseline; gap: 8px;
}
.sec-head span { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: .78rem; }

.ing-group {
  margin: 16px 0 8px;
  font-size: .82rem; font-weight: 750;
  color: var(--accent);
}
.ing-group:first-child { margin-top: 0; }
.ing-group.is-hidden { display: none; }
#items > .items + .ing-group { margin-top: 18px; }

/* Zubereitung */

.steps {
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid; gap: 9px;
}
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px 13px 48px;
  font-size: .9rem; line-height: 1.5;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 12px; top: 12px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: .76rem; font-weight: 800;
}
@media (prefers-color-scheme: dark) {
  .steps li::before { color: color-mix(in srgb, var(--accent) 65%, white); }
}

/* Vegetarische Variante */

.veg {
  margin-top: 24px;
  background: color-mix(in srgb, #4E9F5B 9%, transparent);
  border: 1px solid color-mix(in srgb, #4E9F5B 24%, transparent);
  border-radius: 16px;
  padding: 15px 16px;
}
.veg h3 {
  margin: 0 0 6px;
  font-size: .88rem; font-weight: 750;
  color: #3d7d49;
}
@media (prefers-color-scheme: dark) { .veg h3 { color: #8fd6a0; } }
.veg p { margin: 0; font-size: .87rem; line-height: 1.55; color: var(--ink-soft); }

@media (min-width: 700px) {
  .days { grid-template-columns: 1fr 1fr; align-items: start; }
  .steps { grid-template-columns: 1fr 1fr; }
}

/* Rezeptzutaten sind oft ganze Sätze – normaler Schriftschnitt liest sich
   besser als der fette der Einkaufsliste. */
[data-page="meal"] .item-de { font-weight: 500; line-height: 1.45; }
[data-page="meal"] .item-btn { min-height: 52px; padding: 12px 13px; }

/* Zwei Tags sollen nebeneinander passen. */
.tag { font-size: .66rem; padding: 2px 7px; }


/* ================================================================
   Rechte Spalte: Menge oben, Sprachausgabe unten
   ================================================================ */

.item-side {
  flex: none;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px;
  padding: 13px 11px 9px 0;
}

/* Lautsprecher: spricht den französischen Namen – fürs Regal im Supermarkt. */
.say-btn {
  margin-top: auto;                 /* immer unten rechts, auch ohne Menge */
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--accent);
  cursor: pointer;
  transition: transform .12s, background .2s, color .2s, border-color .2s;
}
.say-btn:active { transform: scale(.9); }
.say-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.say-btn svg path:first-child { fill: currentColor; stroke-width: 1.4; }
.say-btn .wave { opacity: .55; }

.say-btn.is-speaking {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.say-btn.is-speaking .wave-1 { animation: wave .9s ease-in-out infinite; }
.say-btn.is-speaking .wave-2 { animation: wave .9s ease-in-out .18s infinite; }
@keyframes wave { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

@media (prefers-color-scheme: dark) {
  .say-btn {
    color: color-mix(in srgb, var(--accent) 55%, white);
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  }
}

/* Ohne Sprachausgabe im Browser gar nicht erst anzeigen. */
body.no-tts .say-btn { display: none; }
body.no-tts .item-side { padding-bottom: 14px; }

/* ================================================================
   PWA: Homescreen-Hinweis & Standalone-Feinschliff
   ================================================================ */

.install-hint {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-b));
  z-index: 80;
  display: flex; align-items: center; gap: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px 12px 14px;
  box-shadow: var(--shadow-lg);
  transform: translateY(140%);
  transition: transform .38s cubic-bezier(.2,.9,.3,1);
  max-width: 620px; margin: 0 auto;
}
.install-hint.show { transform: translateY(0); }

.install-icon {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--azur-lit) 15%, transparent);
  color: var(--azur-mid);
}
.install-icon svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
@media (prefers-color-scheme: dark) { .install-icon { color: var(--azur-lit); } }

.install-text {
  flex: 1; min-width: 0;
  font-size: .8rem; line-height: 1.4;
  color: var(--ink-soft);
}
.install-text strong { color: var(--ink); font-weight: 700; }

.install-close {
  flex: none;
  width: 30px; height: 30px;
  border: 0; border-radius: 9px;
  background: var(--sand-100);
  color: var(--ink-mute);
  font-size: .8rem; cursor: pointer;
}
.install-close:active { transform: scale(.92); }

/* Als installierte App gibt es keine Browser-Leiste mehr – unten etwas Luft
   für den Home-Indicator, oben rutscht der Hero unter die Statusleiste. */
.is-standalone .wrap { padding-bottom: calc(56px + var(--safe-b)); }
