/* «קטנטן» — מערכת עיצוב. מובייל קודם; בהיר ביום, כהה בלילה */
:root {
  --bg: #f6f1ea; --bg2: #efe7dc; --card: #fffdfa; --ink: #2a2233; --ink2: #5b5266; --muted: #968c9f; --line: #ece4d9;
  --feed: #e8795a; --bottle: #e0a134; --diaper: #2a9d92; --sleep: #6a6fe0; --pump: #b06bd0; --growth: #3f8bd6; --health: #df5577;
  --shadow: 0 1px 2px rgb(42 34 51 / .04), 0 10px 30px -14px rgb(42 34 51 / .18);
  --shadow-lg: 0 24px 60px -20px rgb(42 34 51 / .35);
  --r: 26px; --r-sm: 16px; --ease: cubic-bezier(.32, .72, 0, 1); --spring: cubic-bezier(.34, 1.4, .5, 1);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
[data-theme=dark] {
  --bg: #121019; --bg2: #1a1724; --card: #1c1928; --ink: #f2eef8; --ink2: #c6bfd2; --muted: #8f87a0; --line: #2c2839;
  --feed: #f08b6c; --bottle: #ebb04f; --diaper: #3cb5a9; --sleep: #8b8ff0; --pump: #c487df; --growth: #5aa0e6; --health: #ef6c8c;
  --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 30px -16px rgb(0 0 0 / .7);
  --shadow-lg: 0 30px 70px -20px rgb(0 0 0 / .8);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); font: 400 16px/1.45 'Rubik', system-ui, sans-serif; background: var(--bg);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; overscroll-behavior-y: none;
  transition: background .5s var(--ease), color .5s var(--ease);
}
body::before { /* זוהר רך ברקע */
  content: ''; position: fixed; inset: -20% -30% auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 85% 20%, color-mix(in srgb, var(--feed) 22%, transparent), transparent 70%),
              radial-gradient(45% 55% at 10% 10%, color-mix(in srgb, var(--sleep) 20%, transparent), transparent 70%);
  filter: blur(10px);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }
.flip { transform: scaleX(-1); }
.muted { color: var(--muted); } .sm { font-size: 13px; } .center { text-align: center; justify-content: center; }
.sm-pad { padding: 8px 0 4px; margin: 0; font-size: 14px; }
.c-feed { --c: var(--feed); } .c-bottle { --c: var(--bottle); } .c-diaper { --c: var(--diaper); } .c-sleep { --c: var(--sleep); }
.c-pump { --c: var(--pump); } .c-growth { --c: var(--growth); } .c-health { --c: var(--health); } .c-muted { --c: var(--muted); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--sleep) 60%, transparent); outline-offset: 2px; border-radius: 12px; }

/* ---------------------------------------------------------------- שלד */
#app { max-width: 560px; margin: 0 auto; }
.page { padding: calc(14px + var(--safe-t)) 16px calc(120px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--sleep); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 2px; }
.page-h h1 { font-size: 30px; font-weight: 700; }

.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h3, .card > h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.card > h3 { margin-bottom: 12px; }
.card-h h3 .ic { width: 18px; height: 18px; color: var(--muted); }
.link { display: inline-flex; align-items: center; gap: 2px; color: var(--sleep); font-weight: 500; font-size: 14px; min-height: 40px; }
.link .ic { width: 16px; height: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--c, var(--muted)); letter-spacing: .01em; }
.eyebrow .ic { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- כפתורים */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 18px; font-weight: 600; font-size: 16px; transition: transform .18s var(--ease), background .2s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn .ic { width: 20px; height: 20px; }
.btn.primary { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--sleep)) 88%, #fff), var(--c, var(--sleep))); box-shadow: 0 10px 24px -10px var(--c, var(--sleep)), 0 1px 0 rgb(255 255 255 / .25) inset; }
.btn.ghost { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.btn.danger { background: var(--health); color: #fff; }
.btn.danger-t { color: var(--health); }
.btn.full { width: 100%; } .btn.grow { flex: 1; } .btn.big { min-height: 58px; font-size: 17px; }
.btn:disabled { opacity: .55; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--ink2); background: color-mix(in srgb, var(--ink) 5%, transparent); transition: transform .15s; }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 40px; height: 40px; border-radius: 12px; }
.icon-btn.sm .ic { width: 18px; height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); transition: transform .15s; }
.pill:active { transform: scale(.95); } .pill .ic { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 4px 4px 2px; }
.hero-top { display: flex; align-items: center; gap: 14px; }
.avatar { width: 58px; height: 58px; border-radius: 22px; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: #fff; flex: none;
  background: conic-gradient(from 210deg, var(--feed), var(--bottle), var(--sleep), var(--feed)); box-shadow: 0 10px 24px -10px var(--feed); position: relative; }
.avatar::after { content: ''; position: absolute; inset: 3px; border-radius: 19px; background: linear-gradient(160deg, color-mix(in srgb, var(--feed) 85%, #fff), var(--sleep)); z-index: 0; }
.avatar { isolation: isolate; } .avatar { text-shadow: 0 1px 2px rgb(0 0 0 / .15); }
.avatar::after { z-index: -1; }
.avatar.xl { width: 72px; height: 72px; border-radius: 26px; font-size: 32px; } .avatar.xl::after { border-radius: 23px; }
.hero-tx { flex: 1; min-width: 0; }
.hero-tx small { color: var(--muted); font-size: 14px; }
.hero-tx h1 { font-size: 30px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-tx p { margin: 2px 0 0; color: var(--ink2); font-size: 15px; }
.sync-dot { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; }
.sync-dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--diaper); box-shadow: 0 0 0 4px color-mix(in srgb, var(--diaper) 20%, transparent); transition: background .3s; }
.sync-dot.pend i, .sync-dot.busy i { background: var(--bottle); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bottle) 22%, transparent); animation: pulse 1.2s infinite; }
.sync-dot.off i { background: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 22%, transparent); }
@keyframes pulse { 50% { transform: scale(.7); opacity: .6; } }

/* ---------------------------------------------------------------- כרטיס האכלה עם טבעת */
.feed-card { display: flex; align-items: center; gap: 18px; cursor: pointer; --c: var(--feed); position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--feed) 12%, var(--card)), var(--card) 60%); }
.ring { position: relative; width: 124px; height: 124px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.r-bg { stroke: color-mix(in srgb, var(--feed) 14%, transparent); }
.r-fg { stroke: var(--feed); transition: stroke-dashoffset 1s linear, stroke .4s; filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--feed) 50%, transparent)); }
.ring.near .r-fg { stroke: var(--bottle); } .ring.due .r-fg { stroke: var(--health); }
.ring-tx { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-tx b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.ring-tx small { color: var(--muted); font-size: 12px; margin-top: -2px; }
.feed-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feed-tx strong { font-size: 18px; font-weight: 600; line-height: 1.25; }
.feed-tx > small { color: var(--ink2); font-size: 13.5px; }
.feed-act { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini { text-align: start; display: flex; flex-direction: column; gap: 4px; padding: 16px; transition: transform .18s var(--ease); min-height: 116px; }
.mini:active { transform: scale(.97); }
.mini b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.mini small { color: var(--muted); font-size: 12.5px; }
.mini.is-on { color: #fff; background: radial-gradient(120% 120% at 0 0, #8a8ff5, #4b4fc4 60%, #2e2f85); border-color: transparent; box-shadow: 0 16px 34px -14px #4b4fc4; }
.mini.is-on .eyebrow, .mini.is-on small { color: rgb(255 255 255 / .8); }

/* ---------------------------------------------------------------- רישום מהיר */
.quick, .pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
.pick.three { grid-template-columns: repeat(2, 1fr); }
.q { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink2); padding: 4px 0; }
.q > span { width: 100%; max-width: 72px; aspect-ratio: 1; border-radius: 24px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
  transition: transform .2s var(--spring), background .2s; box-shadow: 0 8px 18px -14px var(--c); }
.q .ic { width: 28px; height: 28px; }
.q:active > span { transform: scale(.9); background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.pick .q > span { max-width: 84px; }

/* ---------------------------------------------------------------- היום */
.stats4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st { padding: 12px 10px; border-radius: 18px; background: color-mix(in srgb, var(--c) 9%, transparent); display: flex; flex-direction: column; }
.st b { font-size: 26px; font-weight: 700; color: var(--c); letter-spacing: -.02em; line-height: 1.1; }
.st span { font-size: 13px; font-weight: 600; } .st small { font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }

/* ---------------------------------------------------------------- שורות */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; text-align: start; width: 100%; border-bottom: 1px solid var(--line); min-height: 60px; transition: background .2s; border-radius: 12px; }
.row:last-child { border-bottom: 0; }
.row:active { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.row time { width: 44px; font-size: 14px; font-weight: 500; color: var(--ink2); flex: none; }
.r-ic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); flex: none; }
.r-ic .ic { width: 21px; height: 21px; }
.r-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.r-tx b { font-weight: 500; font-size: 15.5px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-tx small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.live .r-ic { animation: breathe 2s ease-in-out infinite; }
.row.fever .r-tx b { color: var(--health); }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 15%, transparent); } }
.who { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--m); flex: none; box-shadow: 0 0 0 2px var(--card); }
.who.lg { width: 44px; height: 44px; font-size: 18px; }
.poo { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.poo.c-y { background: #e6b83a; } .poo.c-g { background: #7d9a3a; } .poo.c-b { background: #8a5a33; } .poo.c-k { background: #2b2420; } .poo.c-r { background: #c2453a; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 18px 10px; }
.empty .ic { width: 34px; height: 34px; opacity: .6; } .empty p { margin: 0; font-size: 14.5px; }
.empty.big { padding: 40px 20px; }

/* ---------------------------------------------------------------- טיימרים */
.timer { position: relative; overflow: hidden; color: #fff; border: 0; display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(130% 120% at 100% 0, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 60%, #000)); box-shadow: 0 22px 44px -20px var(--c); animation: popIn .5s var(--spring) both; }
.t-sleep { background: radial-gradient(130% 130% at 100% 0, #9b9ff8, #5257d0 45%, #24245e); }
@keyframes popIn { from { transform: scale(.94); opacity: 0; } }
.timer .eyebrow { color: rgb(255 255 255 / .88); }
.tm-h { display: flex; justify-content: space-between; align-items: center; }
.timer .icon-btn { background: rgb(255 255 255 / .16); color: #fff; }
.tm-big { font-size: 54px; font-weight: 300; letter-spacing: -.03em; text-align: center; line-height: 1; padding: 6px 0 4px; direction: ltr; }
.timer .btn.primary { background: #fff; color: color-mix(in srgb, var(--c) 80%, #000); box-shadow: 0 10px 24px -12px rgb(0 0 0 / .45); }
.t-sleep .btn.primary { color: #3c3fa8; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side { border-radius: 20px; padding: 12px 10px; background: rgb(255 255 255 / .14); color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 96px; border: 2px solid transparent; transition: all .25s var(--ease); }
.side small { font-size: 14px; opacity: .85; } .side b { font-size: 24px; font-weight: 600; direction: ltr; }
.side-st { display: flex; align-items: center; gap: 4px; font-size: 12.5px; opacity: .85; } .side-st .ic { width: 14px; height: 14px; }
.side.on { background: rgb(255 255 255 / .95); color: color-mix(in srgb, var(--c) 85%, #000); border-color: #fff; box-shadow: 0 10px 26px -12px rgb(0 0 0 / .4); }
.side.on b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-inline-end: 6px; vertical-align: middle; animation: pulse 1.4s infinite; }
.stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .6; animation: tw 3s ease-in-out infinite; }
.stars i:nth-child(1) { top: 18%; left: 12%; } .stars i:nth-child(2) { top: 40%; left: 28%; animation-delay: .7s; width: 2px; height: 2px; }
.stars i:nth-child(3) { top: 22%; left: 52%; animation-delay: 1.4s; } .stars i:nth-child(4) { top: 62%; left: 8%; animation-delay: .3s; width: 2px; height: 2px; }
.stars i:nth-child(5) { top: 12%; left: 78%; animation-delay: 2s; width: 2px; height: 2px; } .stars i:nth-child(6) { top: 52%; left: 70%; animation-delay: 1.1s; }
@keyframes tw { 50% { opacity: .1; transform: scale(.6); } }

/* ---------------------------------------------------------------- ניווט תחתון */
.tabbar { position: fixed; z-index: 20; inset-inline: 12px; bottom: calc(10px + var(--safe-b)); max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px; border-radius: 26px; background: color-mix(in srgb, var(--card) 78%, transparent); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: var(--shadow-lg); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 20px; color: var(--muted); font-size: 11.5px; font-weight: 500; min-height: 54px; transition: color .2s, background .3s var(--ease); }
.tabbar a.on { color: var(--ink); background: color-mix(in srgb, var(--sleep) 14%, transparent); }
.tabbar a.on .ic { color: var(--sleep); }

/* ---------------------------------------------------------------- גיליון תחתון */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgb(18 14 26 / .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s var(--ease); }
.sheet { position: absolute; inset-inline: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 30px 30px 0 0; box-shadow: var(--shadow-lg); transform: translateY(105%); transition: transform .42s var(--ease); --c: var(--sleep); }
.sheet-wrap.on .sheet-bg { opacity: 1; } .sheet-wrap.on .sheet { transform: none; }
.grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 10px auto 2px; flex: none; }
.sh-head { display: flex; align-items: center; gap: 12px; padding: 6px 18px 12px; flex: none; touch-action: none; }
.sh-head h2 { font-size: 21px; font-weight: 700; flex: 1; }
.sh-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.sh-body { overflow-y: auto; padding: 4px 18px 18px; overscroll-behavior: contain; }
.sh-foot { display: flex; gap: 10px; padding: 12px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; background: var(--card); }
.sheet .btn.primary { --c: inherit; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c)); box-shadow: 0 10px 24px -10px var(--c); }
.lead { font-size: 16.5px; color: var(--ink2); margin: 4px 0 14px; }
.hint { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink2); margin: 2px 0 14px; flex-wrap: wrap; }
.hint .ic { width: 18px; height: 18px; color: var(--c); } .hint.warn { color: var(--health); font-weight: 600; }

/* ---------------------------------------------------------------- טפסים */
.evf { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.f-lbl { font-size: 14px; font-weight: 600; color: var(--ink2); }
.f-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
input:not([type=number]), textarea { width: 100%; font-size: 16px; padding: 13px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg); outline: 0; transition: border-color .2s, box-shadow .2s; min-height: 50px; }
input:focus, textarea:focus { border-color: var(--c, var(--sleep)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--sleep)) 16%, transparent); }
textarea { resize: none; }
.f-dt { width: auto !important; min-width: 0; direction: ltr; text-align: center; font-weight: 500; }
.f-row .f-dt { width: 100% !important; }
.field > .f-dt { width: 100% !important; }
hr { border: 0; border-top: 1px dashed var(--line); margin: 2px 0; width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.center { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 14px; font-weight: 500; white-space: nowrap; transition: all .2s var(--ease); }
.chip .ic { width: 17px; height: 17px; }
.chip.on { background: var(--ink); color: var(--bg); }
.chips.sm .chip { min-height: 36px; padding: 0 12px; font-size: 13px; }
.sheet .chip.on { background: var(--c); color: #fff; }

.seg-wrap { display: flex; justify-content: center; }
.seg { display: inline-flex; padding: 4px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 6%, transparent); gap: 2px; margin-bottom: 16px; }
.seg button, .rng { min-height: 42px; padding: 0 18px; border-radius: 12px; font-weight: 500; font-size: 15px; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all .25s var(--ease); }
.seg button .ic { width: 18px; height: 18px; }
.seg button.on, .rng.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px -2px rgb(0 0 0 / .15); font-weight: 600; }
.seg.wide { display: flex; margin: 0; } .seg.wide button { flex: 1; padding: 0 8px; }
.seg.wrap { flex-wrap: wrap; } .seg.wrap button { flex: 1 1 30%; }
.p-stats .seg-wrap { display: flex; padding: 4px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.p-stats .seg-wrap .rng { flex: 1; }

.stepper { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 18px; padding: 5px; border: 1.5px solid var(--line); }
.st-b { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--card); color: var(--c, var(--ink)); box-shadow: 0 2px 6px -2px rgb(0 0 0 / .12); flex: none; transition: transform .15s; }
.st-b:active { transform: scale(.88); }
.st-v { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 4px; min-width: 0; }
.st-v input { width: 100%; min-width: 0; max-width: 90px; border: 0; background: none; text-align: center; font-size: 22px; font-weight: 600; padding: 0; outline: 0; -moz-appearance: textfield; }
.st-v input::-webkit-inner-spin-button, .st-v input::-webkit-outer-spin-button { -webkit-appearance: none; }
.st-v span { color: var(--muted); font-size: 14px; flex: none; }
.stepper.big { padding: 8px; border-radius: 26px; border: 0; background: color-mix(in srgb, var(--c) 9%, transparent); }
.stepper.big .st-b { width: 60px; height: 60px; border-radius: 20px; }
.stepper.big .st-b .ic { width: 26px; height: 26px; }
.stepper.big input { font-size: 52px; font-weight: 300; max-width: 160px; letter-spacing: -.03em; color: var(--c); }
.stepper.big span { font-size: 18px; }
.stepper.bump input { animation: bump .25s var(--spring); }
@keyframes bump { 40% { transform: scale(1.12); } }
.hero-num { margin: 2px 0 14px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; border-radius: 20px; font-size: 14px; font-weight: 600; color: var(--ink2); background: color-mix(in srgb, var(--ink) 5%, transparent); border: 2px solid transparent; transition: all .22s var(--spring); }
.tile .ic { width: 28px; height: 28px; color: var(--c); }
.tile.k-dirty .ic, .tile.k-both .ic { color: #a8743f; }
.tile.on { background: color-mix(in srgb, var(--c) 14%, transparent); border-color: var(--c); color: var(--ink); transform: scale(1.03); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); min-width: 44px; }
.swatches i { width: 36px; height: 36px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line); transition: transform .2s var(--spring); }
.swatches button.on i { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--sw); transform: scale(1.08); }
.timefield .chips { margin-top: 2px; }

.side-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.side-btn { min-height: 140px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--feed); background: color-mix(in srgb, var(--feed) 10%, transparent); border: 2px solid color-mix(in srgb, var(--feed) 22%, transparent); transition: transform .2s var(--spring); }
.side-btn b { font-size: 30px; font-weight: 700; } .side-btn .sb-l { font-size: 14px; color: var(--ink2); }
.side-btn.sug { color: #fff; background: radial-gradient(120% 120% at 100% 0, color-mix(in srgb, var(--feed) 70%, #fff), var(--feed)); border-color: transparent; box-shadow: 0 16px 30px -14px var(--feed); }
.side-btn.sug .sb-l { color: rgb(255 255 255 / .85); }
.side-btn:active { transform: scale(.95); }
.big-start { width: 100%; min-height: 120px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 19px; font-weight: 600; color: #fff;
  background: radial-gradient(120% 140% at 100% 0, color-mix(in srgb, var(--c) 65%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000)); box-shadow: 0 18px 36px -16px var(--c); transition: transform .2s var(--spring); }
.big-start .ic { width: 34px; height: 34px; } .big-start:active { transform: scale(.97); }

/* ---------------------------------------------------------------- toast */
#toast { position: fixed; z-index: 90; inset-inline: 16px; bottom: calc(96px + var(--safe-b)); max-width: 440px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; padding-inline-start: 18px; min-height: 52px; border-radius: 18px; background: var(--ink); color: var(--bg); font-weight: 500; font-size: 15px; box-shadow: var(--shadow-lg);
  transform: translateY(30px) scale(.96); opacity: 0; pointer-events: none; transition: all .38s var(--spring); }
#toast.on { transform: none; opacity: 1; pointer-events: auto; }
.t-undo { color: var(--bottle); font-weight: 700; min-height: 40px; padding: 0 12px; border-radius: 12px; }

/* ---------------------------------------------------------------- יומן */
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); justify-content: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }
.lg-sleep { background: var(--sleep); } .lg-feed { background: var(--feed); border-radius: 50% !important; width: 9px !important; height: 9px !important; } .lg-diaper { background: var(--diaper); width: 4px !important; height: 10px !important; }
.day { background: var(--card); border-radius: var(--r); padding: 16px 16px 8px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.day-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; }
.day-h h3 { font-size: 17px; font-weight: 700; }
.day-sum { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink2); }
.day-sum span { display: inline-flex; align-items: center; gap: 3px; } .day-sum .ic { width: 14px; height: 14px; color: var(--c); }
.strip { margin: 0 0 6px; } .strip svg { width: 100%; height: 34px; display: block; }
.s-bg { fill: color-mix(in srgb, var(--ink) 5%, transparent); } .s-sleep { fill: var(--sleep); opacity: .85; } .s-feed { fill: var(--feed); stroke: var(--card); stroke-width: 2; }
.s-diaper { fill: var(--diaper); } .s-grid { stroke: color-mix(in srgb, var(--ink) 10%, transparent); stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.s-now { stroke: var(--health); stroke-width: 2; vector-effect: non-scaling-stroke; }
.s-lbl { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); padding: 0 1px; }

/* ---------------------------------------------------------------- מגמות */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--card); border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; inset-inline-start: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--c); }
.kpi b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--c); }
.kpi span { font-size: 13px; font-weight: 600; color: var(--ink2); } .kpi small { font-size: 11.5px; color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; height: 170px; align-items: end; }
.bars.thin { gap: 3px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bv { font-size: 11px; font-weight: 600; color: var(--ink2); }
.bcol { width: 100%; max-width: 30px; flex: 1; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-radius: 9px; overflow: hidden; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.bcol i { display: block; width: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 75%, #fff), var(--bc)); animation: grow .7s var(--ease) both; transform-origin: bottom; }
.bcol i.b2 { background: linear-gradient(180deg, color-mix(in srgb, var(--bottle) 75%, #fff), var(--bottle)); }
@keyframes grow { from { transform: scaleY(0); } }
.bar small { font-size: 11px; color: var(--muted); height: 14px; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-inline: 6px 3px; }
.rhythm { display: flex; gap: 8px; margin-bottom: 10px; }
.rh-days { display: flex; flex-direction: column; font-size: 10.5px; color: var(--muted); }
.rh-days span { height: 18px; line-height: 14px; }
.rh-plot { flex: 1; min-width: 0; } .rh-plot svg { width: 100%; display: block; }
.line { width: 100%; height: auto; display: block; }
.g-list { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.g-list b { color: var(--ink); }

/* ---------------------------------------------------------------- משפחה */
.baby-card { display: flex; align-items: center; gap: 14px; }
.baby-card > div:nth-child(2) { flex: 1; min-width: 0; }
.baby-card h2 { font-size: 24px; } .baby-card p { margin: 2px 0 0; color: var(--ink2); font-size: 14px; }
.members { display: flex; flex-direction: column; gap: 4px; }
.mem { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.mem > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mem small { color: var(--muted); font-size: 13px; }
.tag { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--sleep); background: color-mix(in srgb, var(--sleep) 14%, transparent); padding: 2px 8px; border-radius: 999px; margin-inline-start: 4px; }
.invite p { margin: -4px 0 14px; font-size: 14.5px; }
.code { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.code span { width: 44px; height: 56px; display: grid; place-items: center; font-size: 26px; font-weight: 700; border-radius: 14px; background: color-mix(in srgb, var(--sleep) 10%, transparent); color: var(--sleep); font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.row-btns { display: flex; gap: 10px; }
.center-b { display: flex; margin: 8px auto 0; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; }
.center-b .ic { width: 15px; height: 15px; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set.col { flex-direction: column; align-items: stretch; }
.set > div:first-child { display: flex; flex-direction: column; } .set small { color: var(--muted); font-size: 12.5px; }
.set .stepper { width: 180px; flex: none; }
.set-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; font-weight: 500; color: var(--ink2); text-align: start; }
.set-btn.red { color: var(--health); }
.danger-zone { padding-block: 6px; }
.foot-note { text-align: center; font-size: 12.5px; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- פתיחה */
.ob { min-height: 100dvh; padding: calc(24px + var(--safe-t)) 22px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; animation: pageIn .5s var(--ease) both; }
.ob .back { align-self: flex-start; margin-bottom: 6px; }
.ob-h { font-size: 32px; font-weight: 700; } .ob > .muted { margin: 0 0 10px; font-size: 15px; }
.ob form.card { gap: 18px; padding: 20px; }
.welcome { justify-content: center; text-align: center; align-items: center; }
.art { width: min(320px, 90%); color: var(--ink); margin-bottom: -6px; }
.swing { transform-box: fill-box; transform-origin: top center; animation: swing 4s ease-in-out infinite; }
.swing.s2 { animation-delay: -1.3s; animation-duration: 4.6s; } .swing.s3 { animation-delay: -2.4s; animation-duration: 3.8s; }
@keyframes swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.twinkle circle { animation: tw 2.6s ease-in-out infinite; } .twinkle circle:nth-child(2n) { animation-delay: -1.2s; }
.brand { font-size: 52px; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(120deg, var(--feed), var(--sleep)); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 6px; }
.tag-line { font-size: 17px; color: var(--ink2); margin: 0 0 8px; line-height: 1.5; }
.perks { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; flex-direction: column; gap: 10px; text-align: start; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; }
.perks .ic { width: 38px; height: 38px; padding: 9px; border-radius: 13px; color: var(--sleep); background: color-mix(in srgb, var(--sleep) 13%, transparent); }
.perks li:nth-child(1) .ic { color: var(--feed); background: color-mix(in srgb, var(--feed) 13%, transparent); }
.perks li:nth-child(3) .ic { color: var(--diaper); background: color-mix(in srgb, var(--diaper) 13%, transparent); }
.ob-btns { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.code-in { text-align: center; font-size: 30px !important; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; padding-inline-start: calc(14px + .4em) !important; }
.peek { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 14px; font-size: 15px; margin-top: -6px; }
.peek.ok { background: color-mix(in srgb, var(--diaper) 13%, transparent); color: var(--diaper); } .peek.ok b { color: var(--ink); }
.peek.bad { background: color-mix(in srgb, var(--health) 12%, transparent); color: var(--health); }

@media (min-width: 700px) {
  .page { padding-top: 32px; }
  .sheet { bottom: 50%; transform: translateY(calc(50% + 60px)) scale(.96); opacity: 0; border-radius: 30px; transition: transform .4s var(--ease), opacity .3s; max-height: 86dvh; }
  .sheet-wrap.on .sheet { transform: translateY(50%); opacity: 1; }
  .grab { display: none; }
}
@media (max-width: 360px) {
  .ring { width: 104px; height: 104px; } .ring-tx b { font-size: 20px; } .tm-big { font-size: 44px; }
  .quick { gap: 8px 6px; } .q { font-size: 12px; } .code span { width: 38px; height: 50px; font-size: 22px; }
  .stats4 .st b { font-size: 22px; } .set .stepper { width: 150px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
