/* ספר המתכונים: מובייל פירסט, שלוש ערכות נושא. */

:root, [data-theme="warm-kitchen"] {
  --bg: #FBF6EE;
  --surface: #FFFFFF;
  --surface-2: #F4ECDF;
  --text: #2B1E16;
  --muted: #7A6A5D;
  --line: #EADFD0;
  --accent: #C8553D;
  --on-accent: #FFFFFF;
  --accent-soft: #F7E0D8;
  --hero-bg: #2B1E16;
  --hero-text: #FBF6EE;
  --font-head: 'Frank Ruhl Libre', 'Heebo', serif;
  --head-weight: 900;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 2px 4px rgb(60 35 20 / .04), 0 12px 28px rgb(60 35 20 / .08);
  --nav-bg: #FFFFFF;
  --nav-text: #A08E80;
  --nav-active: #C8553D;
  --nav-active-bg: #F7E0D8;
  --t-peach: #FBE0CF; --t-pink: #F8D7DD; --t-red: #F4D2C8; --t-amber: #F8E2B8; --t-blue: #D6E4EC;
  --t-sand: #EDE3D2; --t-green: #DCE8CF; --t-orange: #FAD9BC; --t-wheat: #F1E4C4; --t-yellow: #F8ECB0;
  --t-purple: #E3DAF0; --t-teal: #CFE7E2;
  --tile-ink: #2B1E16;
}

[data-theme="playful-blocks"] {
  --bg: #FFF9EF;
  --surface: #FFFFFF;
  --surface-2: #FFF1DC;
  --text: #1C1B1F;
  --muted: #6E6A75;
  --line: #F0E6D6;
  --accent: #1C1B1F;
  --on-accent: #FFFFFF;
  --accent-soft: #FFE48A;
  --hero-bg: #FFE48A;
  --hero-text: #1C1B1F;
  --font-head: 'Rubik', 'Heebo', sans-serif;
  --head-weight: 800;
  --radius: 24px;
  --radius-lg: 32px;
  --shadow: 0 6px 0 rgb(28 27 31 / .06);
  --nav-bg: #1C1B1F;
  --nav-text: #9C99A3;
  --nav-active: #1C1B1F;
  --nav-active-bg: #FFE48A;
  --t-peach: #FFD9C2; --t-pink: #FFD3E2; --t-red: #FFC9BE; --t-amber: #FFE0A3; --t-blue: #CDE3FF;
  --t-sand: #F2E6D3; --t-green: #CFEFD0; --t-orange: #FFD0A8; --t-wheat: #F6E6B8; --t-yellow: #FFF0A0;
  --t-purple: #E3DAFF; --t-teal: #C6EEE6;
  --tile-ink: #1C1B1F;
}

[data-theme="bold-dark"] {
  --bg: #0F0F12;
  --surface: #1A1A1F;
  --surface-2: #24242B;
  --text: #F4F4F6;
  --muted: #9A9AA6;
  --line: #2C2C34;
  --accent: #FFD23F;
  --on-accent: #111111;
  --accent-soft: #3A3420;
  --hero-bg: #FFD23F;
  --hero-text: #111111;
  --font-head: 'Rubik', 'Heebo', sans-serif;
  --head-weight: 900;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 12px 30px rgb(0 0 0 / .4);
  --nav-bg: #1E1E24;
  --nav-text: #8E8E99;
  --nav-active: #111111;
  --nav-active-bg: #FFD23F;
  --t-peach: #3B2A22; --t-pink: #3A2229; --t-red: #3D2320; --t-amber: #3A3020; --t-blue: #1F2E38;
  --t-sand: #302B24; --t-green: #24331F; --t-orange: #3D2A1C; --t-wheat: #36301F; --t-yellow: #38341A;
  --t-purple: #2D2638; --t-teal: #1D3330;
  --tile-ink: #F4F4F6;
}

:root {
  --c-red: #D9483B; --c-blue: #3B6CF6; --c-green: #2E9E5B; --c-orange: #F76B15; --c-gray: #8B8D98;
  --nav-h: 68px;
  color-scheme: light;
}
[data-theme="bold-dark"] { color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; font-family: 'Heebo', system-ui, sans-serif; font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.i { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.app { max-width: 760px; margin: 0 auto; padding: 0 18px calc(var(--nav-h) + 110px); min-height: 100vh; }

/* ---------- ראש ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 18px 0 12px; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.top__title { font-size: 28px; flex: 1; }
.sub { color: var(--muted); margin: -6px 0 12px; }
.icon-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow); flex: none; }

.hero { margin: 0 -18px; padding: 30px 22px 26px; background: var(--hero-bg); color: var(--hero-text); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.hero__hello { font-weight: 700; opacity: .8; }
.hero h1 { font-size: clamp(38px, 11vw, 56px); margin-top: 4px; }
.hero__book { margin-top: 6px; opacity: .75; }
.search { position: relative; margin-top: 18px; }
.search .i { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 56px; padding: 0 50px 0 18px; border-radius: 999px; border: 0; background: var(--surface); color: var(--text); font-size: 17px; box-shadow: var(--shadow); outline: none; }
.search input:focus-visible { outline: 3px solid var(--accent); }

/* ---------- מקטעים ---------- */
.section { margin-top: 28px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section__head h2 { font-size: 24px; }
.section__head a { color: var(--accent); font-weight: 700; padding: 8px 0; }
[data-theme="playful-blocks"] .section__head a { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- קטגוריות ---------- */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cats--scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 4px 18px 10px; scrollbar-width: none; }
.cats--scroll::-webkit-scrollbar { display: none; }
.cats--scroll .cat { flex: 0 0 140px; scroll-snap-align: start; }
.cat { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 140px; border-radius: var(--radius); background: var(--tile); color: var(--tile-ink); }
.cat b { font-size: 18px; font-weight: 800; line-height: 1.2; margin-top: auto; }
.cat small { opacity: .7; }
.cat__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgb(255 255 255 / .6); }
.cat__ico .i { width: 28px; height: 28px; }
[data-theme="bold-dark"] .cat__ico { background: rgb(255 255 255 / .08); color: var(--accent); }
[data-theme="playful-blocks"] .cat { border: 2px solid #1C1B1F; box-shadow: 0 5px 0 #1C1B1F; }
[data-theme="playful-blocks"] .cats--scroll { padding-bottom: 16px; }

/* ---------- תגיות ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 14px; padding: 2px 18px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; margin: 0 0 14px; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; white-space: nowrap; flex: none; }
.chip em { font-style: normal; font-size: 13px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip .i { width: 18px; height: 18px; }
.chip--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.chip button { border: 0; background: none; font-size: 20px; line-height: 1; padding: 6px 4px; margin-inline-end: -8px; color: var(--muted); min-width: 32px; min-height: 32px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* ---------- כרטיסי מתכון ---------- */
.rgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rrow { display: flex; gap: 14px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rrow::-webkit-scrollbar { display: none; }
.rrow .rcard { flex: 0 0 62%; scroll-snap-align: start; }
.rcard { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
[data-theme="playful-blocks"] .rcard { border: 2px solid #1C1B1F; }
.rcard__img { position: relative; aspect-ratio: 4 / 3; display: block; background: var(--surface-2); }
.rcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--tile); color: var(--tile-ink); }
.ph .i { width: 44px; height: 44px; opacity: .55; stroke-width: 1.5; }
[data-theme="bold-dark"] .ph .i { color: var(--accent); opacity: .8; }
.fav-dot { position: absolute; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgb(255 255 255 / .92); color: #D9483B; }
.fav-dot .i { width: 16px; height: 16px; fill: currentColor; }
.rcard__body { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 2px; }
.rcard__body b { font-size: 16px; font-weight: 800; line-height: 1.3; }
.rcard__body small { color: var(--muted); font-size: 14px; }

/* ---------- חגים ---------- */
.hols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hol { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 104px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border-inline-start: 6px solid var(--accent); }
.hol b { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 22px; }
.hol small { color: var(--muted); }
[data-theme="playful-blocks"] .hol { border: 2px solid #1C1B1F; border-inline-start-width: 8px; }

/* ---------- דף מתכון ---------- */
.rhero { position: relative; margin: 0 -18px; height: 300px; background: var(--tile); color: var(--tile-ink); display: grid; place-items: center; overflow: hidden; }
.rhero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rhero__ico .i { width: 96px; height: 96px; stroke-width: 1.2; opacity: .5; }
[data-theme="bold-dark"] .rhero__ico .i { color: var(--accent); opacity: .85; }
.rhero__bar { position: absolute; top: 14px; inset-inline: 14px; display: flex; justify-content: space-between; }
.rhero .icon-btn { background: rgb(255 255 255 / .92); color: #2B1E16; }
.rhero .icon-btn.is-fav { color: #D9483B; }
.rhero .icon-btn.is-fav .i { fill: currentColor; }
.recipe { position: relative; margin: -28px -18px 0; padding: 26px 20px 0; background: var(--bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.recipe__cat { display: inline-block; color: var(--accent); font-weight: 800; font-size: 15px; padding: 4px 0; }
[data-theme="bold-dark"] .recipe__cat, [data-theme="playful-blocks"] .recipe__cat { color: var(--text); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.recipe h1 { font-size: clamp(32px, 9vw, 44px); margin-top: 6px; }
.recipe__src { color: var(--muted); margin-top: 6px; font-style: italic; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 14px; color: var(--muted); font-weight: 700; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .i { width: 20px; height: 20px; color: var(--accent); }
[data-theme="playful-blocks"] .meta .i { color: var(--text); }
.share { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 8px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 66px; border-radius: var(--radius); border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }
.act--wa .i { color: #1FAF54; }
.block { margin-top: 26px; }
.block__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.block h2 { font-size: 26px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.stepper button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); }
.stepper button:disabled { opacity: .35; }
.stepper .i { width: 18px; height: 18px; }
.stepper span { min-width: 72px; text-align: center; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin: -4px 0 10px; }
.ings { list-style: none; margin: 0; padding: 6px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.ings li { border-bottom: 1px solid var(--line); }
.ings li:last-child { border-bottom: 0; }
.ings label { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 0; cursor: pointer; }
.ings input { appearance: none; width: 24px; height: 24px; flex: none; margin: 0; border-radius: 8px; border: 2px solid var(--line); background: var(--bg); display: grid; place-items: center; }
.ings input:checked { background: var(--accent); border-color: var(--accent); }
.ings input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.ings input:checked + span { opacity: .45; text-decoration: line-through; }
.qty { font-weight: 800; color: var(--accent); unicode-bidi: isolate; }
[data-theme="playful-blocks"] .qty { color: var(--text); background: var(--accent-soft); padding: 0 6px; border-radius: 6px; }
.ing-head, .step-head { list-style: none; font-weight: 800; font-size: 17px; padding: 14px 0 4px; color: var(--accent); }
[data-theme="playful-blocks"] .ing-head, [data-theme="playful-blocks"] .step-head { color: var(--text); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.steps li.step-head { background: none; box-shadow: none; padding: 8px 0 0; }
.steps .num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.steps p { font-size: 17px; padding-top: 4px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; }
.toggle.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.toggle .i { width: 18px; height: 18px; }
.note { padding: 18px; border-radius: var(--radius); background: var(--accent-soft); }
.note h2 { font-size: 20px; margin-bottom: 6px; }
[data-theme="bold-dark"] .note { background: var(--surface-2); border-inline-start: 4px solid var(--accent); }

/* ---------- כפתורים ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 800; background: var(--surface-2); color: var(--text); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ghost { background: var(--surface); border: 1px solid var(--line); }
.btn--danger { background: transparent; color: var(--c-red); border: 1px solid currentColor; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn--wide { width: 100%; margin-top: 16px; }
.btn .i { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; justify-content: center; margin: 30px 0 0; }
.btn-row--start { justify-content: flex-start; flex-wrap: wrap; margin: 12px 0 0; }
.fab { position: fixed; z-index: 20; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); inset-inline-start: max(18px, calc(50% - 362px)); display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; box-shadow: 0 10px 24px rgb(0 0 0 / .22); }
[data-theme="playful-blocks"] .fab { border: 2px solid #1C1B1F; background: #FFE48A; color: #1C1B1F; box-shadow: 0 5px 0 #1C1B1F; }

/* ---------- ריק ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 20px; border-radius: var(--radius); background: var(--surface); border: 2px dashed var(--line); }
.empty .i { width: 44px; height: 44px; color: var(--accent); }
.empty b { font-size: 19px; }
.empty p { color: var(--muted); max-width: 32ch; }
.empty .btn { margin-top: 8px; }
.empty--small { padding: 22px; }

/* ---------- טופס ---------- */
.form { display: grid; gap: 18px; padding-bottom: 90px; }
.f { display: grid; gap: 8px; }
.f > label, .f > span { font-weight: 800; }
.f > span small { font-weight: 400; color: var(--muted); }
.f i { color: var(--c-red); font-style: normal; }
.f input:not([type=checkbox]):not([type=radio]):not([type=file]), .f textarea { width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 17px; outline: none; }
.f textarea { line-height: 1.7; resize: vertical; }
.f input:focus, .f textarea:focus { border-color: var(--accent); }
.f.bad input, .f.bad .pills { border-color: var(--c-red); }
.err { color: var(--c-red); font-size: 14px; font-weight: 700; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; border-radius: 14px; border: 1.5px solid transparent; }
.pills label { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }
.pills label .i { width: 19px; height: 19px; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills label:has(input:checked) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pills label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.photo-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.photo-in img { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--radius); }
.switch { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 800; cursor: pointer; }
.switch input { appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { inset-inline-start: 23px; }
.savebar { position: fixed; z-index: 30; inset-inline: 0; bottom: 0; display: flex; gap: 10px; justify-content: center; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.savebar .btn { flex: 1; max-width: 360px; }

/* ---------- הגדרות ---------- */
.card { border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.set { padding: 18px; margin-bottom: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.edit-row input, .add-row input { width: 0; }
.set h3 { font-size: 21px; }
.edit-list { display: grid; gap: 8px; }
.edit-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 16px; background: var(--tile); color: var(--tile-ink); }
.edit-row .cat__ico { width: 42px; height: 42px; }
.edit-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 0; background: rgb(255 255 255 / .55); font-weight: 700; color: inherit; }
[data-theme="bold-dark"] .edit-row input { background: rgb(255 255 255 / .06); }
.edit-row .icon-btn { width: 44px; height: 44px; box-shadow: none; background: rgb(255 255 255 / .55); color: inherit; }
[data-theme="bold-dark"] .edit-row .icon-btn { background: rgb(255 255 255 / .06); }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-card { display: grid; gap: 8px; justify-items: center; padding: 12px 6px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); font-size: 14px; }
.theme-card.on { border-color: var(--accent); }
.swatches { display: flex; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); margin-inline-start: -6px; }

/* ---------- ניווט ---------- */
.nav { position: fixed; z-index: 25; inset-inline: 0; bottom: 0; display: flex; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--nav-bg); border-top: 1px solid var(--line); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: 16px; color: var(--nav-text); font-size: 12.5px; font-weight: 700; }
.nav a.on { color: var(--nav-active); background: var(--nav-active-bg); }
[data-theme="bold-dark"] .nav, [data-theme="playful-blocks"] .nav { inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 26px; border: 0; box-shadow: 0 12px 30px rgb(0 0 0 / .3); }
[data-theme="bold-dark"] .fab, [data-theme="playful-blocks"] .fab { bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); }

/* ---------- הודעה ---------- */
.toast { position: fixed; z-index: 40; inset-inline: 18px; bottom: calc(var(--nav-h) + 92px); max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-radius: 16px; background: #1C1B1F; color: #fff; font-weight: 700; box-shadow: 0 12px 30px rgb(0 0 0 / .3); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.on { transform: none; opacity: 1; pointer-events: auto; }
.toast button { border: 0; background: none; color: #FFD23F; font-weight: 800; min-height: 40px; padding: 0 6px; }

/* ---------- מחשב ---------- */
@media (min-width: 700px) {
  .rgrid { grid-template-columns: repeat(3, 1fr); }
  .cats:not(.cats--scroll) { grid-template-columns: repeat(3, 1fr); }
  .hols { grid-template-columns: repeat(3, 1fr); }
  .rrow .rcard { flex-basis: 34%; }
  .rhero { height: 380px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin: 0; }
  .recipe { margin: -28px 0 0; }
  .nav { max-width: 560px; margin: 0 auto; }
  [data-theme="bold-dark"] .nav, [data-theme="playful-blocks"] .nav { inset-inline: 0; max-width: 520px; }
  .hero { margin: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}

/* ---------- הדפסה ---------- */
@media print {
  .nav, .fab, .toast, .share, .rhero__bar, .stepper, .toggle, .btn-row, .hint { display: none !important; }
  body, .recipe { background: #fff; color: #000; }
  .rhero { height: 200px; }
  .ings, .steps li { box-shadow: none; border: 1px solid #ddd; }
}

/* =====================================================================
   חי ותוסס: צבעים חיים, תמונות גדולות ותנועה
   ===================================================================== */
[data-theme="vivid"] {
  --bg: #FFF7EE;
  --surface: #FFFFFF;
  --surface-2: #FFEEDD;
  --text: #1E1530;
  --muted: #6F6680;
  --line: #F3E3D3;
  --accent: #FF4D2E;
  --on-accent: #FFFFFF;
  --accent-soft: #FFE1D6;
  --hero-bg: #1E1530;
  --hero-text: #FFFFFF;
  --font-head: 'Rubik', 'Heebo', sans-serif;
  --head-weight: 900;
  --radius: 22px;
  --radius-lg: 32px;
  --shadow: 0 2px 6px rgb(30 21 48 / .05), 0 14px 34px rgb(255 77 46 / .10);
  --nav-bg: rgb(255 255 255 / .86);
  --nav-text: #9A90A8;
  --nav-active: #FFFFFF;
  --nav-active-bg: #FF4D2E;
  --t-peach: #FFD9C7; --t-pink: #FFD1E1; --t-red: #FFCFC4; --t-amber: #FFE4A8; --t-blue: #CFE3FF;
  --t-sand: #F5E7D3; --t-green: #CDEFD9; --t-orange: #FFD5B3; --t-wheat: #F8E8BF; --t-yellow: #FFF0A6;
  --t-purple: #E6DAFF; --t-teal: #C9F0E8;
  --tile-ink: #1E1530;
}
:root {
  --v-peach: #FF7A45; --v-pink: #F0377E; --v-red: #E8322A; --v-amber: #F59E0B; --v-blue: #2F7CF6;
  --v-sand: #C27C3A; --v-green: #16A34A; --v-orange: #FF6A00; --v-wheat: #D99A1E; --v-yellow: #EAB308;
  --v-purple: #8B5CF6; --v-teal: #0EA5A0;
}

/* ---------- ראש עם תמונה ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero--photo { padding-top: 54px; padding-bottom: 30px; min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.hero__bg { position: absolute; inset: -4%; z-index: -2; background-size: cover; background-position: center; animation: kenburns 22s ease-in-out infinite alternate; }
.hero--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(20 12 30 / .15) 0%, rgb(20 12 30 / .55) 45%, rgb(20 12 30 / .92) 100%); }
[data-theme="vivid"] .hero--photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 100% 0%, rgb(255 77 46 / .45), transparent 60%), radial-gradient(90% 60% at 0% 20%, rgb(255 184 0 / .30), transparent 60%); mix-blend-mode: screen; }
.hero__hello { display: inline-flex; align-self: flex-start; gap: 6px; padding: 5px 14px; border-radius: 999px; background: rgb(255 255 255 / .16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 15px; opacity: 1 !important; }
.hero h1 { font-size: clamp(40px, 12vw, 64px); letter-spacing: -.5px; }
.hero__book b { color: #FFB800; }
.rotator { display: inline-grid; height: 1.15em; line-height: 1.15; vertical-align: top; overflow: hidden; color: #FFB800; }
.rotator span { grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(100%); animation: rotword 12.5s infinite both; animation-delay: calc(var(--n) * 2.5s); }
.hero--photo .search input { background: rgb(255 255 255 / .95); }

/* ---------- קטגוריות עם תמונה ---------- */
.cat { position: relative; overflow: hidden; isolation: isolate; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.cat:active { transform: scale(.96); }
.cat--photo { color: #fff; min-height: 168px; }
.cat__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.cat--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(200deg, transparent 20%, color-mix(in srgb, var(--v) 70%, transparent) 62%, color-mix(in srgb, var(--v) 96%, #000 4%) 100%); }
.cat--photo .cat__ico { background: rgb(255 255 255 / .92); color: var(--v); box-shadow: 0 6px 16px rgb(0 0 0 / .18); }
.cat--photo small { opacity: .92; }
.cat--photo b { text-shadow: 0 1px 8px rgb(0 0 0 / .25); }
.cats--scroll .cat { flex-basis: 150px; }
[data-theme="playful-blocks"] .cat--photo::before { background: linear-gradient(200deg, transparent 25%, rgb(28 27 31 / .78) 100%); }
[data-theme="bold-dark"] .cat--photo::before { background: linear-gradient(200deg, transparent 15%, rgb(15 15 18 / .92) 100%); }
[data-theme="bold-dark"] .cat--photo .cat__ico { color: #111; background: #FFD23F; }
[data-theme="warm-kitchen"] .cat--photo::before { background: linear-gradient(200deg, transparent 20%, rgb(43 30 22 / .85) 100%); }
[data-theme="warm-kitchen"] .cat--photo .cat__ico { color: #C8553D; }

/* ---------- כרטיסים ---------- */
.rcard { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.rcard:active { transform: scale(.97); }
.rcard__img { overflow: hidden; }
.rcard__img img { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) {
  .rcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgb(30 21 48 / .16); }
  .rcard:hover .rcard__img img, .cat:hover .cat__img { transform: scale(1.08); }
  .cat:hover { transform: translateY(-4px); }
}
[data-theme="vivid"] .rcard__body small { color: var(--accent); font-weight: 700; }
[data-theme="vivid"] .chip.on { box-shadow: 0 6px 16px rgb(255 77 46 / .35); }
[data-theme="vivid"] .nav { inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 26px; border: 0; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 14px 34px rgb(30 21 48 / .18); }
[data-theme="vivid"] .nav a.on { box-shadow: 0 6px 16px rgb(255 77 46 / .4); }
[data-theme="vivid"] .fab { bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); background: linear-gradient(135deg, #FF4D2E, #FF7A1A); box-shadow: 0 12px 28px rgb(255 77 46 / .45); }
[data-theme="vivid"] .hol { border-inline-start: 0; background: linear-gradient(135deg, var(--hc1), var(--hc2)); color: #fff; box-shadow: 0 12px 26px color-mix(in srgb, var(--hc1) 35%, transparent); }
[data-theme="vivid"] .hol small { color: rgb(255 255 255 / .88); }
.hol:nth-child(6n+1) { --hc1: #FF4D2E; --hc2: #FF8A3D; }
.hol:nth-child(6n+2) { --hc1: #F0377E; --hc2: #FF7AA8; }
.hol:nth-child(6n+3) { --hc1: #8B5CF6; --hc2: #B794FF; }
.hol:nth-child(6n+4) { --hc1: #0E9F9A; --hc2: #2CC5A8; }
.hol:nth-child(6n+5) { --hc1: #E58A00; --hc2: #FFB52E; }
.hol:nth-child(6n+6) { --hc1: #2F7CF6; --hc2: #6AA8FF; }

/* ---------- דף מתכון ---------- */
.rhero { height: 360px; }
.rhero__img { will-change: transform; transform-origin: center top; }
.rhero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .25), transparent 30%); pointer-events: none; }
.rhero__bar { z-index: 2; }
.icon-btn.pop { position: relative; }
.icon-btn.pop .i { animation: heartpop .6s cubic-bezier(.2,.8,.2,1.4); }
.icon-btn.pop::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid #D9483B; animation: ring .6s ease-out forwards; }
[data-theme="vivid"] .recipe__cat { color: #fff; background: var(--accent); padding: 5px 14px; border-radius: 999px; }
[data-theme="vivid"] .steps .num { background: linear-gradient(135deg, #FF4D2E, #FF9A00); }
[data-theme="vivid"] .act--wa { background: #1FAF54; color: #fff; }
[data-theme="vivid"] .act--wa .i { color: #fff; }
.act { transition: transform .2s; }
.act:active { transform: scale(.94); }
.progress { margin: 0 0 12px; }
.progress > div { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFB800, var(--accent)); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.progress small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.progress.done small { color: var(--c-green); }
.progress.done i { background: linear-gradient(90deg, #16A34A, #34D399); }
.ings input:checked { animation: tick .35s cubic-bezier(.2,.8,.2,1.4); }
.ings span { transition: opacity .25s; }

/* ---------- כניסה מדורגת וחשיפה בגלילה ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rcard, .cat, .hol, .chips > .chip { animation: fadeup .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(min(var(--i, 0), 10) * 55ms + 80ms); }
  .ings li { animation: fadein .4s ease both; animation-delay: calc(min(var(--i, 0), 14) * 30ms + 150ms); }
  .rhero__img { animation: zoomin 1.1s cubic-bezier(.2,.8,.2,1) both; }
  .recipe { animation: sheetup .6s cubic-bezier(.2,.8,.2,1) both; }
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
  .fab { animation: fabin .6s cubic-bezier(.2,.8,.2,1.3) .3s both; }
  .hero h1, .top { animation: fadeup .7s cubic-bezier(.2,.8,.2,1) .05s both; }
  .hero .search { animation: fadeup .7s cubic-bezier(.2,.8,.2,1) .18s both; }
  ::view-transition-old(root) { animation: vt-out .2s ease both; }
  ::view-transition-new(root) { animation: vt-in .32s cubic-bezier(.2,.8,.2,1) both; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg, .rotator span { animation: none !important; }
  .rotator span:not(:first-child) { display: none; }
  .rotator span:first-child { opacity: 1 !important; transform: none !important; }
}
@keyframes fadeup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomin { from { transform: scale(1.15); } to { transform: scale(1); } }
@keyframes sheetup { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fabin { from { transform: scale(.4) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.14) translate(-2%, 2%); } }
@keyframes rotword { 0% { opacity: 0; transform: translateY(100%); } 3%, 17% { opacity: 1; transform: none; } 20%, 100% { opacity: 0; transform: translateY(-100%); } }
@keyframes heartpop { 0% { transform: scale(.5); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes tick { 0% { transform: scale(.6); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@media (min-width: 700px) { .rhero { height: 440px; } .hero--photo { min-height: 440px; } [data-theme="vivid"] .nav { inset-inline: 0; max-width: 520px; } }

/* ---------- כניסה ---------- */
.login { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px 18px; overflow: hidden; isolation: isolate; }
.login .hero__bg { z-index: -2; }
.login::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(20 12 30 / .35), rgb(20 12 30 / .85)); }
.login__card { width: 100%; max-width: 420px; display: grid; gap: 14px; padding: 28px 22px; border-radius: var(--radius-lg); background: var(--bg); box-shadow: 0 30px 60px rgb(0 0 0 / .35); animation: fadeup .6s cubic-bezier(.2,.8,.2,1) both; }
.login__card h1 { font-size: 32px; }
.login__logo { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #FF4D2E, #FFB800); color: #fff; box-shadow: 0 12px 26px rgb(255 77 46 / .4); }
.login__logo .i { width: 34px; height: 34px; }
.login__err { color: var(--c-red); font-weight: 700; }
.login__help { font-size: 14px; }

/* ---------- אנשים בספר ---------- */
.people { display: grid; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; background: var(--surface-2); }
.person__av { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 18px; }
.person__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person__main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; text-align: end; }
.person__main em { font-style: normal; font-size: 13px; color: var(--c-orange); font-weight: 700; }
.person .icon-btn { width: 44px; height: 44px; box-shadow: none; }
.people-add { display: grid; gap: 8px; }
.people-add input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); }
.invite { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--accent-soft); }
.invite code { display: block; padding: 10px; border-radius: 10px; background: var(--surface); font-size: 13px; word-break: break-all; text-align: left; }
