:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --text: #1c1b1f;
  --muted: #6f6c75;
  --line: #e7e4de;
  --accent: #5b5bd6;
  --accent-2: #8b5cf6;
  --accent-soft: #ecebfd;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --star: #f5a524;
  --shadow: 0 1px 2px rgba(20, 18, 30, .05), 0 4px 16px rgba(20, 18, 30, .06);
  --radius: 18px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --surface: #1c1c20;
    --surface-2: #26262b;
    --text: #f2f1f4;
    --muted: #9c99a3;
    --line: #2e2e34;
    --accent: #8484f0;
    --accent-2: #a78bfa;
    --accent-soft: #26264a;
    --green: #4ade80;
    --green-soft: #12301f;
    --red: #f87171;
    --red-soft: #3a1717;
    --amber: #fbbf24;
    --amber-soft: #3a2c0c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { opacity: .5; cursor: default; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; direction: ltr; display: inline-block; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; max-width: 340px; }
.center-text { text-align: center; padding: 16px; }
.text-start { text-align: start; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; }
.flip { transform: scaleX(-1); }
.icon { flex-shrink: 0; }
.plain { display: block; }
.danger-text { color: var(--red) !important; }
.stack { display: grid; gap: 10px; }

/* ---------- Layout ---------- */
#app { min-height: 100dvh; }
.main { padding: calc(var(--safe-t) + 12px) 16px calc(var(--tabbar-h) + var(--safe-b) + 28px); max-width: 640px; margin: 0 auto; }
.page { display: grid; gap: 14px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.splash, .center-screen { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; }
.center-screen p { max-width: 340px; }
.login h1 { font-size: 30px; font-weight: 800; }
.logo-badge { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.logo-badge.big { width: 96px; height: 96px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.logo-badge.big img { width: 100%; height: 100%; }
.mock-banner { position: sticky; top: 0; z-index: 50; background: var(--amber-soft); color: var(--amber); text-align: center; font-size: 12.5px; padding: 4px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.tabbar a.on { color: var(--accent); font-weight: 700; }
.tabbar a.on .icon { transform: translateY(-1px); }

/* ---------- Headers ---------- */
.page-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.2px; }
.subtitle { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.today-head { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.today-head h1 { font-size: 27px; font-weight: 800; }
.date-line { color: var(--muted); font-size: 14px; font-weight: 500; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 56px; height: 56px; }

.section { display: grid; gap: 10px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.section-head h2 { font-size: 18px; font-weight: 700; flex: 1; }
.group-title { font-size: 13.5px; font-weight: 700; color: var(--muted); margin: 6px 4px 6px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.clickable { width: 100%; text-align: start; transition: transform .12s ease; }
.clickable:active { transform: scale(.985); }
.notes { color: var(--text); font-size: 15px; }

.hero { display: flex; align-items: center; gap: 12px; }
.muted-hero { color: var(--muted); min-height: 64px; }
.muted-hero p { font-size: 13.5px; }
.event-hero {
  display: grid; gap: 8px; padding: 18px; color: #fff;
  background: linear-gradient(135deg, #5b5bd6 0%, #8b5cf6 60%, #c06cf0 100%);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero-label { font-size: 12.5px; font-weight: 700; letter-spacing: .3px; opacity: .9; background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 99px; justify-self: start; }
.hero-title { font-size: 22px; font-weight: 800; line-height: 1.25; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; opacity: .95; }
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.countdown { font-size: 15px; font-weight: 700; background: rgba(255,255,255,.2); border-radius: 12px; padding: 8px 12px; justify-self: start; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: var(--surface-2); color: var(--text); white-space: nowrap;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn.tiny { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.btn.big-btn { height: 52px; width: 100%; font-size: 16.5px; border-radius: 16px; }
.btn.google { background: var(--surface); color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--line); height: 52px; padding: 0 22px; font-size: 16px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--text); }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.tiny { width: 30px; height: 30px; border-radius: 9px; color: var(--muted); }
.link { color: var(--accent); font-weight: 600; }
.fab {
  position: fixed; z-index: 25; inset-inline-start: auto; inset-inline-end: 20px;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px);
  width: 58px; height: 58px; border-radius: 20px; background: var(--accent); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(91, 91, 214, .4);
}
@media (min-width: 680px) { .fab { inset-inline-end: calc(50% - 300px); } }
.row-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--line); text-align: start; }
.row-btn:last-child { border-bottom: 0; }
.row-btn.danger { color: var(--red); }
a.card.row-btn { padding: 14px 16px; border: 0; }

/* ---------- Chips & segmented ---------- */
.chip { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-weight: 500; }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.accent { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.chip.tiny { font-size: 11.5px; padding: 1px 7px; margin-top: 4px; }
.chip.prio.high { background: var(--red-soft); color: var(--red); }
.chip.prio.low { background: var(--green-soft); color: var(--green); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 13px; padding: 3px; gap: 3px; }
.segmented button { height: 36px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ---------- Tasks ---------- */
.task-list { list-style: none; margin: 0; padding: 4px 12px; }
.task { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-body { flex: 1; min-width: 0; text-align: start; display: grid; gap: 3px; padding: 4px 0; }
.task-title { font-weight: 500; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.task-meta:empty { display: none; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.note-dot { color: var(--muted); font-weight: 700; }
.check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0;
  display: grid; place-items: center; color: #fff; transition: all .15s ease;
}
.check.on { background: var(--green); border-color: var(--green); }
.check.big { width: 38px; height: 38px; border-radius: 12px; }

/* ---------- Workouts ---------- */
.workout-card { display: flex; align-items: center; gap: 12px; }
.wk-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.wk-icon.live { background: var(--green-soft); color: var(--green); }
.live-banner { border: 1.5px solid var(--green); }
.workout-row { display: flex; align-items: center; gap: 12px; }
.workout-row.is-today { outline: 2px solid var(--accent); }
.day-badge { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.day-badge.live { background: var(--green-soft); color: var(--green); }
.ex-list { list-style: none; margin: 0; padding: 4px 8px; }
.ex-list li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ex-list li:last-child { border-bottom: 0; }
.reorder { display: grid; }
.ex-note { color: var(--muted); margin-top: 2px; font-style: italic; }
.hist-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.hist-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.hist-list li span { direction: ltr; text-align: end; }

.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; background: var(--green); transition: width .25s ease; }
.save-state { font-size: 12.5px; color: var(--muted); }
.save-state.error { color: var(--red); }
.ex-card { display: grid; gap: 8px; }
.ex-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.ex-head b { font-size: 17px; }
.set-grid { display: grid; grid-template-columns: 34px 1fr 1fr 44px; gap: 8px; align-items: center; }
.set-grid.head { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.set-grid input { height: 42px; text-align: center; padding: 0 6px; }
.set-grid.done input { background: var(--green-soft); border-color: transparent; }
.set-no { text-align: center; font-weight: 700; color: var(--muted); }
.ex-actions { display: flex; gap: 6px; }
.session-actions { display: grid; gap: 8px; margin-top: 4px; }

/* ---------- Events ---------- */
.event-list { list-style: none; margin: 0; padding: 2px 6px 2px 4px; }
.event-list li { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.event-list li:last-child { border-bottom: 0; }
.event-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 6px; text-align: start; }
.ev-time { width: 54px; flex-shrink: 0; font-weight: 700; font-size: 14px; text-align: center; }
.cal-bar { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.ev-body { display: grid; gap: 1px; justify-items: start; }
.ev-body > * { max-width: 100%; }
.star-btn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--line); flex-shrink: 0; border-radius: 12px; }
.star-btn.on, .star-on { color: var(--star); }
.star-btn.light { color: rgba(255,255,255,.85); }
.connect-card { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 22px 18px; }
.steps { text-align: start; margin: 4px 0; padding-inline-start: 22px; color: var(--muted); font-size: 14.5px; display: grid; gap: 4px; }
.warn-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--amber); background: var(--amber-soft); box-shadow: none; padding: 10px 14px; }
.detail-rows { display: grid; gap: 10px; margin-bottom: 14px; }
.detail-rows > div { display: flex; align-items: center; gap: 10px; }

/* ---------- Recipes ---------- */
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 0 14px; box-shadow: var(--shadow); color: var(--muted); }
.search input { border: 0; background: transparent; height: 46px; padding: 0; box-shadow: none; }
.search input:focus { outline: none; box-shadow: none; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.filter-chip { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; }
.filter-chip.on { background: var(--text); color: var(--bg); }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.recipe-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; text-align: start; }
.recipe-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.recipe-img img { width: 100%; height: 100%; object-fit: cover; }
.img-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); }
.fav-btn { position: absolute; top: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9); color: #9a98a0; display: grid; place-items: center; }
.fav-btn.on { color: #e11d48; }
.made-badge { position: absolute; bottom: 8px; inset-inline-start: 8px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; display: inline-flex; gap: 3px; align-items: center; }
.recipe-info { padding: 10px 12px 12px; display: grid; gap: 4px; }
.recipe-info b { font-size: 15px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.recipe-meta { display: inline-flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; }
.recipe-meta span { display: inline-flex; align-items: center; gap: 4px; }
.recipe-hero { margin: 0 -16px; aspect-ratio: 16 / 10; overflow: hidden; }
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .recipe-hero { margin: 0; border-radius: var(--radius); } }
.recipe-title { font-size: 26px; font-weight: 800; }
.recipe-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fav-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.fav-inline.on { color: #e11d48; }
.ingredients { list-style: none; margin: 0; padding: 4px 14px; }
.ingredients li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ingredients li:last-child { border-bottom: 0; }
.ingredients li.done { color: var(--muted); text-decoration: line-through; }
.ingredients .check { width: 22px; height: 22px; }
.ing-amount { font-weight: 700; min-width: 56px; }
.steps-list { list-style: none; margin: 0; padding: 6px 14px; display: grid; }
.steps-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps-list li:last-child { border-bottom: 0; }
.step-no { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; display: grid; place-items: center; flex-shrink: 0; }
.img-pick { width: 100%; height: 120px; border: 2px dashed var(--line); border-radius: 16px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); background: var(--surface); }
.img-edit { position: relative; border-radius: 16px; overflow: hidden; }
.img-edit img { width: 100%; max-height: 260px; object-fit: cover; }
.img-edit-actions { position: absolute; bottom: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.img-edit-actions .btn { background: rgba(255,255,255,.92); color: #1c1b1f; }
.ing-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.ing-amt { width: 92px !important; flex-shrink: 0; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- Quick links ---------- */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-btn { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; }
.quick-btn.q1 { color: #16a34a; } .quick-btn.q2 { color: var(--accent); } .quick-btn.q3 { color: #ea580c; }
.quick-btn span { color: var(--text); }

/* ---------- Forms ---------- */
form, .form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: 12.5px; }
input, select, textarea {
  width: 100%; min-width: 0; font-size: 16px; /* 16px מונע זום אוטומטי באייפון */
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 12px; height: 46px; outline: none; -webkit-appearance: none; appearance: none;
}
textarea { height: auto; resize: vertical; line-height: 1.5; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: 18px 20px, 13px 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="date"], input[type="time"] { display: block; text-align: start; }
input[type="checkbox"] { height: auto; -webkit-appearance: auto; appearance: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.input-with-clear { position: relative; }
.input-with-clear .clear { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }

/* ---------- Sheets & dialogs ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 20, .4); display: flex; align-items: flex-end; justify-content: center; animation: bd .15s ease; }
.backdrop.center { align-items: center; padding: 24px; }
@keyframes bd { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 640px; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 24px 24px 0 0; animation: up .22s cubic-bezier(.2, .9, .3, 1);
  padding-bottom: var(--safe-b);
}
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 6px 16px; }
.sheet-head h2 { flex: 1; font-size: 19px; font-weight: 700; }
.sheet-body { padding: 6px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.dialog { background: var(--surface); border-radius: 22px; padding: 22px 20px 16px; width: 100%; max-width: 340px; display: grid; gap: 8px; text-align: center; animation: pop .16s ease; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.dialog p { color: var(--muted); overflow-wrap: anywhere; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.account { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.list-actions { background: var(--surface); border-radius: var(--radius); padding: 0 14px; margin-bottom: 12px; }

.toasts { position: fixed; z-index: 80; top: calc(var(--safe-t) + 10px); inset-inline: 16px; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-weight: 500; font-size: 14.5px; box-shadow: var(--shadow); animation: pop .18s ease; max-width: 520px; }
.toast.error { background: var(--red); color: #fff; }

/* ---------- States ---------- */
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner.small { width: 18px; height: 18px; border-width: 2.5px; }
.btn.primary .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .9s linear infinite; }
.loading { display: grid; justify-items: center; gap: 10px; padding: 32px 0; color: var(--muted); }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 36px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty h3 { font-size: 18px; font-weight: 700; }
.empty p { color: var(--muted); max-width: 300px; margin-bottom: 8px; }
.empty-icon { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.error-box { display: flex; align-items: center; gap: 12px; color: var(--red); background: var(--red-soft); box-shadow: none; }
.error-box p { color: var(--text); font-size: 14px; }
.install-hint { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); box-shadow: none; margin-bottom: 14px; }
.install-hint p { font-size: 14px; }
.install-hint .icon { vertical-align: -3px; }

/* ---------- התאמות אייפון / PWA ---------- */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-touch-callout: none; }
button, .tabbar a, .chip { -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
/* המקלדת פתוחה: מסתירים את סרגל הניווט והכפתור הצף כדי שלא יכסו את השדה */
body.kb-open .tabbar, body.kb-open .fab { display: none; }
body.kb-open .main { padding-bottom: 24px; }
body.kb-open .sheet { max-height: calc(var(--vvh, 100dvh) - 12px); }

/* פסי מצב עליונים (עדכון / לא מקוון) */
.sync-bar {
  position: sticky; top: 0; z-index: 40; width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 8px) 16px 8px; font-size: 13.5px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent); text-align: start;
}
.sync-bar + .sync-bar { padding-top: 8px; }
.sync-bar.offline { background: var(--amber-soft); color: var(--amber); }
.sync-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.sync-bar ~ .main { padding-top: 12px; }

/* הגדרות */
.settings { display: grid; gap: 12px; }
.set-title { font-size: 15px; font-weight: 700; color: var(--muted); margin: 8px 4px -4px; }
.settings .list-actions { margin-bottom: 0; }
.row-btn.static { cursor: default; }
.fine.start { text-align: start; max-width: none; }
.warn-text { color: var(--amber); margin-top: 8px; }
.card.notes.small p + p { margin-top: 6px; }
.warn-line.col { display: grid; gap: 10px; }
.warn-line.col .row { display: flex; align-items: center; gap: 8px; }
.warn-line.col .btn { justify-self: start; }
.recipe-hero .img-ph, .img-edit .img-ph { aspect-ratio: 16 / 10; }
