@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 1000; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fcf7f2;
  --paper-2: #f5ede4;
  --card: #fffdfb;
  --ink: #3a3027;
  --ink-2: #6e6155;
  --muted: #9a8c7e;
  --line: #efe4d8;
  --line-2: #e3d5c5;
  --shadow: 0 1px 0 rgba(120, 80, 60, .05), 0 10px 24px -16px rgba(120, 70, 60, .35);

  --rose: #d4677b;
  --rose-ink: #ffffff;
  --rose-soft: #fbe5e9;
  --rose-deep: #a8475b;

  --feed: #f2c65f;   --feed-soft: #fdf1d3;  --feed-ink: #86600f;
  --diaper: #8fc0d8; --diaper-soft: #e3f0f7; --diaper-ink: #2a6481;
  --sleep: #9ea7d8;  --sleep-soft: #e9ebf8;  --sleep-ink: #444e8a;
  --bath: #86cbb9;   --bath-soft: #dff3ed;   --bath-ink: #226e5c;
  --temp: #ee9a80;   --temp-soft: #fce5dc;   --temp-ink: #a3472d;
  --med: #a8c494;    --med-soft: #e9f1e1;    --med-ink: #496a36;
  --note: #e6a6b6;   --note-soft: #fae6eb;   --note-ink: #994860;
  --grow-soft: #f3ebdf;   --grow-ink: #6b5434;

  --ok: #4f8a5b; --ok-soft: #e2efe2;
  --warn: #b7791f; --warn-soft: #fbefd6;
  --bad: #b5483a; --bad-soft: #f8e0dc;

  --radius: 24px;
  --radius-sm: 16px;
  --font: "Nunito", ui-rounded, system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --nav-h: 70px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1816;
    --paper-2: #27211d;
    --card: #2a2420;
    --ink: #f3eae0;
    --ink-2: #cfc1b3;
    --muted: #9d8f81;
    --line: #3a322c;
    --line-2: #4b4038;
    --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 10px 24px -14px rgba(0, 0, 0, .7);
    --rose: #ec8fa0; --rose-ink: #2a1418; --rose-soft: #4a2a31; --rose-deep: #f6b6c2;
    --feed-soft: #463a1d;  --feed-ink: #f4d283;
    --diaper-soft: #1f3a47; --diaper-ink: #aad4e8;
    --sleep-soft: #2c3050;  --sleep-ink: #c5cbef;
    --bath-soft: #1d3e36;   --bath-ink: #a5ddce;
    --temp-soft: #4a2c22;   --temp-ink: #f5baa6;
    --med-soft: #2f3d26;    --med-ink: #c5dcb3;
    --note-soft: #472a32;   --note-ink: #f1c2ce;
    --grow-soft: #3b3226;   --grow-ink: #e3cfae;
    --ok-soft: #233a27; --ok: #8fc79a;
    --warn-soft: #43361b; --warn: #e8bb68;
    --bad-soft: #4a2420; --bad: #f09d90;
    color-scheme: dark;
  }
  .app::before { background: radial-gradient(closest-side, rgba(74, 42, 49, .7), rgba(74, 42, 49, 0)) !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }

h1, h2, h3, .display {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 48;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- estructura ---------- */
.app {
  min-height: 100dvh;
  padding: 0 var(--gutter) calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
}
.app::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -160px; width: 560px; height: 340px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(251, 229, 233, .95), rgba(251, 229, 233, 0));
  pointer-events: none;
}
.topbar { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 0 16px; }
.topbar .who { flex: 1; min-width: 0; text-decoration: none; }
.topbar .who h1 { font-size: 1.55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .who p { margin: 1px 0 0; color: var(--ink-2); font-size: .92rem; font-weight: 600; }
.logo {
  width: 56px; height: 56px; border-radius: 20px; flex: none;
  display: grid; place-items: center; text-decoration: none;
  background: var(--rose-soft); transition: transform .15s;
}
.logo svg { width: 46px; height: 46px; }
.logo:active { transform: scale(.94); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  text-decoration: none; box-shadow: var(--shadow);
}
.icon-btn .ico { width: 22px; height: 22px; }

.baby-switch { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.baby-switch a {
  padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card);
  text-decoration: none; font-weight: 700; font-size: .9rem; white-space: nowrap; color: var(--ink-2);
}
.baby-switch a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* barra inferior (celular) / riel lateral (tablet) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 8px 6px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.nav a {
  flex: 1; max-width: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 800;
  border-radius: 16px; position: relative;
}
.nav a .ico { width: 26px; height: 26px; }
.nav a.on { color: var(--rose); }
.nav a.on::before { content: ""; position: absolute; top: -8px; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--rose); }
.nav .brand, .nav .tablet-only { display: none !important; }

/* ---------- tarjetas ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card.flush { padding: 4px 16px; }
.section { margin-top: 26px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 12px; min-height: 28px; }
.section-head h2 { font-size: 1.2rem; }
.section-head a, .link { color: var(--rose); font-weight: 800; text-decoration: none; font-size: .93rem; background: none; border: 0; padding: 4px 0; }

/* ---------- inicio: 9 botones ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile {
  -webkit-appearance: none; appearance: none; border: 0; text-decoration: none; color: inherit; font: inherit;
  border-radius: 26px; padding: 14px 4px 12px; min-height: 126px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-align: center; position: relative; overflow: hidden;
  transition: transform .12s ease;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .04);
}
.tile:active { transform: scale(.95); }
.tile .blob {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px;
  background: var(--card); box-shadow: 0 5px 12px -7px rgba(0, 0, 0, .35);
}
.tile .blob .ico { width: 32px; height: 32px; }
.tile b { font-weight: 800; font-size: .98rem; line-height: 1.1; }
.tile small { font-size: .74rem; font-weight: 700; opacity: .8; line-height: 1.2; min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; }
.tile.feed { background: var(--feed-soft); color: var(--feed-ink); }
.tile.diaper { background: var(--diaper-soft); color: var(--diaper-ink); }
.tile.sleep { background: var(--sleep-soft); color: var(--sleep-ink); }
.tile.bath { background: var(--bath-soft); color: var(--bath-ink); }
.tile.temp { background: var(--temp-soft); color: var(--temp-ink); }
.tile.med { background: var(--med-soft); color: var(--med-ink); }
.tile.note { background: var(--note-soft); color: var(--note-ink); }
.tile.grow { background: var(--grow-soft); color: var(--grow-ink); }
.tile.sum { background: var(--rose); color: var(--rose-ink); }
.tile.sum .blob { background: rgba(255, 255, 255, .22); box-shadow: none; }
.tile.sleep.active { background: var(--sleep-ink); color: #fff; }
.tile.sleep.active .blob { background: rgba(255, 255, 255, .16); box-shadow: none; }
@media (prefers-color-scheme: dark) { .tile.sleep.active { color: #1c1a2e; } }
.tile.sleep.active::after {
  content: ""; position: absolute; top: 12px; right: 14px; width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- resumen ---------- */
.day-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.day-nav .lbl { flex: 1; min-width: 0; text-align: center; position: relative; }
.day-nav .lbl b { display: block; font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.day-nav .lbl span { font-size: .85rem; color: var(--muted); font-weight: 700; }
.day-nav .lbl input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; min-height: 0; cursor: pointer; }
.icon-btn.off { opacity: .35; pointer-events: none; }

.stats { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
.stat {
  border-radius: var(--radius); padding: 14px 15px 13px; position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0;
}
.stat .lbl { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat .big { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 600; font-size: 2rem; line-height: 1.05; margin-top: 4px; white-space: nowrap; }
.stat .big small { font-family: var(--font); font-size: .9rem; font-weight: 800; opacity: .7; margin: 0 4px 0 2px; }
.stat .sub { font-size: .84rem; margin-top: 4px; font-weight: 600; }
.stat.feed { background: var(--feed-soft); border-color: transparent; grid-row: span 2; color: var(--feed-ink); }
.stat.feed .lbl { color: var(--feed-ink); }
.stat.feed .big { font-size: 3.2rem; color: var(--ink); }
.stat.diaper { background: var(--diaper-soft); border-color: transparent; color: var(--diaper-ink); }
.stat.diaper .lbl { color: var(--diaper-ink); }
.stat.sleep { background: var(--sleep-soft); border-color: transparent; color: var(--sleep-ink); }
.stat.sleep .lbl { color: var(--sleep-ink); }
.stat.diaper .big, .stat.sleep .big { color: var(--ink); font-size: 1.75rem; }
.stat .bar { height: 9px; border-radius: 99px; background: color-mix(in srgb, var(--feed) 28%, transparent); margin-top: 14px; overflow: hidden; display: flex; }
.stat .bar i { display: block; height: 100%; background: var(--feed); }
.stat .bar i + i { background: color-mix(in srgb, var(--feed) 50%, var(--rose)); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: .8rem; font-weight: 800; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--feed); margin-right: 5px; }
.legend span + span::before { background: color-mix(in srgb, var(--feed) 50%, var(--rose)); }
.since { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.since span { font-size: .84rem; font-weight: 700; color: var(--ink-2); background: var(--paper-2); border-radius: 99px; padding: 6px 12px; }
.since b { color: var(--ink); }

.sleep-banner {
  display: none; align-items: center; gap: 12px; margin: 0 0 16px;
  background: var(--sleep-soft); color: var(--sleep-ink); border-radius: var(--radius); padding: 12px 12px 12px 16px;
}
.sleep-banner.show { display: flex; }
.sleep-banner .ico { width: 30px; height: 30px; }
.sleep-banner div { flex: 1; min-width: 0; }
.sleep-banner span { font-size: .82rem; font-weight: 700; }
.sleep-banner b { font-family: var(--display); font-size: 1.3rem; font-weight: 600; display: block; }
.sleep-banner button { border: 0; border-radius: 99px; background: var(--sleep-ink); color: var(--card); font-weight: 800; padding: 11px 16px; }

/* línea de tiempo */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline .t { width: 46px; flex: none; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9rem; }
.timeline .dot { width: 40px; height: 40px; border-radius: 14px; flex: none; display: grid; place-items: center; }
.timeline .dot .ico { width: 22px; height: 22px; }
.timeline .body { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
.timeline .body b { display: block; font-weight: 800; }
.timeline .body span { display: block; color: var(--ink-2); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.row-btn { border: 0; background: none; color: var(--muted); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; padding: 0; }
.row-btn:active { background: var(--paper-2); }
.row-btn .ico { width: 20px; height: 20px; }
.k-feed { background: var(--feed-soft); color: var(--feed-ink); }
.k-diaper { background: var(--diaper-soft); color: var(--diaper-ink); }
.k-sleep { background: var(--sleep-soft); color: var(--sleep-ink); }
.k-bath { background: var(--bath-soft); color: var(--bath-ink); }
.k-temp { background: var(--temp-soft); color: var(--temp-ink); }
.k-med { background: var(--med-soft); color: var(--med-ink); }
.k-note { background: var(--note-soft); color: var(--note-ink); }
.k-grow { background: var(--grow-soft); color: var(--grow-ink); }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); font-weight: 600; }
.empty svg { width: 110px; height: auto; margin: 0 auto 10px; color: var(--line-2); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 124px; }
.week .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; text-decoration: none; }
.week .col i { display: block; width: 100%; max-width: 30px; border-radius: 9px 9px 4px 4px; background: var(--feed); min-height: 4px; }
.week .col.sel i { background: var(--rose); }
.week .col b { font-size: .7rem; color: var(--muted); font-weight: 800; }
.week .col em { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--ink-2); }

/* ---------- hoja inferior ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: none; }
.sheet-wrap.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(40, 24, 20, .42); opacity: 0; transition: opacity .2s; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92dvh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: var(--card); border-radius: 30px 30px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .9, .3, 1);
  max-width: 640px; margin: 0 auto;
}
.sheet-wrap.open .sheet { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 0 auto 14px; }
.sheet-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sheet-title .dot { width: 48px; height: 48px; border-radius: 17px; display: grid; place-items: center; flex: none; }
.sheet-title .dot .ico { width: 27px; height: 27px; }
.sheet-title h2 { flex: 1; min-width: 0; font-size: 1.4rem; }
.sheet-title .close { border: 0; background: var(--paper-2); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.sheet h3 { margin: 22px 0 10px; font-size: 1.05rem; }
.sheet .divider { border: 0; border-top: 1px dashed var(--line-2); margin: 22px 0 18px; }

.seg { display: flex; background: var(--paper-2); border-radius: 18px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button {
  flex: 1; min-width: 0; border: 0; background: none; border-radius: 14px; padding: 11px 4px;
  font-weight: 800; font-size: .9rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(80, 50, 20, .16); }

.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.chips.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chip {
  border: 0; border-radius: 18px; min-height: 66px; min-width: 0; padding: 0;
  font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.45rem;
  background: var(--paper-2); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  transition: transform .1s;
}
.chip small { font-family: var(--font); font-size: .72rem; font-weight: 800; opacity: .7; margin-top: 4px; }
.chip:active { transform: scale(.94); }
.chip.big { min-height: 112px; font-family: var(--font); font-size: 1.02rem; font-weight: 800; gap: 8px; }
.chip.big .ico { width: 40px; height: 40px; }
.chip.c-feed { background: var(--feed-soft); color: var(--feed-ink); }
.chip.c-diaper { background: var(--diaper-soft); color: var(--diaper-ink); }
.chip.c-temp { background: var(--temp-soft); color: var(--temp-ink); }
.chip.sel { box-shadow: inset 0 0 0 3px currentColor; }

/* selector de hora: ahora / hace X / otra */
.when { margin-top: 18px; padding: 14px; border-radius: var(--radius-sm); background: var(--paper-2); overflow: hidden; }
.when.first { margin: 0 0 16px; }
.when-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.when-head .ico { width: 20px; height: 20px; color: var(--ink-2); }
.when-head span { font-weight: 800; font-size: .88rem; color: var(--ink-2); }
.when-head b { margin-left: auto; font-weight: 800; text-align: right; }
.when-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.when-chips::-webkit-scrollbar { display: none; }
.when-chips button {
  flex: none; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink-2);
  border-radius: 99px; padding: 8px 13px; font-weight: 800; font-size: .86rem;
}
.when-chips button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.when-custom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.when-custom .field { margin: 0; }

.hint { font-size: .84rem; color: var(--muted); margin: 10px 2px 0; font-weight: 600; }

/* ---------- formularios ---------- */
.field { display: block; margin: 0 0 14px; min-width: 0; }
.field > span { display: block; font-weight: 800; font-size: .86rem; color: var(--ink-2); margin: 0 0 6px 2px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], select, textarea {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; min-width: 0; max-width: 100%; height: 52px; margin: 0;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background-color: var(--card); padding: 0 14px; font-size: 16px; line-height: 1.3; text-align: left;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type=date], input[type=time], input[type=datetime-local] { line-height: 49px; }
input::-webkit-date-and-time-value { text-align: left; margin: 0; line-height: 49px; min-height: 49px; }
input::-webkit-datetime-edit { padding: 0; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a8c7e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
textarea { height: auto; min-height: 104px; padding: 12px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form-actions .btn { flex: 1 1 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 22px; border-radius: 99px; border: 0;
  background: var(--rose); color: var(--rose-ink); font-weight: 800; font-size: 1rem;
  text-decoration: none; transition: transform .1s, filter .15s; text-align: center; line-height: 1.15;
}
.btn .ico { width: 22px; height: 22px; }
.btn:active { transform: scale(.97); }
.btn.block { display: flex; width: 100%; }
.btn.soft { background: var(--rose-soft); color: var(--rose-deep); }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line-2); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { min-height: 42px; padding: 0 16px; font-size: .9rem; }
.btn[disabled] { opacity: .55; }
.btn-stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.check { display: flex; align-items: flex-start; gap: 12px; font-weight: 700; padding: 8px 0; line-height: 1.35; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--rose); flex: none; margin: 0; }
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 700; font-size: .93rem; margin-bottom: 14px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--paper-2); color: var(--ink-2); font-weight: 600; }

/* ---------- aviso flotante ---------- */
.toast {
  position: fixed; left: 50%; z-index: 60;
  bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));
  width: min(520px, calc(100vw - 24px));
  transform: translate(-50%, 24px) scale(.96); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 10px 14px 12px; border-radius: 22px; overflow: hidden;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 18px 40px -14px rgba(60, 30, 20, .45), 0 2px 6px rgba(60, 30, 20, .08);
  transition: transform .3s cubic-bezier(.2, 1.3, .4, 1), opacity .2s;
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
.toast .t-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--rose-soft); color: var(--rose-deep); }
.toast .t-ico .ico { width: 24px; height: 24px; }
.toast[data-kind=feed] .t-ico { background: var(--feed-soft); color: var(--feed-ink); }
.toast[data-kind=diaper] .t-ico { background: var(--diaper-soft); color: var(--diaper-ink); }
.toast[data-kind=sleep] .t-ico { background: var(--sleep-soft); color: var(--sleep-ink); }
.toast[data-kind=bath] .t-ico { background: var(--bath-soft); color: var(--bath-ink); }
.toast[data-kind=temp] .t-ico { background: var(--temp-soft); color: var(--temp-ink); }
.toast[data-kind=med] .t-ico { background: var(--med-soft); color: var(--med-ink); }
.toast[data-kind=note] .t-ico { background: var(--note-soft); color: var(--note-ink); }
.toast[data-kind=ok] .t-ico { background: var(--ok-soft); color: var(--ok); }
.toast[data-kind=error] .t-ico { background: var(--bad-soft); color: var(--bad); }
.toast[data-kind=undo] .t-ico { background: var(--paper-2); color: var(--ink-2); }
.toast .t-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.toast .t-msg { font-weight: 800; line-height: 1.25; }
.toast .t-sub { font-size: .8rem; color: var(--muted); font-weight: 600; }
.toast .t-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--paper-2); color: var(--ink-2); display: grid; place-items: center; flex: none; padding: 0; align-self: flex-start; }
.toast .t-close .ico { width: 16px; height: 16px; }
.toast .t-actions { order: 5; flex-basis: 100%; display: flex; gap: 8px; padding-left: 54px; }
.toast .t-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  border-radius: 99px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink);
  font-weight: 800; font-size: .9rem; padding: 0 12px;
}
.toast .t-btn .ico { width: 18px; height: 18px; }
.toast .t-btn.primary { background: var(--rose); border-color: var(--rose); color: var(--rose-ink); }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--rose); opacity: .55; transform-origin: left; }
.toast.show .t-bar { animation: t-count var(--t-ms, 6000ms) linear forwards; }
@keyframes t-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- animación ilustrada al registrar ---------- */
.fx { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; pointer-events: none; visibility: hidden; }
.fx.show { visibility: visible; }
.fx-card {
  width: 210px; padding: 18px 16px 16px; border-radius: 34px; text-align: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(60, 30, 20, .5);
  opacity: 0; transform: scale(.6) translateY(20px);
}
.fx.show .fx-card { animation: fx-card 1.9s cubic-bezier(.2, 1.3, .4, 1) forwards; }
@keyframes fx-card {
  0% { opacity: 0; transform: scale(.6) translateY(20px); }
  14% { opacity: 1; transform: scale(1.04) translateY(0); }
  20% { transform: scale(1); }
  84% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.9) translateY(-14px); }
}
.fx-stage { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.fx-ring { position: absolute; inset: 6px; border-radius: 50%; background: var(--tint); }
.fx.show .fx-ring { animation: fx-ring 1.9s ease-out both; }
@keyframes fx-ring { 0% { transform: scale(.4); } 25% { transform: scale(1.06); } 35%, 100% { transform: scale(1); } }
.fx-art { position: relative; width: 100%; height: 100%; overflow: visible; }
.fx-art * { transform-box: fill-box; transform-origin: center; }
.fx-art .fx-rot { transform-box: view-box; transform-origin: 0 0; }
.fx-cap { margin-top: 8px; font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.15rem; line-height: 1.2; }

/* gotas que caen (pipí, medicina) */
.fx.show .fx-fall { opacity: 0; animation: fx-fall .75s cubic-bezier(.5, 0, .9, .5) forwards; }
.fx.show .fx-fall.f2 { animation-delay: .18s; }
.fx.show .fx-fall.f3 { animation-delay: .32s; }
.fx.show .fx-med .fx-fall { animation: fx-fall-short .6s .35s cubic-bezier(.5, 0, .9, .5) forwards; }
@keyframes fx-fall { 0% { opacity: 0; transform: translateY(-14px) scale(.7); } 20% { opacity: 1; transform: translateY(0) scale(1); } 85% { opacity: 1; transform: translateY(38px) scaleY(1.15); } 100% { opacity: 0; transform: translateY(44px) scale(.5); } }
@keyframes fx-fall-short { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1); } 90% { opacity: 1; transform: translateY(16px); } 100% { opacity: 0; transform: translateY(20px) scale(.5); } }
.fx-splash circle { opacity: 0; }
.fx.show .fx-splash circle { animation: fx-splash .5s ease-out forwards; }
@keyframes fx-splash { 0% { opacity: 1; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(1.1); } }
.fx-wet { opacity: 0; }
.fx.show .fx-wet { animation: fx-wet .5s .7s ease-out forwards; }
@keyframes fx-wet { 0% { opacity: 0; transform: scale(.2); } 100% { opacity: .85; transform: scale(1); } }
.fx.show .fx-diaper { animation: fx-squish .5s .6s ease; }
@keyframes fx-squish { 30% { transform: scale(1.06, .94); } 60% { transform: scale(.97, 1.03); } }
/* popó */
.fx.show .fx-poop { animation: fx-pop-up .8s .15s cubic-bezier(.3, 1.6, .5, 1) backwards; }
@keyframes fx-pop-up { from { transform: translateY(34px) scale(.3); } }
.fx-stink { opacity: 0; }
.fx.show .fx-stink { animation: fx-stink 1.2s .7s ease-out forwards; }
@keyframes fx-stink { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }
/* biberón */
.fx.show .fx-bottle { animation: fx-tilt 1.5s ease-in-out; }
@keyframes fx-tilt { 0% { transform: rotate(0); } 25%, 70% { transform: rotate(-32deg); } 100% { transform: rotate(0); } }
.fx.show .fx-milk { animation: fx-drink 1.2s .25s ease-in-out forwards; transform-origin: bottom; }
@keyframes fx-drink { to { transform: scaleY(.45); } }
.fx-bub { opacity: 0; }
.fx.show .fx-bub { animation: fx-bub 1s ease-in infinite; }
.fx.show .fx-bub.b2 { animation-delay: .3s; } .fx.show .fx-bub.b3 { animation-delay: .55s; }
@keyframes fx-bub { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-34px); } }
.fx-hearts path { opacity: 0; }
.fx.show .fx-hearts .h1 { animation: fx-float 1.2s .5s ease-out forwards; }
.fx.show .fx-hearts .h2 { animation: fx-float 1.2s .8s ease-out forwards; }
@keyframes fx-float { 0% { opacity: 0; transform: translateY(10px) scale(.5); } 30% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: translateY(-20px) scale(1); } }
/* sueño */
.fx.show .fx-moon { animation: fx-rock 1.6s ease-in-out; transform-origin: 60% 40%; }
@keyframes fx-rock { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-12deg); } 65% { transform: rotate(8deg); } }
.fx-z text { opacity: 0; }
.fx.show .fx-z .z1 { animation: fx-z 1.1s .2s ease-out forwards; }
.fx.show .fx-z .z2 { animation: fx-z 1.1s .45s ease-out forwards; }
.fx.show .fx-z .z3 { animation: fx-z 1.1s .7s ease-out forwards; }
@keyframes fx-z { 0% { opacity: 0; transform: translate(-8px, 10px) scale(.5); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -12px) scale(1.1); } }
.fx-stars path { opacity: 0; }
.fx.show .fx-stars .s1 { animation: fx-twinkle 1.2s .3s ease-in-out forwards; }
.fx.show .fx-stars .s2 { animation: fx-twinkle 1.2s .6s ease-in-out forwards; }
@keyframes fx-twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(45deg); } }
.fx.show .fx-sun { animation: fx-rise .9s cubic-bezier(.3, 1.4, .5, 1) backwards; }
@keyframes fx-rise { from { transform: translateY(40px); opacity: 0; } }
.fx.show .fx-rays { animation: fx-spin 3s linear infinite; transform-box: view-box; transform-origin: 60px 60px; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
/* baño */
.fx-bubbles circle { opacity: 0; }
.fx.show .fx-bubbles circle { animation: fx-bubble 1.3s ease-out forwards; }
.fx.show .fx-bubbles .u2 { animation-delay: .2s; } .fx.show .fx-bubbles .u3 { animation-delay: .4s; } .fx.show .fx-bubbles .u4 { animation-delay: .6s; }
@keyframes fx-bubble { 0% { opacity: 0; transform: translateY(16px) scale(.4); } 30% { opacity: 1; } 85% { opacity: 1; transform: translateY(-26px) scale(1); } 100% { opacity: 0; transform: translateY(-30px) scale(1.4); } }
.fx.show .fx-foam circle { animation: fx-wobble .9s ease-in-out infinite alternate; }
.fx.show .fx-foam circle:nth-child(even) { animation-delay: .3s; }
@keyframes fx-wobble { to { transform: scale(1.12); } }
/* temperatura */
.fx.show .fx-merc { animation: fx-merc 1.2s .1s cubic-bezier(.3, 1.2, .5, 1) backwards; transform-origin: bottom; }
@keyframes fx-merc { from { transform: scaleY(.15); } }
/* medicina */
.fx.show .fx-dropper { animation: fx-squeeze .6s ease; }
@keyframes fx-squeeze { 40% { transform: scale(.94, 1.04); } }
/* nota */
.fx-write { stroke-dasharray: 44; stroke-dashoffset: 44; }
.fx.show .fx-write { animation: fx-draw .45s ease-out forwards; }
.fx.show .fx-write.w1 { animation-delay: .15s; } .fx.show .fx-write.w2 { animation-delay: .55s; } .fx.show .fx-write.w3 { animation-delay: .95s; }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
.fx.show .fx-pencil { animation: fx-scribble 1.3s .1s ease-in-out; }
@keyframes fx-scribble { 0% { transform: translate(-46px, -40px); } 30% { transform: translate(-10px, -40px); } 33% { transform: translate(-46px, -24px); } 62% { transform: translate(-18px, -24px); } 65% { transform: translate(-46px, -8px); } 100% { transform: translate(0, 0); } }
/* vacuna con su gotita roja y curita */
.fx.show .fx-plunger { animation: fx-push 1s .2s ease-in-out forwards; }
@keyframes fx-push { to { transform: translateX(30px); } }
.fx.show .fx-blood { animation: fx-inject 1s .2s ease-in-out forwards; transform-origin: right; }
@keyframes fx-inject { to { transform: scaleX(.18); } }
.fx-bdrop { opacity: 0; }
.fx.show .fx-bdrop { animation: fx-bdrop .7s 1s ease-in forwards; }
@keyframes fx-bdrop { 0% { opacity: 0; transform: scale(.3); } 40% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: translateY(18px) scale(.8); } }
.fx-bandaid { opacity: 0; }
.fx.show .fx-bandaid { animation: fx-band .6s 1.15s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes fx-band { 0% { opacity: 0; transform: scale(.3); } 100% { opacity: 1; transform: scale(1); } }
.fx.show .fx-syringe { animation: fx-fade-down .5s 1.25s ease forwards; }
@keyframes fx-fade-down { to { opacity: .25; } }
/* medidas */
.fx.show .fx-needle { animation: fx-needle 1.4s cubic-bezier(.3, 1.5, .5, 1) forwards; transform-box: view-box; transform-origin: 60px 70px; }
@keyframes fx-needle { 0% { transform: rotate(-80deg); } 40% { transform: rotate(50deg); } 70% { transform: rotate(10deg); } 100% { transform: rotate(25deg); } }
/* pediatría */
.fx.show .fx-heart { animation: fx-beat .7s ease-in-out 2; }
@keyframes fx-beat { 30% { transform: scale(1.12); } 60% { transform: scale(.96); } }
.fx-ecg { stroke-dasharray: 160; stroke-dashoffset: 160; }
.fx.show .fx-ecg { animation: fx-draw 1.1s .2s ease-out forwards; }
/* foto */
.fx-flash { opacity: 0; }
.fx.show .fx-flash { animation: fx-flash .6s .3s ease-out; }
@keyframes fx-flash { 0% { opacity: 0; transform: scale(.5); } 30% { opacity: 1; transform: scale(2.4); } 100% { opacity: 0; transform: scale(3); } }
.fx.show .fx-cam { animation: fx-squish .5s .25s ease; }

/* ---------- crecimiento ---------- */
.chart-card svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-card .axis { stroke: var(--line); }
.chart-card .axis-t { fill: var(--muted); font-size: 11px; font-family: var(--font); font-weight: 700; }
.chart-card .line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-card .area { opacity: .16; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 1.5px solid var(--line-2); background: var(--card); border-radius: 99px; padding: 8px 16px; font-weight: 800; font-size: .9rem; color: var(--ink-2); white-space: nowrap; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mtable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mtable th { text-align: left; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 8px 4px; }
.mtable td { padding: 10px 4px; border-top: 1px dashed var(--line-2); font-variant-numeric: tabular-nums; vertical-align: middle; }
.mtable td.num { font-weight: 800; white-space: nowrap; }
.latest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.latest .stat .big { font-size: 1.6rem; }
.latest .stat .sub { font-size: .78rem; }

/* ---------- vacunas ---------- */
.progress { height: 12px; border-radius: 99px; background: var(--paper-2); overflow: hidden; margin: 12px 0 4px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.vgroup { margin-top: 20px; }
.vgroup-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 8px; }
.vgroup-head h3 { font-size: 1.1rem; }
.vgroup-head span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.vac {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.vac .mark { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px dashed var(--line-2); color: transparent; }
.vac.aplicada .mark { border: 0; background: var(--ok); color: #fff; }
.vac .mark .ico { width: 20px; height: 20px; }
.vac .body { flex: 1; min-width: 0; }
.vac .body b { display: block; font-weight: 800; }
.vac .body .dose { font-weight: 600; color: var(--ink-2); }
.vac .body .desc { display: block; color: var(--ink-2); font-size: .85rem; }
.vac > .ico { color: var(--muted); }
.pill { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; margin: 5px 4px 0 0; }
.pill.atrasada { background: var(--bad-soft); color: var(--bad); }
.pill.pronto { background: var(--warn-soft); color: var(--warn); }
.pill.recordar { background: var(--sleep-soft); color: var(--sleep-ink); }
.rem { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line-2); }
.rem:first-child { border-top: 0; }
.rem .body { flex: 1; min-width: 0; }
.rem .body b { display: block; }
.rem .body span { font-size: .85rem; color: var(--ink-2); }
.badge { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.badge .ico { width: 22px; height: 22px; }

/* ---------- fotos ---------- */
.album { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.slot { aspect-ratio: 1; border-radius: 20px; position: relative; overflow: hidden; text-decoration: none; background: var(--paper-2); display: flex; align-items: flex-end; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .tag { position: relative; margin: 8px; padding: 4px 10px; border-radius: 99px; background: var(--card); font-weight: 800; font-size: .74rem; color: var(--ink); white-space: nowrap; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; }
.slot.empty-slot { border: 2px dashed var(--line-2); background: none; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.slot.empty-slot .tag { background: none; margin: 4px 0 0; padding: 0; color: var(--ink-2); }
.slot.empty-slot .ico { width: 28px; height: 28px; }
.slot.future { opacity: .45; }
.slot .count { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .45); color: #fff; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.slot.now { box-shadow: 0 0 0 3px var(--rose); }
.photos-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.photo { border-radius: 18px; overflow: hidden; position: relative; background: var(--paper-2); aspect-ratio: 4 / 5; border: 0; padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-collage { aspect-ratio: auto; }
.photo.is-collage img { height: auto; }
.viewer { position: fixed; inset: 0; z-index: 70; background: rgba(15, 10, 6, .95); display: none; flex-direction: column; }
.viewer.open { display: flex; }
.viewer img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.viewer .bar { display: flex; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
.viewer .bar .icon-btn { background: rgba(255, 255, 255, .12); border-color: transparent; color: #f2e9dc; box-shadow: none; }
.viewer .cap { color: #f2e9dc; text-align: center; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); }
.upload-tile { border: 2px dashed var(--line-2); border-radius: 18px; aspect-ratio: 4 / 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--rose); font-weight: 800; cursor: pointer; background: none; text-align: center; padding: 8px; }
.upload-tile .ico { width: 36px; height: 36px; }
.up-bar { display: none; width: 70%; height: 8px; border-radius: 99px; background: var(--rose-soft); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--rose); transition: width .2s; }
.collage-cta { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--rose-soft); color: var(--rose-deep); border-radius: var(--radius); padding: 16px; }
.collage-cta .txt { flex: 1; min-width: 0; }
.collage-cta b { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.collage-cta .txt span { font-size: .87rem; font-weight: 600; }
.collage-cta .stack { position: relative; width: 54px; height: 54px; flex: none; }
.collage-cta .stack i { position: absolute; width: 34px; height: 40px; border-radius: 6px; border: 3px solid var(--card); box-shadow: 0 2px 6px rgba(90, 40, 50, .2); }
.collage-cta .stack i:nth-child(1) { left: 0; top: 8px; transform: rotate(-10deg); background: var(--feed); }
.collage-cta .stack i:nth-child(2) { left: 10px; top: 4px; transform: rotate(3deg); background: var(--diaper); }
.collage-cta .stack i:nth-child(3) { left: 20px; top: 9px; transform: rotate(12deg); background: var(--note); }
.strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.strip-item { flex: none; width: 128px; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--paper-2); }
.strip-item img { width: 100%; height: 100%; object-fit: cover; }
.pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pick { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.pick img { width: 100%; height: 100%; object-fit: cover; transition: transform .15s; }
.pick .n { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); color: #fff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.pick .m { position: absolute; left: 5px; bottom: 4px; right: 5px; font-size: .64rem; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick.on img { transform: scale(.88); border-radius: 10px; }
.pick.on { background: var(--rose-soft); }
.pick.on .n { background: var(--rose); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-2); padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--rose); }
.preview-box { background: var(--paper-2); border-radius: var(--radius); min-height: 260px; display: grid; place-items: center; overflow: hidden; position: relative; }
.preview-box img { width: 100%; height: auto; display: block; }
.preview-box .loading { position: absolute; inset: 0; display: none; place-items: center; background: color-mix(in srgb, var(--paper) 60%, transparent); font-weight: 800; color: var(--ink-2); }
.preview-box.busy .loading { display: grid; }
.sticky-save { position: sticky; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 16px; }

/* ---------- acceso ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter); }
.auth-card { width: 100%; max-width: 420px; }
.auth-hero { text-align: center; margin-bottom: 22px; }
.auth-hero .logo { width: 124px; height: 124px; border-radius: 42px; margin: 0 auto 18px; }
.auth-hero .logo svg { width: 100px; height: 100px; }
.auth-hero h1 { font-size: 2.4rem; }
.auth-hero p { color: var(--ink-2); margin: 6px 0 0; font-weight: 600; }
.btn.google { background: var(--card); color: var(--ink); border: 1.5px solid var(--line-2); box-shadow: var(--shadow); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px dashed var(--line-2); }
.list-row:first-child { border-top: 0; padding-top: 2px; }
.list-row .body { flex: 1; min-width: 0; }
.list-row .body b { display: block; }
.list-row .body span { display: block; color: var(--ink-2); font-size: .87rem; overflow: hidden; text-overflow: ellipsis; }
.avatar-sm { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--rose-soft); color: var(--rose-deep); font-family: var(--display); font-weight: 700; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: inline-block; margin-right: 6px; vertical-align: 1px; }
.status-dot.on { background: var(--ok); }
.steps { margin: 14px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--sleep-soft); color: var(--sleep-ink); font-weight: 700; }
.steps ol { margin: 0 0 12px; padding-left: 20px; }
.steps li { margin: 4px 0; }

/* ---------- pediatría ---------- */
.tile.wide-tile {
  grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 92px;
  padding: 14px 18px; text-align: left;
}
.tile.wide-tile .blob { margin: 0; flex: none; }
.tile.wide-tile .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile.wide-tile b { font-size: 1.1rem; }
.tile.wide-tile small { padding: 0; font-size: .82rem; text-align: left; }
.tile.wide-tile > .ico { width: 22px; height: 22px; opacity: .7; }
.tile.pedia { background: linear-gradient(120deg, var(--diaper-soft), var(--bath-soft)); color: var(--diaper-ink); }
.when-chip { flex: none; background: var(--card); color: var(--diaper-ink); border-radius: 14px; padding: 6px 10px; text-align: center; font-weight: 800; font-size: .78rem; line-height: 1.15; box-shadow: var(--shadow); }
.when-chip b { display: block; font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.datebox { width: 54px; height: 58px; border-radius: 16px; background: var(--diaper-soft); color: var(--diaper-ink); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.datebox b { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.datebox small { font-size: .72rem; font-weight: 800; text-transform: uppercase; margin-top: 3px; }
.appt-list { display: grid; gap: 10px; }
.appt { display: flex; align-items: center; gap: 14px; padding: 12px 14px; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.appt .body { flex: 1; min-width: 0; }
.appt .body b { display: block; font-weight: 800; }
.appt .body > span { display: block; color: var(--ink-2); font-size: .86rem; }
.appt .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.appt .pill .ico { width: 12px; height: 12px; vertical-align: -1px; }
.appt > .ico { color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line-2); }
.check-row:first-child { border-top: 0; }
.check-row .body { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.check-row .body b { display: block; font-weight: 800; }
.check-row .body span { display: block; color: var(--ink-2); font-size: .85rem; }
.tick { width: 32px; height: 32px; border-radius: 50%; flex: none; border: 2px dashed var(--line-2); background: none; color: transparent; display: grid; place-items: center; padding: 0; transition: background .2s, transform .2s; }
.tick .ico { width: 18px; height: 18px; }
.check-row.done .tick { border: 0; background: var(--ok); color: #fff; animation: pop .35s ease; }
.check-row.done .body b { color: var(--ink-2); }
.check-row.late .body span { color: var(--bad); font-weight: 700; }
.hist { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px dashed var(--line-2); padding: 12px 0; font: inherit; color: inherit; cursor: pointer; }
.hist:first-child { border-top: 0; }
.hist b { display: block; }
.hist span { color: var(--muted); font-size: .84rem; font-weight: 700; }
.hist p { margin: 4px 0 0; color: var(--ink-2); font-size: .9rem; }

.install-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 8px 10px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.install-banner .txt { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.install-banner b { display: block; }
.install-banner span { font-size: .84rem; color: var(--ink-2); }
.install-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; line-height: 1.4; }
.install-steps .n { width: 28px; height: 28px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-deep); display: grid; place-items: center; font-weight: 800; flex: none; }
.install-steps .ico { width: 20px; height: 20px; color: var(--rose); vertical-align: -4px; }
tr.tap { cursor: pointer; }
tr.tap:active td { background: var(--paper-2); }
.is-busy { pointer-events: none; opacity: .7; transition: opacity .15s; }

/* ---------- animaciones ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .28s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes tile-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes breathe { 50% { transform: scale(1.08); } }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.08); } }

.topbar { animation: rise .45s cubic-bezier(.2, .9, .3, 1) backwards; }
.tiles > .tile { animation: tile-in .5s cubic-bezier(.2, .9, .3, 1) backwards; }
.tiles > .tile:nth-child(1) { animation-delay: .03s; } .tiles > .tile:nth-child(2) { animation-delay: .07s; }
.tiles > .tile:nth-child(3) { animation-delay: .11s; } .tiles > .tile:nth-child(4) { animation-delay: .15s; }
.tiles > .tile:nth-child(5) { animation-delay: .19s; } .tiles > .tile:nth-child(6) { animation-delay: .23s; }
.tiles > .tile:nth-child(7) { animation-delay: .27s; } .tiles > .tile:nth-child(8) { animation-delay: .31s; }
.tiles > .tile:nth-child(9) { animation-delay: .35s; } .tiles > .tile:nth-child(10) { animation-delay: .4s; }
.reveal, .stats, .since, .day-nav, .card, .vgroup, .album, .latest, .collage-cta, .appt-list { animation: rise .5s cubic-bezier(.2, .9, .3, 1) backwards; }
.section:nth-of-type(2) .card, .section:nth-of-type(2).reveal { animation-delay: .06s; }
.section:nth-of-type(3) .card, .section:nth-of-type(3).reveal { animation-delay: .12s; }
.timeline li { animation: rise .35s ease backwards; }
.timeline li:nth-child(2) { animation-delay: .03s; } .timeline li:nth-child(3) { animation-delay: .06s; }
.timeline li:nth-child(4) { animation-delay: .09s; } .timeline li:nth-child(5) { animation-delay: .12s; }

.tile, .btn, .chip, .seg button, .when-chips button, .vac, .appt, .icon-btn, .nav a { position: relative; overflow: hidden; -webkit-user-select: none; user-select: none; }
.tile .blob { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tile:active .blob { transform: scale(.88) rotate(-6deg); }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; width: 240%; aspect-ratio: 1; background: currentColor; opacity: .18; transform: translate(-50%, -50%) scale(0); animation: ripple .6s ease-out forwards; }
.tile.done .blob { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.tile.done .blob .ico { animation: wiggle .5s ease .1s; }
.tile.sleep.active .blob .ico { animation: breathe 3s ease-in-out infinite; }
.spark { position: fixed; z-index: 80; width: 9px; height: 9px; border-radius: 50%; pointer-events: none; animation: burst .7s cubic-bezier(.2, .8, .3, 1) forwards; }
.bump { animation: bump .45s ease; }
.sheet-backdrop { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.sheet { transition: transform .38s cubic-bezier(.16, 1.1, .3, 1); }
.sheet-wrap.open #sheet-body > * { animation: rise .35s cubic-bezier(.2, .9, .3, 1) backwards; }
.sheet-wrap.open #sheet-body > *:nth-child(2) { animation-delay: .03s; }
.sheet-wrap.open #sheet-body > *:nth-child(3) { animation-delay: .06s; }
.sheet-wrap.open #sheet-body > *:nth-child(4) { animation-delay: .09s; }
.sheet-wrap.open #sheet-body > *:nth-child(n+5) { animation-delay: .12s; }
.chip.sel, .seg button.on, .when-chips button.on { transition: background .2s, color .2s, box-shadow .2s; }
.logo svg { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover svg, .nav .brand:hover svg { transform: rotate(-8deg) scale(1.05); }
@media (hover: hover) {
  .tile:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px rgba(80, 40, 30, .45); }
  .btn:hover, .appt:hover, .vac:hover { filter: brightness(1.03); transform: translateY(-1px); }
  .tile, .btn, .appt, .vac { transition: transform .2s ease, box-shadow .2s ease, filter .2s; }
}

/* celulares con poca altura: que los 10 botones quepan sin desplazarse */
@media (max-width: 759px) and (max-height: 780px) {
  .topbar { padding-bottom: 10px; }
  .tiles { gap: 10px; }
  .tile { min-height: 108px; padding: 10px 4px; border-radius: 22px; }
  .tile .blob { width: 48px; height: 48px; margin-bottom: 2px; }
  .tile .blob .ico { width: 27px; height: 27px; }
  .tile.wide-tile { min-height: 76px; padding: 10px 14px; }
  .install-banner { padding: 6px 6px 6px 10px; margin-bottom: 10px; }
  .install-banner .badge { width: 36px; height: 36px; }
}

/* ---------- tablet ---------- */
@media (min-width: 760px) {
  :root { --nav-h: 0px; --gutter: 32px; }
  .app { max-width: none; margin: 0 0 0 108px; padding: 0 32px 40px; }
  .app::before { left: 35%; }
  .nav {
    top: 0; right: auto; width: 108px; height: auto; flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: calc(20px + env(safe-area-inset-top)) 12px 20px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .nav .brand { display: grid !important; place-items: center; width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 22px; background: var(--rose-soft); }
  .nav .brand svg { width: 50px; height: 50px; }
  .nav a { flex: none; max-width: none; padding: 12px 4px; font-size: .78rem; }
  .nav a.on { background: var(--rose-soft); color: var(--rose-deep); }
  .nav a.on::before { display: none; }
  .nav a.tablet-only { display: flex !important; margin-top: auto; }
  .topbar .logo { display: none; }
  .toast { bottom: 28px; }
  .wide { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .wide > .col-side { position: sticky; top: 16px; }
  .tiles { gap: 18px; max-width: 760px; margin: 8px auto 0; }
  .tile { min-height: 172px; border-radius: 32px; }
  .tile .blob { width: 74px; height: 74px; }
  .tile .blob .ico { width: 40px; height: 40px; }
  .tile b { font-size: 1.12rem; }
  .tile small { font-size: .85rem; }
  .album { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .photos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sticky-save { bottom: 16px; }
  .sheet { border-radius: 30px; bottom: 50%; transform: translateY(calc(50% + 40px)); opacity: 0; transition: transform .22s, opacity .22s; max-width: 560px; }
  .sheet-wrap.open .sheet { transform: translateY(50%); opacity: 1; }
  .sheet .grab { display: none; }
}
@media (min-width: 1100px) {
  .album { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .photos-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 370px) {
  :root { --gutter: 12px; }
  .tiles { gap: 9px; }
  .tile { min-height: 110px; }
  .tile .blob { width: 48px; height: 48px; }
  .tile .blob .ico { width: 28px; height: 28px; }
  .tile b { font-size: .88rem; }
  .chip { font-size: 1.25rem; }
  .when-custom { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* plantillas de collage */
.tpl-strip { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; margin: 0 -2px; scroll-snap-type: x proximity; }
.tpl-strip::-webkit-scrollbar { display: none; }
.tpl { flex: none; width: 142px; border: 0; background: var(--card); border-radius: 20px; padding: 8px 8px 12px; text-align: left; color: var(--ink); scroll-snap-align: start; box-shadow: inset 0 0 0 2px var(--line); transition: box-shadow .2s, transform .15s; }
.tpl:active { transform: scale(.96); }
.tpl.on { box-shadow: inset 0 0 0 3px var(--rose); }
.tpl-img { display: grid; place-items: center; height: 150px; border-radius: 14px; overflow: hidden; background: var(--paper-2); margin-bottom: 8px; }
.tpl-img img { max-width: 100%; max-height: 100%; display: block; border-radius: 6px; box-shadow: 0 2px 8px rgba(80, 50, 20, .14); }
.tpl-img.own-img { background: var(--rose-soft); color: var(--rose-deep); }
.tpl-img.own-img .ico { width: 44px; height: 44px; }
.tpl b { display: block; font-size: .95rem; font-weight: 800; }
.tpl small { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 auto; min-width: 70px; padding: 11px 8px; overflow: visible; text-overflow: clip; }

/* elegir varias fotos */
.photo .tick { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); color: #fff; display: none; place-items: center; }
.photo .tick .ico { width: 18px; height: 18px; opacity: 0; }
.selecting .photo .tick { display: grid; }
.selecting .photo img { transition: transform .15s, border-radius .15s; }
.selecting .photo.sel { background: var(--rose-soft); }
.selecting .photo.sel img { transform: scale(.88); border-radius: 12px; }
.selecting .photo.sel .tick { background: var(--rose); }
.selecting .photo.sel .tick .ico { opacity: 1; }
.selecting .upload-tile { opacity: .4; pointer-events: none; }
.selbar { position: fixed; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 30; background: var(--card); border-radius: 22px; padding: 10px 12px 12px; box-shadow: 0 10px 34px rgba(60, 30, 20, .22); animation: rise .3s cubic-bezier(.2, .9, .3, 1) backwards; }
.selbar[hidden] { display: none; }
.selbar-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding-left: 4px; }
.selbar-top b { flex: 1; }
.selbar-actions { display: flex; gap: 10px; }
.selbar-actions .btn { flex: 1; }
.selbar .btn:disabled { opacity: .45; }
body.has-selbar main { padding-bottom: 170px; }
body.has-selbar .toast { bottom: calc(var(--nav-h) + 150px + env(safe-area-inset-bottom)); }

/* ---------- gráficas del resumen ---------- */
:root { --c-feed: #d29a14; --c-sleep: #6e77c6; --c-awake: #d29a14; --c-pipi: #c99212; --c-popo: #9c5520; }
@media (prefers-color-scheme: dark) {
  :root { --c-feed: #b5850f; --c-sleep: #7c85d4; --c-awake: #b5850f; --c-pipi: #b5850f; --c-popo: #9a4e22; }
}
.ch-range { margin-bottom: 12px; }
.ch-range button { padding: 9px 2px; font-size: .84rem; }
.ch-shell { position: relative; }
.ch-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); overscroll-behavior-x: contain; }
.ch-track::-webkit-scrollbar { display: none; }
.ch-card { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; background: var(--card); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: 16px 16px 14px; min-width: 0; }
.charts.busy .ch-track { opacity: .55; transition: opacity .2s; }
.ch-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-right: 0; margin-bottom: 10px; }
.ch-card h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.ch-count { font-size: .76rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.ch-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ch-facts div { background: var(--paper-2); border-radius: 14px; padding: 7px 11px; min-width: 0; }
.ch-facts span { display: block; font-size: .72rem; font-weight: 800; color: var(--muted); }
.ch-facts b { display: block; font-size: .95rem; font-weight: 800; color: var(--ink); }
.ch-legend { display: flex; gap: 14px; font-size: .8rem; font-weight: 800; color: var(--ink-2); margin: 0 2px 4px; }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ch-plot { position: relative; touch-action: pan-x pan-y; }
.ch-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.ch-ax { fill: var(--muted); font-size: 9.5px; font-weight: 700; }
.ch-avg-t { fill: var(--ink-2); }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-avg { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 4 4; }
.ch-band { fill: var(--c-sleep); fill-opacity: .1; }
.ch-cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-col-on { fill: var(--ink); fill-opacity: .06; }
.ch-cell-bg { fill: var(--paper-2); }
.ch-cell-na { fill: var(--line); fill-opacity: .4; }
.ch-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 7px 10px; font-size: .8rem; font-weight: 700; line-height: 1.35; max-width: 220px; box-shadow: 0 6px 18px rgba(40, 20, 10, .25); }
.ch-tip b { display: block; font-weight: 800; }
.ch-note { font-size: .8rem; color: var(--muted); font-weight: 600; margin: 8px 2px 0; }
.ch-empty { color: var(--muted); font-weight: 700; text-align: center; padding: 50px 10px; margin: 0; }
.ch-nav { position: absolute; top: 10px; width: 36px; height: 36px; min-height: 0; padding: 0; display: grid; place-items: center; }
.ch-nav .ico { width: 18px; height: 18px; }
.ch-nav.prev { right: 54px; } .ch-nav.next { right: 12px; }
.ch-card header { padding-right: 88px; }
.ch-nav:disabled { opacity: .35; }
.ch-dots { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.ch-dots button { width: 24px; height: 24px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.ch-dots button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: width .2s, background .2s; }
.ch-dots button.on::after { width: 20px; border-radius: 4px; background: var(--rose); }

/* ---------- documentos ---------- */
.nav a .sm { display: none; }
@media (max-width: 430px) { .nav a .lg { display: none; } .nav a .sm { display: inline; } }
.nav a { white-space: nowrap; }
.doc-cta { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
.doc-cta .cta-ico { width: 54px; height: 54px; flex: none; border-radius: 18px; background: var(--card); display: grid; place-items: center; color: var(--rose); box-shadow: 0 4px 12px -6px rgba(90, 40, 50, .35); }
.doc-cta .cta-ico .ico { width: 28px; height: 28px; }
.doc-thumb { width: 52px; height: 52px; flex: none; border-radius: 14px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); display: grid; place-items: center; position: relative; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.doc-thumb.ext { color: var(--note-ink); background: var(--note-soft); border-color: transparent; align-content: center; gap: 0; }
.doc-thumb.ext .ico { width: 24px; height: 24px; }
.doc-thumb.ext b { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; line-height: 1; }
.doc-thumb.empty { background: transparent; border: 2px dashed var(--line-2); color: var(--muted); }
.doc-thumb.lg { width: 100%; height: 220px; border-radius: 18px; }
.doc-thumb.lg img { object-fit: contain; background: #fff; }
.doc-thumb.lg.ext .ico { width: 64px; height: 64px; }
.doc-thumb.lg.ext b { font-size: .9rem; }
.doc-slots { display: grid; gap: 10px; }
.doc-slot, .doc-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.doc-slot { padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.doc-slot .body, .doc-row .body { flex: 1; min-width: 0; }
.doc-slot .body b, .doc-row .body b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-slot .body > span, .doc-row .body > span { display: block; color: var(--ink-2); font-size: .84rem; font-weight: 600; }
.doc-slot .add { flex: none; font-weight: 800; font-size: .84rem; color: var(--rose-deep); background: var(--rose-soft); border-radius: 99px; padding: 7px 13px; }
.doc-slot .ok-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.doc-slot .ok-dot .ico { width: 16px; height: 16px; }
.doc-slot.ok .body > span { color: var(--ok); font-weight: 800; }
.doc-row { padding: 11px 0; background: none; border: 0; border-top: 1px dashed var(--line-2); }
.doc-row:first-child { border-top: 0; }
.doc-row > .ico { color: var(--muted); width: 18px; height: 18px; flex: none; }
.doc-tag { display: inline-flex !important; align-items: center; gap: 5px; margin-top: 4px; font-size: .74rem !important; font-weight: 800 !important; color: var(--diaper-ink) !important; background: var(--diaper-soft); border-radius: 99px; padding: 2px 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-tag .ico { width: 13px; height: 13px; flex: none; }
.doc-search { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 0 14px; height: 48px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); }
.doc-search .ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.doc-search input { border: 0 !important; box-shadow: none !important; height: 44px; padding: 0; background: transparent; }
.doc-search[hidden] { display: none; }
.doc-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; padding-bottom: 2px; }
.doc-cats::-webkit-scrollbar { display: none; }
.doc-cats[hidden] { display: none; }
.doc-cats button { flex: none; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink-2); border-radius: 99px; padding: 8px 13px; font-weight: 800; font-size: .86rem; }
.doc-cats button b { color: var(--muted); margin-left: 2px; }
.doc-cats button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.doc-cats button.on b { color: inherit; opacity: .7; }
.doc-cats.pick { flex-wrap: wrap; overflow: visible; margin: 0; }
.doc-group { margin-bottom: 16px; }
.doc-group h3 { display: flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px; font-family: var(--font); }
.doc-group h3 .ico { width: 18px; height: 18px; }
.card.empty .ico.big { width: 56px; height: 56px; color: var(--line-2); margin: 0 auto 10px; display: block; }
.doc-preview { display: block; position: relative; text-decoration: none; color: inherit; margin-bottom: 12px; }
.doc-preview .open { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: color-mix(in srgb, var(--ink) 86%, transparent); color: var(--paper); border-radius: 99px; padding: 8px 14px; font-weight: 800; font-size: .84rem; }
.doc-preview .open .ico { width: 18px; height: 18px; }
.doc-meta { margin: 0 2px 10px; color: var(--ink-2); font-size: .86rem; font-weight: 700; }
.doc-notes { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--paper-2); white-space: pre-wrap; font-size: .93rem; }
.doc-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--diaper-soft); color: var(--diaper-ink); text-decoration: none; font-weight: 700; font-size: .86rem; }
.doc-link span { flex: 1; min-width: 0; }
.doc-link b { display: block; font-size: .98rem; font-weight: 800; }
.doc-link .ico { width: 22px; height: 22px; flex: none; }
.doc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 4px; }
.doc-actions .btn { padding: 0 14px; }
.drop { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.drop-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; border: 2px dashed var(--line-2); border-radius: 20px; background: var(--paper-2); color: var(--ink-2); font-weight: 800; font-size: .92rem; cursor: pointer; text-align: center; }
.drop-btn .ico { width: 30px; height: 30px; color: var(--rose); }
.drop-btn:active { transform: scale(.98); }
.up-list { list-style: none; margin: 0 0 8px; padding: 0; }
.up-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-weight: 700; font-size: .9rem; }
.up-list li > .ico { width: 22px; height: 22px; color: var(--note-ink); flex: none; }
.up-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-list li small { color: var(--muted); font-weight: 700; flex: none; }
.up-progress { height: 8px; border-radius: 9px; background: var(--paper-2); overflow: hidden; margin: 4px 0 12px; }
.up-progress i { display: block; height: 100%; width: 0; background: var(--rose); border-radius: 9px; transition: width .2s; }
/* documentos dentro de una cita de Pediatría */
.attach { margin: 2px 0 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--paper-2); }
.attach .doc-row { border-top-color: var(--line-2); padding: 9px 0; }
.attach .doc-thumb { width: 44px; height: 44px; border-radius: 12px; }
.attach .add-file { display: inline-flex; margin-top: 8px; cursor: pointer; }
.attach .queued { font-size: .86rem; font-weight: 700; color: var(--ink-2); margin: 6px 0 0; }
.pill.docs { background: var(--note-soft); color: var(--note-ink); }
.pill.docs .ico { width: 12px; height: 12px; vertical-align: -1px; }
/* foto de un hito o nota */
.timeline .ph { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: none; border: 2px solid var(--card); box-shadow: 0 2px 8px -3px rgba(80, 40, 30, .4); }
.timeline .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-photo { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px; border-radius: var(--radius-sm); background: var(--note-soft); }
.note-photo .acts > b { font-weight: 800; color: var(--note-ink); }
.note-photo .prev { width: 76px; height: 76px; border-radius: 16px; overflow: hidden; flex: none; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); border: 2px dashed var(--line-2); }
.note-photo .prev.has { border: 0; }
.note-photo .prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-photo .prev .ico { width: 30px; height: 30px; }
.note-photo .acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.note-photo .acts label { cursor: pointer; }
.note-photo small { color: var(--muted); font-weight: 600; font-size: .8rem; }
@media (min-width: 760px) {
  .doc-slots { grid-template-columns: minmax(0, 1fr); }
  .doc-thumb.lg { height: 300px; }
}

/* ---------- documentos: carpetas por tipo ---------- */
.cat-identidad { --c: var(--sleep); --c-soft: var(--sleep-soft); --c-ink: var(--sleep-ink); }
.cat-salud { --c: var(--med); --c-soft: var(--med-soft); --c-ink: var(--med-ink); }
.cat-estudios { --c: var(--diaper); --c-soft: var(--diaper-soft); --c-ink: var(--diaper-ink); }
.cat-seguro { --c: var(--bath); --c-soft: var(--bath-soft); --c-ink: var(--bath-ink); }
.cat-escuela { --c: var(--feed); --c-soft: var(--feed-soft); --c-ink: var(--feed-ink); }
.cat-otro { --c: var(--note); --c-soft: var(--note-soft); --c-ink: var(--note-ink); }
.cat-todos { --c: var(--rose); --c-soft: var(--rose-soft); --c-ink: var(--rose-deep); }
.slot-progress { height: 8px; border-radius: 9px; background: var(--paper-2); overflow: hidden; margin: -4px 2px 12px; }
.slot-progress i { display: block; height: 100%; width: 0; border-radius: 9px; background: var(--ok); transition: width .4s ease; }
.doc-slot { border-left: 5px solid var(--c, var(--line)); }
.doc-slot .doc-thumb.empty { border-color: color-mix(in srgb, var(--c) 60%, transparent); color: var(--c-ink); }
.doc-slot .doc-thumb.empty .ico { width: 22px; height: 22px; margin: 0; color: var(--c-ink); }
.folders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.folder {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 118px;
  padding: 14px; border: 2px solid transparent; border-radius: 22px; background: var(--c-soft); color: var(--c-ink);
  font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow);
}
.folder .f-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--card); color: var(--c-ink); }
.folder .f-ico .ico { width: 24px; height: 24px; }
.folder .f-txt { min-width: 0; max-width: 100%; }
.folder .f-txt b, .folder .f-txt small { overflow-wrap: anywhere; hyphens: auto; }
.folder .f-txt b { display: block; font-weight: 800; font-size: .98rem; line-height: 1.2; }
.folder .f-txt small { display: block; margin-top: 2px; font-size: .76rem; font-weight: 700; opacity: .8; line-height: 1.3; }
.folder .f-n { position: absolute; top: 12px; right: 12px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 900; font-size: .9rem; }
.folder .f-n .ico { width: 16px; height: 16px; }
.folder.is-empty { background: var(--card); border: 2px dashed var(--line-2); color: var(--ink-2); box-shadow: none; }
.folder.is-empty .f-ico { background: var(--c-soft); }
.folder.is-empty .f-n { background: var(--paper-2); color: var(--muted); }
.folder:active { transform: scale(.98); }
.doc-group h3 { color: var(--c-ink, var(--muted)); letter-spacing: .03em; font-size: .86rem; }
.doc-group h3 .f-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--c-soft); flex: none; }
.doc-group h3 .f-ico .ico { width: 18px; height: 18px; }
.doc-group h3 > b { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; background: var(--c-soft); font-size: .8rem; }
.doc-group .card.flush { border-left: 5px solid var(--c, var(--line)); }
.doc-group .doc-thumb.ext { background: var(--c-soft); color: var(--c-ink); }
@media (min-width: 1200px) {
  .folders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* carpeta Todos: ocupa todo el ancho, arriba de las demás */
.folder.cat-todos { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; padding: 14px 16px; }
.folder.cat-todos .f-txt { flex: 1; }
.folder.cat-todos .f-n { position: static; }
.folder { overflow: hidden; }
/* vista de una carpeta */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 6px 2px; border: 0; background: none; color: var(--rose-deep); font: inherit; font-weight: 800; cursor: pointer; }
.back-link .ico { width: 18px; height: 18px; }
.folder-head { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 14px; border-radius: var(--radius); background: var(--c-soft); color: var(--c-ink); }
.folder-head .f-ico { width: 52px; height: 52px; flex: none; border-radius: 17px; display: grid; place-items: center; background: var(--card); color: var(--c-ink); box-shadow: var(--shadow); }
.folder-head .f-ico .ico { width: 28px; height: 28px; }
.folder-head .f-txt { flex: 1; min-width: 0; }
.folder-head h2 { font-size: 1.35rem; color: inherit; margin: 0; }
.folder-head small { display: block; font-weight: 700; font-size: .84rem; opacity: .85; }
.folder-head .btn { flex: none; background: var(--c-ink); color: var(--card); }
.folder-head.in-sheet { margin: 0 0 14px; }
.folder-head .close { border: 0; background: var(--card); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; cursor: pointer; }
.folder-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 132px; padding: 16px 10px; border-radius: 22px; font: inherit; text-align: center; cursor: pointer; border: 2px solid var(--line-2); background: var(--card); color: var(--ink); }
.choice .ico { width: 34px; height: 34px; color: var(--c-ink); }
.choice b { font-weight: 800; font-size: 1.02rem; }
.choice small { color: var(--ink-2); font-weight: 700; font-size: .8rem; }
.choice.see { background: var(--c-soft); border-color: transparent; color: var(--c-ink); }
.choice.see small { color: inherit; opacity: .8; }
.choice.up { border-style: dashed; }
.choice:active { transform: scale(.98); }
/* elegir carpeta al subir */
.type-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.type-pick button { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.type-pick .f-ico { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--c-soft); color: var(--c-ink); }
.type-pick .f-ico .ico { width: 20px; height: 20px; }
.type-pick b { font-weight: 800; font-size: .88rem; line-height: 1.2; padding-right: 16px; }
.type-pick small { font-size: .72rem; font-weight: 700; color: var(--muted); line-height: 1.25; }
.type-pick .tick { position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 50%; display: none; place-items: center; background: var(--c-ink); color: var(--card); }
.type-pick .tick .ico { width: 12px; height: 12px; }
.type-pick button.on { border-color: var(--c-ink); background: var(--c-soft); }
.type-pick button.on .f-ico { background: var(--card); }
.type-pick button.on .tick { display: grid; }
@media (max-width: 360px) { .type-pick { grid-template-columns: 1fr; } }
/* ver un documento dentro de la app */
.doc-preview { width: 100%; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.doc-viewer { z-index: 80; background: #120d0a; }
.doc-viewer .bar { align-items: center; color: #f2e9dc; }
.doc-viewer .bar .icon-btn { flex: none; text-decoration: none; }
.doc-viewer .v-title { flex: 1; min-width: 0; }
.doc-viewer .v-title b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-viewer .v-title small { font-size: .8rem; opacity: .7; font-weight: 700; }
.v-pages { --zoom: 1; flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; padding: 4px 12px calc(20px + env(safe-area-inset-bottom)); }
.v-page { margin: 0 auto 14px; width: calc(100% * var(--zoom)); max-width: calc(900px * var(--zoom)); }
.v-pages.zoomed .v-page { max-width: none; }
.v-page img { display: block; width: 100%; height: auto; flex: none; object-fit: initial; background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.v-page figcaption { text-align: center; color: #f2e9dc; opacity: .7; font-size: .78rem; font-weight: 700; margin-top: 6px; }
/* en el celular: Ver ocupa toda la fila y los demás van de dos en dos */
@media (max-width: 559px) {
  .doc-actions { grid-template-columns: 1fr 1fr; }
  .doc-actions .wide-btn { grid-column: 1 / -1; }
  .doc-actions .see-btn { min-height: 60px; font-size: 1.08rem; }
  .doc-actions .see-btn .ico { width: 24px; height: 24px; }
}
