/* =========================================================
   白奕の专属 · Newborn feeding log
   A warm, quiet interface designed for one-handed use.
   ========================================================= */

:root {
  --bg: #f6f1e8;
  --bg-deep: #efe7da;
  --surface: #fffdf9;
  --surface-soft: #fbf7f0;
  --surface-raise: #ffffff;
  --ink: #2d2923;
  --ink-soft: #5f574d;
  --muted: #756b5f;
  --muted-light: #8a7e70;
  --line: #e9e0d2;
  --line-strong: #d9cdbc;

  --green-950: #1f3a2d;
  --green-900: #284737;
  --green-800: #315642;
  --green-700: #3f6a52;
  --green-600: #557b62;
  --green-100: #e6efe7;
  --green-50: #f0f5f0;

  --coral-700: #a94f3b;
  --coral: #cf755d;
  --coral-500: #d9866f;
  --coral-100: #f8e5de;
  --coral-50: #fcf1ed;

  --gold-700: #9b712f;
  --gold: #d9a84f;
  --gold-100: #f8edd6;

  --blue-700: #5f8191;
  --blue: #80a1b1;
  --blue-100: #e7f0f4;

  --lilac-700: #746a90;
  --lilac: #968bb1;
  --lilac-100: #efebf6;

  --danger: #b34d40;
  --danger-100: #fae8e4;

  --shadow-xs: 0 1px 2px rgba(60, 46, 31, 0.04);
  --shadow-sm: 0 8px 24px rgba(60, 46, 31, 0.06);
  --shadow-md: 0 18px 50px rgba(49, 38, 26, 0.1);
  --shadow-lg: 0 30px 80px rgba(31, 41, 34, 0.18);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --radius-xl: 32px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: "Avenir Next", "Segoe UI", "SF Pro Display", "Helvetica Neue", sans-serif;

  --sidebar-w: 264px;
  --page-max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -4%, rgba(207, 117, 93, 0.09), transparent 29rem),
    radial-gradient(circle at 100% 0%, rgba(63, 106, 82, 0.07), transparent 34rem),
    var(--bg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--surface);
  background: var(--green-700);
}

:focus-visible {
  outline: 3px solid rgba(207, 117, 93, 0.42);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--surface);
  background: var(--green-900);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background:
    radial-gradient(circle at 50% 38%, rgba(207, 117, 93, 0.12), transparent 26rem),
    var(--bg);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.boot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-grid;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(40, 71, 55, 0.16);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.boot-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  animation: boot-breathe 2.4s ease-in-out infinite;
}

.boot-word {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.boot-word small {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.23em;
}

.boot-dots {
  display: flex;
  gap: 7px;
}

.boot-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  animation: dot-pulse 1.25s ease-in-out infinite;
}

.boot-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.boot-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

.noscript-card {
  max-width: 540px;
  margin: 15vh auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.noscript-card h1 {
  margin-bottom: 12px;
  font-size: 24px;
}

/* ---------- App shell ---------- */

.app-shell {
  min-height: 100svh;
}

.app-body {
  min-height: 100svh;
}

main {
  min-height: 60vh;
}

.page-wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px 18px calc(112px + env(safe-area-inset-bottom));
}

.page-enter {
  animation: page-rise 0.5s var(--ease) both;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-eyebrow::before {
  width: 18px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.page-title {
  font-size: clamp(27px, 4.2vw, 36px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.page-subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: calc(8px + env(safe-area-inset-top)) 18px 8px;
  background: rgba(246, 241, 232, 0.83);
  border-bottom: 1px solid rgba(233, 224, 210, 0.55);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.mobile-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  box-shadow: none;
}

.mobile-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-date {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.avatar-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(49, 86, 66, 0.12);
  border-radius: 50%;
  color: var(--green-800);
  background: var(--green-100);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s var(--spring), box-shadow 0.2s ease;
}

.avatar-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.sidebar {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s var(--spring), background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  color: #fffaf2;
  background: var(--green-800);
  box-shadow: 0 8px 20px rgba(49, 86, 66, 0.18);
}

.btn-primary:hover {
  background: var(--green-900);
  box-shadow: 0 12px 26px rgba(49, 86, 66, 0.22);
}

.btn-coral {
  color: #fffaf5;
  background: var(--coral);
  box-shadow: 0 8px 20px rgba(207, 117, 93, 0.22);
}

.btn-coral:hover {
  background: var(--coral-700);
}

.btn-soft {
  color: var(--green-800);
  background: var(--green-100);
}

.btn-soft:hover {
  background: #dce9df;
}

.btn-ghost {
  color: var(--ink-soft);
  border-color: var(--line);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.btn-danger {
  color: var(--danger);
  border-color: #efd3cd;
  background: var(--danger-100);
}

.btn-danger:hover {
  background: #f6dcd7;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 15px;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.head-add {
  display: none;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface);
  transition: background 0.18s ease, transform 0.18s var(--spring), border-color 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  transform: rotate(-4deg);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 650;
}

.text-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.text-link:hover svg {
  transform: translateX(2px);
}

/* ---------- Sidebar ---------- */

@media (min-width: 1060px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    padding: 28px 22px calc(22px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background:
      radial-gradient(circle at 8% 92%, rgba(207, 117, 93, 0.08), transparent 16rem),
      #fbf7f0;
    border-right: 1px solid var(--line);
  }

  .app-body {
    margin-left: var(--sidebar-w);
  }

  .page-wrap {
    padding: 40px 40px 64px;
  }

  .mobile-header,
  .bottom-nav {
    display: none !important;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 6px 0;
  }

  .sidebar-brand .brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }

  .sidebar-word {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 20px;
    font-weight: 680;
    letter-spacing: 0.1em;
    line-height: 1.2;
  }

  .sidebar-word small {
    color: var(--muted);
    font-family: var(--font-num);
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.19em;
  }

  .sidebar-baby {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 26px 0 22px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #e4dacb;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffdf9 0%, #f7efe4 100%);
    text-align: left;
    transition: transform 0.2s var(--spring), box-shadow 0.2s ease;
  }

  .sidebar-baby::after {
    position: absolute;
    right: -12px;
    bottom: -20px;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(207, 117, 93, 0.16);
    border-radius: 50%;
    content: "";
  }

  .sidebar-baby:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }

  .sidebar-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #f9f1e5;
    background: var(--green-800);
    font-size: 17px;
    font-weight: 650;
  }

  .sidebar-baby-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
  }

  .sidebar-baby-copy strong {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-baby-copy span {
    color: var(--muted);
    font-size: 10.5px;
  }

  .side-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .side-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 550;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s var(--spring);
  }

  .side-nav a svg {
    width: 20px;
    height: 20px;
    color: var(--muted);
    transition: color 0.18s ease;
  }

  .side-nav a:hover {
    color: var(--ink);
    background: rgba(255, 253, 249, 0.72);
  }

  .side-nav a.active {
    color: var(--green-900);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    font-weight: 650;
  }

  .side-nav a.active svg {
    color: var(--green-700);
  }

  .side-nav a.active::before {
    position: absolute;
    left: -22px;
    width: 3px;
    height: 20px;
    border-radius: 0 4px 4px 0;
    background: var(--coral);
    content: "";
  }

  .sidebar-add {
    width: 100%;
    margin-top: 18px;
  }

  .sidebar-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: auto;
    padding: 18px 8px 0;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.55;
  }

  .sidebar-note svg {
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 1px;
  }
}

/* ---------- Mobile bottom navigation ---------- */

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(220, 209, 193, 0.7);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 -12px 36px rgba(57, 43, 28, 0.07);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
}

.nav-item {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 550;
  transition: color 0.18s ease;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
}

.nav-item.active {
  color: var(--green-800);
  font-weight: 650;
}

.nav-item.active svg {
  stroke-width: 2;
}

.nav-add-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  gap: 2px;
  min-height: 56px;
  transform: translateY(-15px);
}

.nav-add {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  color: #fffaf2;
  background: var(--coral);
  box-shadow: 0 10px 22px rgba(207, 117, 93, 0.32);
  transition: transform 0.2s var(--spring), background 0.2s ease;
}

.nav-add:hover {
  background: var(--coral-700);
  transform: scale(1.04);
}

.nav-add:active {
  transform: scale(0.96);
}

.nav-add svg {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.nav-add-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
  line-height: 1;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 24px 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  color: #f8f1e5;
  background:
    radial-gradient(circle at 88% -12%, rgba(232, 185, 131, 0.25), transparent 17rem),
    radial-gradient(circle at 18% 110%, rgba(207, 117, 93, 0.23), transparent 18rem),
    linear-gradient(135deg, #284737 0%, #315642 53%, #3c624b 100%);
  box-shadow: 0 24px 52px -18px rgba(31, 58, 45, 0.5);
}

.hero::before {
  position: absolute;
  top: -92px;
  right: -64px;
  z-index: -1;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(248, 241, 229, 0.1);
  border-radius: 50%;
  content: "";
}

.hero::after {
  position: absolute;
  top: -46px;
  right: -18px;
  z-index: -1;
  width: 165px;
  height: 165px;
  border: 1px solid rgba(248, 241, 229, 0.08);
  border-radius: 50%;
  content: "";
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(248, 241, 229, 0.8);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-kicker i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e6b87b;
  box-shadow: 0 0 0 4px rgba(230, 184, 123, 0.12);
}

.hero-date {
  color: rgba(248, 241, 229, 0.6);
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 16px;
}

.hero-metrics {
  margin-top: 1px;
}

.hero-label {
  margin-bottom: -1px;
  color: rgba(248, 241, 229, 0.68);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.03em;
}

.hero-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-num);
  font-size: clamp(60px, 10vw, 80px);
  font-weight: 550;
  letter-spacing: -0.07em;
  line-height: 1;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.hero-count em {
  color: rgba(248, 241, 229, 0.62);
  font-family: var(--font-sans);
  font-size: 15px;
  font-style: normal;
  font-weight: 450;
  letter-spacing: 0;
}

.hero-caption {
  margin-top: 7px;
  color: rgba(248, 241, 229, 0.52);
  font-size: 10.5px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(248, 241, 229, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(4px);
}

.hero-metric {
  min-width: 0;
  padding: 12px 10px;
  text-align: center;
}

.hero-metric + .hero-metric {
  border-left: 1px solid rgba(248, 241, 229, 0.09);
}

.hero-metric span {
  display: block;
  margin-bottom: 3px;
  overflow: hidden;
  color: rgba(248, 241, 229, 0.53);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-metric strong {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.hero-metric small {
  color: rgba(248, 241, 229, 0.55);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 450;
  letter-spacing: 0;
}

.hero-last {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(248, 241, 229, 0.11);
  color: rgba(248, 241, 229, 0.55);
  font-size: 10.5px;
  line-height: 1.4;
}

.hero-last svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: #e6b87b;
}

.hero-last strong {
  overflow: hidden;
  color: rgba(248, 241, 229, 0.88);
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-last .last-relative {
  margin-left: auto;
  color: rgba(248, 241, 229, 0.55);
  font-family: var(--font-num);
  white-space: nowrap;
}

.rhythm {
  margin-top: 15px;
}

.rhythm-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(248, 241, 229, 0.12);
}

.rhythm-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(230, 184, 123, 0.45), rgba(230, 184, 123, 0.05));
}

.rhythm-now {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 13px;
  border-radius: 2px;
  background: #f8f1e5;
  box-shadow: 0 0 0 3px rgba(248, 241, 229, 0.12);
  transform: translate(-50%, -50%);
}

.rhythm-dot {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1.5px solid #315642;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.rhythm-dot.nursing {
  background: #e9a58f;
}

.rhythm-dot.bottle {
  background: #e8c27f;
}

.rhythm-dot.diaper {
  background: #a9c7d4;
}

.rhythm-dot.sleep {
  background: #c3b9d7;
}

.rhythm-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: rgba(248, 241, 229, 0.32);
  font-family: var(--font-num);
  font-size: 8px;
  letter-spacing: 0.04em;
}

/* ---------- Active timer banner ---------- */

.timer-banner {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 12px 11px 15px;
  border: 1px solid #efcfc4;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8f3, #f9e9e2);
  box-shadow: var(--shadow-xs);
  text-align: left;
  animation: page-rise 0.45s var(--ease) both;
}

.timer-banner-pulse {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--coral-700);
  background: #f6ded6;
}

.timer-banner-pulse svg {
  width: 19px;
  height: 19px;
}

.timer-banner.running .timer-banner-pulse::after {
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(207, 117, 93, 0.32);
  border-radius: 14px;
  content: "";
  animation: timer-ring 2s ease-out infinite;
}

.timer-banner-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.timer-banner-copy strong {
  color: var(--coral-700);
  font-size: 12px;
  font-weight: 650;
}

.timer-banner-copy span {
  overflow: hidden;
  color: #9b776c;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-banner-time {
  flex: none;
  color: var(--coral-700);
  font-family: var(--font-num);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.timer-banner-chevron {
  flex: none;
  color: #b28d81;
}

.timer-banner-chevron svg {
  width: 17px;
  height: 17px;
}

/* ---------- Quick actions ---------- */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0 24px;
}

.quick-btn {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, var(--shadow-xs);
  text-align: left;
  transition: transform 0.2s var(--spring), box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-btn:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.quick-btn:active {
  transform: translateY(0) scale(0.985);
}

.quick-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 41px;
  height: 41px;
  border-radius: 14px;
}

.quick-icon svg {
  width: 21px;
  height: 21px;
}

.quick-nursing .quick-icon {
  color: var(--green-700);
  background: var(--green-100);
}

.quick-bottle .quick-icon {
  color: var(--coral-700);
  background: var(--coral-100);
}

.quick-diaper .quick-icon {
  color: var(--blue-700);
  background: var(--blue-100);
}

.quick-sleep .quick-icon {
  color: var(--lilac-700);
  background: var(--lilac-100);
}

.quick-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.quick-copy strong {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-arrow {
  display: none;
  flex: none;
  color: var(--muted-light);
}

.quick-arrow svg {
  width: 16px;
  height: 16px;
}

/* ---------- Cards and home layout ---------- */

.page-section {
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
  padding: 0 2px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-title small {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--coral-700);
  background: var(--coral-100);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 650;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.home-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-card {
  padding: 17px 18px 10px;
}

.timeline-card .section-head {
  margin-bottom: 3px;
}

.record-list {
  display: flex;
  flex-direction: column;
}

.record-row {
  display: grid;
  grid-template-columns: 44px 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 2px;
  border-bottom: 1px solid #f0e9dd;
  text-align: left;
  transition: background 0.16s ease;
}

.record-row:last-child {
  border-bottom: 0;
}

.record-row:hover {
  background: #fcf8f1;
}

.record-time {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.record-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.record-icon svg {
  width: 18px;
  height: 18px;
}

.record-icon.nursing {
  color: var(--green-700);
  background: var(--green-100);
}

.record-icon.bottle {
  color: var(--coral-700);
  background: var(--coral-100);
}

.record-icon.diaper {
  color: var(--blue-700);
  background: var(--blue-100);
}

.record-icon.sleep {
  color: var(--lilac-700);
  background: var(--lilac-100);
}

.record-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.record-title {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 550;
}

.record-title strong {
  font-weight: 650;
}

.record-title .record-value {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta em {
  color: var(--ink-soft);
  font-style: normal;
}

.record-chevron {
  color: var(--muted-light);
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.record-chevron svg {
  width: 15px;
  height: 15px;
}

.record-row:hover .record-chevron {
  opacity: 1;
  transform: translateX(2px);
}

.record-row:focus-visible .record-chevron {
  opacity: 1;
}

/* Summary card */

.summary-card {
  padding: 18px;
}

.summary-list {
  display: flex;
  flex-direction: column;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f1eade;
}

.summary-item:last-child {
  border-bottom: 0;
}

.summary-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 29px;
  height: 29px;
  border-radius: 9px;
}

.summary-ico svg {
  width: 15px;
  height: 15px;
}

.summary-ico.nursing {
  color: var(--green-700);
  background: var(--green-50);
}

.summary-ico.bottle {
  color: var(--coral-700);
  background: var(--coral-50);
}

.summary-ico.diaper {
  color: var(--blue-700);
  background: var(--blue-100);
}

.summary-ico.sleep {
  color: var(--lilac-700);
  background: var(--lilac-100);
}

.summary-label {
  flex: 1;
  color: var(--muted);
  font-size: 11px;
}

.summary-value {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.summary-value small {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 450;
}

.summary-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted-light);
  font-size: 9.5px;
  line-height: 1.5;
}

.summary-foot svg {
  flex: none;
  width: 12px;
  height: 12px;
}

/* Tip card */

.tip-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid #efdcd2;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff8f2, #f8e9e0);
}

.tip-card::after {
  position: absolute;
  right: -30px;
  bottom: -36px;
  z-index: -1;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(207, 117, 93, 0.16);
  border-radius: 50%;
  content: "";
}

.tip-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--coral-700);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tip-head svg {
  width: 13px;
  height: 13px;
}

.tip-card p {
  max-width: 34em;
  color: #735d54;
  font-size: 11.5px;
  line-height: 1.72;
}

.empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 28px 14px 32px;
  text-align: center;
}

.empty-art {
  width: 112px;
  height: 108px;
  margin-bottom: 12px;
  color: var(--green-700);
}

.empty-art svg {
  width: 100%;
  height: 100%;
}

.empty-state h3 {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 650;
}

.empty-state p {
  max-width: 24em;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

/* ---------- Records view ---------- */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 -18px 20px;
  padding: 0 18px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: none;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.6);
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface);
}

.filter-chip.active {
  border-color: var(--green-800);
  color: #fffaf2;
  background: var(--green-800);
  box-shadow: 0 6px 14px rgba(49, 86, 66, 0.16);
}

.records-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(63, 106, 82, 0.06), transparent 12rem),
    var(--surface);
}

.overview-copy {
  flex: 1;
}

.overview-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 650;
}

.overview-copy span {
  color: var(--muted);
  font-size: 10px;
}

.overview-spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
}

.overview-spark i {
  width: 7px;
  min-height: 4px;
  border-radius: 3px;
  background: var(--green-100);
}

.overview-spark i.has-data {
  background: var(--green-600);
}

.day-group {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid #f0e9dd;
  background: #fcf8f1;
}

.day-date {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.day-date strong {
  font-size: 13px;
  font-weight: 650;
}

.day-date span {
  color: var(--muted);
  font-size: 9.5px;
}

.day-stats {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.day-body {
  padding: 0 18px 6px;
}

.day-group .record-row {
  padding: 13px 0;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 0 0;
}

/* ---------- Stats view ---------- */

.range-switch {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 17px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.65);
}

.range-switch button {
  min-width: 54px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 550;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.range-switch button.active {
  color: var(--green-900);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(49, 38, 26, 0.08);
  font-weight: 650;
}

.stats-lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid #e2d8c9;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 95% 30%, rgba(207, 117, 93, 0.11), transparent 12rem),
    linear-gradient(135deg, #fffdf9, #f8f1e6);
}

.stats-lead-copy {
  min-width: 0;
}

.stats-lead-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats-lead-label i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.stats-lead h2 {
  margin-bottom: 2px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.stats-lead p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.stats-lead-number {
  flex: none;
  color: var(--green-800);
  font-family: var(--font-num);
  font-size: 45px;
  font-weight: 550;
  letter-spacing: -0.06em;
  line-height: 1;
}

.stats-lead-number span {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 450;
  letter-spacing: 0;
}

.stats-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.chart-card {
  padding: 17px 16px 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.metric-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.metric-tabs button {
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
  transition: all 0.18s ease;
}

.metric-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(49, 38, 26, 0.08);
  font-weight: 650;
}

.chart-summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 4px 0 10px;
}

.chart-summary strong {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1;
}

.chart-summary span {
  color: var(--muted);
  font-size: 9.5px;
}

.chart-area {
  min-height: 168px;
}

.chart-bars {
  display: grid;
  align-items: end;
  gap: 4px;
  height: 148px;
  padding: 8px 2px 0;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0, transparent 36px, #f3ece1 36px, #f3ece1 37px);
}

.chart-col {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
}

.chart-value {
  position: absolute;
  left: 50%;
  z-index: 1;
  color: var(--ink-soft);
  font-family: var(--font-num);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
}

.chart-col.today .chart-value {
  color: var(--coral-700);
}

.chart-bar {
  position: relative;
  width: min(24px, 74%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #588069, #315642);
  box-shadow: 0 4px 8px rgba(49, 86, 66, 0.09);
  transition: height 0.5s var(--ease), filter 0.18s ease;
}

.chart-bar.zero {
  background: #ece5da;
  box-shadow: none;
}

.chart-col:hover .chart-bar:not(.zero) {
  filter: brightness(1.08);
}

.chart-bar .bar-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d9a84f;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.chart-col.today .chart-bar {
  background: linear-gradient(180deg, #d98a73, #c96e56);
}

.chart-col.today .chart-bar.zero {
  background: #e9dfd2;
}

.chart-col.today .chart-bar .bar-dot {
  opacity: 1;
}

.chart-labels {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.chart-labels span {
  overflow: visible;
  color: var(--muted-light);
  font-family: var(--font-num);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.chart-live-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.chart-live-note i {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.chart-labels span.is-today {
  color: var(--coral-700);
  font-weight: 600;
}

.chart-empty {
  display: flex;
  min-height: 168px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.chart-empty svg {
  width: 30px;
  height: 30px;
  margin-bottom: 3px;
  color: var(--line-strong);
}

/* Donut */

.donut-card {
  display: flex;
  flex-direction: column;
}

.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 5px 0 3px;
}

.donut {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: conic-gradient(var(--green-700) 0 50%, var(--coral) 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.donut::after {
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px #f3ece1;
  content: "";
}

.donut-center {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.donut-center strong {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -0.05em;
  line-height: 1;
}

.donut-center span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.donut-legend {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-row span {
  flex: 1;
  color: var(--muted);
  font-size: 10px;
}

.legend-row strong {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
}

.donut-note {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted-light);
  font-size: 9px;
  line-height: 1.5;
}

/* Stat tiles */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stat-tile {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.stat-tile::after {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 62px;
  height: 62px;
  border: 1px solid #f0e8dc;
  border-radius: 50%;
  content: "";
}

.stat-tile-top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
}

.stat-tile-top svg {
  width: 13px;
  height: 13px;
}

.stat-tile strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 7px;
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat-tile small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 450;
  letter-spacing: 0;
}

.stats-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.day-facts {
  display: flex;
  flex-direction: column;
}

.day-fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #f1eade;
}

.day-fact:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.day-fact-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.day-fact-label svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.day-fact strong {
  font-family: var(--font-num);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.day-fact strong small {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 450;
}

.card-note {
  margin-top: 10px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.5;
}

/* Growth */

.growth-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #eadcc8;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 104% 12%, rgba(217, 168, 79, 0.1), transparent 11rem),
    linear-gradient(135deg, #fffdf8, #fbf4e6);
}

.growth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.growth-latest {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.growth-weight {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--green-900);
  font-family: var(--font-num);
  font-size: 38px;
  font-weight: 550;
  letter-spacing: -0.055em;
  line-height: 1;
}

.growth-weight small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 450;
  letter-spacing: 0;
}

.growth-date {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
}

.growth-meta {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed #eadfce;
}

.growth-meta div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.growth-meta strong {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
}

.sparkline {
  width: 100%;
  height: 58px;
  margin-top: 7px;
  overflow: visible;
}

.sparkline path.line {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sparkline path.area {
  fill: url(#sparkFill);
}

.sparkline circle {
  fill: var(--surface);
  stroke: var(--gold);
  stroke-width: 2;
}

.growth-empty {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 4px 0 2px;
}

.growth-empty-art {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  border: 1px dashed #dfcfb5;
  border-radius: 18px;
  color: var(--gold-700);
  background: rgba(255, 253, 249, 0.6);
}

.growth-empty-art svg {
  width: 27px;
  height: 27px;
}

.growth-empty-copy {
  flex: 1;
}

.growth-empty-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11.5px;
  font-weight: 650;
}

.growth-empty-copy p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

/* ---------- Profile view ---------- */

.baby-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #e5d7c8;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 96% 0%, rgba(207, 117, 93, 0.18), transparent 12rem),
    radial-gradient(circle at 6% 104%, rgba(63, 106, 82, 0.12), transparent 13rem),
    linear-gradient(135deg, #fffaf2, #f4e9db);
}

.baby-card::after {
  position: absolute;
  top: -60px;
  right: -40px;
  z-index: -1;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  content: "";
}

.baby-profile {
  display: flex;
  align-items: center;
  gap: 15px;
}

.baby-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 68px;
  height: 68px;
  border: 3px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  color: #fbf4e8;
  background:
    radial-gradient(circle at 68% 22%, rgba(232, 184, 123, 0.3), transparent 2.5rem),
    var(--green-800);
  box-shadow: 0 10px 22px rgba(49, 86, 66, 0.17);
  font-size: 27px;
  font-weight: 600;
}

.baby-profile-copy {
  min-width: 0;
  flex: 1;
}

.baby-profile-copy h2 {
  overflow: hidden;
  margin-bottom: 3px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.baby-profile-copy p {
  color: var(--muted);
  font-size: 10.5px;
}

.baby-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.baby-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 0 9px;
  border: 1px solid rgba(49, 86, 66, 0.12);
  border-radius: 999px;
  color: var(--green-800);
  background: rgba(255, 253, 249, 0.62);
  font-size: 9px;
  font-weight: 550;
}

.baby-chip svg {
  width: 11px;
  height: 11px;
}

.baby-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(159, 137, 111, 0.28);
}

.baby-stat {
  min-width: 0;
}

.baby-stat span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.baby-stat strong {
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.baby-stat small {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 450;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #dfe9e1;
  border-radius: 16px;
  background: var(--green-50);
}

.privacy-note svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--green-700);
}

.privacy-note p {
  color: #5e7264;
  font-size: 9.5px;
  line-height: 1.62;
}

.settings-group {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.settings-label {
  padding: 14px 17px 8px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 56px;
  padding: 9px 16px;
  border-top: 1px solid #f2ebe0;
  text-align: left;
  transition: background 0.16s ease;
}

.settings-label + .setting-row {
  border-top: 0;
}

.setting-row:hover {
  background: #fcf8f1;
}

.setting-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--surface-soft);
}

.setting-icon svg {
  width: 16px;
  height: 16px;
}

.setting-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.setting-copy strong {
  font-size: 11.5px;
  font-weight: 550;
}

.setting-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-value {
  flex: none;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9.5px;
}

.setting-chevron {
  flex: none;
  color: var(--muted-light);
}

.setting-chevron svg {
  width: 15px;
  height: 15px;
}

.setting-row.danger .setting-icon {
  color: var(--danger);
  background: var(--danger-100);
}

.setting-row.danger .setting-copy strong {
  color: var(--danger);
}

.install-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #d9e6dc;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f6faf6, #e9f2ea);
}

.install-art {
  display: grid;
  place-items: center;
  flex: none;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  color: var(--green-800);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.install-art svg {
  width: 21px;
  height: 21px;
}

.install-copy {
  min-width: 0;
  flex: 1;
}

.install-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11.5px;
  font-weight: 650;
}

.install-copy span {
  display: block;
  color: #6c7b6f;
  font-size: 9px;
  line-height: 1.45;
}

.app-footer {
  padding: 10px 0 0;
  color: var(--muted-light);
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
}

.app-footer strong {
  color: var(--muted);
  font-weight: 550;
  letter-spacing: 0.08em;
}

/* ---------- Modal & sheets ---------- */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(35, 29, 23, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade-in 0.22s ease both;
}

.sheet {
  display: flex;
  width: 100%;
  max-height: min(92dvh, 860px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  outline: none;
  animation: sheet-up 0.38s var(--ease) both;
}

.sheet-handle {
  flex: none;
  width: 38px;
  height: 4px;
  margin: 9px auto 1px;
  border-radius: 999px;
  background: #dfd5c7;
}

.sheet-head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px 10px;
}

.sheet-head-copy {
  min-width: 0;
}

.sheet-title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.sheet-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.sheet-close {
  width: 35px;
  height: 35px;
  border: 0;
  background: var(--surface-soft);
}

.sheet-close svg {
  width: 17px;
  height: 17px;
}

.sheet-body {
  flex: 1;
  padding: 4px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-foot {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(12px);
}

.sheet-foot .btn {
  flex: 1;
}

.sheet-foot .btn-ghost {
  flex: 0 0 auto;
}

.sheet-delete {
  flex: 0 0 auto !important;
  color: var(--danger);
  border-color: #efd3cd;
  background: var(--danger-100);
}

.sheet-delete.btn-danger {
  color: #fffaf5;
  border-color: var(--danger);
  background: var(--danger);
}

.sheet-foot .btn-icon-only {
  flex: none;
  width: 48px;
  padding: 0;
}

.sheet-form-error {
  display: none;
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid #efd1cb;
  border-radius: 10px;
  color: var(--danger);
  background: var(--danger-100);
  font-size: 10.5px;
}

.sheet-form-error.visible {
  display: block;
  animation: shake 0.32s ease;
}

/* Record type tabs */

.type-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 4px 0 18px;
}

.type-tab {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 9px 3px 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 9.5px;
  font-weight: 550;
  transition: all 0.18s ease;
}

.type-tab svg {
  width: 20px;
  height: 20px;
}

.type-tab:hover {
  border-color: var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface);
}

.type-tab.active {
  border-color: var(--green-800);
  color: var(--green-900);
  background: var(--green-50);
  box-shadow: 0 0 0 1px var(--green-800) inset;
  font-weight: 650;
}

.type-tab[data-rtype="bottle"].active {
  border-color: var(--coral);
  color: var(--coral-700);
  background: var(--coral-50);
  box-shadow: 0 0 0 1px var(--coral) inset;
}

.type-tab[data-rtype="diaper"].active {
  border-color: var(--blue);
  color: var(--blue-700);
  background: #f2f8fa;
  box-shadow: 0 0 0 1px var(--blue) inset;
}

.type-tab[data-rtype="sleep"].active {
  border-color: var(--lilac);
  color: var(--lilac-700);
  background: #f7f4fb;
  box-shadow: 0 0 0 1px var(--lilac) inset;
}

.form-section {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.form-label .label-hint {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 450;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.field-label {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--line-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--green-600);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(63, 106, 82, 0.1);
}

.textarea {
  min-height: 68px;
  resize: vertical;
  line-height: 1.65;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-light);
}

.time-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.time-row .input {
  flex: 1;
  min-width: 0;
}

.time-now {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--green-700);
  background: var(--green-50);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.time-now:hover {
  background: var(--green-100);
}

/* Nursing */

.side-editors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.side-editor {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.side-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 9px;
}

.side-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.side-name i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-600);
}

.side-editor[data-side="right"] .side-name i {
  background: var(--coral);
}

.side-unit {
  color: var(--muted-light);
  font-size: 8.5px;
}

.stepper {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 31px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.stepper button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 37px;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 400;
  transition: background 0.15s ease;
}

.stepper button:hover {
  background: var(--surface-soft);
}

.stepper input {
  width: 100%;
  min-width: 0;
  height: 37px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.nursing-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 10px;
}

.nursing-total strong {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
}

.timer-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.timer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--coral-700);
  font-size: 9.5px;
  font-weight: 550;
}

.timer-link svg {
  width: 12px;
  height: 12px;
}

/* Bottle */

.bottle-amount-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.bottle-graphic {
  position: relative;
  flex: none;
  width: 32px;
  height: 52px;
  border: 1.5px solid var(--coral);
  border-radius: 7px 7px 10px 10px;
  background: var(--surface);
}

.bottle-graphic::before {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 13px;
  height: 6px;
  border: 1.5px solid var(--coral);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  content: "";
  transform: translateX(-50%);
}

.bottle-graphic::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  height: var(--fill, 55%);
  border-radius: 3px 3px 6px 6px;
  background: linear-gradient(180deg, #f4d8cf, #eab8a8);
  content: "";
}

.bottle-amount-copy {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.bottle-amount-copy input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-num);
  font-size: 36px;
  font-weight: 550;
  letter-spacing: -0.05em;
  line-height: 1.1;
  outline: none;
  -moz-appearance: textfield;
}

.bottle-amount-copy input::-webkit-outer-spin-button,
.bottle-amount-copy input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.bottle-amount-copy span {
  color: var(--muted);
  font-size: 11px;
}

.amount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.amount-preset {
  min-width: 49px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 550;
  transition: all 0.15s ease;
}

.amount-preset:hover {
  border-color: var(--coral);
  color: var(--coral-700);
}

.amount-preset.active {
  border-color: var(--coral);
  color: var(--coral-700);
  background: var(--coral-50);
  font-weight: 650;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.segmented.three {
  grid-template-columns: repeat(3, 1fr);
}

.segmented button {
  min-height: 35px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 550;
  transition: all 0.16s ease;
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(49, 38, 26, 0.08);
  font-weight: 650;
}

/* Diaper choices */

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  min-height: 92px;
  justify-content: center;
  padding: 10px 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 550;
  transition: all 0.18s ease;
}

.choice-card svg {
  width: 24px;
  height: 24px;
}

.choice-card:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.choice-card.active {
  border-color: var(--blue);
  color: var(--blue-700);
  background: var(--blue-100);
  box-shadow: 0 0 0 1px var(--blue) inset;
  font-weight: 650;
}

/* Sleep */

.duration-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.duration-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}

.duration-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
}

.duration-field .stepper {
  background: var(--surface);
}

/* Timer */

.timer-layer .sheet {
  position: relative;
  max-width: 500px;
  background:
    radial-gradient(circle at 50% 0%, rgba(207, 117, 93, 0.09), transparent 18rem),
    var(--surface);
}

.timer-stage {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 12px 6px 8px;
}

.timer-side-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  width: 100%;
  margin: 6px 0 15px;
}

.side-pick {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  min-height: 92px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10.5px;
  transition: all 0.18s ease;
}

.side-pick strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.side-pick small {
  color: var(--muted-light);
  font-size: 8.5px;
}

.side-pick:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.side-pick.active {
  border-color: var(--green-700);
  color: var(--green-700);
  background: var(--green-50);
  box-shadow: 0 0 0 1px var(--green-700) inset;
}

.timer-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 232px;
  max-width: 72vw;
  height: 232px;
  max-height: 72vw;
  margin: 2px auto 10px;
}

.timer-circle svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-circle .ring-track {
  fill: none;
  stroke: #eee5d8;
  stroke-width: 5;
}

.timer-circle .ring-progress {
  fill: none;
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-width: 5;
  stroke-dasharray: 653;
  stroke-dashoffset: 653;
  transition: stroke-dashoffset 0.7s linear;
}

.timer-circle.paused .ring-progress {
  stroke: var(--gold);
}

.timer-inner {
  display: flex;
  align-items: center;
  flex-direction: column;
  z-index: 1;
}

.timer-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  color: var(--coral-700);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.timer-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: soft-blink 1.5s ease-in-out infinite;
}

.timer-circle.paused .timer-status {
  color: var(--gold-700);
}

.timer-clock {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 47px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.timer-active-side {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.timer-split {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 4px 0 17px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 10px;
}

.timer-split span {
  color: var(--muted);
}

.timer-split strong {
  margin-left: 3px;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.timer-split .split-side {
  display: flex;
  align-items: center;
  gap: 4px;
}

.timer-split .split-side i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-600);
}

.timer-split .split-side.right i {
  background: var(--coral);
}

.timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
}

.timer-control-main {
  min-width: 132px;
  min-height: 48px;
}

.timer-control-square {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  width: 62px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 8px;
  font-weight: 550;
  transition: all 0.16s ease;
}

.timer-control-square:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.timer-control-square svg {
  width: 17px;
  height: 17px;
}

.timer-control-square:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.timer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.timer-foot span {
  color: var(--muted-light);
  font-size: 8.5px;
}

.text-danger {
  color: var(--danger) !important;
}

.timer-minimize {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
}

.timer-minimize svg {
  width: 12px;
  height: 12px;
}

.timer-manual {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.timer-manual:hover {
  color: var(--green-700);
}

.timer-manual svg {
  width: 12px;
  height: 12px;
}

/* Small helper cards used in modal content */

.help-steps {
  display: flex;
  flex-direction: column;
}

.help-step {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f1eade;
}

.help-step:first-child {
  padding-top: 2px;
}

.help-step:last-child {
  border-bottom: 0;
}

.help-step-num {
  flex: none;
  padding-top: 2px;
  color: var(--coral);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.help-step strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 650;
}

.help-step p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.about-card {
  padding: 6px 2px 2px;
  text-align: center;
}

.about-logo {
  display: inline-block;
  width: 66px;
  height: 66px;
  margin-bottom: 14px;
}

.about-logo .brand-mark {
  width: 66px;
  height: 66px;
  border-radius: 20px;
}

.about-card h3 {
  margin-bottom: 9px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.about-card > p {
  max-width: 34em;
  margin: 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: left;
}

.about-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
}

.about-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-50);
  font-size: 8.5px;
  font-weight: 550;
}

.about-meta svg {
  width: 11px;
  height: 11px;
}

.confirm-icon.primary {
  color: var(--green-700);
  background: var(--green-100);
}

.card-head-icon {
  width: 18px;
  height: 18px;
  color: var(--coral);
  opacity: 0.8;
}

@media (max-width: 520px) {
  .stats-lead {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .stats-lead-number {
    align-self: flex-end;
    margin-top: -8px;
    font-size: 38px;
  }

  .stats-lead h2 {
    font-size: 16px;
    line-height: 1.5;
  }

  .chart-card .card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .metric-tabs {
    align-self: stretch;
  }

  .metric-tabs button {
    flex: 1;
    min-height: 29px;
  }

  .hero-last {
    flex-wrap: wrap;
    row-gap: 3px;
  }

  .hero-last .last-relative {
    width: 100%;
    margin-left: 22px;
  }

  .record-row {
    grid-template-columns: 40px 36px minmax(0, 1fr) 12px;
    gap: 8px;
  }

  .record-icon {
    width: 34px;
    height: 34px;
  }

  .day-stats {
    max-width: 130px;
    line-height: 1.4;
  }

  .sheet-head {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sheet-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sheet-foot {
    padding-right: 16px;
    padding-left: 16px;
  }

  .bottle-amount-copy input {
    font-size: 32px;
  }

  .welcome-art {
    min-height: 218px;
  }

  .welcome-art-copy h2 {
    font-size: 26px;
  }

  .welcome-illustration {
    right: -46px;
    bottom: -48px;
    width: 205px;
  }

  .growth-latest {
    flex-wrap: wrap;
    align-items: center;
  }

  .donut-wrap {
    gap: 13px;
  }

  .donut {
    width: 112px;
    height: 112px;
  }

  .donut::after {
    inset: 10px;
  }

  .donut-legend {
    gap: 8px;
  }

  .legend-row strong {
    font-size: 10px;
  }
}

@media (max-width: 370px) {
  .page-wrap {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-count {
    font-size: 58px;
  }

  .quick-btn {
    gap: 8px;
    padding: 10px;
  }

  .quick-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .quick-copy strong {
    font-size: 11.5px;
  }

  .quick-copy small {
    font-size: 8.5px;
  }

  .quick-arrow {
    display: none;
  }

  .card {
    padding: 16px;
  }

  .timeline-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .filter-bar {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .type-tabs {
    gap: 5px;
  }

  .type-tab {
    min-height: 60px;
  }

  .side-editors {
    grid-template-columns: 1fr;
  }

  .timer-controls {
    gap: 6px;
  }

  .timer-control-main {
    min-width: 118px;
  }

  .timer-control-square {
    width: 56px;
  }

  .welcome-panel {
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* Confirmation dialog */

.modal-layer.confirm-layer {
  z-index: 120;
  align-items: center;
  padding: 20px;
}

.confirm-box {
  width: min(400px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: dialog-pop 0.3s var(--spring) both;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 13px;
  border-radius: 14px;
  color: var(--danger);
  background: var(--danger-100);
}

.confirm-icon svg {
  width: 21px;
  height: 21px;
}

.confirm-box h3 {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.confirm-box p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Growth history */

.growth-list {
  display: flex;
  flex-direction: column;
}

.growth-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid #f1eade;
}

.growth-row:last-child {
  border-bottom: 0;
}

.growth-row-date {
  display: flex;
  flex: none;
  width: 50px;
  flex-direction: column;
  gap: 1px;
}

.growth-row-date strong {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
}

.growth-row-date span {
  color: var(--muted);
  font-size: 8px;
}

.growth-row-values {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 9px;
}

.growth-row-values span {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.growth-row-values strong {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
}

.growth-row-delete {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--muted-light);
  transition: all 0.16s ease;
}

.growth-row-delete:hover {
  color: var(--danger);
  background: var(--danger-100);
}

.growth-row-delete svg {
  width: 15px;
  height: 15px;
}

/* ---------- Welcome ---------- */

.welcome {
  display: grid;
  min-height: 100svh;
  grid-template-columns: 1fr;
  background: var(--bg);
}

.welcome-art {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 248px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px 22px;
  color: #f8f1e5;
  background:
    radial-gradient(circle at 78% 22%, rgba(232, 184, 123, 0.22), transparent 16rem),
    radial-gradient(circle at 20% 105%, rgba(207, 117, 93, 0.25), transparent 18rem),
    linear-gradient(145deg, #263f32 0%, #315642 60%, #3d624c 100%);
}

.welcome-art::before {
  position: absolute;
  top: 44px;
  right: -84px;
  z-index: -1;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(248, 241, 229, 0.1);
  border-radius: 50%;
  content: "";
}

.welcome-art::after {
  position: absolute;
  top: 80px;
  right: -46px;
  z-index: -1;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(248, 241, 229, 0.08);
  border-radius: 50%;
  content: "";
}

.welcome-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.welcome-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  box-shadow: none;
}

.welcome-art-copy {
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin-top: 26px;
}

.welcome-art-copy p {
  margin-bottom: 7px;
  color: rgba(248, 241, 229, 0.55);
  font-family: var(--font-num);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.welcome-art-copy h2 {
  font-size: clamp(25px, 5vw, 36px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.welcome-illustration {
  position: absolute;
  right: -18px;
  bottom: -34px;
  width: 230px;
  opacity: 0.9;
  pointer-events: none;
}

.welcome-panel {
  display: flex;
  justify-content: center;
  padding: 26px 22px calc(36px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 100% 100%, rgba(207, 117, 93, 0.07), transparent 20rem),
    var(--bg);
}

.welcome-form {
  width: 100%;
  max-width: 400px;
  padding-top: 2px;
}

.welcome-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--coral-700);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.welcome-kicker::before {
  width: 14px;
  height: 1px;
  background: var(--coral);
  content: "";
}

.welcome-form h1 {
  margin-bottom: 7px;
  font-size: clamp(28px, 5.3vw, 38px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.3;
}

.welcome-form .welcome-intro {
  margin-bottom: 21px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.welcome-fields {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.welcome-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.welcome-field .input {
  min-height: 48px;
  background: var(--surface);
}

.gender-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.gender-picker button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 550;
  transition: all 0.16s ease;
}

.gender-picker button.active {
  border-color: var(--green-700);
  color: var(--green-800);
  background: var(--green-50);
  box-shadow: 0 0 0 1px var(--green-700) inset;
  font-weight: 650;
}

.welcome-submit {
  margin-top: 20px;
}

.welcome-alt {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.demo-link {
  color: var(--muted);
  font-size: 10px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.demo-link:hover {
  color: var(--ink-soft);
}

.welcome-privacy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted-light);
  font-size: 9px;
  line-height: 1.6;
}

.welcome-privacy svg {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #ecd8b6;
  border-radius: 14px;
  background: #fcf4e3;
  color: #8a6a34;
  font-size: 10px;
  line-height: 1.5;
}

.demo-banner svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--gold-700);
}

.demo-banner strong {
  font-weight: 650;
}

.demo-banner button {
  flex: none;
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--gold-700);
  background: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 600;
}

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

body.modal-open .toast-stack {
  top: calc(16px + env(safe-area-inset-top));
  bottom: auto;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 420px;
  padding: 11px 15px 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #f8f2e8;
  background: rgba(39, 52, 43, 0.94);
  box-shadow: 0 12px 34px rgba(31, 41, 34, 0.24);
  font-size: 11px;
  line-height: 1.4;
  pointer-events: auto;
  animation: toast-in 0.34s var(--spring) both;
  backdrop-filter: blur(12px);
}

.toast.leaving {
  animation: toast-out 0.26s ease both;
}

.toast svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: #e6b87b;
}

.toast.error svg {
  color: #efa99a;
}

/* ---------- Readability & touch pass ---------- */

.hero-kicker {
  font-size: 10.5px;
}

.hero-date {
  color: rgba(248, 241, 229, 0.74);
  font-size: 11px;
}

.hero-label {
  color: rgba(248, 241, 229, 0.82);
  font-size: 12.5px;
}

.hero-caption {
  color: rgba(248, 241, 229, 0.7);
  font-size: 11px;
}

.hero-metric span {
  color: rgba(248, 241, 229, 0.76);
  font-size: 10.5px;
}

.hero-metric strong {
  font-size: 21px;
}

.hero-metric small {
  color: rgba(248, 241, 229, 0.72);
  font-size: 9px;
}

.hero-last {
  color: rgba(248, 241, 229, 0.72);
  font-size: 11.5px;
}

.hero-last .last-relative {
  color: rgba(248, 241, 229, 0.74);
  font-size: 10.5px;
}

.rhythm-labels {
  color: rgba(248, 241, 229, 0.52);
  font-size: 9px;
}

.quick-copy strong {
  font-size: 13px;
}

.quick-copy small {
  font-size: 10.5px;
}

.record-time {
  font-size: 12px;
}

.record-title {
  font-size: 13.5px;
}

.record-title .record-value {
  font-size: 13.5px;
}

.record-meta {
  font-size: 11px;
}

.summary-label {
  font-size: 12px;
}

.summary-value {
  font-size: 13px;
}

.summary-value small {
  font-size: 9.5px;
}

.summary-foot {
  font-size: 10px;
}

.tip-card p {
  font-size: 12px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.range-switch button {
  min-height: 35px;
  font-size: 11.5px;
}

.day-date strong {
  font-size: 14px;
}

.day-date span {
  font-size: 10.5px;
}

.day-stats {
  font-size: 10.5px;
}

.stats-lead-label {
  font-size: 10px;
}

.stats-lead p {
  font-size: 11.5px;
}

.stats-lead-number span {
  font-size: 10.5px;
}

.card-title {
  font-size: 14px;
}

.card-sub {
  font-size: 10.5px;
}

.metric-tabs button {
  min-height: 30px;
  font-size: 10px;
}

.chart-summary span {
  font-size: 10.5px;
}

.chart-labels span {
  color: var(--muted);
  font-size: 9.5px;
}

.legend-row span {
  font-size: 10.5px;
}

.legend-row strong {
  font-size: 12px;
}

.donut-note {
  color: var(--muted);
  font-size: 10px;
}

.stat-tile-top {
  font-size: 10.5px;
}

.stat-tile small {
  font-size: 9.5px;
}

.day-fact-label {
  font-size: 11.5px;
}

.day-fact strong {
  font-size: 13.5px;
}

.card-note {
  color: var(--muted);
  font-size: 9.5px;
}

.growth-date {
  color: var(--muted);
  font-size: 10px;
}

.growth-meta div {
  color: var(--muted);
  font-size: 10px;
}

.growth-meta strong {
  font-size: 14px;
}

.baby-profile-copy p {
  font-size: 11.5px;
}

.baby-chip {
  min-height: 25px;
  padding: 0 10px;
  font-size: 10px;
}

.baby-stat span {
  font-size: 9.5px;
}

.baby-stat strong {
  font-size: 16px;
}

.privacy-note p {
  font-size: 10.5px;
}

.settings-label {
  font-size: 9.5px;
}

.setting-row {
  min-height: 58px;
}

.setting-copy strong {
  font-size: 12.5px;
}

.setting-copy span {
  font-size: 10px;
}

.setting-value {
  font-size: 10.5px;
}

.install-copy strong {
  font-size: 12.5px;
}

.install-copy span {
  font-size: 10px;
}

.app-footer {
  font-size: 10px;
}

.icon-btn {
  width: 44px;
  height: 44px;
}

.sheet-close {
  width: 38px;
  height: 38px;
}

.sheet-sub {
  font-size: 11.5px;
}

.type-tab {
  font-size: 10.5px;
}

.form-label {
  font-size: 11.5px;
}

.form-label .label-hint {
  font-size: 10px;
}

.field > label,
.field-label {
  font-size: 11.5px;
}

.input,
.select,
.textarea {
  font-size: 14px;
}

.time-now {
  font-size: 11px;
}

.amount-preset {
  min-height: 34px;
  font-size: 10.5px;
}

.nursing-total {
  font-size: 11px;
}

.side-name {
  font-size: 11.5px;
}

.side-unit {
  font-size: 9.5px;
}

.stepper {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.stepper button {
  width: 34px;
  height: 40px;
}

.stepper input {
  height: 40px;
}

.segmented button {
  min-height: 38px;
  font-size: 11px;
}

.timer-status {
  font-size: 10px;
}

.timer-active-side {
  font-size: 11px;
}

.timer-split {
  font-size: 11px;
}

.timer-split strong {
  font-size: 13px;
}

.timer-control-square {
  font-size: 9px;
}

.timer-foot span,
.timer-minimize {
  font-size: 9.5px;
}

.timer-manual {
  font-size: 10px;
}

.timer-banner-copy strong {
  font-size: 12.5px;
}

.timer-banner-copy span {
  font-size: 11px;
}

.toast {
  font-size: 11.5px;
}

/* ---------- Desktop refinements ---------- */

@media (min-width: 680px) {
  .page-wrap {
    padding-right: 28px;
    padding-left: 28px;
  }

  .hero {
    padding: 28px 28px 20px;
  }

  .hero-body {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 34px;
  }

  .hero-metrics {
    margin-top: 0;
    margin-bottom: 2px;
  }

  .head-add {
    display: inline-flex;
  }

  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .quick-btn {
    padding: 14px;
  }

  .quick-icon {
    width: 44px;
    height: 44px;
  }

  .quick-copy strong {
    font-size: 12.5px;
  }

  .quick-copy small {
    font-size: 9.5px;
  }

  .quick-arrow {
    display: block;
  }

  .card {
    padding: 22px;
  }

  .timeline-card {
    padding: 20px 22px 11px;
  }

  .record-row {
    grid-template-columns: 48px 40px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 13px 2px;
  }

  .record-icon {
    width: 38px;
    height: 38px;
  }

  .record-title {
    font-size: 13px;
  }

  .record-title .record-value {
    font-size: 13px;
  }

  .record-meta {
    font-size: 10.5px;
  }

  .summary-card,
  .tip-card {
    padding: 20px;
  }

  .stat-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats-main-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.85fr);
  }

  .stats-lower-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .chart-card {
    padding: 20px 20px 16px;
  }

  .chart-bars {
    height: 174px;
  }

  .chart-area {
    min-height: 194px;
  }

  .chart-empty {
    min-height: 194px;
  }

  .filter-bar {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .day-body {
    padding: 0 22px 7px;
  }

  .day-head {
    padding-right: 22px;
    padding-left: 22px;
  }

  .modal-layer {
    align-items: center;
    padding: 24px;
  }

  .sheet {
    max-width: 560px;
    max-height: min(90vh, 900px);
    border-radius: 26px;
    animation-name: dialog-pop;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-head {
    padding: 22px 26px 8px;
  }

  .sheet-title {
    font-size: 22px;
  }

  .sheet-body {
    padding: 6px 26px 20px;
  }

  .sheet-foot {
    padding: 13px 26px 18px;
  }

  .timer-layer .sheet {
    max-width: 470px;
  }

  .timer-circle {
    width: 238px;
    height: 238px;
  }

  .toast-stack {
    right: 28px;
    bottom: 28px;
    left: auto;
    align-items: flex-end;
  }

  .welcome {
    grid-template-columns: 1.04fr 0.96fr;
  }

  .welcome-art {
    min-height: 100svh;
    padding: 38px 42px;
  }

  .welcome-art-copy {
    margin-top: 0;
    margin-bottom: 10vh;
  }

  .welcome-illustration {
    right: -12px;
    bottom: -20px;
    width: min(440px, 45vw);
    opacity: 0.95;
  }

  .welcome-panel {
    align-items: center;
    padding: 46px 52px;
  }

  .welcome-fields {
    gap: 15px;
  }

  .page-head {
    margin-bottom: 26px;
  }

  .page-subtitle {
    font-size: 13.5px;
  }
}

@media (min-width: 1060px) {
  .page-wrap {
    padding: 38px 38px 70px;
  }

  .hero {
    padding: 30px 34px 21px;
  }

  .hero-body {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 56px;
  }

  .hero-count {
    font-size: 82px;
  }

  .quick-grid {
    margin-bottom: 26px;
  }

  .quick-btn {
    padding: 15px;
    gap: 12px;
  }

  .quick-copy strong {
    font-size: 13px;
  }

  .home-grid {
    grid-template-columns: minmax(0, 1.52fr) minmax(286px, 0.72fr);
    gap: 20px;
    align-items: start;
  }

  .record-row {
    grid-template-columns: 50px 42px minmax(0, 1fr) 18px;
    padding: 13px 2px;
  }

  .record-icon {
    width: 40px;
    height: 40px;
  }

  .record-title {
    font-size: 13.5px;
  }

  .record-title .record-value {
    font-size: 13.5px;
  }

  .record-meta {
    font-size: 10.5px;
  }

  .stats-main-grid {
    gap: 18px;
  }

  .chart-bars {
    gap: 5px;
    height: 190px;
  }

  .chart-area {
    min-height: 210px;
  }

  .chart-empty {
    min-height: 210px;
  }

  .donut {
    width: 136px;
    height: 136px;
  }

  .donut-center strong {
    font-size: 29px;
  }

  .stats-lower-grid {
    gap: 18px;
  }
}

@media (min-width: 1360px) {
  :root {
    --sidebar-w: 280px;
  }

  .sidebar {
    padding-right: 26px;
    padding-left: 26px;
  }

  .page-wrap {
    padding-right: 48px;
    padding-left: 48px;
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Keyframes ---------- */

@keyframes page-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes boot-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.02);
  }
}

@keyframes dot-pulse {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes timer-ring {
  0% {
    opacity: 0.7;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

@keyframes soft-blink {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0.6;
    transform: translateY(42px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
