:root { --page: #fffaf5; --ink: #251f21; --ink2: #585254; --pink: #c9567a; --pink-dark: #a63e61; --blush: #fbe6ec; --rose: #f3c9d6; --cream: #f8efe4; --red: #ed313e; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page) linear-gradient(180deg, #fff3f6 0, var(--page) 220px) no-repeat; color: var(--ink); font: 350 15px/24px system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 20px 20px 48px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.title { font-weight: 500; font-size: 28px; line-height: 34px; margin: 0; }
.daynav { display: flex; align-items: center; gap: 4px; background: var(--cream); border-radius: 999px; padding: 2px; font-weight: 600; }
.daynav span { min-width: 64px; text-align: center; }
.daynav button { width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: #fff; color: var(--pink-dark); font-size: 20px; }
.daynav button:disabled { opacity: .35; cursor: default; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--cream); border-radius: 999px; margin: 16px 0; }
.tab { min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; color: var(--ink2); }
.tab.on { background: #fff; color: var(--pink-dark); box-shadow: 0 1px 4px rgba(166, 62, 97, .18); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.card { border-radius: 18px; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t1 { background: #fbe0e8; } .t2 { background: #fdeede; } .t3 { background: #f6e3f0; }
.card-label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--pink-dark); }
.card-num { font-size: 26px; line-height: 30px; font-weight: 600; }
.card-num small { font-size: 11px; font-weight: 350; color: var(--ink2); white-space: nowrap; }
.track { height: 8px; background: rgba(255,255,255,.75); border-radius: 4px; overflow: hidden; }
.fill { height: 100%; background: linear-gradient(90deg, #e58aa6, var(--pink)); border-radius: 4px; transition: width .2s; }
.card-note { font-size: 11px; line-height: 16px; color: var(--ink2); }
.add-big { width: 100%; min-height: 56px; border: 0; border-radius: 18px; background: linear-gradient(135deg, #e58aa6, var(--pink)); color: #fff; font-size: 17px; font-weight: 600; box-shadow: 0 6px 16px rgba(201, 86, 122, .3); }
.add-big span { font-size: 22px; margin-inline-end: 6px; }
.h { font-weight: 500; font-size: 21px; margin: 24px 0 8px; }
.count { background: var(--blush); color: var(--pink-dark); border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: 12px; vertical-align: middle; margin-inline-start: 6px; }
.empty { text-align: center; padding: 28px 16px; background: var(--cream); border-radius: 18px; color: var(--ink2); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: start; background: #fff; border: 1px solid var(--rose); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.item-main { display: grid; gap: 4px; min-width: 0; }
.note { color: var(--ink2); font-size: 12px; line-height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { border-radius: 999px; padding: 2px 10px; font-size: 12px; line-height: 20px; }
.item-actions { display: flex; flex-direction: column; align-items: flex-end; }
.x { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--pink-dark); font-weight: 600; }
.edit { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--rose); }
label { display: grid; gap: 6px; color: var(--ink2); }
input[type=text], input[type=email], input[type=password], input:not([type]), input[inputmode] { min-height: 44px; padding: 0 12px; border: 1px solid var(--rose); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
.form { display: grid; gap: 14px; margin-top: 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 44px; padding: 0 16px; border: 1px solid var(--rose); border-radius: 12px; background: #fff; }
.seg button.on { background: var(--pink); border-color: var(--pink); color: #fff; font-weight: 600; }
.seg.wide button { flex: 1; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pill { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 1px solid var(--rose); border-radius: 999px; background: #fff; }
.pill.on { background: var(--pink); border-color: var(--pink); color: #fff; font-weight: 600; }
.sub { font-size: 12px; color: var(--ink2); margin-bottom: 6px; }
.foods { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 2px; }
.food { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 56px; padding: 12px 14px; text-align: start; background: #fff; border: 1px solid var(--rose); border-radius: 12px; line-height: 20px; }
.food span { color: var(--ink2); font-size: 12px; }
.food.is-on { background: var(--blush); border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.pick { display: grid; gap: 14px; padding: 16px; background: var(--cream); border-radius: 16px; }
.pick-head { display: flex; justify-content: space-between; align-items: center; }
.calc { padding: 10px 14px; background: #fff; border-radius: 12px; border: 1px solid var(--rose); font-weight: 600; }
.cap { font-size: 12px; line-height: 20px; color: var(--ink2); margin: 0; }
.error { color: var(--red); margin: 0; min-height: 0; }
.error:empty, .warn:empty { display: none; }
.warn { padding: 10px 14px; border-radius: 12px; background: #fde4d3; border: 1px solid #f0b48f; color: var(--ink); }
.primary { min-height: 48px; border: 1px solid var(--pink); border-radius: 12px; background: var(--pink); color: #fff; font-weight: 600; padding: 0 16px; }
.primary:disabled { opacity: .45; cursor: default; }
.primary.compact { min-height: 44px; }
.adding { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 8px 14px; border-radius: 14px; background: var(--cream); margin-bottom: 12px; }
.adding.past { background: #fde4d3; border: 1px solid #f0b48f; }
.note-box { padding: 14px; border-radius: 14px; background: var(--cream); line-height: 22px; }
.photo { display: grid; gap: 8px; padding: 16px; border: 1px dashed var(--pink); border-radius: 16px; background: var(--blush); }
.label-img { max-width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: #fff; justify-self: center; }
.status { color: var(--ink2); font-size: 13px; min-height: 0; }
.status:empty { display: none; }
.cand { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; }
.cchip { min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--pink); border-radius: 999px; background: #fff; color: var(--pink-dark); font-weight: 600; }
.cchip.guess { border-style: dashed; font-weight: 350; }
.needs input { border-color: #f0b48f; background: #fffaf0; }
.check { display: flex; align-items: center; gap: 10px; color: var(--ink); min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--pink); }
details { background: #fff; border: 1px solid var(--rose); border-radius: 12px; padding: 8px 12px; }
details pre { white-space: pre-wrap; margin: 8px 0 0; font: 12px/18px ui-monospace, monospace; direction: ltr; text-align: left; }
@media (min-width: 640px) { main { padding-top: 32px; } }
.cchip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 14px; line-height: 1.2; }
.cchip small { font-size: 10px; font-weight: 350; color: var(--ink2); }

/* polish pass */
.title { font-size: 30px; letter-spacing: -.01em; font-weight: 600; background: linear-gradient(135deg, #a63e61, #d9708f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabs { box-shadow: inset 0 1px 3px rgba(166, 62, 97, .08); }
.card { box-shadow: 0 6px 18px rgba(201, 86, 122, .10); border: 1px solid rgba(255,255,255,.7); border-radius: 22px; padding: 14px 12px; }
.card-num { font-size: 30px; line-height: 34px; letter-spacing: -.02em; }
.track { height: 10px; border-radius: 6px; }
.fill { border-radius: 6px; }
.list li { box-shadow: 0 3px 12px rgba(201, 86, 122, .07); border-radius: 18px; }
.empty { border: 1px dashed var(--rose); background: linear-gradient(180deg, #fff8f2, var(--cream)); border-radius: 22px; padding: 32px 20px; }
.food, .seg button, .pill { transition: box-shadow .15s, border-color .15s; }
.food:active, .pill:active, .seg button:active { transform: scale(.99); }
input:not([type=checkbox]):not([type=file]) { border-radius: 14px; box-shadow: 0 1px 2px rgba(166,62,97,.05); }
input:focus-visible, button:focus-visible, label.file-btn:focus-within, .sr-file:focus-visible + .file-btn { outline: 3px solid rgba(201, 86, 122, .45); outline-offset: 2px; }
.primary { border-radius: 14px; min-height: 52px; font-size: 16px; box-shadow: 0 6px 14px rgba(201,86,122,.25); }
.primary:disabled { box-shadow: none; }
.pick { border-radius: 20px; border: 1px solid var(--rose); background: linear-gradient(180deg, #fffaf6, var(--cream)); }
.note-box { background: linear-gradient(180deg, #fffaf6, var(--cream)); border: 1px solid #efdcc8; }
.photo { display: block; padding: 0; border: 0; background: transparent; }
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.file-btn { display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 72px; border-radius: 20px; border: 1.5px dashed var(--pink); background: var(--blush); color: var(--ink); cursor: pointer; }
.file-btn strong { display: block; color: var(--pink-dark); font-weight: 600; }
.file-btn small { display: block; color: var(--ink2); font-size: 12px; line-height: 18px; }
.file-ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 22px; box-shadow: 0 2px 8px rgba(201,86,122,.2); }
.label-img { border: 1px solid var(--rose); }
.title { font-size: 26px; line-height: 32px; white-space: nowrap; }
.card-num { font-size: 26px; line-height: 30px; }
.card-num small { display: inline-block; }
.card-num small { display: block; line-height: 16px; }
.banner { background: var(--cream); border-radius: 14px; padding: 10px 14px; margin: 12px 0; font-size: 14px; }
.err { color: #a3192a; min-height: 24px; }
.ok { color: #1d6b3a; }
select { font: inherit; width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--rose); padding: 0 10px; background: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.box { background: #fff; border: 1px solid var(--rose); border-radius: 16px; padding: 14px; margin: 12px 0; }
.mono { direction: ltr; unicode-bidi: plaintext; word-break: break-all; font-family: ui-monospace, monospace; font-size: 13px; }
