/* ---------- Tokens ---------- */
:root {
  /* Light-only, candy-pastel palette */
  --bg: #FFF9F2;
  --surface: #FFFFFF;
  --surface-2: #FFF0E6;
  --ink: #2E2A4F;
  --ink-2: #5F5A80;
  --ink-3: #958FB2;
  --line: #F3E6EE;
  --brand: #FF6B57;
  --brand-strong: #E54B3A;
  --brand-soft: #FFE3DC;
  --pink: #FF8FB8;
  --pink-soft: #FFE6F0;
  --sun: #FFC83D;
  --sun-soft: #FFF3CC;
  --mint: #3CCFA4;
  --mint-soft: #DCF8EE;
  --sky: #4FA9FF;
  --sky-soft: #E0F0FF;
  --lilac: #9B7BFF;
  --lilac-soft: #EEE8FF;
  /* Age-stage colours (ribbons + selected age chip), deep enough for white text */
  --stage-2: #8A68F5;
  --stage-3: #2F8FE8;
  --stage-4: #12A386;
  --veg: #18A660;
  --veg-soft: #DDF7E9;
  --egg: #D98E00;
  --egg-soft: #FFF2C9;
  --nonveg: #E5503F;
  --nonveg-soft: #FFE2DC;
  --shadow-sm: 0 1px 2px rgb(46 42 79 / .06);
  --shadow: 0 1px 2px rgb(46 42 79 / .04), 0 12px 28px -14px rgb(255 107 87 / .35);
  --radius: 22px;
  --font-display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(280px 240px at 100% 0, var(--pink-soft), transparent 70%),
    radial-gradient(260px 220px at 0 220px, var(--sky-soft), transparent 70%),
    radial-gradient(320px 260px at 90% 520px, var(--sun-soft), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; border-radius: 12px; }

/* ---------- Install app bar (PWA) ---------- */
.install-bar {
  background: var(--ink); color: #fff;
  padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 10px;
  animation: barIn .35s ease both;
}
@keyframes barIn { from { opacity: 0; transform: translateY(-100%); } }
.install-inner { display: flex; align-items: center; gap: 12px; }
.install-inner img { flex: none; width: 40px; height: 40px; border-radius: 12px; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.install-text strong { font-size: 14px; font-weight: 800; }
.install-text span { font-size: 12px; color: rgb(255 255 255 / .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install-btn {
  flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap;
  box-shadow: 0 4px 14px -6px var(--brand);
}
.install-btn:active { transform: scale(.96); }
.install-close {
  flex: none; width: 32px; height: 32px; margin-right: -6px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: rgb(255 255 255 / .7); cursor: pointer;
}
.install-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ios-help { margin: 10px auto 0; font-size: 13px; color: rgb(255 255 255 / .85); }
.ios-help svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The bar already clears the notch, so the header doesn't need to again. */
.install-bar:not([hidden]) + .top { padding-top: 14px; }

/* ---------- Header ---------- */
.top { padding-top: max(14px, env(safe-area-inset-top)); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.logo { width: 34px; height: 34px; }

.saved-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.saved-toggle svg { width: 18px; height: 18px; fill: none; stroke: var(--brand); stroke-width: 2; }
.saved-toggle b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; display: grid; place-items: center; }
.saved-toggle[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.saved-toggle[aria-pressed="true"] svg { fill: #fff; stroke: #fff; }
.saved-toggle[aria-pressed="true"] b { background: rgb(255 255 255 / .25); color: #fff; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em; line-height: 1.15; margin: 0; }
#hero-title { font-size: clamp(30px, 8.4vw, 46px); margin-top: 26px; max-width: 14ch; }
#hero-title em {
  font-style: normal; color: var(--brand);
  background: linear-gradient(100deg, var(--brand) 15%, var(--pink) 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.search {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 6px; padding: 0 16px; height: 52px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.search:focus-within { border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); }
.search svg { stroke: var(--pink); }
.search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; }
.search input::placeholder { color: var(--ink-3); }


/* ---------- Sticky filters ---------- */
.filters {
  position: sticky; top: 0; z-index: 20;
  padding: 10px 0 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow .2s;
}
.filters.stuck { box-shadow: 0 1px 0 var(--line), 0 8px 20px -16px rgb(46 42 79 / .3); }
.chip-row { display: flex; align-items: center; gap: 10px; }
.chip-row + .chip-row { margin-top: 8px; }
.row-label { flex: none; width: 34px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 2px 2px 4px; margin: -2px calc(var(--gutter) * -1) -4px -2px;
  padding-right: var(--gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip small { font-weight: 700; font-size: 12px; color: var(--ink-3); }
.chip[aria-pressed="true"] { --c: var(--brand); background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 6px 14px -8px var(--c); }
.chip[aria-pressed="true"] small { color: rgb(255 255 255 / .8); }
.chip[data-stage="2"] { --c: var(--stage-2); }
.chip[data-stage="3"] { --c: var(--stage-3); }
.chip[data-stage="4"] { --c: var(--stage-4); }
.chip[data-diet="veg"][aria-pressed="true"] { --c: var(--veg); }
.chip[data-diet="egg"][aria-pressed="true"] { --c: var(--egg); }
.chip[data-diet="nonveg"][aria-pressed="true"] { --c: var(--nonveg); }
.chip[aria-pressed="true"] .mark:not(.combo) { background: #fff; border-color: #fff; }
.chip:disabled { opacity: .45; cursor: default; }

/* Indian-style food marks: square + dot (veg / egg), square + triangle (non-veg) */
.mark {
  --c: var(--veg);
  flex: none; position: relative; width: 14px; height: 14px;
  border: 1.6px solid var(--c); border-radius: 3px; background: var(--surface);
}
.mark::after { content: ""; position: absolute; inset: 2.4px; border-radius: 50%; background: var(--c); }
.mark.egg { --c: var(--egg); }
.mark.nonveg { --c: var(--nonveg); }
.mark.nonveg::after { inset: auto; left: 50%; top: 50%; width: 0; height: 0; border-radius: 0; background: none; transform: translate(-50%, -55%); border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid var(--c); }
.mark.combo { width: auto; border: 0; background: none; display: inline-flex; gap: 3px; }
.mark.combo::after { display: none; }
.mark.combo .mark { position: relative; }

/* ---------- Results ---------- */
.summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 6px; }
.summary p { margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.summary strong { color: var(--ink); }
.link-btn { flex: none; border: 0; background: none; padding: 4px 0; color: var(--brand-strong); font-weight: 800; font-size: 14px; cursor: pointer; }

.section { margin: 18px 0 30px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 24px; }
.section-head span { color: var(--ink-3); font-size: 13px; font-weight: 700; }
.section-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: rise .35s ease both;
}
@media (hover: hover) { .card:hover { transform: translateY(-3px); } }
.card:active { transform: scale(.985); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card-media { position: relative; aspect-ratio: 4 / 3.4; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-link { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.ribbon {
  position: absolute; top: 0; left: 10px; z-index: 2;
  display: grid; justify-items: center; padding: 6px 7px 10px;
  background: var(--brand); color: #fff; line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
  box-shadow: var(--shadow-sm);
}
.ribbon[data-stage="2"] { background: var(--stage-2); }
.ribbon[data-stage="3"] { background: var(--stage-3); }
.ribbon[data-stage="4"] { background: var(--stage-4); }
.ribbon b { font-family: var(--font-display); font-size: 19px; }
.ribbon small { font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }

.cuisine-pill {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 999px;
  background: rgb(255 255 255 / .92); color: var(--ink); box-shadow: var(--shadow-sm);
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.cuisine-pill::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: linear-gradient(#FF9933 0 33%, #fff 33% 66%, #138808 66%); box-shadow: 0 0 0 1px rgb(0 0 0 / .08); vertical-align: 0; }

.fav {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgb(255 255 255 / .9); box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .15s;
}
.fav:active { transform: scale(.88); }
.fav svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 2; transition: fill .15s, stroke .15s; }
.fav[aria-pressed="true"] svg { fill: var(--brand); stroke: var(--brand); }
.fav.pop svg { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.3); } }

.card-body { padding: 11px 12px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.card-meta.veg { color: var(--veg); } .card-meta.egg { color: var(--egg); } .card-meta.nonveg { color: var(--nonveg); }
.card h3 {
  font-size: 16px; line-height: 1.22;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-hl { margin: auto 0 0; padding-top: 2px; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 720px) { .card h3 { font-size: 18px; } .card-body { padding: 14px 16px 18px; } }

.empty { text-align: center; padding: 48px 16px 32px; color: var(--ink-2); }
.empty svg { width: 96px; height: 96px; margin: 0 auto 14px; }
.empty h2 { font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; max-width: 32ch; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(100deg, var(--brand), #FF7E8E); color: #fff; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 18px -10px var(--brand);
}

.site-footer { padding-top: 8px; padding-bottom: max(32px, env(safe-area-inset-bottom)); }
.site-footer p { margin: 0; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: 13px; }
.site-footer a { color: var(--ink-2); font-weight: 700; }

/* ---------- Detail view ---------- */
#detail-view { min-height: 100vh; display: flow-root; animation: fadeIn .25s ease both; }
#detail-view .d-sheet { animation: slideUp .35s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }
.d-hero { position: relative; aspect-ratio: 4 / 3.3; max-height: 62vh; width: 100%; background: var(--surface-2); overflow: hidden; }
.d-hero img { width: 100%; height: 100%; object-fit: cover; }
.d-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .28), transparent 30%); pointer-events: none; }
.d-bar {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px;
  transition: background .2s, box-shadow .2s;
}
.d-bar.solid { background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.d-bar-title { flex: 1; margin: 0 12px; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; }
.d-bar.solid .d-bar-title { opacity: 1; }
.round-btn {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer; text-decoration: none;
  background: rgb(255 255 255 / .92); color: var(--ink); box-shadow: var(--shadow);
}
.round-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.round-btn.fav-btn[aria-pressed="true"] svg { fill: var(--brand); stroke: var(--brand); }

.d-sheet {
  position: relative; z-index: 2; margin-top: -28px;
  background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 24px var(--gutter) 40px;
}
.d-inner { max-width: 720px; margin: 0 auto; }
.d-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tag { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--surface-2); color: var(--ink-2); }
.tag.age { background: var(--brand-soft); color: var(--brand-strong); }
.tag.veg { background: var(--veg-soft); color: var(--veg); }
.tag.egg { background: var(--egg-soft); color: var(--egg); }
.tag.nonveg { background: var(--nonveg-soft); color: var(--nonveg); }
.d-title { font-size: clamp(28px, 7.6vw, 40px); }
.d-lede { margin: 12px 0 0; color: var(--ink-2); font-size: 17px; }

.d-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 8px; }
.stat { background: var(--surface); border-radius: 16px; padding: 12px 10px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.stat:nth-child(1) { background: var(--mint-soft); border-color: transparent; }
.stat:nth-child(2) { background: var(--lilac-soft); border-color: transparent; }
.stat:nth-child(3) { background: var(--sky-soft); border-color: transparent; }
.stat b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }

.d-section { margin-top: 30px; }
.d-section > h2 { font-size: 24px; margin-bottom: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.d-section > h2 small { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: 0; }

.about p { margin: 0 0 12px; color: var(--ink-2); }
details.about { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 16px; margin-top: 22px; }
details.about summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 800; }
details.about summary::-webkit-details-marker { display: none; }
details.about summary::after { content: "+"; font-size: 22px; font-weight: 600; color: var(--brand); transition: transform .2s; }
details.about[open] summary::after { transform: rotate(45deg); }

.ingredients { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 20px; border: 1px solid var(--line); overflow: hidden; }
.ingredients li + li { border-top: 1px solid var(--line); }
.ingredients label { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; cursor: pointer; }
.ingredients input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid var(--ink-3); border-radius: 7px; display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s; }
.ingredients input::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.ingredients input:checked { background: var(--veg); border-color: var(--veg); }
.ingredients input:checked::after { opacity: 1; }
.ingredients input:checked + span { color: var(--ink-3); text-decoration: line-through; }

.method h3 { font-family: var(--font-body); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-strong); margin: 26px 0 12px; }
.method h3:first-child { margin-top: 0; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; margin: 0 0 16px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; }
.step p, .tip p { margin: 3px 0 0; }
.tip { margin: 0 0 12px; padding: 12px 14px; background: var(--sun-soft); border-radius: 14px; color: var(--ink-2); }
.tip p { margin: 0; }
.method figure { margin: 4px 0 18px; }
.method figure img { width: 100%; border-radius: 18px; background: var(--surface-2); }
@media (min-width: 720px) { .method figure { margin-left: 42px; } }

.gallery-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; }
.gallery-head h3 { font-family: var(--font-body); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-strong); }
.gallery-head span { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1) 26px; padding: 0 var(--gutter) 4px;
  scroll-padding: 0 var(--gutter); scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { position: relative; margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; background: var(--surface-2); }
.gallery figcaption { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; font-size: 12px; font-weight: 800; }
@media (min-width: 720px) { .gallery { grid-auto-columns: 42%; margin-left: 0; margin-right: 0; padding: 0 0 4px; } }

.credit { margin-top: 34px; padding: 18px; border-radius: 20px; background: var(--pink-soft); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.credit p { margin: 0; color: var(--ink-2); font-size: 14px; }
.credit .btn { height: 42px; font-size: 14px; }

@media (min-width: 900px) {
  #detail-view { padding-top: 76px; }
  .d-hero { max-width: 1080px; margin: 0 auto; border-radius: 28px; aspect-ratio: 16 / 8; }
  .d-hero::after { display: none; }
  .d-sheet { margin-top: 0; background: transparent; padding-top: 30px; }
  .d-bar { background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .d-bar .d-bar-title { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Header actions + hamburger ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn {
  width: 40px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm);
  color: var(--ink); cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.menu-btn:active { transform: scale(.94); }

/* Free-recipe counter on the recipe page */
.free-note {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 14px; border: 1px dashed color-mix(in srgb, var(--lilac) 55%, transparent);
  border-radius: 14px; background: var(--lilac-soft); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.free-note b { color: var(--ink); }
.free-note-cta { font-weight: 800; color: var(--stage-2); }

/* ---------- Dialogs (menu drawer, bottom sheets, alert) ---------- */
.lb-dialog { border: 0; padding: 0; margin: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; overflow: visible; }
.lb-dialog::backdrop { background: rgb(46 42 79 / .42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.lb-dialog[open]::backdrop { animation: lbFade .2s ease both; }
.lb-panel { background: var(--bg); font-family: var(--font-body); }
.lb-dialog h2 { font-family: var(--font-display); font-size: 22px; line-height: 1.2; margin: 0; }
@keyframes lbFade { from { opacity: 0; } }
@keyframes lbFromRight { from { transform: translateX(100%); } }
@keyframes lbFromBottom { from { transform: translateY(100%); } }
@keyframes lbPop { from { opacity: 0; transform: scale(.94); } }

.lb-x {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-2); cursor: pointer;
}
.lb-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Drawer from the right */
.lb-drawer { position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px); height: 100dvh; }
.lb-drawer[open] { animation: lbFromRight .26s cubic-bezier(.2, .8, .2, 1) both; }
.lb-drawer .lb-panel {
  height: 100%; display: flex; flex-direction: column; overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  border-radius: 24px 0 0 24px; box-shadow: -20px 0 40px -20px rgb(46 42 79 / .4);
}
.lb-menu-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.lb-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--pink)); color: #fff; font-family: var(--font-display); font-size: 20px; font-weight: 700;
}
.lb-avatar svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.lb-avatar.big { width: 60px; height: 60px; font-size: 26px; }
.lb-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-who strong { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.lb-who span { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.lb-menu-list { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; }
.lb-menu-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); font: inherit; color: inherit;
}
.lb-menu-list button:active { transform: scale(.985); }
.lb-menu-list button > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb-ico { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.lb-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-ico.sky { background: var(--sky-soft); color: var(--sky); }
.lb-ico.pink { background: var(--pink-soft); color: #E5598C; }
.lb-ico.sun { background: var(--sun-soft); color: #C98A00; }
.lb-item { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-item b { font-size: 15px; font-weight: 800; }
.lb-item small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-pill { flex: none; padding: 4px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.lb-menu-foot { margin: auto 0 0; padding-top: 16px; text-align: center; color: var(--ink-3); font-size: 12px; }

/* Bottom sheet (centred card on wider screens) */
.lb-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-height: 92dvh; }
.lb-sheet[open] { animation: lbFromBottom .28s cubic-bezier(.2, .8, .2, 1) both; }
.lb-sheet .lb-panel {
  max-width: 520px; margin: 0 auto; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 18px max(20px, env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
  box-shadow: 0 -16px 40px -20px rgb(46 42 79 / .45);
}
.lb-sheet .lb-panel::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 10px; border-radius: 99px; background: var(--line); }
@media (min-width: 720px) {
  .lb-sheet { inset: 0; display: grid; place-items: center; height: 100dvh; max-height: none; }
  .lb-sheet[open] { display: grid; animation: lbPop .2s ease both; }
  .lb-sheet .lb-panel { width: min(480px, 92vw); border-radius: 26px; padding-bottom: 22px; }
  .lb-sheet .lb-panel::before { display: none; }
}
.lb-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lb-sheet-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

/* Forms */
.lb-form { display: flex; flex-direction: column; gap: 14px; }
.lb-field { display: flex; flex-direction: column; gap: 6px; }
.lb-field > span:first-child { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.lb-field em { font-style: normal; font-weight: 600; color: var(--ink-3); }
.lb-field input, .lb-field select {
  width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; outline: none;
}
.lb-field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.lb-field input:focus, .lb-field select:focus, .lb-phone:focus-within, .lb-suffix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.lb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lb-phone, .lb-suffix {
  display: flex; align-items: center; height: 50px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden;
}
.lb-phone i, .lb-suffix i { font-style: normal; font-weight: 800; color: var(--ink-2); padding: 0 12px; }
.lb-phone i { border-right: 1.5px solid var(--line); height: 100%; display: grid; place-items: center; background: var(--surface-2); }
.lb-phone input, .lb-suffix input { border: 0 !important; box-shadow: none !important; height: 100%; border-radius: 0; letter-spacing: .04em; }
.lb-trust { display: flex; gap: 8px; margin-top: -4px; }
.lb-trust span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--mint-soft); color: #0E8A68; font-size: 12.5px; font-weight: 800; }
.lb-trust svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--nonveg-soft); color: var(--brand-strong); font-size: 13.5px; font-weight: 700; }
.lb-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); font-weight: 700; color: var(--ink-2); }
.lb-summary-row b { font-family: var(--font-display); font-size: 20px; color: var(--ink); }

/* Buttons */
.lb-primary, .lb-secondary, .lb-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 16px;
}
.lb-primary { width: 100%; background: linear-gradient(100deg, var(--brand), #FF7E8E); color: #fff; box-shadow: 0 10px 22px -12px var(--brand); }
.lb-primary:disabled { opacity: .8; cursor: progress; }
.lb-primary:active, .lb-secondary:active { transform: scale(.98); }
.lb-secondary { flex: 1; background: var(--ink); color: #fff; }
.lb-ghost { flex: 1; background: transparent; color: var(--ink-2); border: 1.5px solid var(--line); }
.lb-ghost.wide { width: 100%; margin-top: 8px; border: 0; height: 44px; }
.lb-row-btns { display: flex; gap: 10px; margin-top: 18px; }
.lb-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgb(255 255 255 / .45); border-top-color: #fff; animation: lbSpin .7s linear infinite; }
@keyframes lbSpin { to { transform: rotate(360deg); } }

/* Profile */
.lb-profile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.lb-profile div { display: flex; flex-direction: column; }
.lb-profile strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.lb-profile span { color: var(--ink-2); font-weight: 700; }

/* Plans */
.lb-plan { position: relative; padding: 16px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line); margin-bottom: 12px; }
.lb-plan.current { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.lb-plan.pro {
  border: 0; color: var(--ink);
  background:
    radial-gradient(120% 80% at 100% 0%, var(--sun-soft), transparent 60%),
    linear-gradient(160deg, var(--lilac-soft), #fff 70%);
  box-shadow: 0 0 0 2px var(--lilac), 0 16px 30px -18px var(--lilac);
}
.lb-plan-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lb-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.lb-badge svg { width: 15px; height: 15px; fill: var(--sun); stroke: var(--sun); stroke-width: 1.5; stroke-linejoin: round; }
.lb-badge.free { background: var(--surface-2); color: var(--ink-2); }
.lb-price b { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.lb-price small { margin-left: 4px; color: var(--ink-2); font-weight: 700; }
.lb-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.lb-plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.lb-plan li svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--veg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lb-plan .lb-primary { margin-top: 14px; }
.lb-usage { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.lb-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.lb-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--pink)); }
.lb-note { padding: 14px; border-radius: 16px; background: var(--mint-soft); font-weight: 700; }

/* Paywall */
.lb-paywall { text-align: center; padding: 0 4px 16px; }
.lb-paywall h2 { margin-top: 14px; }
.lb-paywall p { margin: 8px auto 0; max-width: 34ch; color: var(--ink-2); }
.lb-locked { position: relative; width: 132px; height: 100px; margin: -6px auto 0; border-radius: 20px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.lb-locked img { width: 100%; height: 100%; object-fit: cover; filter: blur(3px) saturate(.9); transform: scale(1.1); }
.lb-lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(46 42 79 / .25); }
.lb-lock svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: #fff; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

/* Alert (server error) */
.lb-alert { position: fixed; inset: 0; margin: auto; width: min(340px, calc(100vw - 32px)); height: fit-content; }
.lb-alert[open] { animation: lbPop .2s ease both; }
.lb-alert .lb-panel { padding: 24px 20px 18px; border-radius: 24px; text-align: center; box-shadow: 0 24px 50px -20px rgb(46 42 79 / .5); }
.lb-alert p { margin: 8px 0 18px; color: var(--ink-2); }
.lb-alert-ico { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--nonveg-soft); }
.lb-alert-ico svg { width: 28px; height: 28px; fill: none; stroke: var(--brand-strong); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Toast */
.lb-toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 100;
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; text-align: center;
  font-weight: 700; font-size: 14px; box-shadow: 0 12px 28px -12px rgb(46 42 79 / .6);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .25s ease, opacity .25s ease; pointer-events: none;
}
.lb-toast.show { transform: translate(-50%, 0); opacity: 1; }
.lb-fine { margin: -6px 0 0; color: var(--ink-3); font-size: 12px; }
