/* «Малыш» — оформление в духе Baby+: белый фон, бирюзовые акценты, светло-голубые панели. */
:root {
  --teal: #6ccbde;
  --teal-d: #4fbfd6;
  --teal-dd: #2c9ab4;
  --teal-l: #d3eef4;
  --panel: #eef7fa;
  --cell: #dcf0f5;
  --text: #212121;
  --muted: #8a8a8a;
  --muted2: #a9a9a9;
  --line: #ececec;
  --field: #f0f0f0;
  --danger: #e5484d;
  --warn: #f2994a;
  --nav-h: 64px;
  --bar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font: 16px/1.35 Roboto, system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text); background: #fff; overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.ic { width: 24px; height: 24px; flex: none; display: block; }

/* ── каркас ── */
#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; }
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
.screen.no-nav { padding-bottom: 0; }
.page-body { flex: 1; padding: 0 16px 24px; }
.screen.no-nav .page-body { padding-bottom: 96px; }
.screen:has(.bottom-action) .page-body { padding-bottom: 100px; }

.bar { position: sticky; top: 0; z-index: 20; height: var(--bar-h); display: flex; align-items: center; gap: 6px; padding: 0 12px 0 6px; background: #fff;
  padding-top: env(safe-area-inset-top, 0px); height: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); }
.bar-back { border: 0; background: none; width: 48px; height: 48px; display: grid; place-items: center; color: #6b6b6b; border-radius: 50%; }
.bar-back:active { background: #f2f2f2; }
.bar-title { flex: 1; margin: 0 0 0 4px; font-size: 22px; font-weight: 400; color: #6f6f6f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar:not(:has(.bar-back)) .bar-title { margin-left: 12px; font-size: 24px; }
.bar-right { display: flex; align-items: center; gap: 4px; }
.bar-avatar { display: block; }
.icon-btn { border: 0; background: none; width: 44px; height: 44px; display: grid; place-items: center; color: #707070; border-radius: 50%; }
.icon-btn:active { background: #f2f2f2; }
.info-btn { color: #bdbdbd; }
.info-btn .ic { width: 30px; height: 30px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: block; border: 2px solid #ececec; background: #f4f4f4; flex: none; }
.avatar img, .avatar .person { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 52px; height: 52px; }

.sync-badge { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 19; margin: 0 16px 6px; padding: 6px 12px; border-radius: 8px; background: #e9f6fa; color: var(--teal-dd); font-size: 13px; text-align: center; }
.sync-badge.off { background: #fff4e5; color: #9a5b00; }

/* вкладки */
.tabs { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 18; background: #fff; display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; margin-bottom: 10px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 14px 2px 12px; font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #9b9b9b; border-bottom: 4px solid transparent; border-radius: 2px; }
.tab.on { color: var(--teal-d); border-bottom-color: var(--teal); }

/* нижнее меню */
#tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid #efefef;
  display: flex; justify-content: space-around; max-width: 560px; margin: 0 auto; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8d8d8d; }
.nav-item .ic { width: 28px; height: 28px; }
.nav-item span { font-size: 13px; font-weight: 700; display: none; }
.nav-item.on { color: var(--teal-d); }
.nav-item.on span { display: block; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 6px; background: var(--teal); color: #fff; font-weight: 700; font-size: 15px;
  letter-spacing: .03em; text-transform: uppercase; padding: 11px 18px; min-height: 42px; }
.btn:active { background: var(--teal-d); }
.btn:disabled { background: #b8e4ee; }
.btn.big { width: 100%; min-height: 50px; font-size: 17px; }
.btn.ghost { background: transparent; color: var(--teal-dd); box-shadow: inset 0 0 0 1.5px var(--teal); }
.btn.danger { background: var(--danger); }
.btn .ic { width: 22px; height: 22px; }
.bottom-action { position: fixed; z-index: 25; left: 0; right: 0; max-width: 560px; margin: 0 auto; bottom: calc(var(--nav-h) + var(--safe-b)); padding: 10px 16px; background: linear-gradient(rgba(255,255,255,0), #fff 30%); }
.no-nav .bottom-action { bottom: 0; padding-bottom: calc(12px + var(--safe-b)); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #e8f6fa; color: var(--teal-d); display: grid; place-items: center; }
.round-btn:disabled { opacity: .45; }
.round-btn .ic { width: 22px; height: 22px; }
.chip-btn { border: 0; background: #e8f6fa; color: var(--teal-dd); border-radius: 16px; padding: 6px 12px; font-size: 13px; font-weight: 700; flex: none; }
.more-btn { display: block; width: 100%; border: 0; background: #f6f6f6; color: var(--muted); padding: 12px; border-radius: 8px; margin-top: 8px; }

/* ── «Сегодня» ── */
.today-head { position: relative; padding: 18px 0 10px; }
.today-date { color: #808080; font-size: 17px; }
.today-title { margin: 4px 0 0; font-size: 30px; font-weight: 700; }
.today-avatars { position: absolute; right: 0; top: 14px; display: flex; }
.today-avatars a + a { margin-left: -14px; }
.today-avatars .avatar { border: 3px solid #fff; box-shadow: 0 0 0 1px #ececec; width: 62px; height: 62px; }
.hero { position: relative; display: block; height: min(118vw, 470px); border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #bfe7f0, #e6f5f9 60%, #f7e7ee);
  background-size: cover; background-position: center; box-shadow: 0 2px 8px rgba(0,0,0,.08); color: #fff; margin-top: 4px; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,0) 32%, rgba(0,0,0,0) 70%, rgba(0,0,0,.35)); }
.hero:not(.has-photo) .hero-shade { background: linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,0) 40%, rgba(0,0,0,0) 70%, rgba(0,0,0,.12)); }
.hero-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #4a9fb2; font-size: 15px; }
.hero-ph .ic { width: 44px; height: 44px; }
.empty-hero .hero-ph { color: var(--teal-dd); text-shadow: none; }
.hero-greet { position: absolute; left: 20px; top: 22px; right: 20px; font-size: 19px; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.hero-greet b { display: block; font-size: 30px; font-weight: 700; margin-top: 4px; line-height: 1.1; }
.hero-age { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; justify-content: space-between; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero-age div { display: flex; flex-direction: column; }
.hero-age div:last-child { align-items: flex-end; }
.hero-age b { font-size: 34px; font-weight: 700; line-height: 1; }
.hero-age span { font-size: 19px; font-weight: 500; }

.card { display: block; position: relative; background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.10); padding: 18px 16px 6px; margin: 20px 0 0; }
.card-kicker { font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: #7d7d7d; }
.card-title { margin: 2px 0 8px; font-size: 30px; font-weight: 700; }
.card-title.small { font-size: 21px; }
.card-expand { position: absolute; right: 14px; top: 16px; color: #8a8a8a; padding: 4px; }
.card-expand .ic { width: 26px; height: 26px; }
.act-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #e3e3e3; color: var(--text); }
.act-row:last-child { border-bottom: 0; }
.act-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; flex: none; }
.act-ic .ic { width: 26px; height: 26px; }
.act-ic.sm { width: 36px; height: 36px; }
.act-ic.sm .ic { width: 20px; height: 20px; }
.act-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.act-txt b { font-size: 17px; font-weight: 500; }
.act-txt small { font-size: 15px; color: #9a9a9a; margin-top: 2px; }
.act-row > .ic:last-child { color: #8a8a8a; }
.dev-card { padding-bottom: 14px; }
.dev-card p { margin: 0 0 8px; color: #555; }
.link-more { display: inline-flex; align-items: center; gap: 2px; color: var(--teal-dd); font-weight: 700; font-size: 14px; text-transform: uppercase; }
.link-more .ic { width: 18px; height: 18px; }

/* лента дня */
.day-nav { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 10px; }
.day-nav b { font-size: 18px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 14px; }
.chip { background: var(--panel); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.chip b { font-size: 17px; color: var(--teal-dd); }
.chip span { font-size: 12px; color: var(--muted); }
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tl-time { width: 46px; color: #777; font-variant-numeric: tabular-nums; font-size: 15px; }
.note-line { color: #666 !important; font-style: italic; white-space: pre-line; }

/* плитки */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 10px; }
.tile { background: #fff; border-radius: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.12); aspect-ratio: 1.25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.tile .tile-ic { width: 96px; height: 96px; }
.tile span { font-size: 18px; font-weight: 500; color: #6b6b6b; }
.tile:active { background: #f7fcfd; }

/* ── панели и таймеры ── */
.panel { background: var(--panel); border-radius: 8px; padding: 18px 16px; margin-bottom: 14px; }
.panel-title { color: var(--teal-d); font-size: 22px; font-weight: 500; text-align: center; line-height: 1.25; margin: 14px 0 18px; }
.panel-foot { text-align: center; color: #7f8f94; font-size: 14px; margin-top: 12px; }
.lr-row { display: flex; justify-content: center; gap: 44px; }
.lr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lr-btn { width: 104px; height: 104px; border-radius: 50%; border: 3.5px solid var(--teal); background: transparent; color: var(--teal-d); font-size: 46px; font-weight: 700; line-height: 1; transition: transform .1s; }
.lr-btn:active { transform: scale(.95); }
.lr-btn.on { background: var(--teal); color: #fff; box-shadow: 0 0 0 6px rgba(108,203,222,.25); animation: pulse 1.8s infinite; }
.lr-btn.used { border-color: #9fdbe8; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(108,203,222,.30); } 50% { box-shadow: 0 0 0 12px rgba(108,203,222,.10); } }
.lr-time { color: var(--teal-d); font-size: 23px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lr-hint { font-size: 12px; color: var(--teal-dd); background: #dff3f8; border-radius: 10px; padding: 2px 8px; }
.lr-total { text-align: center; color: #5c8f9b; font-size: 15px; margin-top: 14px; }
.lr-total b { font-variant-numeric: tabular-nums; }
.btn.manual { display: flex; width: 78%; margin: 26px auto 8px; }
.timer-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.big-timer { position: relative; width: 186px; height: 186px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #fff; }
.big-timer .baby-face { width: 92px; height: 92px; }
.bt-label { color: var(--teal-d); font-size: 22px; font-weight: 500; display: flex; flex-direction: column; align-items: center; }
.bt-label b { font-size: 22px; font-variant-numeric: tabular-nums; }
.big-timer.on { box-shadow: 0 0 0 6px rgba(108,203,222,.35); animation: pulse 2.2s infinite; }
.ov-toggle { width: 100%; border: 0; border-radius: 8px; background: var(--teal); color: #fff; font-size: 26px; font-weight: 700; padding: 28px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; }
.ov-toggle .ic { width: 22px; height: 22px; transition: transform .2s; }
.ov-toggle.open .ic { transform: rotate(180deg); }
.ov-toggle.open { padding: 14px 0 8px; font-size: 20px; }

/* обзор и графики */
.overview { margin-bottom: 8px; }
.ov-title { font-size: 22px; font-weight: 400; margin: 6px 0 12px; }
.ov-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.ov-range { font-size: 18px; font-weight: 700; }
.ov-sub { color: var(--muted); font-size: 16px; margin-top: 2px; }
.ov-nav { display: flex; gap: 14px; }
.chart { width: 100%; height: auto; display: block; font-family: inherit; }
.chart .grid { stroke: #ececec; stroke-width: 1; }
.chart .axis { stroke: #cfcfcf; }
.chart .axis-y { font-size: 11px; fill: #777; text-anchor: end; font-weight: 700; }
.chart .axis-x { font-size: 11px; fill: #777; text-anchor: middle; font-weight: 700; }
.chart .mx-cell { fill: var(--cell); }
.chart .mx-ev { fill: var(--teal-d); }
.chart .mx-ev.sleep { fill: #7f9fe0; }
.chart .mx-ev.cry { fill: #f0a1b9; }
.chart .mx-day, .chart .mx-date { font-size: 11px; fill: #707070; text-anchor: middle; font-weight: 700; }
.chart .mx-hour { font-size: 11px; fill: #707070; text-anchor: end; font-weight: 700; }
.legend { display: flex; gap: 18px; padding: 4px 0 6px 40px; font-size: 15px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.chart.growth .g-col { fill: #eeeef0; }
.chart.growth .b1 { fill: #fcecf1; }
.chart.growth .b2 { fill: #f8d9e3; }
.chart.growth .b3 { fill: #f3c3d2; }
.chart.growth .b4 { fill: #eeafc3; }
.chart.growth .median { fill: none; stroke: #e4869f; stroke-width: 1; }
.chart.growth .frame { fill: none; stroke: #cfcfcf; }
.chart.growth .pct { font-size: 9px; fill: #9a9a9a; }
.chart .baby-line { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; }
.chart .baby-pt { fill: #fff; stroke: var(--teal); stroke-width: 2; }
.chart .baby-pt.hot { stroke: var(--danger); }
.chart .mark-line { stroke: var(--danger); stroke-dasharray: 4 4; stroke-width: 1; }
.chart-note { font-size: 12px; color: var(--muted); margin: 4px 0 0; text-align: center; }
.chart-loading { padding: 40px 0; text-align: center; color: var(--muted); }

/* история */
.history { margin-top: 18px; }
.hist-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 12px; }
.hist-title { font-size: 15px; font-weight: 700; text-transform: uppercase; color: #7a7a7a; letter-spacing: .02em; }
.filter-btn { border: 0; background: var(--panel); color: var(--teal-d); font-weight: 700; font-size: 15px; text-transform: uppercase; padding: 10px 14px; border-radius: 6px; display: flex; align-items: center; gap: 8px; }
.filter-btn .caret { width: 20px; height: 20px; }
.hist-head, .hist-row { display: grid; grid-template-columns: 1.6fr 1fr 0.7fr 1fr; gap: 6px; align-items: center; }
.history:not(:has(.c3)) .hist-head, .history:not(:has(.c3)) .hist-row { grid-template-columns: 2fr 1fr 1fr; }
.history.sum4 .hist-head, .history.sum4 .hist-row { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.history.sum5 .hist-head, .history.sum5 .hist-row { grid-template-columns: 1.1fr .6fr 1fr 1fr 1fr; }
.hist-head { font-weight: 700; font-size: 15px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.hist-row { padding: 13px 16px; margin: 0 -16px; border-bottom: 1px solid var(--line); color: #7b7b7b; font-size: 16px; min-height: 50px; }
a.hist-row:active { background: #f5fbfc; }
.hist-head span:not(.c0), .hist-row span:not(.c0) { text-align: center; }
.hist-row .c0 small { display: block; font-size: 13px; color: #a3a3a3; }
.hist-row span small { display: block; font-size: 12px; color: #a3a3a3; }
.hist-row .ic { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; color: #9a9a9a; }
.hist-empty { color: var(--muted); text-align: center; padding: 26px 0; }
.hot { color: var(--danger); }

/* пустые экраны */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18vh 24px 30px; color: #7a7a7a; }
.empty .empty-ic { width: 150px; height: 150px; }
.empty p { font-size: 17px; margin: 6px 0 0; max-width: 320px; }
.empty-text { color: var(--muted); text-align: center; padding: 40px 10px; }

/* ── формы ── */
.form { padding-top: 6px; }
.form-h { font-size: 22px; font-weight: 400; margin: 12px 4px 12px; }
.field { display: block; background: var(--field); border-radius: 5px 5px 0 0; border-bottom: 2px solid #d9d9d9; padding: 10px 14px 8px; margin-bottom: 18px; position: relative; }
.field:focus-within { border-bottom-color: var(--teal); }
.field-label { display: block; font-size: 15px; color: #8a8a8a; margin-bottom: 2px; }
.field input, .field select, .field textarea { width: 100%; border: 0; background: transparent; outline: none; font-size: 20px; padding: 2px 0; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 30px; }
.field.select .caret { position: absolute; right: 12px; bottom: 12px; width: 24px; height: 24px; pointer-events: none; }
.field.area textarea { min-height: 110px; resize: vertical; font-size: 18px; }
.field.area.big textarea { min-height: 220px; }
.field.plain { background: none; border: 0; padding: 0 2px; }
.field.ro output { font-size: 20px; }
.dt-row { display: flex; gap: 14px; align-items: center; }
.dt-row input { width: auto; flex: 0 1 auto; min-width: 0; font-size: 21px; }
.dt-row input[type=date] { flex: 1 1 60%; }
.dur-row, .num-row { display: flex; align-items: baseline; gap: 6px; }
.dur-row input { width: 64px; text-align: center; }
.dur-row b, .num-row b { color: #8a8a8a; font-weight: 400; margin-right: 14px; }
.num-row input { width: 140px; }
.hint { font-size: 13px; color: #8a8a8a; margin: 6px 2px 10px; }
.hint.pad { padding: 0 2px; }
.seg { display: flex; background: #f0f0f0; border-radius: 22px; padding: 3px; gap: 2px; margin: 4px 0; }
.seg-opt, .seg > button { flex: 1; position: relative; text-align: center; border: 0; background: none; padding: 8px 6px; border-radius: 20px; font-size: 15px; color: #6b6b6b; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: block; }
.seg-opt:has(input:checked), .seg > button.on { background: #fff; color: var(--teal-dd); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.toggle-row { display: flex; align-items: center; gap: 14px; padding: 12px 2px; margin-bottom: 10px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-icon { color: var(--teal); }
.toggle-label { flex: 1; font-size: 18px; }
.switch, .switch-ui { width: 52px; height: 30px; border-radius: 16px; background: #e3e3e3; position: relative; flex: none; transition: background .2s; }
.switch::after, .switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .2s; }
.toggle-row input:checked + .switch, .switch-ui.on { background: #d2eef5; }
.toggle-row input:checked + .switch::after, .switch-ui.on::after { left: 25px; background: var(--teal); }
.remind-box { margin: -4px 0 10px; }

/* линейка */
.ruler-panel { padding: 22px 0 12px; }
.ruler-value { text-align: center; color: var(--teal-d); }
.ruler-num { border: 0; background: none; color: var(--teal-d); font-size: 64px; font-weight: 700; padding: 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ruler-value small { font-size: 26px; font-weight: 700; margin-left: 4px; }
.ruler-ctl { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.ruler-step { flex: none; width: 38px; height: 56px; border: 0; background: none; font-size: 30px; color: var(--teal-d); }
.ruler { position: relative; flex: 1; min-width: 0; }
.ruler-arrow { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 14px solid var(--teal); z-index: 2; }
.ruler-scroll { overflow-x: auto; scrollbar-width: none; background: #d2eef5; height: 76px; padding: 0 50%; }
.ruler-scroll::-webkit-scrollbar { display: none; }
.ruler-strip { position: relative; height: 100%;
  background:
    repeating-linear-gradient(to right, #fff 0 2px, transparent 2px var(--major)) 0 0 / 100% 40px no-repeat,
    repeating-linear-gradient(to right, rgba(255,255,255,.85) 0 1.5px, transparent 1.5px var(--mid)) 0 0 / 100% 28px no-repeat,
    repeating-linear-gradient(to right, rgba(255,255,255,.7) 0 1px, transparent 1px var(--minor)) 0 0 / 100% 18px no-repeat; }
.ruler-strip span { position: absolute; top: 44px; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: 18px; white-space: nowrap; }

/* вертикальные ползунки: бутылочка и градусник */
.bottle-panel, .thermo-panel { padding: 16px 10px 10px; }
.vslider { display: flex; flex-direction: column; align-items: center; }
.vs-area { position: relative; width: 210px; height: 330px; touch-action: none; cursor: ns-resize; }
.vslider.small .vs-area { width: 120px; height: 230px; }
.vs-shape { position: absolute; inset: 0 10px 0 10px; width: calc(100% - 20px); height: 100%; }
.vs-track { position: absolute; left: 50%; top: 18px; bottom: 30px; width: 2px; }
.vs-fill { position: absolute; left: -95px; right: -95px; bottom: 0; background: rgba(255,255,255,.65); border-radius: 0 0 60px 60px; pointer-events: none; }
.vslider.small .vs-fill { left: -50px; right: -50px; border-radius: 0 0 36px 36px; }
.vs-tick { position: absolute; left: -16px; transform: translateY(50%); display: flex; align-items: center; gap: 10px; pointer-events: none; }
.vs-tick i { width: 22px; height: 5px; border-radius: 3px; background: var(--teal); display: block; }
.vs-tick.minor i { width: 14px; margin-left: 4px; }
.vs-tick span { color: var(--teal-d); font-weight: 700; font-size: 17px; }
.vslider.small .vs-tick span { font-size: 13px; }
.vs-knob { position: absolute; left: -58px; width: 40px; height: 20px; border-radius: 10px; background: var(--teal); transform: translateY(50%); pointer-events: none; }
.vs-knob::after { content: ''; position: absolute; right: -7px; top: 3px; border-left: 9px solid var(--teal); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.vs-value { color: var(--teal-d); margin-top: 6px; }
.vs-num { border: 0; background: none; color: var(--teal-d); font-size: 58px; font-weight: 700; padding: 0; font-variant-numeric: tabular-nums; }
.vslider.small .vs-num { font-size: 34px; }
.vs-value small { font-size: 24px; font-weight: 700; margin-left: 2px; }
.vslider.thermo .vs-area { width: 180px; height: 340px; }
.vslider.thermo .vs-area::before { content: ''; position: absolute; left: calc(50% - 75px); width: 150px; top: 0; bottom: 18px; background: #f6fbfc; border-radius: 4px; }
.vslider.thermo .vs-fill { left: -75px; right: -75px; border-radius: 0; background: rgba(210,238,245,.9); }
.vslider.thermo .vs-tick i { height: 4px; }
.pump-pair { display: flex; justify-content: space-around; }
.pump-label { text-align: center; color: var(--teal-dd); font-weight: 700; margin-bottom: 4px; }
.pump-total { text-align: center; color: #5c8f9b; margin-top: 4px; }

/* подгузник */
.diaper-panel { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "mixed mixed" "wet soiled"; padding: 16px 0 10px; }
.dp-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.dp-mixed { grid-area: mixed; }
.dp-wet { grid-area: wet; margin-top: -26px; justify-self: start; margin-left: 6%; }
.dp-soiled { grid-area: soiled; margin-top: -26px; justify-self: end; margin-right: 6%; }
.dp-pick input { position: absolute; opacity: 0; pointer-events: none; }
.dp-circle { width: 108px; height: 108px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #c9c9c9; transition: all .15s; }
.dp-circle .diaper-type { width: 84px; height: 84px; }
.dp-name { font-size: 19px; font-weight: 500; color: #b9b9b9; }
.dp-pick:has(input:checked) .dp-circle { background: var(--teal); color: #fff; box-shadow: 0 0 0 5px rgba(108,203,222,.25); }
.dp-pick:has(input:checked) .dp-name { color: var(--teal-dd); }

/* фото-поле */
.photo-field { position: relative; background: var(--field); border-radius: 4px; height: 170px; margin-bottom: 18px; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.photo-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #7a7a7a; font-size: 16px; }
.photo-empty .ic { width: 56px; height: 56px; color: #6d6d6d; }
.photo-field.has .photo-empty { display: none; }
.photo-preview { position: absolute; inset: 0; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-del { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.baby-photo-row .photo-field { width: 150px; height: 150px; border-radius: 50%; margin: 6px auto 18px; }

/* рост */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.stat { background: var(--field); border-radius: 3px; padding: 10px 10px 8px; display: flex; flex-direction: column; }
.stat span { font-size: 15px; color: #7d7d7d; border-bottom: 2px solid #c9c9c9; padding-bottom: 6px; margin-bottom: 6px; }
.stat b { font-size: 22px; font-weight: 700; white-space: nowrap; }
.stat b i { font-style: normal; font-size: 15px; font-weight: 400; margin-left: 2px; }
.stat small { font-size: 14px; color: #8a8a8a; }
.pct-line { font-size: 17px; font-weight: 700; color: #6f6f6f; margin: 6px 0 8px; }
.pct-line b { color: var(--text); }
.since-card { background: var(--field); text-align: center; padding: 36px 10px; font-size: 24px; margin: 4px 0 6px; }
.since-card b { font-weight: 400; }
.mom-start { text-align: center; padding: 14px 0 4px; }
.mom-start h2 { font-size: 28px; font-weight: 500; margin: 0; }
.mom-start p { color: #808080; margin: 6px 0 16px; font-size: 17px; }
.date-chip { display: block; position: relative; width: fit-content; margin: 18px auto 6px; background: #fff; border-radius: 8px; padding: 12px 22px; color: var(--teal-d); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.date-chip input { position: absolute; inset: 0; opacity: 0; width: 100%; }

/* карточки записей */
.cards { display: flex; flex-direction: column; gap: 10px; }
.rec-card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.09); padding: 10px 12px; }
.rec-main { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.rec-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.rec-thumb.ph { background: var(--teal); color: #fff; display: grid; place-items: center; }
.rec-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rec-txt b { font-weight: 500; font-size: 17px; }
.rec-txt small { color: #8a8a8a; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.rec-txt small .ic { width: 16px; height: 16px; }
.rec-txt small.remind { color: var(--teal-dd); }
.rec-txt small.muted { color: #b0b0b0; }
.vac-cal { margin-top: 18px; background: var(--panel); border-radius: 10px; padding: 12px 14px; }
.vac-cal summary { font-weight: 700; color: var(--teal-dd); cursor: pointer; }
.vac-age { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; border-bottom: 1px solid #dceef3; align-items: baseline; }
.vac-age b { width: 100%; font-size: 14px; color: #557; }
.vac-age span { background: #fff; border-radius: 12px; padding: 3px 10px; font-size: 13px; color: #555; }
.vac-age span.done { background: var(--teal); color: #fff; }
.food-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.food-chip { background: var(--panel); border-radius: 14px; padding: 5px 10px; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.food-chip small { color: var(--teal-dd); font-weight: 700; }
.food-chip.warn { background: #fff1e6; }

/* память */
.diary-card { display: block; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.09); padding: 12px 14px; }
.diary-date { font-weight: 700; display: flex; flex-direction: column; }
.diary-date small { color: #999; font-weight: 400; font-size: 13px; }
.diary-card p { margin: 8px 0 2px; white-space: normal; }
.diary-photo { width: 100%; max-height: 300px; object-fit: cover; border-radius: 8px; margin-top: 8px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.g-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eee; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; color: #fff; font-weight: 700; font-size: 14px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.55)); }
.g-item small { display: block; font-weight: 400; font-size: 12px; opacity: .9; }
.viewer-img { width: 100%; border-radius: 10px; display: block; }
.viewer-meta { padding: 12px 2px; display: flex; flex-direction: column; gap: 4px; }
.viewer-meta span { color: #888; }
.mile-progress { background: var(--panel); border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px; color: #557; }
.mile-progress b { font-size: 22px; color: var(--teal-dd); }
.mile-progress .bar { height: 8px; background: #fff; border-radius: 4px; overflow: hidden; margin-top: 8px; position: static; padding: 0; }
.mile-progress .bar i { display: block; height: 100%; background: var(--teal); }
.mile-group h3 { font-size: 18px; margin: 18px 0 6px; display: flex; align-items: center; gap: 8px; }
.now-tag { font-size: 12px; background: var(--teal); color: #fff; border-radius: 10px; padding: 2px 8px; font-weight: 700; }
.mile-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mile-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #cfe9ef; flex: none; display: grid; place-items: center; color: #fff; }
.mile-row.done .mile-check { background: var(--teal); border-color: var(--teal); }
.mile-check .ic { width: 18px; height: 18px; }
.mile-txt { display: flex; flex-direction: column; }
.mile-txt b { font-weight: 500; }
.mile-txt small { color: #999; font-size: 13px; }
.mile-head { text-align: center; padding: 6px 10px 14px; }
.mile-head .tile-ic { width: 110px; height: 110px; }
.mile-head h2 { margin: 4px 0; font-size: 22px; }
.mile-head p { color: #888; margin: 0; }
.month-strip { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 4px 16px 10px; margin: 0 -16px 6px; }
.month-strip::-webkit-scrollbar { display: none; }
.m-item { flex: none; display: flex; flex-direction: column; align-items: center; font-size: 22px; color: #222; padding: 2px 4px 6px; border-bottom: 3px solid transparent; }
.m-item small { font-size: 11px; text-transform: uppercase; font-weight: 700; color: var(--teal-d); }
.m-item.on { color: var(--teal-d); border-bottom-color: var(--teal); }
.month-strip.wide { gap: 10px; }
.month-strip.wide .m-item { font-size: 15px; background: #f3f3f3; border-radius: 16px; padding: 6px 12px; border: 0; white-space: nowrap; }
.month-strip.wide .m-item.on { background: var(--teal); color: #fff; }
.month-strip.wide .m-item.on small { color: #fff; }
.teeth-panel { padding: 16px 14px 14px; }
.teeth-msg { color: var(--teal-d); font-size: 22px; font-weight: 700; text-align: center; margin: 4px 0 14px; line-height: 1.25; }
.mouth { width: 100%; max-width: 380px; display: block; margin: 0 auto 14px; }
.mouth .gum { fill: #f9e0e8; }
.mouth .throat { fill: #cf7c95; }
.mouth .tongue { fill: #ec95ad; }
.mouth .tooth rect { fill: #f6d0dc; stroke: #f4c5d3; stroke-width: 1; cursor: pointer; }
.mouth .tooth.soon rect { fill: #fff; stroke: #e7b6c5; stroke-dasharray: 4 3; stroke-width: 1.5; }
.mouth .tooth.have rect { fill: #fff; stroke: var(--teal); stroke-width: 2.5; }
.seg.two { background: #fff; border-radius: 4px; padding: 0; }
.seg.two > button { border-radius: 3px; text-transform: uppercase; font-weight: 700; color: var(--teal-d); padding: 12px 6px; }
.seg.two > button.on { background: var(--teal); color: #fff; box-shadow: none; }

/* ещё */
.guide-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.09); padding: 14px; }
.guide-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.guide-card b { font-weight: 500; font-size: 17px; }
.guide-card small { color: #8a8a8a; font-size: 14px; margin-top: 2px; }
.guide-card > .ic { color: #9a9a9a; }
.guide-emoji { font-size: 30px; width: 44px; text-align: center; }
.article { font-size: 17px; line-height: 1.55; padding-bottom: 20px; }
.article h2 { font-size: 26px; line-height: 1.2; margin: 6px 0 12px; }
.article h3 { font-size: 19px; margin: 20px 0 6px; }
.article p { margin: 8px 0; }
.article ul { padding-left: 22px; margin: 8px 0; }
.article li { margin: 4px 0; }
.article .lead { font-size: 18px; color: #444; }
.article .warn-box { background: #fff4ec; border-left: 4px solid var(--warn); padding: 10px 12px; border-radius: 6px; margin: 12px 0; }
.disclaimer { font-size: 13px; color: #999; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 18px !important; }
.dev-nav { display: flex; justify-content: space-between; gap: 10px; }
.dev-nav .btn { text-transform: none; font-size: 14px; }
.sec-title { font-size: 20px; margin: 16px 0 8px; font-weight: 700; }
.sec-lead { color: #666; margin: 0 0 12px; }
.act-card { background: var(--panel); border-radius: 12px; padding: 12px 14px; }
.act-card b { font-size: 17px; }
.act-card p { margin: 6px 0 0; color: #445; }
.appt-card { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.09); padding: 12px 14px; }
.appt-card.past { opacity: .6; }
.appt-date { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; color: var(--teal-dd); font-size: 13px; text-transform: uppercase; font-weight: 700; }
.appt-date b { font-size: 26px; line-height: 1; }
.q-box { background: var(--field); border-radius: 5px 5px 0 0; border-bottom: 2px solid #d9d9d9; padding: 10px 14px; margin-bottom: 18px; }
.q-in { display: block; width: 100%; border: 0; border-bottom: 1px dashed #d0d0d0; background: transparent; font-size: 17px; padding: 8px 0; outline: none; }
.sound-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding-top: 6px; }
.sound { position: relative; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.1); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 104px; font-size: 15px; color: #555; }
.sound-emoji { font-size: 34px; }
.sound.on { background: var(--teal); color: #fff; }
.sound.busy { opacity: .6; }
.sound i { position: absolute; right: 8px; top: 8px; }
.sound i .ic { width: 20px; height: 20px; }
.sound-panel { margin-top: 16px; }
.sound-panel .seg { margin: 6px 0 14px; }
.vol { width: 100%; accent-color: var(--teal); }

/* профиль */
.baby-card { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.09); padding: 10px; }
.baby-card.on { box-shadow: 0 0 0 2px var(--teal); }
.baby-pick { flex: 1; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; }
.baby-pick span { display: flex; flex-direction: column; }
.baby-pick b { font-size: 18px; font-weight: 500; }
.baby-pick small { color: #8a8a8a; }
.add-card { display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #cde9f0; border-radius: 12px; padding: 14px; color: var(--teal-dd); font-weight: 700; }
.me-card { display: flex; align-items: center; gap: 14px; padding: 4px 2px 10px; }
.me-card b { font-size: 20px; font-weight: 500; }
.me-card small { display: block; color: #8a8a8a; }
.me-photo { position: relative; border: 0; background: none; padding: 0; }
.me-cam { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; }
.me-cam .ic { width: 16px; height: 16px; }
.menu { display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 16px; border: 0; background: none; text-align: left; padding: 15px 14px; border-bottom: 1px solid var(--line); width: 100%; font-size: 17px; }
.menu-row:last-child { border-bottom: 0; }
.menu-row > .ic { color: var(--teal); width: 26px; height: 26px; }
.menu-row > span:not(.switch-ui):not(.avatar) { flex: 1; display: flex; flex-direction: column; }
.menu-row span small { color: #999; font-size: 13px; }
.menu-row > small { color: #8a8a8a; font-size: 15px; text-align: right; }
.menu-row.danger, .menu-row.danger > .ic { color: var(--danger); }
.menu-row.static { cursor: default; }
.menu-row .avatar { width: 34px; height: 34px; }
.app-foot { text-align: center; color: #aaa; font-size: 12px; margin-top: 26px; }
.creds { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; background: var(--panel); border-radius: 10px; padding: 12px 14px; }
.creds span { color: #888; }
.creds b { word-break: break-all; }

/* ── листы и диалоги ── */
#overlay { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.layer { position: fixed; inset: 0; pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .18s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: #fff; border-radius: 18px 18px 0 0; padding: 16px 18px calc(16px + var(--safe-b));
  transform: translateY(100%); transition: transform .2s ease-out; max-height: 88vh; overflow-y: auto; }
.layer.open .backdrop { opacity: 1; }
.layer.open .sheet { transform: none; }
.layer.closing .backdrop { opacity: 0; }
.layer.closing .sheet { transform: translateY(100%); }
.sheet.dialog { left: 16px; right: 16px; bottom: auto; top: 50%; border-radius: 16px; transform: translateY(-40%) scale(.96); opacity: 0; transition: all .18s; padding-bottom: 16px; }
.layer.open .sheet.dialog { transform: translateY(-50%); opacity: 1; }
.layer.closing .sheet.dialog { opacity: 0; }
.sheet-title { font-size: 20px; font-weight: 700; margin: 2px 0 12px; }
.sheet-text { margin: 4px 0 8px; font-size: 17px; line-height: 1.4; }
.sheet-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.sheet-buttons .btn { flex: 1; }
.choose-list { display: flex; flex-direction: column; }
.choose-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: none; text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
.choose-item:last-child { border-bottom: 0; }
.choose-item span { display: flex; flex-direction: column; }
.choose-item small { color: #999; font-size: 13px; }
.choose-item.on { color: var(--teal-dd); font-weight: 700; }
.prompt { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--teal); }
.prompt-input { flex: 1; border: 0; outline: none; font-size: 28px; padding: 6px 0; min-width: 0; }
.prompt span { color: #888; font-size: 18px; }
#toast { position: fixed; z-index: 200; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 76px); transform: translate(-50%, 20px); background: #323232; color: #fff; border-radius: 10px;
  padding: 12px 16px; font-size: 15px; display: flex; gap: 16px; align-items: center; max-width: calc(100% - 32px); width: max-content; opacity: 0; pointer-events: none; transition: all .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { border: 0; background: none; color: #8fe0f0; font-weight: 700; text-transform: uppercase; font-size: 14px; padding: 0; }

/* вход и загрузка */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(180deg, #eef7fa, #fff 60%); }
.login-box { width: 100%; max-width: 380px; text-align: center; }
.login-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 4px 14px rgba(108,203,222,.35); }
.login-box h1 { font-size: 32px; margin: 14px 0 2px; }
.login-sub { color: #7a8b90; margin: 0 0 26px; }
.login-box .field { text-align: left; }
.login-err { color: var(--danger); margin: -6px 0 12px; }
.login-help { color: #999; font-size: 13px; margin-top: 18px; }
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #8aa; background: #fff; z-index: 300; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid #d3eef4; border-top-color: var(--teal); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stuck { text-align: center; padding: 24px; max-width: 360px; color: #333; }
.stuck p { color: #666; }
.stuck-actions { display: flex; gap: 10px; justify-content: center; }
.stuck-actions button { border: 0; background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 700; }
.stuck-actions .ghost { background: #eee; color: #444; }

@media (min-width: 600px) {
  body { background: #f4f8f9; }
  #app { background: #fff; box-shadow: 0 0 24px rgba(0,0,0,.06); }
}

/* резервные копии (профиль администратора) */
.bk-state.bad { color: var(--danger) !important; }
.bk-row { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bk-row b { font-weight: 500; }
.bk-row span { color: #888; font-size: 14px; }
.bk-row.bad b { color: var(--danger); }
.bk-err { color: var(--danger); font-size: 13px; margin: 4px 0 0; }
