/* Layout: image-first kitchen app on a warm light ground: soft tomato as the action colour, mustard and fresh herb for state.
   One light theme by choice: a home-cooking app, bright in any system setting. */
:root {
  --bg: #FFFBF6;
  --surface: #FFFFFF;
  --surface-2: #FBF6EF;
  --track: #F5EDE3;
  --ink: #3D342E;
  --muted: #8C8178;
  --line: #EFE5DA;
  --chili: #E8705A;
  --chili-ink: #FFFFFF;
  --chili-soft: #FDECE6;
  --saffron: #F2C14E;
  --saffron-soft: #FEF5DC;
  --herb: #4FA77F;
  --herb-soft: #E6F4EC;
  --berry: #C76B8A;
  --shadow: 0 1px 2px rgba(90, 60, 30, .05), 0 6px 20px rgba(90, 60, 30, .07);
  --font-display: "Secular One", "Rubik", "Arial Hebrew", system-ui, sans-serif;
  --font-body: "Rubik", "Arial Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 20px;
  --nav-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }

/* ---------- top bar & bottom nav ---------- */
.top {
  position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding-top: env(safe-area-inset-top, 0px);
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--chili); display: grid; place-items: center; transform: rotate(-6deg); }
.brand-mark svg { width: 22px; height: 22px; color: #fff; }
.brand-name { font-family: var(--font-display); font-size: 26px; letter-spacing: -.5px; }
.top-links { margin-inline-start: auto; display: none; gap: 4px; }
.top-links a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--muted); }
.top-links a.on { background: var(--chili-soft); color: var(--chili); }
.top .top-add { display: none; }

.nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
.nav a, .nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--muted); background: none; border: 0; }
.nav a.on { color: var(--chili); }
.nav svg { width: 24px; height: 24px; }
.nav .fab { position: relative; }
.nav .fab span.fab-btn { width: 56px; height: 56px; border-radius: 18px; background: var(--chili); color: #fff; display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 16px color-mix(in srgb, var(--chili) 28%, transparent); transform: rotate(-4deg); transition: transform .2s; }
.nav .fab:active span.fab-btn { transform: rotate(0) scale(.94); }
.nav .fab svg { width: 28px; height: 28px; }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .nav { display: none; }
  .top-links { display: flex; }
  .top .top-add { display: inline-flex; }
}

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 600; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; transition: transform .12s, background .2s; min-height: 44px; }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--chili); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--chili) 22%, transparent); }
.btn.dark { background: var(--herb); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.small { padding: 7px 12px; min-height: 36px; border-radius: 11px; font-size: 14px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); white-space: nowrap; }
.chip svg { width: 16px; height: 16px; }
.chip.saffron { background: var(--saffron-soft); box-shadow: none; }
.chip.herb { background: var(--herb-soft); color: var(--herb); box-shadow: none; }
.chip.chili { background: var(--chili-soft); color: var(--chili); box-shadow: none; }
.chip.missing { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); border: 0; color: var(--muted); background-image: repeating-linear-gradient(-45deg, transparent 0 6px, color-mix(in srgb, var(--line) 60%, transparent) 6px 7px); }

/* ---------- collection ---------- */
.hello { padding-block: 12px 4px; }
.hello h1 { font-size: clamp(34px, 8vw, 56px); letter-spacing: -1px; }
.hello h1 em { font-style: normal; color: var(--chili); }
.hello p { margin: 6px 0 0; color: var(--muted); }

.paste {
  margin-block: 16px; display: flex; gap: 8px; align-items: center; background: var(--surface); border-radius: 18px; padding: 8px; box-shadow: var(--shadow);
}
.paste input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font-size: 16px; outline: none; direction: ltr; text-align: right; }
.paste input::placeholder { color: var(--muted); direction: rtl; }

.seg { display: inline-grid; grid-auto-flow: column; background: var(--track); border-radius: 999px; padding: 4px; position: relative; }
.seg button { border: 0; background: none; padding: 9px 16px; border-radius: 999px; font-weight: 600; color: var(--muted); position: relative; z-index: 1; display: flex; gap: 6px; align-items: center; }
.seg button.on { color: var(--ink); }
.seg .pill { position: absolute; top: 4px; bottom: 4px; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 4px rgba(90, 60, 30, .12); transition: inset-inline-start .25s cubic-bezier(.3,.7,.2,1), width .25s; }
.seg .count { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, currentColor 18%, transparent); }

.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-block: 8px 16px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 24px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

.card { position: relative; display: block; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-2); text-decoration: none; color: #fff; box-shadow: var(--shadow); transform: translateZ(0); }
.card img, .card .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover img { transform: scale(1.05); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(60, 35, 20, .72) 0%, rgba(60, 35, 20, .18) 45%, transparent 70%); }
.card .meta { position: absolute; inset-inline: 0; bottom: 0; padding: 12px; z-index: 1; }
.card h3 { font-size: 18px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.card .src { font-size: 12.5px; opacity: .85; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .badges { position: absolute; top: 10px; inset-inline: 10px; z-index: 1; display: flex; gap: 6px; justify-content: space-between; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #24142F; backdrop-filter: blur(6px); }
.badge svg { width: 14px; height: 14px; }
.badge.warn { background: var(--saffron-soft); color: #7A5A0E; }
.badge.play { background: rgba(255, 255, 255, .9); color: var(--chili); }

.ph { display: grid; place-items: center; font-family: var(--font-display); font-size: 64px; color: rgba(255,255,255,.9); }

.empty { text-align: center; padding: 48px 16px; max-width: 480px; margin: 0 auto; }
.empty .art { width: 120px; height: 120px; margin: 0 auto 16px; border-radius: 36px; background: var(--saffron-soft); display: grid; place-items: center; transform: rotate(-8deg); }
.empty .art svg { width: 60px; height: 60px; color: var(--chili); }
.empty h2 { font-size: 26px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 0 0 20px; }

/* ---------- recipe page ---------- */
.hero { position: relative; height: min(52vh, 440px); background: var(--surface-2); overflow: hidden; }
.hero img, .hero .ph { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(60,35,20,.18), transparent 30%, transparent 62%, var(--bg)); }
.hero .back { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); inset-inline-start: 16px; z-index: 2; background: rgba(255,255,255,.92); color: #24142F; box-shadow: none; }
.hero .watch { position: absolute; z-index: 2; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--chili); box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .2s; }
.hero .watch:hover { transform: scale(1.06); }
.hero .watch svg { width: 34px; height: 34px; margin-left: 4px; }
.r-head { position: relative; z-index: 3; margin-top: -72px; }
/* inline player: the video plays inside the recipe page */
.hero.playing { height: auto; overflow: visible; background: var(--track); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: calc(64px + env(safe-area-inset-top, 0px)) 16px 14px; }
.hero.playing::after { display: none; }
.is-playing .r-head { margin-top: 18px; }
.player { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #2B2420; box-shadow: var(--shadow); }
.player.vertical { width: auto; height: min(78vh, 760px); aspect-ratio: 9 / 16; max-width: 100%; }
.player.ig { aspect-ratio: auto; width: 100%; max-width: 440px; height: min(82vh, 820px); background: var(--surface); }
.player { position: relative; }
.player iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; display: block; }
.player-wait { position: absolute; inset: 0; display: flex; gap: 8px; align-items: center; justify-content: center; color: #E9DED3; font-size: 14px; }
.player.ig .player-wait { color: var(--muted); }
.player-out { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.player-out svg { width: 14px; height: 14px; }
button.watch { border: 0; padding: 0; cursor: pointer; }
.r-head h1 { font-size: clamp(30px, 6.5vw, 48px); letter-spacing: -.5px; }
.r-src { color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.r-src a { color: var(--chili); font-weight: 600; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.r-src a svg { width: 16px; height: 16px; }
.r-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.status-toggle { display: inline-flex; background: var(--surface); border-radius: 14px; padding: 4px; box-shadow: inset 0 0 0 1.5px var(--line); }
.status-toggle button { border: 0; background: none; border-radius: 10px; padding: 8px 12px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; min-height: 36px; }
.status-toggle button svg { width: 18px; height: 18px; }
.status-toggle button.on.want { background: var(--saffron-soft); color: #8A6410; box-shadow: inset 0 0 0 1.5px var(--saffron); }
.status-toggle button.on.cooked { background: var(--herb-soft); color: var(--herb); box-shadow: inset 0 0 0 1.5px var(--herb); }

.tabs { display: flex; gap: 6px; margin: 24px 0 12px; position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding-block: 8px; }
.tabs button { flex: 1; border: 0; padding: 12px; border-radius: 14px; background: var(--surface); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); }
.tabs button.on { background: var(--chili-soft); color: var(--chili); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--chili) 35%, transparent); }
.cols { display: grid; gap: 20px; }
.cols > section { min-width: 0; }
@media (min-width: 860px) {
  .tabs { display: none; }
  .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; margin-top: 28px; align-items: start; }
  .cols > section[hidden] { display: block !important; }
  .cols > section.ing { position: sticky; top: 76px; }
}
.panel { background: var(--surface); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 24px; }
.list-pick { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.list-pick select { font: inherit; font-weight: 600; color: var(--ink); background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 8px; max-width: 170px; }

.group-name { font-weight: 700; font-size: 14px; color: var(--chili); margin: 16px 0 6px; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.group-name::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.ing-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.ing-row:last-child { border-bottom: 0; }
.tick { flex: none; width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; color: transparent; padding: 0; transition: all .15s; }
.tick svg { width: 16px; height: 16px; }
.tick.on { background: var(--herb); border-color: var(--herb); color: #fff; }
.ing-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ing-row.done .ing-text { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.need { flex: none; border: 0; border-radius: 11px; padding: 6px 10px; font-size: 13px; font-weight: 600; background: var(--chili-soft); color: var(--chili); display: inline-flex; gap: 5px; align-items: center; min-height: 34px; white-space: nowrap; }
.need svg { width: 16px; height: 16px; }
.need.added { background: var(--herb-soft); color: var(--herb); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); font-family: var(--font-display); font-size: 24px; line-height: 1; width: 44px; height: 44px; border-radius: 14px; background: var(--saffron-soft); display: grid; place-items: center; color: #A07415; }
.steps li p { margin: 0; padding-top: 8px; overflow-wrap: anywhere; }

.miss-note { display: flex; gap: 10px; align-items: flex-start; background: var(--saffron-soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.miss-note svg { width: 20px; height: 20px; flex: none; color: #B07400; margin-top: 2px; }

.prov { margin-top: 20px; }
.prov h2 { font-size: 22px; margin-bottom: 10px; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.checks .dot { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; margin-top: 1px; }
.checks .dot svg { width: 14px; height: 14px; }
.dot.ok { background: var(--herb-soft); color: var(--herb); }
.dot.empty, .dot.skipped { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.dot.blocked, .dot.error { background: var(--chili-soft); color: var(--chili); }
.checks small { color: var(--muted); }
details.raw { margin-top: 12px; }
details.raw summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 6px 0; }
details.raw pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-body); font-size: 14px; background: var(--surface-2); border-radius: 12px; padding: 12px; max-height: 360px; overflow: auto; margin: 6px 0 0; direction: auto; text-align: start; }

textarea.notes { width: 100%; min-height: 110px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); padding: 12px; resize: vertical; }
textarea.notes:focus { outline: none; border-color: var(--saffron); }
.save-state { font-size: 13px; color: var(--muted); min-height: 20px; }
.save-state.ok { color: var(--herb); }
.save-state.bad { color: var(--chili); }

.danger-zone { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 28px 0 40px; }
.confirm { display: inline-flex; gap: 8px; align-items: center; background: var(--chili-soft); padding: 6px 6px 6px 12px; border-radius: 14px; font-size: 14px; font-weight: 500; flex-wrap: wrap; }

/* ---------- lists ---------- */
.lists-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.lists-row::-webkit-scrollbar { display: none; }
.list-tab { flex: none; border: 0; border-radius: 16px; padding: 10px 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); text-align: start; min-width: 130px; }
.list-tab b { display: block; font-weight: 600; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.list-tab span { font-size: 12px; color: var(--muted); }
.list-tab.on { background: var(--herb-soft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--herb); }
.list-tab.on span { color: var(--muted); }
.list-tab.new { display: flex; align-items: center; gap: 6px; color: var(--chili); font-weight: 600; min-width: 0; }
.list-tab.new svg { width: 18px; height: 18px; }

.list-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.list-head h2 { font-size: 30px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rename { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.rename input, .field { flex: 1; min-width: 0; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); padding: 10px 12px; }
.progress { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--herb), color-mix(in srgb, var(--herb) 60%, var(--saffron))); border-radius: 99px; transition: width .4s; }
.progress-label { font-size: 13px; color: var(--muted); }

.li-group { margin-top: 18px; }
.li-group h3 { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.li-group h3 a { color: inherit; }
.li-group h3 svg { width: 16px; height: 16px; flex: none; }
.item { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 8px; overflow: hidden; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.item.bought .ing-text { text-decoration: line-through; color: var(--muted); }
.price-btn { border: 0; background: var(--saffron-soft); border-radius: 11px; padding: 6px 10px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; white-space: nowrap; }
.price-btn svg { width: 16px; height: 16px; }
.x-btn { border: 0; background: none; color: var(--muted); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.x-btn svg { width: 18px; height: 18px; }

.price-panel { border-top: 1px solid var(--line); padding: 12px; background: var(--surface-2); font-size: 14px; }
.best { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border-radius: 14px; padding: 10px; box-shadow: inset 0 0 0 2px var(--herb); }
.best img, .opt img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: #fff; }
.best .tag { font-size: 12px; font-weight: 700; color: var(--herb); }
.p-title { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--muted); }
.p-nums b { color: var(--ink); font-size: 17px; }
.p-link { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; color: var(--chili); text-decoration: none; margin-top: 6px; }
.p-link svg { width: 15px; height: 15px; }
.opts { display: grid; gap: 8px; margin-top: 10px; }
.opt { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; border-radius: 12px; background: var(--surface); }
.opt img { width: 48px; height: 48px; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.store { font-weight: 700; }

/* ---------- for you ---------- */
.taste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.taste .label { font-size: 13px; color: var(--muted); font-weight: 600; margin-inline-end: 2px; }
.taste .chip button { border: 0; background: none; padding: 0; display: grid; place-items: center; color: inherit; opacity: .7; }
.taste .chip button svg { width: 14px; height: 14px; }
.taste .chip.avoid { background: transparent; box-shadow: inset 0 0 0 1.5px var(--chili); color: var(--chili); }
.taste .add input { width: 120px; border: 0; background: transparent; outline: none; padding: 0; font-size: 14px; }

.vgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 12px 32px; }
@media (min-width: 640px) { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vcard { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: opacity .3s, transform .3s; }
.vcard.gone { opacity: 0; transform: scale(.96); }
.thumb { position: relative; aspect-ratio: 16 / 9; display: block; background: var(--surface-2); max-width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .len { position: absolute; bottom: 8px; inset-inline-end: 8px; background: rgba(60,35,20,.7); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; direction: ltr; }
.thumb .views { position: absolute; top: 8px; inset-inline-start: 8px; }
.vbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vbody h3 { font-family: var(--font-body); font-weight: 600; font-size: 16px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; direction: auto; text-align: start; }
.vmeta { font-size: 13px; color: var(--muted); }
.why { display: flex; gap: 6px; flex-wrap: wrap; }
.why .chip { font-size: 12.5px; padding: 3px 10px; }
.vactions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.vactions .btn { flex: 1; }
.hidden-list { margin: 8px 0 40px; }
.hidden-list summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.hidden-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hidden-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; max-width: 65ch; }

/* ---------- sheet (add flow) ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(90, 60, 30, .25); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 28px 28px 0 0; padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); animation: up .28s cubic-bezier(.2,.8,.2,1); max-height: 92vh; overflow: auto; }
@media (min-width: 640px) { .scrim { align-items: center; } .sheet { border-radius: 28px; padding-bottom: 24px; } }
.sheet h2 { font-size: 26px; margin-bottom: 4px; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: -6px auto 14px; }
.sheet .field { width: 100%; direction: ltr; text-align: right; font-size: 16px; padding: 14px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.choice button { border: 0; border-radius: 20px; padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; transition: transform .12s; }
.choice button:active { transform: scale(.97); }
.choice button svg { width: 34px; height: 34px; }
.choice .want { background: var(--saffron-soft); color: #7A5A0E; box-shadow: inset 0 0 0 2px var(--saffron); }
.choice .cooked { background: var(--herb-soft); color: #2F7A58; box-shadow: inset 0 0 0 2px var(--herb); }
.choice small { font-weight: 400; font-size: 13px; opacity: .85; }
.working { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 0 8px; text-align: center; }
.pot { width: 72px; height: 72px; border-radius: 24px; background: var(--chili); display: grid; place-items: center; color: #fff; animation: wob 1.2s ease-in-out infinite; }
.pot svg { width: 40px; height: 40px; }
.dupe { display: flex; gap: 12px; align-items: center; background: var(--saffron-soft); padding: 12px; border-radius: 16px; margin-top: 14px; }
.dupe img, .dupe .ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; font-size: 24px; flex: none; }
.dupe div { flex: 1; min-width: 0; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--saffron) 45%, transparent) 0 120px, transparent 121px),
  radial-gradient(circle at 88% 78%, color-mix(in srgb, var(--chili) 35%, transparent) 0 160px, transparent 161px),
  radial-gradient(circle at 80% 12%, color-mix(in srgb, var(--herb) 30%, transparent) 0 70px, transparent 71px), var(--bg); }
.login form { width: 100%; max-width: 380px; background: var(--surface); border-radius: 28px; padding: 28px 22px; box-shadow: var(--shadow); display: grid; gap: 14px; text-align: center; }
.login h1 { font-size: 46px; }
.login p { margin: 0; color: var(--muted); }
.login input { text-align: center; direction: ltr; font-size: 18px; padding: 14px; }
.login .err { color: var(--chili); font-weight: 600; min-height: 24px; }

/* ---------- toast ---------- */
#toast { position: fixed; z-index: 80; inset-inline: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; pointer-events: none; }
@media (min-width: 860px) { #toast { bottom: 24px; } }
.toast { pointer-events: auto; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); padding: 12px 16px; border-radius: 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: up .25s cubic-bezier(.2,.8,.2,1); max-width: 520px; }
.toast button { border: 0; background: none; color: var(--chili); font-weight: 700; padding: 4px 6px; }
.toast.bad { background: var(--chili); color: #fff; }
.toast.bad button { color: #fff; }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; animation: rot .8s linear infinite; display: inline-block; flex: none; }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sh 1.4s infinite; border-radius: var(--r); }

@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes wob { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-4px); } }
@keyframes sh { to { background-position: -200% 0; } }
@keyframes pop { 0% { transform: scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
.grid > * { animation: pop .35s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.backup { text-align: center; margin: 4px 0 28px; font-size: 13px; }
.backup a { color: var(--muted); }

/* categories, flour and health */
.frow { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; align-items: center; }
.frow::-webkit-scrollbar { display: none; }
.flabel { font-size: 12px; color: var(--muted); font-weight: 600; flex: none; }
.fchip { flex: none; border: 0; border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 500; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); white-space: nowrap; }
.fchip .num { color: var(--muted); font-size: 12px; }
.fchip.on { background: var(--chili-soft); color: var(--chili); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--chili) 40%, transparent); }
.card .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.htag, .ftag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.92); color: #3D342E; }
.htag.good { background: #E6F4EC; color: #2F7A58; }
.htag.mid { background: #FEF5DC; color: #8A6410; }
.htag.low { background: #FDECE6; color: #B4513C; }
.ftag-chip { background: var(--surface-2); }
.health { margin-top: 14px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.health summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 12px 14px; flex-wrap: wrap; }
.health summary::-webkit-details-marker { display: none; }
.hscore { font-family: var(--font-display); font-size: 20px; padding: 2px 10px; border-radius: 10px; background: var(--surface-2); }
.health.good .hscore { background: var(--herb-soft); color: var(--herb); }
.health.mid .hscore { background: var(--saffron-soft); color: #8A6410; }
.health.low .hscore { background: var(--chili-soft); color: var(--chili); }
.hsum { color: var(--muted); font-size: 14px; flex: 1 1 200px; }
.hbody { padding: 0 14px 14px; display: grid; gap: 10px; }
.hbody h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.hbody ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.hbody li small { display: block; color: var(--muted); font-size: 12.5px; }

/* recipe video as a card inside the page, not a banner */
.r-top { display: grid; gap: 18px; }
.r-top .r-head { min-width: 0; }
@media (min-width: 860px) {
  .r-top.has-video { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 28px; }
  .r-top.has-video .video-card { margin-top: -72px; }
}
.video-card { position: relative; z-index: 3; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 10px; width: 100%; max-width: 560px; justify-self: center; }
.video-card.vertical, .video-card.ig { max-width: 340px; }
@media (min-width: 860px) { .video-card.wide { width: 480px; } .video-card.vertical, .video-card.ig { width: 320px; } }
.vc-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: 14px; }
.vc-badge { width: 26px; height: 26px; border-radius: 8px; background: var(--chili-soft); color: var(--chili); display: grid; place-items: center; flex: none; }
.vc-badge svg { width: 13px; height: 13px; margin-left: 2px; }
.vc-src { color: var(--muted); }
.vc-head a { margin-inline-start: auto; color: var(--muted); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; }
.vc-head a:hover { background: var(--surface-2); }
.vc-head a svg { width: 16px; height: 16px; }
.video-card .player { width: 100%; max-width: none; height: auto; box-shadow: none; border-radius: 14px; }
.video-card .player.wide { aspect-ratio: 16 / 9; }
.video-card .player.vertical { aspect-ratio: 9 / 16; }
.video-card .player.ig { aspect-ratio: auto; height: 540px; background: var(--surface-2); }

/* times and temperatures inside a step */
.steps li > div { min-width: 0; }
.step-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.timer { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 4px 12px 4px 6px; background: var(--saffron-soft); color: #7A5A0E; font-weight: 600; font-size: 14px; min-height: 36px; font-variant-numeric: tabular-nums; }
.timer .ring { width: 26px; height: 26px; transform: rotate(-90deg); }
.timer .ring-bg { fill: var(--surface); stroke: color-mix(in srgb, var(--saffron) 45%, transparent); stroke-width: 3; }
.timer .ring-fg { fill: none; stroke: var(--chili); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .5s linear; }
.timer .ring-hand { fill: none; stroke: #7A5A0E; stroke-width: 2; stroke-linecap: round; transform: rotate(90deg); transform-origin: 18px 18px; }
.timer.running { background: var(--chili-soft); color: var(--chili); }
.timer.running .ring-hand { stroke: var(--chili); }
.temp { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px; background: var(--chili-soft); color: #B4513C; font-weight: 600; font-size: 14px; min-height: 36px; }
.temp svg { width: 16px; height: 16px; }

/* temperature marked inside the step sentence, with the other scale */
.tinline { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; margin: 0 2px; border-radius: 999px; background: var(--chili-soft); color: #B4513C; font-weight: 600; white-space: nowrap; }
.tinline svg { width: 14px; height: 14px; }
.tinline small { font-weight: 500; color: color-mix(in srgb, #B4513C 70%, var(--muted)); font-size: 12.5px; padding-inline-start: 4px; border-inline-start: 1px solid color-mix(in srgb, #B4513C 30%, transparent); }
.steps li p { white-space: pre-line; }
