@font-face{font-family:Rubik;font-weight:400;font-display:swap;src:url(fonts/rubik-hebrew-400-normal.woff2) format('woff2');unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:Rubik;font-weight:500;font-display:swap;src:url(fonts/rubik-hebrew-500-normal.woff2) format('woff2');unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:Rubik;font-weight:700;font-display:swap;src:url(fonts/rubik-hebrew-700-normal.woff2) format('woff2');unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:Rubik;font-weight:400;font-display:swap;src:url(fonts/rubik-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:Rubik;font-weight:500;font-display:swap;src:url(fonts/rubik-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:Rubik;font-weight:700;font-display:swap;src:url(fonts/rubik-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}

:root{
  --bg:#F7F3EC; --card:#FFFFFF; --ink:#1E2A24; --muted:#7A847E; --line:#EDE7DD;
  --green:#1E9E63; --green-2:#E3F4EA; --coral:#FF7A59; --coral-2:#FFEDE6; --shadow:0 1px 2px rgba(40,30,10,.05),0 6px 20px rgba(40,30,10,.06);
  --r:22px; --safe-b:env(safe-area-inset-bottom); --safe-t:env(safe-area-inset-top);
}
@media (prefers-color-scheme:dark){:root{--bg:#121513;--card:#1C201E;--ink:#EEF2EF;--muted:#98A29C;--line:#2A302C;--green-2:#173828;--coral-2:#3A2018;--shadow:none}}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:Rubik,-apple-system,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
button,input{font:inherit;color:inherit}
button{background:none;border:0;padding:0;cursor:pointer}
#app{height:100dvh;display:flex;flex-direction:column;max-width:560px;margin:0 auto;position:relative;overflow:hidden}
.muted{color:var(--muted)} .small{font-size:14px} .center{text-align:center}
.demo{background:var(--coral-2);color:#B4442A;font-size:12.5px;text-align:center;padding:6px 12px;padding-top:calc(6px + var(--safe-t))}

/* header */
.top{display:flex;align-items:center;justify-content:space-between;padding:calc(10px + var(--safe-t)) 18px 8px}
.demo + .top{padding-top:10px}
.brand{display:flex;align-items:center;gap:10px}
.brand img{width:38px;height:38px;filter:drop-shadow(0 3px 5px rgba(0,0,0,.12))}
.brand h1{font-size:26px;font-weight:700;margin:0;letter-spacing:-.3px}
.pill{background:var(--card);box-shadow:var(--shadow);border-radius:99px;padding:7px 14px;font-weight:500;font-size:14px}

.main{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:4px 16px 0;overscroll-behavior:contain}
.spacer{height:calc(110px + var(--safe-b))}

/* add bar */
.addbar{position:sticky;top:0;z-index:5;display:flex;gap:8px;padding:6px 0 10px;background:linear-gradient(var(--bg) 80%,transparent)}
.addbar input{flex:1;min-width:0;height:54px;border-radius:18px;border:1.5px solid var(--line);background:var(--card);padding:0 18px;font-size:17px;box-shadow:var(--shadow);outline:none}
.addbar input:focus{border-color:var(--green)}
.addbtn{width:54px;height:54px;border-radius:18px;background:var(--green);display:grid;place-items:center;box-shadow:0 6px 16px rgba(30,158,99,.35)}
.addbtn svg{width:26px;height:26px;stroke:#fff;stroke-width:2.6;stroke-linecap:round;fill:none}
.addbtn:active{transform:scale(.94)}

.suggest{display:flex;flex-wrap:wrap;gap:8px;margin:-2px 0 14px}
.chip{display:inline-flex;align-items:center;gap:7px;background:var(--card);border:1.5px solid var(--line);border-radius:99px;padding:6px 13px 6px 8px;font-size:15px;box-shadow:var(--shadow)}
[dir=rtl] .chip{padding:6px 8px 6px 13px}
.chip img{width:28px;height:28px}
.chip.on{border-color:var(--green);background:var(--green-2)}
.chip i{font-style:normal;color:var(--green);font-weight:700}
.chip.new{color:var(--green);font-weight:500;padding:8px 14px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips.small .chip{font-size:14px;padding:4px 11px 4px 6px} [dir=rtl] .chips.small .chip{padding:4px 6px 4px 11px}
.chips.small .chip img{width:22px;height:22px}

.summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 2px 6px}
.stat{background:var(--green-2);color:var(--green);font-weight:500;font-size:14px;border-radius:99px;padding:5px 12px}
.stat.cart{background:var(--coral-2);color:var(--coral)}
.link{color:var(--green);font-size:14px;font-weight:500;margin-inline-start:auto}
.link::after{content:' ←'} [dir=ltr] .link::after{content:' →'}

/* sections + rows */
.sec{margin:16px 0 4px}
.sec h2{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;margin:0 4px 8px;color:var(--ink)}
.sec h2 img{width:26px;height:26px}
.count{margin-inline-start:auto;font-size:13px;color:var(--muted);font-weight:500;background:var(--card);border-radius:99px;padding:2px 9px}
.card{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow)}
.pad{padding:14px 16px}
.rows{list-style:none;margin:0;padding:4px 0;overflow:hidden}
.row{display:flex;align-items:center;gap:4px;padding:0 10px;min-height:66px;position:relative;transition:background .3s}
.row + .row::before{content:'';position:absolute;top:0;inset-inline:66px 14px;height:1px;background:var(--line)}
.check{width:44px;height:44px;flex:none;display:grid;place-items:center}
.check svg{width:30px;height:30px;border-radius:50%;border:2.2px solid #C9CFCA;padding:4px;stroke:transparent;stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round;transition:.2s}
.row.done .check svg{background:var(--green);border-color:var(--green);stroke:#fff}
.row.pop .check svg{animation:pop .35s}
@keyframes pop{50%{transform:scale(1.25)}}
.rowbody{flex:1;min-width:0;display:flex;align-items:center;gap:12px;text-align:start;padding:8px 0}
.ic{width:46px;height:46px;flex:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.1))}
.txt{display:flex;flex-direction:column;min-width:0}
.txt b{font-weight:500;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.txt small{color:var(--muted);font-size:13.5px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.q{font-style:normal;color:var(--coral);font-weight:700;font-size:15px}
.row.done .txt b{color:var(--muted);text-decoration:line-through;text-decoration-color:rgba(0,0,0,.25)}
.row.done .ic{opacity:.55;filter:grayscale(.4)}
.row.flash{animation:flash 1.2s}
@keyframes flash{0%,60%{background:var(--coral-2)}}
.cartsec .btn{margin-top:12px}

.empty{text-align:center;padding:40px 20px 10px}
.empty img{width:110px;height:110px;animation:bob 3s ease-in-out infinite}
.empty h2{margin:14px 0 6px;font-size:22px}
.empty p{margin:0 0 20px;line-height:1.5}
@keyframes bob{50%{transform:translateY(-8px) rotate(-3deg)}}

/* buttons */
.btn{display:block;width:100%;height:52px;border-radius:16px;font-weight:500;font-size:16.5px}
.btn.primary{background:var(--green);color:#fff;box-shadow:0 6px 16px rgba(30,158,99,.3)}
.btn.soft{background:var(--card);box-shadow:var(--shadow);color:var(--green)}
.btn.danger{color:#D2483A}
.btn:active{transform:scale(.98)}

/* usuals */
.seg{display:flex;background:var(--line);border-radius:14px;padding:3px;margin:6px 0 10px}
.seg button{flex:1;height:38px;border-radius:11px;font-weight:500;font-size:15px;color:var(--muted)}
.seg button.on{background:var(--card);color:var(--ink);box-shadow:var(--shadow)}
.search{width:100%;height:46px;border-radius:14px;border:1.5px solid var(--line);background:var(--card);padding:0 14px;font-size:16px;outline:none}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:10px}
.tile{position:relative;background:var(--card);border-radius:20px;box-shadow:var(--shadow);padding:14px 6px 11px;display:flex;flex-direction:column;align-items:center;gap:7px;border:2px solid transparent;transition:transform .15s,border-color .2s,background .2s}
.tile img{width:54px;height:54px;filter:drop-shadow(0 3px 4px rgba(0,0,0,.12));transition:transform .2s}
.tile span{font-size:13.5px;line-height:1.2;text-align:center;font-weight:500;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.4em}
.tile .tick{position:absolute;top:7px;inset-inline-end:7px;width:22px;height:22px;border-radius:50%;background:var(--green);color:#fff;font-style:normal;font-size:13px;display:grid;place-items:center;transform:scale(0);transition:transform .2s}
.tile.on{border-color:var(--green);background:var(--green-2)}
.tile.on .tick{transform:scale(1)}
.tile.on img{transform:scale(1.08)}
.tile.cart{opacity:.55}
.tile:active{transform:scale(.95)}

/* settings */
.order .orow{display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid var(--line)}
.order .orow:last-child{border:0}
.orow img{width:28px;height:28px} .orow span{flex:1;font-size:15.5px}
.mini{width:34px;height:34px;border-radius:10px;background:var(--bg);font-size:12px;color:var(--muted)}
.mini:disabled{opacity:.3}
.card.pad input,#meEdit{width:100%;border:0;background:none;font-size:17px;outline:none}
.card.pad p{margin:0;line-height:1.5}
.danger.btn{margin-top:22px}

/* tab bar */
.tabbar{position:absolute;bottom:0;inset-inline:0;display:flex;justify-content:space-around;padding:8px 10px calc(8px + var(--safe-b));background:color-mix(in srgb,var(--card) 82%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-top:1px solid var(--line)}
.tab{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px 18px;border-radius:14px;color:var(--muted);font-size:12px;font-weight:500}
.tab img{width:28px;height:28px;filter:grayscale(1) opacity(.55);transition:.2s}
.tab.on{color:var(--green)} .tab.on img{filter:none;transform:scale(1.08)}
.badge{position:absolute;top:0;inset-inline-end:8px;background:var(--coral);color:#fff;font-style:normal;font-size:11px;font-weight:700;min-width:19px;height:19px;border-radius:99px;display:grid;place-items:center;padding:0 5px}

/* sheet */
.scrim{position:absolute;inset:0;background:rgba(10,20,15,.35);z-index:20;animation:fade .2s}
.sheet{position:absolute;bottom:0;inset-inline:0;z-index:21;background:var(--card);border-radius:28px 28px 0 0;padding:10px 20px calc(20px + var(--safe-b));max-height:88%;overflow-y:auto;animation:up .28s cubic-bezier(.2,.9,.3,1)}
.sheet.tall{height:80%}
@keyframes up{from{transform:translateY(100%)}} @keyframes fade{from{opacity:0}}
.grab{width:40px;height:5px;border-radius:9px;background:var(--line);margin:0 auto 14px}
.sheet h3{margin:4px 0 10px;font-size:20px}
.sheethead{display:flex;align-items:center;gap:14px;margin-bottom:8px}
.sheethead > img{width:54px;height:54px}
.bigic{position:relative;width:78px;height:78px;flex:none;border-radius:22px;background:var(--bg);display:grid;place-items:center}
.bigic img{width:60px;height:60px}
.bigic i{position:absolute;bottom:-4px;inset-inline-end:-4px;width:26px;height:26px;border-radius:50%;background:var(--green);color:#fff;font-style:normal;font-size:13px;display:grid;place-items:center}
.names{flex:1;display:flex;flex-direction:column;gap:6px}
.names input{border:0;border-bottom:1.5px solid var(--line);background:none;font-size:17px;padding:6px 2px;outline:none}
.names input:first-child{font-weight:700;font-size:19px}
.field{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}
.field.col{flex-direction:column;align-items:stretch}
.field > span{font-weight:500}
.field input[type=text],.field #noteInput{border:1.5px solid var(--line);border-radius:12px;padding:10px 12px;font-size:16px;background:var(--bg);outline:none}
.stepper{display:flex;align-items:center;gap:14px;background:var(--bg);border-radius:12px;padding:4px}
.stepper button{width:38px;height:38px;border-radius:10px;background:var(--card);font-size:22px;box-shadow:var(--shadow)}
.stepper b{min-width:22px;text-align:center;font-size:18px}
.toggle input{display:none}
.toggle i{width:52px;height:31px;border-radius:99px;background:var(--line);position:relative;transition:.2s}
.toggle i::after{content:'';position:absolute;top:2px;inset-inline-start:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2);transition:.2s}
.toggle input:checked + i{background:var(--green)}
.toggle input:checked + i::after{inset-inline-start:23px}
.sheetbtns{display:flex;gap:10px;margin-top:18px}
.icongrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(62px,1fr));gap:8px}
.icongrid button{aspect-ratio:1;border-radius:16px;background:var(--bg);display:grid;place-items:center}
.icongrid img{width:44px;height:44px}

/* toast */
.toast{position:absolute;left:50%;bottom:calc(92px + var(--safe-b));transform:translate(-50%,30px);opacity:0;pointer-events:none;background:#1E2A24;color:#fff;border-radius:16px;padding:12px 16px;display:flex;gap:14px;align-items:center;font-size:15px;max-width:90%;transition:.25s;z-index:30;white-space:nowrap}
.toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast button{color:#7FE0B0;font-weight:700}

/* login */
.login{flex:1;overflow:auto;display:flex;flex-direction:column;align-items:center;padding:calc(40px + var(--safe-t)) 22px 30px;text-align:center;position:relative}
.corner{position:absolute;top:calc(14px + var(--safe-t));inset-inline-end:16px}
.hero{position:relative;width:220px;height:170px;display:grid;place-items:center;margin-top:10px}
.hero > img{width:120px;height:120px;filter:drop-shadow(0 10px 16px rgba(0,0,0,.18));animation:bob 3.4s ease-in-out infinite}
.floaties .f{position:absolute;width:46px;height:46px;animation:bob 3s ease-in-out infinite}
.f0{top:4px;left:18px}.f1{top:0;right:24px;animation-delay:.4s!important}.f2{bottom:22px;left:-4px;animation-delay:.9s!important}
.f3{bottom:10px;right:0;animation-delay:1.3s!important}.f4{top:62px;left:-18px;width:36px!important;height:36px!important;animation-delay:.2s!important}.f5{top:56px;right:-16px;width:36px!important;height:36px!important;animation-delay:1.1s!important}
.login h1{font-size:32px;margin:6px 0 6px}
.login > p{max-width:300px;line-height:1.5;margin:0 0 22px}
.form{width:100%;max-width:380px;padding:20px;display:flex;flex-direction:column;gap:14px;text-align:start}
.form label{display:flex;flex-direction:column;gap:6px;font-weight:500;font-size:15px}
.form input{height:50px;border-radius:14px;border:1.5px solid var(--line);background:var(--bg);padding:0 14px;font-size:17px;outline:none}
.form input:focus{border-color:var(--green)}
.err{color:#D2483A;margin:0;min-height:1em;font-size:14px}
img.photo{border-radius:14px;object-fit:cover;filter:none!important;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.tile img.photo{border-radius:16px}
.photobtns{display:flex;gap:10px;margin-bottom:6px}
.photobtns label.btn{display:flex;align-items:center;justify-content:center;cursor:pointer}
.fab{position:absolute;inset-inline-end:18px;bottom:calc(88px + var(--safe-b));z-index:6;width:58px;height:58px;border-radius:20px;background:var(--green);display:grid;place-items:center;box-shadow:0 8px 20px rgba(30,158,99,.4)}
.fab svg{width:28px;height:28px;stroke:#fff;stroke-width:2.6;stroke-linecap:round;fill:none}
.fab:active{transform:scale(.94)}
.addnew{width:100%;display:flex;align-items:center;gap:12px;background:var(--green-2);border:2px dashed var(--green);border-radius:18px;padding:14px 16px;margin:4px 0 6px;color:var(--green);font-weight:500;font-size:16px;text-align:start}
.addnew b{font-size:24px;line-height:1}
.sheet .addbar{position:static;background:none;padding:0 0 10px}
