/* ============================================================
   Кроха — «нежная пастель»
   Шрифт Nunito (округлый), сливочный фон, у каждого дела свой мягкий цвет:
   кормление — персик, сон — лаванда, подгузник — ваниль, прикорм — шалфей, прогулка — небо.
   ============================================================ */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('/fonts/nunito-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('/fonts/nunito-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Палитра ===== */
:root {
  --bg: #FBF6F1;
  --bg2: #F4EBE5;
  --card: #FFFFFF;
  --ink: #45384A;
  --muted: #8E8193;
  --line: #EFE4DD;
  --primary: #B65F74;
  --primary-ink: #FFFFFF;
  --primary-soft: #F8E1E4;
  --feed: #C46A49;    --feed-soft: #FCE7DB;
  --sleep: #7461C2;   --sleep-soft: #ECE7FA;
  --diaper: #A87C1E;  --diaper-soft: #FBF0D3;
  --solid: #578A66;   --solid-soft: #E3F0E3;
  --sky: #4683B0;     --sky-soft: #DFEEF8;
  --danger: #BE4249;  --danger-soft: #FBE3E2;
  --ok: #4A8660;      --ok-soft: #E1F1E5;
  --warn: #A9741A;    --warn-soft: #FBEFD6;
  --shadow: 0 1px 2px rgba(110, 70, 80, .05), 0 12px 32px -10px rgba(110, 70, 80, .16);
  --shadow-lg: 0 2px 6px rgba(110, 70, 80, .06), 0 24px 48px -16px rgba(110, 70, 80, .28);
  --r-hero: 32px;
  --r-tile: 26px;
  --r: 22px;
  --r-sm: 16px;
  --tab-h: 68px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1B171E; --bg2: #262029; --card: #241F27; --ink: #F2E9EE; --muted: #A99BAA; --line: #352D37;
  --primary: #E59AAB; --primary-ink: #2A1A20; --primary-soft: #3D2A31;
  --feed: #F0A584;  --feed-soft: #3A2821;
  --sleep: #B4A6F0; --sleep-soft: #2C2640;
  --diaper: #E6C46F; --diaper-soft: #352D18;
  --solid: #9CCAA6; --solid-soft: #22302A;
  --sky: #8FC2E8;   --sky-soft: #1F2D3A;
  --danger: #F08A8F; --danger-soft: #3D2224;
  --ok: #8CCB9F;    --ok-soft: #1E3226;
  --warn: #E9BE6E;  --warn-soft: #3A2F18;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #1B171E; --bg2: #262029; --card: #241F27; --ink: #F2E9EE; --muted: #A99BAA; --line: #352D37;
    --primary: #E59AAB; --primary-ink: #2A1A20; --primary-soft: #3D2A31;
    --feed: #F0A584;  --feed-soft: #3A2821;
    --sleep: #B4A6F0; --sleep-soft: #2C2640;
    --diaper: #E6C46F; --diaper-soft: #352D18;
    --solid: #9CCAA6; --solid-soft: #22302A;
    --sky: #8FC2E8;   --sky-soft: #1F2D3A;
    --danger: #F08A8F; --danger-soft: #3D2224;
    --ok: #8CCB9F;    --ok-soft: #1E3226;
    --warn: #E9BE6E;  --warn-soft: #3A2F18;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.5);
    --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
/* Ночь: очень тусклая и тёплая, чтобы не слепить в 3 часа ночи */
:root[data-theme="night"] {
  --bg: #0C090A; --bg2: #161112; --card: #141011; --ink: #C99B7A; --muted: #87664F; --line: #261C1A;
  --primary: #B97A52; --primary-ink: #140C08; --primary-soft: #2A1B13;
  --feed: #C67A55;  --feed-soft: #24150F;
  --sleep: #9E8299; --sleep-soft: #1D1519;
  --diaper: #B59252; --diaper-soft: #221A0E;
  --solid: #8E9A62; --solid-soft: #181C10;
  --sky: #82919F;   --sky-soft: #12171B;
  --danger: #CF6A5D; --danger-soft: #2A1411;
  --ok: #85A078;    --ok-soft: #141C10;
  --warn: #C79A50;  --warn-soft: #251C0D;
  --shadow: none; --shadow-lg: none;
  color-scheme: dark;
}
:root[data-theme="night"] .art { filter: saturate(.5) brightness(.45); }
:root[data-theme="dark"] .art { filter: saturate(.9) brightness(.92); }

/* ===== Основа ===== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Nunito', ui-rounded, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.45; font-weight: 600;
  min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none;
  font-feature-settings: 'tnum' 0;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 850; letter-spacing: -.015em; }
p { margin: 0 0 .6em; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 12px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { justify-content: center; text-align: center; }
.grow { flex: 1; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.col.gap { gap: 14px; }
.hidden { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
.art { display: inline-block; line-height: 0; flex: none; }
.art svg { display: block; }

/* ===== Каркас ===== */
.app { max-width: 600px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) 18px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px);
}
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 900; font-size: 1.15rem;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--blush-ring, color-mix(in srgb, var(--primary) 35%, transparent));
}
.topbar .who { flex: 1; min-width: 0; }
.topbar .hello { display: block; font-size: .82rem; color: var(--muted); font-weight: 700; }
.topbar .who b { display: block; font-size: 1.12rem; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.sync-dot.off { background: var(--warn); }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: var(--muted); flex: none; background: var(--card); box-shadow: var(--shadow); }
.icon-btn:active { transform: scale(.95); }
.sheet-head .icon-btn { box-shadow: none; background: var(--bg2); }
.view { flex: 1; padding: 6px 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 40px); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 30;
  display: flex; justify-content: center; padding: 0 14px; pointer-events: none;
}
.tabbar-inner {
  pointer-events: auto; display: flex; align-items: center; width: 100%; max-width: 540px; height: var(--tab-h);
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(16px);
  border-radius: 26px; box-shadow: var(--shadow-lg); padding: 0 6px;
}
.tab {
  flex: 1; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: .7rem; font-weight: 750; color: var(--muted); text-decoration: none; border-radius: 18px;
}
.tab svg { transition: transform .2s; }
.tab[aria-current="page"] { color: var(--primary); }
.tab[aria-current="page"] svg { transform: translateY(-1px); }
.tab-add {
  flex: none; width: 56px; height: 56px; margin: 0 4px; border-radius: 20px; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--primary) 70%, transparent);
}
.tab-add:active { transform: scale(.94); }
.page-title { font-size: 1.75rem; margin: 6px 0 16px; font-weight: 900; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin: 2px 0 4px -6px; padding: 6px 10px 6px 4px; border-radius: 12px; text-decoration: none; font-weight: 750; }

/* ===== Карточки и секции ===== */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 12px; }
.section { margin-top: 26px; }
.section-title { font-size: 1.12rem; font-weight: 850; margin: 0 4px 12px; display: flex; align-items: center; justify-content: space-between; }
.section-title a, .section-title button { font-size: .9rem; font-weight: 750; color: var(--primary); text-decoration: none; }

/* Главная карточка «что дальше» */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-hero); padding: 20px 20px 18px; min-height: 172px;
  background: var(--hero-bg, var(--feed-soft)); color: var(--ink); text-align: left; width: 100%; display: block;
}
.hero .hero-kicker { font-size: .9rem; font-weight: 800; color: var(--hero-accent, var(--feed)); }
.hero .hero-main { font-size: 2.1rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 4px; max-width: 64%; }
.hero .hero-sub { font-size: .95rem; color: var(--muted); max-width: 62%; }
.hero .art { position: absolute; right: -6px; bottom: -8px; }
.hero .ring { position: absolute; right: 18px; top: 18px; }
.hero-actions { display: flex; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.hero.h-feed { --hero-bg: var(--feed-soft); --hero-accent: var(--feed); }
.hero.h-sleep { --hero-bg: var(--sleep-soft); --hero-accent: var(--sleep); }
.hero.h-calm { --hero-bg: var(--primary-soft); --hero-accent: var(--primary); }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; overflow: hidden; background: var(--card); border-radius: var(--r-tile); box-shadow: var(--shadow);
  padding: 16px 16px 14px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 164px;
}
.tile.wide { grid-column: 1 / -1; min-height: 0; }
.tile-head { display: flex; align-items: center; gap: 8px; font-weight: 850; font-size: 1rem; position: relative; z-index: 1; }
.tile-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tile .big { font-size: 1.55rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; position: relative; z-index: 1; }
.tile .sub { color: var(--muted); font-size: .86rem; position: relative; z-index: 1; }
.tile .next { font-size: .86rem; font-weight: 800; position: relative; z-index: 1; }
.tile .spacer { flex: 1; }
.tile .why { font-size: .76rem; color: var(--muted); font-weight: 700; position: relative; z-index: 1; }
.why-link { display: inline-flex; align-items: center; gap: 6px; margin: 8px 4px 0; padding: 6px 4px; color: var(--muted); font-weight: 750; font-size: .86rem; background: none; border: 0; cursor: pointer; }
.why-block { display: grid; gap: 6px; margin-bottom: 16px; }
.why-block p { margin: 0; }
.tile > .art { position: absolute; right: 8px; top: 8px; width: 58px !important; }
.tile.wide > .art { top: auto; bottom: -6px; right: 6px; width: 84px !important; }
.tile .tile-head { padding-right: 50px; }
.tile:has(> .art) .tile-ico { display: none; }
.tile > .art { width: 46px !important; }
.tile.t-feed { background: var(--feed-soft); } .tile.t-sleep { background: var(--sleep-soft); }
.tile.t-diaper { background: var(--diaper-soft); } .tile.t-solid { background: var(--solid-soft); }
.tile.t-sky { background: var(--sky-soft); }
.t-feed .tile-ico { background: var(--card); color: var(--feed); }
.t-sleep .tile-ico { background: var(--card); color: var(--sleep); }
.t-diaper .tile-ico { background: var(--card); color: var(--diaper); }
.t-solid .tile-ico { background: var(--card); color: var(--solid); }
.t-sky .tile-ico { background: var(--card); color: var(--sky); }
.t-primary .tile-ico { background: var(--primary-soft); color: var(--primary); }
.t-feed .next { color: var(--feed); } .t-sleep .next { color: var(--sleep); } .t-diaper .next { color: var(--diaper); }
.t-sky .next { color: var(--sky); } .t-solid .next { color: var(--solid); }
.tile.active::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2.5px currentColor; color: var(--sleep); pointer-events: none; }
.tile.active.t-feed::after { color: var(--feed); }

/* ===== Кнопки и поля ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border-radius: 18px; font-weight: 850; background: var(--bg2); color: var(--ink); text-decoration: none; text-align: center; font-size: 1rem;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn.feed { background: var(--feed); color: #fff; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--feed) 70%, transparent); }
.btn.sleep { background: var(--sleep); color: #fff; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--sleep) 70%, transparent); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.soft { background: var(--primary-soft); color: var(--primary); }
.btn.white { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px; font-size: .92rem;
  background: var(--bg2); color: var(--ink); font-weight: 750; min-height: 38px; white-space: nowrap;
}
.chip.on { background: var(--primary); color: var(--primary-ink); }
.input, .textarea, .select {
  width: 100%; min-height: 52px; border-radius: 16px; border: 2px solid var(--line); background: var(--card);
  padding: 12px 16px; outline: none; font-weight: 650;
}
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.textarea { min-height: 92px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); }
.field { margin: 16px 0; }
.label { display: block; font-size: .88rem; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 8px; font-weight: 600; }
.seg { display: flex; background: var(--bg2); border-radius: 18px; padding: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; white-space: nowrap; min-height: 42px; border-radius: 14px; font-weight: 800; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; }
.seg.seg-icons { display: grid; grid-template-columns: repeat(4, 1fr); }
.seg.seg-icons button { flex-direction: column; gap: 2px; min-height: 58px; font-size: .8rem; padding: 6px 2px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(110, 70, 80, .12); }
.stepper { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.stepper-main { display: flex; align-items: center; gap: 16px; }
.round-btn { width: 54px; height: 54px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 1.7rem; font-weight: 700; line-height: 1; display: grid; place-items: center; color: var(--primary); }
.stepper-value { display: flex; align-items: baseline; gap: 6px; }
.stepper-input { width: 132px; text-align: center; font-size: 2.6rem; font-weight: 900; border: 0; background: none; outline: none; -moz-appearance: textfield; letter-spacing: -.02em; }
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.unit { color: var(--muted); font-weight: 800; }

/* ===== Шторки и уведомления ===== */
.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(50, 30, 40, .38); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet {
  width: 100%; max-width: 600px; max-height: 92dvh; overflow: auto; background: var(--bg); border-radius: 32px 32px 0 0;
  padding: 10px 20px calc(env(safe-area-inset-bottom) + 24px); animation: rise .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 6px; }
.sheet-full { min-height: 82dvh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 8px; position: sticky; top: -10px; background: var(--bg); z-index: 2; }
.sheet-head h2 { font-size: 1.4rem; font-weight: 900; }
@keyframes rise { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toast {
  position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: 520px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 26px); z-index: 200;
  background: #45384A; color: #fff; padding: 13px 18px; border-radius: 18px; display: flex; gap: 14px; align-items: center;
  box-shadow: 0 16px 36px -10px rgba(50, 30, 40, .45); animation: rise .22s ease; font-weight: 700;
}
.toast-action { color: #F7C3CD; font-weight: 900; }

/* ===== Таймеры ===== */
.big-timer { font-size: 3.4rem; font-weight: 900; letter-spacing: -.03em; text-align: center; font-variant-numeric: tabular-nums; margin: 12px 0 4px; }
.side-btns { display: flex; gap: 16px; justify-content: center; margin: 18px 0; }
.side-btn {
  width: 138px; height: 138px; border-radius: 50%; background: var(--feed-soft); color: var(--feed);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 900; font-size: 1.08rem;
}
.side-btn small { font-weight: 750; font-size: .8rem; opacity: .9; }
.side-btn.running { background: var(--feed); color: #fff; animation: pulse 2.2s ease-in-out infinite; }
.side-btn.suggest { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--feed); }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--feed) 20%, transparent); } }
.kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.kind-btn { background: var(--diaper-soft); color: var(--diaper); border-radius: 24px; min-height: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 900; font-size: 1.05rem; }
.kind-btn:active { transform: scale(.97); }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--sky-soft); color: var(--ink); font-size: .9rem; margin: 14px 0; font-weight: 650; }
.note svg { flex: none; margin-top: 1px; color: var(--sky); }
.note.warn { background: var(--warn-soft); } .note.warn svg { color: var(--warn); }
.note.danger { background: var(--danger-soft); } .note.danger svg { color: var(--danger); }
.note.ok { background: var(--ok-soft); } .note.ok svg { color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 26px 16px; }
.empty svg { margin-bottom: 6px; opacity: .6; }

/* ===== Списки ===== */
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; border-bottom: 1.5px solid var(--line); text-decoration: none; color: inherit; }
.list-item:last-child { border-bottom: 0; }
button.list-item:active, a.list-item:active { background: var(--bg2); }
.list-item .ico { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none; font-weight: 900; }
.list-item .txt { flex: 1; min-width: 0; }
.list-item .txt b { display: block; font-weight: 800; }
.list-item .txt span { display: block; font-size: .85rem; color: var(--muted); }
.list-item .end { color: var(--muted); font-size: .86rem; text-align: right; flex: none; font-weight: 750; }
.list-item > svg:last-child { color: var(--muted); }
.ico.feed { background: var(--feed-soft); color: var(--feed); } .ico.sleep { background: var(--sleep-soft); color: var(--sleep); }
.ico.diaper { background: var(--diaper-soft); color: var(--diaper); } .ico.solid { background: var(--solid-soft); color: var(--solid); }
.ico.sky { background: var(--sky-soft); color: var(--sky); } .ico.primary { background: var(--primary-soft); color: var(--primary); }
.ico.danger { background: var(--danger-soft); color: var(--danger); } .ico.ok { background: var(--ok-soft); color: var(--ok); }
.badge { display: inline-block; font-size: .75rem; font-weight: 850; padding: 4px 10px; border-radius: 999px; background: var(--bg2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); } .badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.feed { background: var(--feed-soft); color: var(--feed); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.stat b { display: block; font-size: 1.4rem; font-weight: 900; letter-spacing: -.02em; }
.stat span { font-size: .84rem; color: var(--muted); }
.day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.day-nav b { font-size: 1.15rem; font-weight: 900; }
.day-nav .icon-btn { box-shadow: none; background: transparent; }
.week-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.week-strip::-webkit-scrollbar { display: none; }
.week-strip button { flex: 1 0 46px; padding: 9px 0; border-radius: 16px; background: var(--card); text-align: center; font-size: .75rem; color: var(--muted); font-weight: 750; }
.week-strip button b { display: block; font-size: 1.08rem; color: var(--ink); font-weight: 900; }
.week-strip button.on { background: var(--primary); color: var(--primary-ink); } .week-strip button.on b { color: var(--primary-ink); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 124px; margin-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: .72rem; color: var(--muted); font-weight: 750; }
.bar i { display: block; width: 100%; max-width: 30px; border-radius: 10px; background: var(--primary); min-height: 4px; }
.bar.sleepbar i { background: var(--sleep); } .bar.feedbar i { background: var(--feed); }
.progress { height: 10px; border-radius: 10px; background: var(--bg2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--solid); border-radius: 10px; }
.pill-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.sheet .pill-row { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.card .pill-row { margin: 0 -18px; }
.pill-row::-webkit-scrollbar { display: none; }
.pill-row .chip { flex: none; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1.5px solid var(--line); text-align: left; width: 100%; font-weight: 650; }
.check:last-child { border-bottom: 0; }
.check .box { width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; margin-top: -1px; color: transparent; background: var(--card); }
.check.on .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.divider { height: 1.5px; background: var(--line); margin: 16px 0; border: 0; }

/* Одежда по погоде */
.wear-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wear { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 14px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wear .art { background: var(--bg); border-radius: 20px; padding: 10px; }
.wear b { font-size: .95rem; line-height: 1.25; font-weight: 850; }
.wear span { font-size: .8rem; color: var(--muted); }

@media print {
  .tabbar, .topbar, .no-print, .toast { display: none !important; }
  body { background: #fff; color: #000; } .app { max-width: none; }
  .view { padding: 0; } .card, .list { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* лекарства и температура */
.care { display: grid; gap: 12px; }
.care-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-weight: 700; line-height: 1.4; }
.care-alert svg { flex: none; margin-top: 2px; }
.care-alert.danger { background: var(--danger-soft); color: var(--danger); }
.care-alert.warn { background: var(--warn-soft); color: var(--ink); }
.care-temp { display: grid; gap: 6px; }
.care-big { font-size: 1.7rem; font-weight: 900; letter-spacing: -.02em; }
.temp-chart { width: 100%; height: auto; display: block; }
.temp-chart .tc-line { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .55; }
.temp-chart .tc-label { fill: var(--danger); font-size: 11px; font-weight: 800; opacity: .8; }
.temp-chart .tc-path { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; }
.temp-chart .tc-dot { fill: var(--primary); }
.temp-chart .tc-dot.hot { fill: var(--danger); }
.care-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1.5px solid var(--line); }
.care-name { display: grid; min-width: 0; }
.care-next { display: grid; justify-items: end; gap: 6px; font-weight: 800; font-size: .9rem; text-align: right; }
.care-next .ok { color: var(--ok); }

/* сказать или написать */
.phrase-top { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.phrase-top p { margin: 0; }
.mic-btn { flex: none; width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--sleep-soft); color: var(--sleep); box-shadow: var(--shadow); transition: transform .15s, box-shadow .3s; }
.mic-btn.on { background: var(--primary); color: var(--primary-ink, #fff); box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 22%, transparent); animation: mic-pulse 1.4s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--primary) 10%, transparent); } }
.phrase-status { min-height: 1.4em; margin: 6px 0; }
.phrase-input { width: 100%; resize: vertical; min-height: 64px; font-size: 1.05rem; line-height: 1.4; padding: 12px 14px; }
.phrase-preview ul { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.phrase-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.phrase-item svg { flex: none; margin-top: 2px; color: var(--ok); }
.phrase-item.unknown svg { color: var(--muted); }
.phrase-item > span { display: grid; gap: 2px; }
.phrase-hint { font-size: .82rem; color: var(--warn); font-weight: 700; }
.phrase-tile { min-height: 0 !important; }
@media (prefers-reduced-motion: reduce) { .mic-btn.on { animation: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* первые разы */
.first-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .first-grid { grid-template-columns: 1fr 1fr; } }
.first-card { display: grid; text-align: left; padding: 0; border: 0; border-radius: 24px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); cursor: pointer; color: inherit; font: inherit; }
.first-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg2); }
.first-photo.missing { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.first-noimg { display: grid; place-items: center; padding: 18px 0 4px; background: var(--solid-soft); }
.first-txt { display: grid; gap: 4px; padding: 14px 16px 16px; }
.first-txt b { font-size: 1.15rem; font-weight: 900; }
.first-txt p { margin: 4px 0 0; }
.first-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 24px 20px; }
.first-pick-wrap { margin-bottom: 8px; }
.first-pick { position: relative; border-radius: 22px; overflow: hidden; background: var(--bg2); min-height: 150px; display: grid; place-items: center; border: 2px dashed var(--line); }
.first-pick-img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.first-pick-empty { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-weight: 800; }
.first-pick-hit { position: absolute; inset: 0; cursor: pointer; }
.first-pick:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }
.first-pick-del { position: absolute; right: 10px; bottom: 10px; z-index: 2; }

/* спросить дневник */
.ask-list { display: grid; gap: 14px; margin: 18px 0; }
.ask-pair { display: grid; gap: 8px; }
.ask-q { justify-self: end; max-width: 85%; background: var(--primary); color: var(--primary-ink, #fff); padding: 10px 14px; border-radius: 18px 18px 6px 18px; font-weight: 700; }
.ask-a { max-width: 92%; background: var(--card); box-shadow: var(--shadow); padding: 12px 16px; border-radius: 18px 18px 18px 6px; line-height: 1.5; white-space: pre-wrap; }
.ask-a.err { color: var(--danger); }
.ask-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 24px 20px; }
.phrase-ai { list-style: none; }
.chip.chip-wrap { white-space: normal; text-align: left; height: auto; min-height: 40px; padding-block: 8px; line-height: 1.3; }
.tg-open { margin-top: 10px; display: grid; gap: 6px; }
.tg-btn { background: #2AABEE; color: #fff; }

/* лента суток и полотно сна */
.ribbon-card { display: grid; gap: 8px; text-decoration: none; color: inherit; margin-top: 12px; }
.ribbon, .sleepmap { width: 100%; height: auto; display: block; }
.rb-bg { fill: var(--bg2); }
.rb-grid { stroke: var(--line); stroke-width: 1.5; }
.rb-grid.thin { stroke-width: .8; stroke-dasharray: 2 3; }
.rb-hour { fill: var(--muted); font-size: 10px; font-weight: 750; font-family: inherit; }
.rb-sleep { fill: var(--sleep); opacity: .45; }
.rb-sleep.night { opacity: .85; }
.rb-sleep.open { opacity: .65; }
.rb-feed { fill: var(--feed); }
.rb-solid { fill: var(--solid); }
.rb-diaper { fill: var(--diaper); }
.rb-med { fill: var(--danger); opacity: .8; }
.rb-now { stroke: var(--primary); stroke-width: 2; stroke-linecap: round; }
.rb-now-dot { fill: var(--primary); }
.rb-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.rb-key { display: inline-flex; align-items: center; gap: 6px; }
.rb-key i { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }
.rb-key .k-sleep { background: var(--sleep); opacity: .45; } .rb-key .k-night { background: var(--sleep); opacity: .85; }
.rb-key .k-feed { background: var(--feed); } .rb-key .k-diaper { background: var(--diaper); width: 4px; }
.ribbon-more { font-weight: 800; font-size: .88rem; text-decoration: none; color: var(--primary); }

/* небо на главной: та же карточка, но с оттенком времени суток */
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: .9; }
:root[data-sky="dawn"] .hero::before { background: radial-gradient(120% 90% at 0% 0%, rgba(255, 196, 170, .55), transparent 60%); }
:root[data-sky="day"] .hero::before { background: radial-gradient(110% 80% at 100% 0%, rgba(255, 244, 214, .6), transparent 60%); }
:root[data-sky="dusk"] .hero::before { background: radial-gradient(120% 90% at 100% 0%, rgba(214, 160, 220, .45), transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(255, 186, 150, .35), transparent 60%); }
:root[data-sky="night"] .hero::before {
  background:
    radial-gradient(1.5px 1.5px at 18% 22%, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1.2px 1.2px at 36% 12%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1.8px 1.8px at 58% 30%, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1.2px 1.2px at 76% 16%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.4px 1.4px at 88% 40%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(130% 90% at 100% 0%, rgba(120, 100, 200, .28), transparent 60%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
:root[data-theme="light"][data-sky="night"] .hero::before, :root[data-theme="auto"][data-sky="night"] .hero::before { opacity: .55; }
@keyframes twinkle { from { opacity: .55; } to { opacity: .95; } }
.hero > * { position: relative; }
.hero > .art { position: absolute; }
.hero > .ring { position: absolute; }

/* отклик на запись */
.toast { animation: toast-in .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes toast-in { from { transform: translateY(14px) scale(.96); opacity: 0; } }
.list-item.is-new, .p-row.is-new { animation: row-in .6s cubic-bezier(.16, 1, .3, 1); }
@keyframes row-in { from { background: color-mix(in srgb, var(--primary) 14%, transparent); } }
.switch-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-weight: 700; cursor: pointer; min-height: 44px; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
@media (prefers-reduced-motion: reduce) { :root[data-sky="night"] .hero::before, .toast { animation: none; } }

/* открытка */
.card-preview { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--bg2); }
.card-canvas { width: 100%; height: auto; display: block; aspect-ratio: 4 / 5; }
.month-banner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 12px; padding: 10px 14px 10px 8px;
  border: 0; border-radius: 22px; background: var(--diaper-soft); color: var(--ink); cursor: pointer; font: inherit; box-shadow: var(--shadow); }
.month-banner > span { display: grid; flex: 1; }
.month-banner b { font-size: 1.05rem; font-weight: 900; }

/* памятка для няни */
.nanny { max-width: 640px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); display: grid; gap: 14px; }
.nanny-head { display: flex; align-items: center; gap: 14px; }
.nanny-head .page-title { margin: 0; }
.nanny-block h2 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin: 0 0 8px; }
.nanny-block h2 svg { color: var(--primary); }
.nanny-text p { margin: 0 0 6px; white-space: pre-wrap; }
.nanny-now ul { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 6px; }
.nanny-alert { background: var(--danger-soft); }
.nanny-alert h2, .nanny-alert h2 svg { color: var(--danger); }
.nanny-empty { display: grid; justify-items: center; text-align: center; gap: 8px; }
.handoff-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.handoff-list li { display: grid; gap: 2px; padding: 10px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.handoff-list b { font-size: .82rem; color: var(--primary); }
.memo-link { display: grid; gap: 8px; }
.memo-url { font-size: .82rem; word-break: break-all; padding: 10px 12px; border-radius: 12px; background: var(--bg2); font-weight: 700; }
.home-links { margin-top: 2px; }

/* вопросы, запасы, дела на день, зубки */
.q-list { display: grid; gap: 2px; }
.q-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1.5px solid var(--line); }
.q-row:last-child { border-bottom: 0; }
.q-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.q-text { display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; flex: 1; }
.q-row.done .q-text { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.stock-now { font-size: 1.05rem; margin: 0 0 8px; }
.stock-now.low b { color: var(--danger); }
.stock-alert { display: flex; gap: 10px; align-items: center; padding: 12px 14px; margin-top: 12px; border-radius: 18px; background: var(--warn-soft); color: var(--ink); font-weight: 750; text-decoration: none; }
.stock-alert svg:first-child { color: var(--warn); flex: none; }
.stock-alert span { flex: 1; }
.daily { display: grid; gap: 0; }
.daily-row { display: flex; gap: 12px; align-items: center; min-height: 48px; border-bottom: 1.5px solid var(--line); cursor: pointer; font-weight: 750; }
.daily-row input { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.daily-row.done span.grow { color: var(--muted); text-decoration: line-through; }
.daily-row.overdue .tnum { color: var(--warn); font-weight: 800; }
.teeth-card { display: grid; gap: 8px; }
.teeth { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
.tooth rect { fill: var(--bg2); stroke: var(--line); stroke-width: 2; cursor: pointer; transition: fill .2s; }
.tooth.in rect { fill: #FFFFFF; stroke: var(--primary); }
.tooth.out rect { fill: none; stroke-dasharray: 3 3; }
.tooth:focus-visible rect { stroke: var(--primary); stroke-width: 3.5; outline: none; }
.teeth-label { fill: var(--muted); font-size: 12px; font-weight: 800; font-family: inherit; }
.rb-key .k-tooth-in { background: #fff; border: 2px solid var(--primary); width: 12px; height: 12px; }
.rb-key .k-tooth { background: var(--bg2); border: 2px solid var(--line); width: 12px; height: 12px; }
.rb-key .k-tooth-out { border: 2px dashed var(--line); width: 12px; height: 12px; }
.report-q { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* беременность */
.preg-hero { min-height: 190px; }
.preg-hero .hero-main, .preg-hero .hero-sub { max-width: 60%; }
.preg-ring { position: absolute !important; right: 14px; top: 50%; transform: translateY(-50%); width: 124px; height: 124px; }
.pr-bg { fill: var(--card); stroke: color-mix(in srgb, var(--primary) 18%, transparent); stroke-width: 9; }
.pr-fg { fill: none; stroke: var(--primary); stroke-width: 9; stroke-linecap: round; }
.pr-week { font-size: 38px; font-weight: 900; fill: var(--ink); font-family: inherit; }
.pr-sub { font-size: 12px; font-weight: 800; fill: var(--muted); font-family: inherit; }
.preg-next { display: grid; gap: 12px; }
.preg-m { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; }
.preg-m > b { color: var(--muted); font-size: .88rem; }
.preg-m.now > b { color: var(--primary); }
.bag-group { margin-bottom: 8px; }
.contraction-btn, .kick-btn { width: 100%; min-height: 150px; border: 0; border-radius: 32px; display: grid; place-items: center; align-content: center; gap: 6px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); }
.contraction-btn { background: var(--feed-soft); }
.contraction-btn span { font-size: 1.5rem; font-weight: 900; }
.contraction-btn b { font-weight: 750; color: var(--muted); }
.contraction-btn.on { background: var(--feed); color: #fff; }
.contraction-btn.on b { color: #fff; font-size: 2.4rem; font-weight: 900; }
.kick-btn { background: var(--sleep-soft); min-height: 190px; }
.kick-btn b { font-size: 3.4rem; font-weight: 900; color: var(--sleep); line-height: 1; }
.kick-btn span { font-weight: 850; font-size: 1.1rem; }
.kick-btn:active, .contraction-btn:active { transform: scale(.98); }
.contraction-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 4px; }
.contraction-list li { display: grid; grid-template-columns: 3.4em 1fr auto auto; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1.5px solid var(--line); }
.daily-item { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.daily-item:last-child { border-bottom: 0; }
.wd-row { display: flex; gap: 4px; flex-wrap: wrap; }
.wd { min-width: 40px; min-height: 36px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.wd.on { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.potty-ok { color: var(--ok); }
.potty-bars .bar { position: relative; }
.potty-bars .bar i.ok { background: var(--ok); }
.potty-bars .bar i.miss { background: var(--diaper); opacity: .7; }
.words-head { display: flex; align-items: baseline; gap: 10px; }
.words-count { font-size: 2.6rem; font-weight: 900; color: var(--sleep); }
.words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.word { display: grid; justify-items: start; gap: 0; padding: 8px 14px; border-radius: 16px; border: 0; background: var(--sleep-soft); color: var(--ink); font: inherit; font-weight: 850; font-size: 1.05rem; cursor: pointer; }
.word small { font-weight: 700; font-size: .72rem; color: var(--muted); }
.ill-list { display: grid; gap: 12px; margin-top: 12px; }
.ill-card { display: grid; gap: 4px; text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.ill-card.active { box-shadow: inset 0 0 0 2px var(--danger), var(--shadow); }
.ill-banner { width: 100%; border: 0; font: inherit; cursor: pointer; text-align: left; margin: 0 0 12px; background: var(--danger-soft); }
.ill-banner svg:first-child { color: var(--danger); }
.potty-bars .bar i.miss { min-height: 0; }
a.hero { text-decoration: none; color: var(--ink); }
a.hero .hero-main { color: var(--ink); }

/* дети: аватарки и цвета */
.kc-rose { --kc: var(--primary); --kc-soft: var(--primary-soft); }
.kc-lav { --kc: var(--sleep); --kc-soft: var(--sleep-soft); }
.kc-sky { --kc: var(--sky); --kc-soft: var(--sky-soft); }
.kc-sage { --kc: var(--solid); --kc-soft: var(--solid-soft); }
.kc-peach { --kc: var(--feed); --kc-soft: var(--feed-soft); }
.kc-vanilla { --kc: var(--diaper); --kc-soft: var(--diaper-soft); }
.kid-ava { border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; background: var(--kc-soft); color: var(--kc); font-weight: 900; line-height: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--kc); }
.kid-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kid-ava.loading { opacity: .5; }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex: none; display: grid; }
.list-item .kid-ava { margin-right: 2px; }
.list-item.current { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.kid-edit-ava { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.kid-edit-actions { display: grid; gap: 8px; justify-items: start; }
.kid-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.kid-color { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--kc); box-shadow: 0 0 0 3px var(--card); }
.kid-color.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--kc); }
.kid-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 12px; padding: 2px 2px 6px; scrollbar-width: none; }
.kid-tab { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 0; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; min-height: 44px; }
.kid-tab.on { background: var(--kc-soft); color: var(--kc); box-shadow: inset 0 0 0 2px var(--kc); }
.who { display: grid; gap: 6px; margin-bottom: 12px; }
.who-seg button.on { color: var(--primary); }
/* доска близнецов */
.twins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.twins-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.twin-card { display: grid; gap: 6px; text-align: left; padding: 12px; border-radius: 22px; border: 0; background: var(--kc-soft); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.twin-card.on { box-shadow: inset 0 0 0 2.5px var(--kc), var(--shadow); }
.twin-head { display: flex; align-items: center; gap: 8px; }
.twin-head b { font-size: 1.05rem; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.twin-line { display: flex; gap: 6px; align-items: center; font-size: .82rem; font-weight: 750; color: var(--muted); }
.twin-line svg { flex: none; color: var(--kc); }
.twins-3 .twin-line { font-size: .74rem; }
.twin-ribbons { display: grid; gap: 10px; }
.twin-rb { display: grid; gap: 2px; }
.twin-rb-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .88rem; }
.gap-s { gap: 8px; }
.handoff-kid { display: flex !important; align-items: center; gap: 8px; background: none !important; box-shadow: none !important; padding: 8px 2px 0 !important; }
.nanny-kid { font-size: 1rem; margin: 6px 0 4px; }
.kid-rows { display: grid; gap: 12px; margin-bottom: 8px; }
.kid-row { display: grid; gap: 8px; padding: 12px; border-radius: 18px; background: var(--bg2); }
.kid-row-title { font-size: .9rem; color: var(--muted); }
.kid-row .chip { justify-self: start; }
.who-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; }
.who-chip:not([class*="kc-"]) { padding-left: 12px; }
.who-chip.on { background: var(--kc-soft, var(--primary-soft)); border-color: var(--kc, var(--primary)); color: var(--kc, var(--primary)); }
.twins.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.twin-head span { display: grid; min-width: 0; }
.twin-head small { font-size: .72rem; color: var(--muted); font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* покупки */
.shop-list { display: grid; gap: 0; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.shop-row:last-child { border-bottom: 0; }
.shop-name { flex: 1; min-width: 0; display: grid; gap: 3px; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.shop-row.need b { color: var(--danger); }
.shop-bar { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; max-width: 180px; }
.shop-bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.shop-bar i.low { background: var(--warn); }
.shop-empty p { margin: 0; color: var(--muted); }
.auto-stock { border-radius: 22px; }
.auto-stock summary { display: grid; gap: 2px; cursor: pointer; padding: 12px 4px; list-style: none; }
.auto-stock summary::-webkit-details-marker { display: none; }
.auto-head { display: flex; align-items: center; gap: 6px; }
.auto-head svg { color: var(--muted); transform: rotate(-90deg); transition: transform .2s; }
.auto-stock[open] .auto-head svg { transform: none; }

/* ---------- расписание ---------- */
.sc-filter { margin: 0 0 12px; }
.sc-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x proximity; scrollbar-width: none; }
.sc-strip::-webkit-scrollbar { display: none; }
.sc-day {
  flex: none; width: 52px; min-height: 72px; display: grid; justify-items: center; align-content: center; gap: 2px; scroll-snap-align: start;
  border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer;
}
.sc-day .sc-wd { font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: lowercase; }
.sc-day b { font-size: 1.15rem; font-weight: 900; line-height: 1.1; }
.sc-day.weekend .sc-wd { color: var(--primary); }
.sc-day.today { border-color: var(--primary); }
.sc-day.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.sc-day.on .sc-wd { color: inherit; opacity: .85; }
.sc-dots { display: flex; gap: 3px; height: 6px; }
.sc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.sc-dots i.done { background: var(--ok); }
.sc-day.on .sc-dots i { background: currentColor; }
.sc-day.on .sc-dots i.done { opacity: .45; }
.sc-list { padding-block: 6px; }
.sc-row, .sc-all-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 0; border-bottom: 1.5px solid var(--line); }
.sc-row:last-of-type, .sc-all-row:last-child { border-bottom: 0; }
.sc-all-row { width: 100%; background: none; border-inline: 0; border-top: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sc-time { flex: none; width: 3.2em; font-weight: 850; color: var(--muted); font-size: .95rem; }
.sc-body { flex: 1; min-width: 0; display: grid; gap: 3px; background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sc-body b { font-weight: 850; overflow-wrap: anywhere; }
.sc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .82rem; color: var(--muted); font-weight: 650; }
.sc-kids { display: inline-flex; align-items: center; }
.sc-kids .kid-ava { margin-right: -5px; box-shadow: 0 0 0 2px var(--card); }
.sc-kids .kid-ava:last-of-type { margin-right: 0; }
.sc-kid-names { margin-left: 8px; }
.sc-more { margin-left: 8px; font-weight: 800; }
.sc-fam { display: inline-flex; align-items: center; gap: 4px; }
.sc-done-by { color: var(--ok); font-weight: 750; }
.sc-bell { display: inline-flex; color: var(--primary); }
.sc-next { flex: none; text-align: right; }
.sc-check {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--line); background: var(--card); color: transparent; transition: background .15s, border-color .15s, color .15s;
}
.sc-check:hover { color: var(--muted); }
.sc-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.sc-row.done .sc-body b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.sc-row.overdue .sc-time { color: var(--warn); }
.sc-row.overdue .sc-check { border-color: var(--warn); }
.sc-list .why-link { margin-top: 6px; }
.sc-empty { display: grid; gap: 10px; justify-items: start; }
.sc-empty p { margin: 0; }
.sc-over { margin-top: 18px; }
.sc-over summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 6px 4px; }
.sc-over .sc-list { opacity: .7; margin-top: 8px; }
.sc-sugg { margin-bottom: 4px; }
.sc-toggle { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; cursor: pointer; }
.sc-toggle input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; margin-top: 2px; }
.sc-toggle > span { display: grid; gap: 2px; }
.sc-inline-date { border: 0; border-bottom: 1.5px dashed var(--muted); background: none; color: var(--ink); font: inherit; font-weight: 750; padding: 0 2px; }
@media (prefers-reduced-motion: reduce) { .sc-check { transition: none; } }

/* ---------- режим на ближайшие часы ---------- */
.plan-card { display: block; width: 100%; margin-top: 12px; text-align: left; color: inherit; font: inherit; border: 0; cursor: pointer; }
.plan-card > .row svg { color: var(--muted); }
.plan-chain { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.plan-chain::-webkit-scrollbar { display: none; }
.plan-step { flex: 1 0 64px; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; background: var(--bg2); position: relative; text-align: center; }
.plan-step + .plan-step::before { content: ''; position: absolute; left: -5px; top: 22px; width: 4px; height: 2px; background: var(--line); }
.plan-step b { font-size: .98rem; font-weight: 900; }
.plan-step span:not(.plan-ico) { font-size: .74rem; color: var(--muted); font-weight: 700; line-height: 1.15; }
.plan-step small { font-size: .66rem; font-weight: 800; color: var(--feed); }
.plan-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.p-wake .plan-ico { background: var(--solid-soft); color: var(--solid); }
.p-feed .plan-ico { background: var(--feed-soft); color: var(--feed); }
.p-sleep .plan-ico { background: var(--sleep-soft); color: var(--sleep); }

/* ---------- поля даты и времени на iPhone ----------
   Safari на iOS рисует их по-своему: не сжимает по ширине (поле вылезает за карточку)
   и в пустом поле ничего не пишет. Выравниваем и показываем подсказку. */
.input[type="date"], .input[type="time"], .input[type="datetime-local"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left;
}
.input::-webkit-date-and-time-value { text-align: left; min-height: 1.5em; margin: 0; }
@supports (-webkit-touch-callout: none) {
  .input[type="date"][data-empty]::before, .input[type="time"][data-empty]::before {
    content: attr(data-ph); color: color-mix(in srgb, var(--muted) 75%, transparent); font-weight: 650;
  }
}

/* ===== Компьютер и ноутбук =====
   На широком экране нижняя панель становится боковым меню, главная и дневник — в две колонки,
   шторки открываются окном по центру. На телефоне всё как было. */
.side-brand, .tab-add-label, .side-keys { display: none; }
@media (min-width: 1000px) {
  .app {
    max-width: 1280px; display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto 1fr;
    column-gap: 36px; padding: 0 32px;
  }
  .topbar { grid-column: 2; grid-row: 1; padding: 22px 0 14px; }
  .view { grid-column: 2; grid-row: 2; padding: 4px 0 56px; min-width: 0; }
  .view > :not(.page-wide) { max-width: 820px; }

  .tabbar {
    grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; bottom: auto; left: auto; right: auto;
    height: 100vh; height: 100dvh; padding: 22px 0; display: block; pointer-events: auto; z-index: 10;
  }
  .tabbar-inner {
    flex-direction: column; align-items: stretch; height: 100%; max-width: none; gap: 4px; padding: 0;
    background: transparent; box-shadow: none; backdrop-filter: none; border-radius: 0;
  }
  .side-brand {
    display: flex; align-items: center; gap: 10px; order: -2; padding: 2px 8px 22px; text-decoration: none;
    color: var(--ink); font-weight: 900; font-size: 1.35rem; letter-spacing: -.01em;
  }
  .side-brand img { border-radius: 11px; }
  .tab {
    flex: none; height: 48px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px;
    font-size: 1rem; border-radius: 14px;
  }
  .tab:hover { background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--ink); }
  .tab[aria-current="page"] { background: var(--card); box-shadow: var(--shadow); }
  .tab svg { width: 22px; height: 22px; }
  .tab-add {
    order: -1; width: 100%; height: 50px; margin: 0 0 18px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .tab-add svg { width: 22px; height: 22px; }
  .tab-add-label { display: inline; font-weight: 850; font-size: 1rem; }
  .side-keys {
    display: grid; gap: 7px; margin-top: auto; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--card) 60%, transparent);
    font-size: .82rem; color: var(--muted); font-weight: 650;
  }
  .side-keys b { color: var(--ink); font-size: .84rem; }
  .side-keys span { display: flex; align-items: center; gap: 8px; }
  kbd {
    min-width: 24px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 7px;
    background: var(--card); box-shadow: inset 0 -2px 0 var(--line), 0 0 0 1px var(--line); font: 800 .76rem/1 inherit; color: var(--ink);
  }

  /* две колонки: каждая колонка — своя стопка карточек, без пустот между ними */
  .dash { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0 24px; align-items: start; margin-top: 12px; }
  .dash-col > :first-child { margin-top: 0; }
  .dash-col > .section:first-child { margin-top: 0; }
  .dash .tile-grid { grid-template-columns: 1fr 1fr; }

  /* шторки — окном по центру */
  .backdrop { align-items: center; padding: 32px; }
  .sheet { width: min(620px, 100%); max-height: min(860px, 90vh); border-radius: 28px; padding: 18px 26px 26px; animation: pop .2s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
  .sheet::before { display: none; }
  .sheet-full { min-height: 0; }
  .sheet-head { top: -18px; }
  .toast { bottom: 32px; }
}
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 1000px) and (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
@media (min-width: 1000px) and (max-width: 1199px) {
  .app { grid-template-columns: 200px minmax(0, 1fr); column-gap: 24px; padding: 0 20px; }
}

/* источники ориентиров */
.sources { margin-top: 14px; border-top: 1.5px solid var(--line); padding-top: 10px; }
.sources summary { cursor: pointer; font-weight: 800; font-size: .9rem; color: var(--muted); }
.sources ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 10px; font-size: .86rem; line-height: 1.4; }
.sources li span { display: block; }
.sources a { font-weight: 800; color: var(--primary); text-decoration: none; }

/* исправить запись: карандаш в строке и «недавние» в окнах записи */
.row-edit { color: var(--muted); opacity: .55; display: grid; place-items: center; margin-left: 2px; flex: none; }
.list-item:hover .row-edit { opacity: 1; color: var(--primary); }
.recent-edit { margin-top: 22px; }
.recent-edit .label { margin-bottom: 8px; }
.recent-edit .list-item > svg:last-child { color: var(--muted); opacity: .6; flex: none; }
