/* ====== המטבח של שילת – עיצוב ====== */
:root {
  --bg: #fdfcfe;
  --bg-2: #f6f4f9;
  --surface: #ffffff;
  --surface-2: #f5f3f8;
  --text: #4a2b6b;
  --muted: #8b8597;
  --line: #ebe6f0;
  --brand: #e0457b;
  --brand-ink: #ffffff;
  --brand-soft: #ffe3ee;
  --saffron: #a970e6;
  --olive: #b06ad9;
  --danger: #d6336c;
  --shadow-sm: 0 1px 2px rgba(160, 40, 90, .05), 0 3px 10px rgba(160, 40, 90, .07);
  --shadow: 0 6px 16px rgba(160, 40, 90, .10), 0 16px 36px rgba(120, 60, 200, .10);
  --radius: 22px;
  --grad: linear-gradient(135deg, #ff8fb8 0%, #e0457b 50%, #9b5de5 100%);
  --grad-soft: linear-gradient(135deg, #ffe3ee, #f0e4ff);
  --blob1: rgba(255, 160, 200, .38); --blob2: rgba(185, 145, 255, .26); --blob3: rgba(210, 205, 225, .35);
  --radius-sm: 12px;
  --tabbar-h: 64px;
  --topbar-h: 58px;
  --font: "Twemoji Country Flags", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-head: "Twemoji Country Flags", "Rubik", "Heebo", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  padding-top: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- Topbar ---- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 14px rgba(224, 69, 123, .38);
}
.brand-logo svg { width: 22px; height: 22px; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -.2px; }
.topbar-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--text); text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on-image { background: rgba(90, 50, 130, .38); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.icon-btn.on-image:hover { background: rgba(90, 50, 130, .5); }
.icon-btn.fav-on { color: #ff5d73; }
.icon-btn.fav-on svg { fill: currentColor; }

/* ---- Tabbar ---- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; position: relative;
}
.tabbar a .ti { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 16px; transition: background .2s, color .2s; }
.tabbar a.active { color: var(--brand); }
.tabbar a.active .ti { background: var(--brand-soft); }

/* ---- FAB ---- */
.fab {
  position: fixed; z-index: 31; left: max(18px, env(safe-area-inset-left));
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  width: 58px; height: 58px; border-radius: 19px; border: 0;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 26px rgba(224, 69, 123, .45);
  transition: transform .15s;
}
.fab svg { width: 28px; height: 28px; stroke-width: 2.4; }
.fab:active { transform: scale(.92); }
.fab[hidden] { display: none; }

/* ---- Layout ---- */
#view { outline: none; max-width: 1180px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.view-enter { animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.4px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.section { margin: 28px 0 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.section-head h2 { font-size: 19px; font-weight: 700; }
.section-head a, .link-btn { color: var(--brand); font-weight: 600; font-size: 14px; text-decoration: none; background: none; border: 0; padding: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .12s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn.soft { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- Search & chips ---- */
.search {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.search svg { color: var(--muted); }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; font-size: 16px; }
.search .clear { border: 0; background: var(--surface-2); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.search .clear svg { width: 16px; height: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; margin: 0 -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600;
  white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.chip .count { font-size: 12px; color: var(--muted); font-weight: 500; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.active .count { color: inherit; opacity: .7; }
.filters-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.select { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font-size: 14px; font-weight: 600; }
.result-count { color: var(--muted); font-size: 13.5px; margin: 14px 0 10px; }

/* ---- Cards grid ---- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1140px) { .grid.wide { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card {
  position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  text-align: start; padding: 0; display: flex; flex-direction: column; text-decoration: none;
  transition: transform .18s, box-shadow .18s; width: 100%;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card:active { transform: scale(.98); }
.card .media { position: relative; width: 100%; height: 0; padding-top: 75%; overflow: hidden; flex: none; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.card h3 { font-size: 15.5px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .sub { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card .fav-badge { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(90, 50, 130, .35); color: #ff6b81; display: grid; place-items: center; backdrop-filter: blur(6px); }
.card .fav-badge svg { width: 17px; height: 17px; fill: currentColor; }
.k-badge { position: absolute; top: 8px; right: 8px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.92); color: #6a4a8a; }
.k-badge.B { color: #a8321c; } .k-badge.H { color: #1f6aa5; } .k-badge.P { color: #3f6b2a; } .k-badge.D { color: #1d7b86; }

/* ---- Art (image fallback) ---- */
.art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.art::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%), radial-gradient(circle at 80% 90%, rgba(90, 50, 130, .18), transparent 50%); }
.art::after { content: ""; position: absolute; inset: 0; opacity: .14; background-image: radial-gradient(rgba(255,255,255,.9) 1.2px, transparent 1.3px); background-size: 14px 14px; }
.art .emoji { position: relative; z-index: 1; font-size: clamp(40px, 13vw, 64px); filter: drop-shadow(0 6px 10px rgba(90, 50, 130, .25)); line-height: 1; }
.art .art-title { position: absolute; z-index: 1; bottom: 8px; inset-inline: 10px; color: rgba(255,255,255,.92); font-family: var(--font-head); font-weight: 700; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .0; }
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease, transform .6s ease; z-index: 2; }
.photo.loaded { opacity: 1; }
.card:hover .photo.loaded { transform: scale(1.04); }

/* ---- Home ---- */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 22px 20px 20px; color: #fff;
  background: var(--grad);
  box-shadow: 0 18px 44px rgba(224, 69, 123, .30);
}
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 10% 0%, rgba(255,255,255,.25), transparent 40%), radial-gradient(circle at 100% 100%, rgba(90, 50, 130, .2), transparent 50%); pointer-events: none; }
.hero .deco { position: absolute; font-size: 90px; opacity: .17; left: -8px; bottom: -18px; transform: rotate(-14deg); pointer-events: none; }
.hero .deco.two { left: auto; right: 58%; top: -30px; bottom: auto; font-size: 64px; transform: rotate(18deg); }
.hero h1 { font-size: 27px; font-weight: 800; position: relative; z-index: 1; }
.hero p { margin: 6px 0 0; opacity: .92; position: relative; z-index: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.stat { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 16px; padding: 10px 12px; text-decoration: none; backdrop-filter: blur(4px); }
.stat b { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 800; }
.stat span { font-size: 12.5px; opacity: .9; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.quick button, .quick a {
  border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; text-decoration: none; box-shadow: var(--shadow-sm);
}
.quick .qi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.quick .qi.a { background: #ffe3ee; color: #e0457b; } .quick .qi.b { background: #f0e4ff; color: #8e5bd6; } .quick .qi.c { background: #f1eff5; color: #7a7290; }

.suggest { display: grid; grid-template-columns: 132px 1fr; gap: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.suggest .media { position: relative; min-height: 132px; }
.suggest .info { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 0; }
.suggest .eyebrow { font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .3px; }
.suggest h3 { font-size: 19px; font-weight: 800; }
.suggest .actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

.hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.comm-tile {
  flex: none; width: 112px; scroll-snap-align: start; border: 1px solid var(--line); background: var(--surface);
  border-radius: 18px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: var(--shadow-sm);
}
.comm-tile .flag { font-size: 30px; line-height: 1.1; }
.comm-tile b { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.comm-tile span { font-size: 12px; color: var(--muted); }
.hscroll .card { flex: none; width: 168px; scroll-snap-align: start; }

/* ---- Empty ---- */
.empty { text-align: center; padding: 36px 20px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-size: 54px; }
.empty h3 { font-size: 19px; margin: 8px 0 6px; }
.empty p { color: var(--muted); margin: 0 auto 16px; max-width: 360px; }

/* ---- Recipe page ---- */
.recipe-hero { position: relative; margin: -18px -16px 0; aspect-ratio: 16 / 11; max-height: 52vh; overflow: hidden; background: var(--surface-2); }
@media (min-width: 760px) { .recipe-hero { margin: 0; border-radius: 26px; aspect-ratio: 21 / 9; } }
.recipe-hero::after { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(to top, rgba(90, 50, 130, .55), transparent 45%, rgba(90, 50, 130, .25)); pointer-events: none; }
.recipe-hero .bar { position: absolute; z-index: 4; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; }
.recipe-hero .bar .grp { display: flex; gap: 8px; }
.recipe-hero .ttl { position: absolute; z-index: 4; bottom: 16px; inset-inline: 18px; color: #fff; }
.recipe-hero .ttl h1 { font-size: clamp(26px, 6vw, 38px); font-weight: 800; text-shadow: 0 2px 14px rgba(90, 50, 130, .35); }
.recipe-hero .ttl .tagline { opacity: .9; font-size: 14px; margin-top: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.pill svg { width: 17px; height: 17px; color: var(--brand); }
.pill.B { background: #ffe0e6; color: #b0263f; border-color: transparent; }
.pill.H { background: #ece2ff; color: #6b46c1; border-color: transparent; }
.pill.P { background: #f1eff5; color: #6f6a7d; border-color: transparent; }
.pill.D { background: #f3e6fb; color: #8e4fb5; border-color: transparent; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 16px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.panel h2 small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; }
.recipe-cols { display: grid; gap: 0; }
@media (min-width: 860px) { .recipe-cols { grid-template-columns: 2fr 3fr; gap: 16px; align-items: start; } }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); cursor: pointer; user-select: none; }
.ing-list li:last-child { border-bottom: 0; }
.ing-list .box { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; transition: .15s; }
.ing-list .box svg { width: 16px; height: 16px; stroke-width: 3; color: #fff; opacity: 0; }
.ing-list li.done .box { background: var(--olive); border-color: var(--olive); }
.ing-list li.done .box svg { opacity: 1; }
.ing-list li.done .txt { text-decoration: line-through; color: var(--muted); }
.ing-list li.head { cursor: default; font-weight: 700; color: var(--brand); padding-top: 14px; border-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 4px 48px 16px 0; cursor: pointer; }
.steps li::before {
  content: counter(s); position: absolute; right: 0; top: 2px; width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-family: var(--font-head); font-weight: 800;
}
.steps li.done { color: var(--muted); }
.steps li.done::before { content: "✓"; background: var(--olive); color: #fff; }
.steps li.head { padding-right: 0; font-weight: 700; color: var(--brand); counter-increment: none; }
.steps li.head::before { display: none; }
.notes { white-space: pre-wrap; margin: 0; }
.cook-toggle { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--brand-soft); margin-top: 16px; }
.cook-toggle .txt { flex: 1; font-size: 14px; }
.cook-toggle .txt b { display: block; font-size: 15px; }

/* switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(90, 50, 130, .2); transition: .2s; }
.switch input:checked + span { background: var(--olive); }
.switch input:checked + span::after { right: 23px; }

/* ---- Links ---- */
.link-list { display: grid; gap: 10px; }
@media (min-width: 760px) { .link-list { grid-template-columns: 1fr 1fr; } }
.link-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.link-item .av { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.link-item .av svg { width: 24px; height: 24px; }
.link-item .main { flex: 1; min-width: 0; text-decoration: none; }
.link-item .main b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-item .main small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: right; }
.link-item .main .note { direction: rtl; }
.link-item .acts { display: flex; }
.link-item .acts .icon-btn { width: 38px; height: 38px; color: var(--muted); }
.link-item .acts svg { width: 19px; height: 19px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-inline-start: 6px; vertical-align: 2px; }

/* ---- Modal / sheet ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal .scrim { position: absolute; inset: 0; background: rgba(110, 70, 150, .32); animation: fade .25s ease both; backdrop-filter: blur(2px); }
.sheet {
  position: relative; width: 100%; max-width: 680px; max-height: 94vh; max-height: 94dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(90, 50, 130, .25);
  animation: up .32s cubic-bezier(.2, .9, .25, 1) both; padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 760px) { .modal { align-items: center; padding: 24px; } .sheet { border-radius: 26px; max-height: 90vh; } }
.modal.closing .scrim { animation: fade .2s ease reverse both; }
.modal.closing .sheet { animation: down .22s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes down { to { transform: translateY(40px); opacity: 0; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 10px auto 0; }
.sheet-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 18px; font-weight: 700; }
.sheet-body { padding: 16px; }
.sheet-foot { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }

.dish-hero { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 26px 26px 0 0; }
@media (min-width: 760px) { .dish-hero { border-radius: 26px 26px 0 0; } }
.dish-hero::after { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(to top, rgba(90, 50, 130, .6), transparent 50%); pointer-events: none; }
.dish-hero .bar { position: absolute; z-index: 4; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; }
.dish-hero .ttl { position: absolute; z-index: 4; bottom: 14px; inset-inline: 18px; color: #fff; }
.dish-hero .ttl h2 { font-size: 28px; font-weight: 800; text-shadow: 0 2px 12px rgba(90, 50, 130, .4); }
.dish-hero .ttl div { font-size: 14px; opacity: .92; }
.dish-hero .art .emoji { font-size: 96px; }
.wiki { font-size: 15px; color: var(--text); margin: 4px 0 0; }
.wiki.loading { color: var(--muted); }
.skel { display: block; height: 12px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; margin: 8px 0; }
@keyframes sk { to { background-position: -200% 0; } }
.credit { font-size: 12px; color: var(--muted); margin-top: 8px; }
.credit a { color: var(--muted); }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.action-grid .btn:first-child { grid-column: 1 / -1; }

/* ---- Forms ---- */
.field { margin-bottom: 14px; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.input, .textarea, .field select {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 14px;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field select { height: 50px; padding: 0 12px; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.input.ltr { direction: ltr; text-align: left; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.img-pick { position: relative; border: 1.5px dashed var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.img-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-pick .ph { text-align: center; color: var(--muted); padding: 12px; }
.img-pick .ph svg { width: 34px; height: 34px; color: var(--brand); margin: 0 auto 6px; }
.img-pick .over { position: absolute; bottom: 10px; inset-inline: 10px; display: flex; gap: 8px; justify-content: center; z-index: 2; flex-wrap: wrap; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chips input { position: absolute; opacity: 0; pointer-events: none; }
.choice-chips label { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; }
.choice-chips input:checked + label { background: var(--text); color: var(--bg); border-color: var(--text); }
.choice-chips input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Settings ---- */
.set-list { display: grid; gap: 10px; }
.set-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-align: start; width: 100%; }
.set-item .si { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.set-item .t { flex: 1; min-width: 0; }
.set-item .t b { display: block; }
.set-item .t small { color: var(--muted); font-size: 13px; }
.install-steps { margin: 8px 0 0; padding-inline-start: 20px; color: var(--muted); font-size: 14px; }
.install-steps li { margin: 4px 0; }

/* ---- Toast ---- */
#toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 90px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s;
  background: var(--grad); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 10px 30px rgba(90, 50, 130, .3); max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.sentinel { height: 40px; }
.loader { display: flex; justify-content: center; padding: 20px; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.center { text-align: center; }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-top: 16px; box-shadow: var(--shadow-sm); }
.banner .bi { font-size: 30px; }
.banner .t { flex: 1; font-size: 14px; }
.banner .t b { display: block; font-size: 15px; }

@media (min-width: 760px) {
  .fab { left: auto; right: max(28px, calc((100vw - 1180px) / 2 + 16px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ====== ✨ שכבת עיצוב ורודה ====== */
body {
  background:
    radial-gradient(620px 420px at 105% -8%, var(--blob1), transparent 62%),
    radial-gradient(520px 460px at -12% 38%, var(--blob2), transparent 62%),
    radial-gradient(480px 380px at 110% 95%, var(--blob3), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.brand-name { background: linear-gradient(90deg, #e0457b, #9b5de5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head h1 { background: linear-gradient(90deg, var(--text) 30%, var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head h2 { background-image: linear-gradient(transparent 60%, var(--brand-soft) 60%, var(--brand-soft) 92%, transparent 92%); padding: 0 4px; }
.section-head h2::after { content: " ♡"; color: var(--brand); font-size: .8em; }

.btn.primary { background: var(--grad); background-size: 140% 140%; color: #fff; box-shadow: 0 8px 20px rgba(224, 69, 123, .32); transition: transform .12s, background-position .4s; }
.btn.primary:hover { background-position: 100% 0; }
.btn.soft { background: var(--grad-soft); color: var(--brand); }
.chip.active, .choice-chips input:checked + label { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(224, 69, 123, .28); }
.chip.active .count { color: #fff; opacity: .85; }
.seg button.active { color: var(--brand); }
.tabbar a.active .ti { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(224, 69, 123, .35); }
.tabbar a .ti { transition: background .25s, color .25s, transform .25s; }
.tabbar a.active .ti { transform: translateY(-2px); }

.card { border-radius: 24px; }
.card:hover { transform: translateY(-3px) rotate(-.4deg); }
.card:hover .art .emoji { animation: bob 1s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-6deg); } }
.k-badge { box-shadow: 0 2px 8px rgba(90, 50, 130, .08); }
.k-badge.B { color: #c42d52; } .k-badge.H { color: #6b46c1; } .k-badge.P { color: #6f6a7d; } .k-badge.D { color: #8e4fb5; }

.hero { border-radius: 30px; }
.hero h1 { text-shadow: 0 2px 14px rgba(120, 20, 70, .25); }
.spark { position: absolute; z-index: 1; pointer-events: none; animation: floaty 4.5s ease-in-out infinite; filter: drop-shadow(0 2px 6px rgba(90, 50, 130, .15)); }
.spark.s1 { top: 14px; left: 22px; font-size: 22px; }
.spark.s2 { top: 64px; left: 70px; font-size: 18px; animation-delay: -1.5s; }
.spark.s3 { top: 26px; left: 120px; font-size: 14px; animation-delay: -3s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) scale(1); opacity: .95; } 50% { transform: translateY(-9px) scale(1.12); opacity: .7; } }
.stat { background: rgba(255, 255, 255, .2); }

.quick button, .quick a { border-radius: 22px; transition: transform .15s; }
.quick button:active, .quick a:active { transform: scale(.95); }
.comm-tile { border-radius: 22px; transition: transform .15s; }
.comm-tile:hover { transform: translateY(-2px); }
.suggest { border-radius: 24px; }
.suggest .eyebrow { color: #9b5de5; }
.empty { border-color: #f5c2d6; background: linear-gradient(180deg, var(--surface), var(--brand-soft)); }
.empty .big { display: inline-block; animation: floaty 3s ease-in-out infinite; }
.panel { border-radius: 24px; }
.panel h2 { color: var(--text); }
.steps li::before { background: var(--grad); color: #fff; }
.ing-list li.done .box, .steps li.done::before { background: var(--olive); }
.cook-toggle { background: var(--grad-soft); }
.recipe-hero::after { background: linear-gradient(to top, rgba(110, 50, 140, .55), transparent 45%, rgba(110, 50, 140, .15)); }
.fab { border-radius: 50%; }
.fab::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(224, 69, 123, .35); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.search { border-radius: 20px; }
.input:focus, .textarea:focus, .field select:focus { box-shadow: 0 0 0 4px rgba(224, 69, 123, .14); }

/* קונפטי */
.confetti { position: fixed; z-index: 90; pointer-events: none; font-size: 22px; animation: conf 1.3s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes conf {
  0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); opacity: 0; }
}

/* מצב סנכרון */
.cloud-btn { position: relative; color: var(--muted); }
.cloud-btn::after { content: ""; position: absolute; bottom: 9px; left: 9px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--bg); background: #c9c3d4; }
.cloud-btn[data-state="ok"] { color: #9b5de5; }
.cloud-btn[data-state="ok"]::after { background: #9b5de5; }
.cloud-btn[data-state="syncing"]::after, .cloud-btn[data-state="idle"]::after { background: #ff8fb8; animation: floaty 1s ease-in-out infinite; }
.cloud-btn[data-state="error"]::after { background: #e0457b; }
