:root {
  --bg: #fff9f6;
  --surface: #ffffff;
  --surface-soft: #fff1ec;
  --text: #2f2927;
  --muted: #817572;
  --line: #eadfdb;
  --primary: #ff8d7b;
  --primary-strong: #f56f5c;
  --accent: #fff0cb;
  --breast-accent: #fff2e9;
  --shadow: 0 10px 28px rgba(67, 44, 39, 0.08);
  --radius: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  --bg: #171413;
  --surface: #221e1c;
  --surface-soft: #2a2220;
  --text: #f9efeb;
  --muted: #b9aaa5;
  --line: #3b312e;
  --primary: #ff9d8e;
  --primary-strong: #ff806d;
  --accent: #493b24;
  --breast-accent: #332723;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, .quick-btn { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow {
  margin: 0 0 4px;
  color: var(--primary-strong);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px calc(96px + var(--safe-bottom));
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 2px 18px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(1.72rem, 4.5vw, 2.15rem); line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 1.25rem; }
h3 { margin-bottom: 8px; }
.topbar p:last-child { margin-bottom: 0; font-size: 1rem; }
.topbar-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 800;
  cursor: pointer;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.profile-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface-soft);
  font-size: 1.4rem;
}
.profile-copy { flex: 1; display: grid; gap: 2px; }
.profile-copy span { font-size: .92rem; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.summary-card {
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 6px;
}
.summary-card .summary-icon { font-size: 1.42rem; }
.summary-label { color: var(--muted); font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
.summary-card strong { font-size: 1.14rem; line-height: 1.35; }
.summary-metric { display: grid; gap: 2px; align-content: start; }
.summary-metric .metric-top { display: block; white-space: normal; overflow-wrap: anywhere; }
.summary-metric .metric-bottom { display: block; white-space: normal; overflow-wrap: anywhere; }
.summary-metric .metric-bottom.soft { color: var(--text); }
.feed-breakdown { gap: 5px; font-size: 1rem !important; }
.feed-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; line-height: 1.35; }
.feed-row > span:first-child { color: var(--muted); font-size: .88rem; font-weight: 700; }
.feed-row > span:last-child { white-space: nowrap; font-weight: 800; }
.stat-breakdown { display: grid; gap: 6px; font-size: 1.08rem !important; }
.accent-card { background: linear-gradient(145deg, var(--surface), var(--accent)); }
.breast-total-card { background: linear-gradient(145deg, var(--surface), var(--breast-accent)); }
.sleep-total-card { background: linear-gradient(145deg, var(--surface), var(--surface-soft)); }

.secondary-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.mini-summary-card {
  min-height: 86px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon label" "icon value";
  column-gap: 10px;
  align-content: center;
  align-items: center;
}
.mini-summary-icon { grid-area: icon; font-size: 1.28rem; }
.mini-summary-card .summary-label { grid-area: label; align-self: end; }
.mini-summary-value {
  grid-area: value;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}
.mini-detail {
  display: grid;
  gap: 1px;
}
.mini-detail .mini-top {
  display: block;
  font-weight: 800;
  white-space: nowrap;
}
.mini-detail .mini-bottom {
  display: block;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.memo-preview {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.memo-preview .memo-time {
  display: block;
  white-space: nowrap;
}
.memo-preview .memo-text {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timers-stack { display: grid; gap: 10px; margin-top: 12px; }
.timer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.timer-card .timer-copy { flex: 1; min-width: 0; }
.timer-title { display: block; font-weight: 800; font-size: 1rem; }
.timer-value { display: block; margin-top: 2px; font-variant-numeric: tabular-nums; font-size: 1.25rem; }
.timer-actions { display: flex; gap: 6px; }
.small-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
}
.small-btn.danger { color: #d9534f; }

.section-block { margin-top: 26px; }
.quick-record-section { margin-top: 14px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.quick-btn {
  min-height: 108px;
  padding: 13px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  box-shadow: 0 6px 18px rgba(67,44,39,.045);
}
.quick-btn:active { transform: translateY(1px) scale(.99); }
.quick-btn > span { font-size: 1.55rem; }
.quick-btn strong { font-size: 1rem; }
.quick-btn small { color: var(--muted); font-size: .76rem; line-height: 1.25; }
.pill {
  min-width: 50px;
  padding: 6px 10px;
  text-align: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-size: .84rem;
  font-weight: 800;
}

.timeline { display: grid; gap: 9px; }
.empty-state {
  min-height: 96px;
  place-items: center;
  align-content: center;
  padding: 22px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}
.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.timeline-time { font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline-main { min-width: 0; }
.timeline-main strong { display: block; margin-bottom: 3px; font-size: 1rem; }
.timeline-main span { display: block; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-actions { display: flex; gap: 4px; }
.tiny-btn { border: 0; background: transparent; cursor: pointer; padding: 7px; border-radius: 10px; color: var(--muted); }

.view { display: none; }
.view.active { display: block; }
.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 520px);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 14px 40px rgba(50,35,30,.14);
  backdrop-filter: blur(16px);
}
.nav-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 6px;
  border-radius: 16px;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 2px;
}
.nav-btn span { font-size: 1.08rem; }
.nav-btn small { font-size: .78rem; }
.nav-btn.active { background: var(--surface-soft); color: var(--primary-strong); font-weight: 800; }

.calendar-shell { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.calendar-header { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 8px; }
.calendar-title-wrap { text-align: center; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday-row { margin-top: 16px; color: var(--muted); font-size: .72rem; text-align: center; }
.calendar-grid { margin-top: 7px; }
.day-cell {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text);
}
.day-cell.muted-day { color: color-mix(in srgb, var(--muted) 40%, transparent); cursor: default; }
.day-cell.today { outline: 1px solid var(--primary); }
.day-cell.selected { background: var(--surface-soft); color: var(--primary-strong); font-weight: 800; }
.day-cell.has-record::after {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}
.select {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: .9rem;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.stat-card { min-height: 120px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.stat-card > span { font-size: 1.35rem; }
.stat-card small { color: var(--muted); font-size: .9rem; }
.stat-card strong { font-size: 1.35rem; }
.stat-detail { display: grid; gap: 4px; font-size: 1rem !important; }
.stat-top { font-weight: 800; }
.stat-bottom { font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.stat-memo .stat-bottom {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.4;
  max-height: 2.8em;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.info-card { padding: 18px; }
.info-card p { color: var(--muted); margin-bottom: 0; line-height: 1.6; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20,14,12,.46);
  backdrop-filter: blur(3px);
}
.sheet {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 760px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 10px 18px calc(22px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  box-shadow: 0 -18px 50px rgba(20,14,12,.18);
}
.sheet-handle { width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 12px; }
.sheet-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.sheet-form { display: grid; gap: 13px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: .9rem; font-weight: 800; }
.field em { font-style: normal; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.field textarea { min-height: 94px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 700; font-size: .92rem; }
.segmented input:checked + span { border-color: var(--primary); background: var(--surface-soft); color: var(--primary-strong); }
.primary-btn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: var(--primary-strong);
  color: white;
  font-weight: 900;
  cursor: pointer;
  margin-top: 4px;
}
.secondary-btn {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  border-radius: 14px;
  background: #2d2927;
  color: white;
  font-size: .88rem;
  box-shadow: var(--shadow);
}

@media (max-width: 520px) {
  .app-shell { padding-inline: 12px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .quick-btn { min-height: 102px; padding-inline: 6px; }
  .quick-btn small { font-size: .7rem; }
  .summary-card { min-height: 116px; padding: 15px; }
  .timeline-item { grid-template-columns: 50px 1fr auto; padding-inline: 12px; }
}


@media (max-width: 520px) {
  .topbar { padding-top: 22px; }
  h2 { font-size: 1.35rem; }
  .section-heading { margin-bottom: 13px; }
  .summary-card strong { font-size: 1.18rem; }
  .summary-label { font-size: .88rem; }
  .mini-summary-card .summary-label { font-size: .84rem; }
  .mini-summary-value { font-size: 1.02rem; }
  .quick-btn strong { font-size: 1.02rem; }
  .timeline-main strong { font-size: 1.02rem; }
  .timeline-main span { font-size: .92rem; }
}

@media (min-width: 680px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .secondary-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(8, 1fr); }
}

/* v0.3 lightweight guide */
.profile-copy { min-width: 0; }
.profile-name-row { display:flex; align-items:center; flex-wrap:wrap; column-gap:12px; row-gap:7px; min-width:0; }
.profile-badges { display:inline-flex; flex-wrap:wrap; gap:6px; margin-left:2px; }
.status-badge { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; font-size:.72rem !important; font-weight:850; line-height:1.15; }
.status-badge.development { background:#f2e9ff; color:#7651a8; }
.status-badge.vaccine { background:#e7f5ff; color:#276b91; }
:root[data-theme="dark"] .status-badge.development { background:#382d47; color:#d8bdf6; }
:root[data-theme="dark"] .status-badge.vaccine { background:#243844; color:#a9ddf7; }
.guide-section { margin-top:22px; }
.guide-heading { margin-bottom:10px; }
.guide-stack { display:grid; gap:10px; }
.guide-card { padding:16px; border-radius:20px; border:1px solid var(--line); background:var(--surface); box-shadow:0 6px 18px rgba(67,44,39,.045); }
.guide-card.development { background:linear-gradient(145deg,var(--surface),color-mix(in srgb,#efe2ff 55%,var(--surface))); }
.guide-card.daily { background:linear-gradient(145deg,var(--surface),color-mix(in srgb,#fff0cb 48%,var(--surface))); }
.guide-card.vaccine { background:linear-gradient(145deg,var(--surface),color-mix(in srgb,#e1f4ff 58%,var(--surface))); }
.guide-title { display:flex; align-items:center; gap:7px; margin-bottom:7px; font-size:1rem; font-weight:900; }
.guide-card p { margin:0; line-height:1.55; font-size:.9rem; }
.guide-tip { margin-top:7px !important; font-weight:750; }
.guide-note { margin-top:6px !important; color:var(--muted); font-size:.8rem !important; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; color:var(--muted); font-size:.78rem; }
.calendar-legend span { display:inline-flex; align-items:center; gap:5px; }
.calendar-legend .swipe-hint { margin-left:auto; opacity:.8; }
.day-cell { grid-template-rows: 1fr auto; align-content:center; }
.day-number { align-self:end; }
.calendar-markers { min-height:15px; display:flex; align-items:center; justify-content:center; gap:1px; font-size:.62rem; line-height:1; }
.calendar-marker { display:inline-block; }
.day-cell.development-day { background:color-mix(in srgb,#eadcff 34%,transparent); }
.day-cell.vaccine-day { box-shadow:inset 0 -3px 0 #8bc9ea; }
.day-cell.development-day.vaccine-day { background:color-mix(in srgb,#eadcff 34%,transparent); box-shadow:inset 0 -3px 0 #8bc9ea; }
:root[data-theme="dark"] .day-cell.development-day { background:#30283a; }
:root[data-theme="dark"] .day-cell.vaccine-day { box-shadow:inset 0 -3px 0 #4f8fb0; }
.calendar-guide-section { margin-top:14px; }

/* v0.4 UX integration */
.profile-name-row { column-gap: 16px; row-gap: 8px; }
.profile-badges { margin-left: 4px; gap: 7px; }
.status-badge { padding: 4px 9px; font-size: .76rem !important; }
button.status-badge { border:0; font-family:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
button.status-badge:active { transform:scale(.98); }
button.status-badge:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.guide-sheet-content { display:grid; gap:12px; padding-bottom:4px; }
.guide-sheet-content .guide-card { box-shadow:none; }
.info-sheet-content { display:grid; gap:10px; padding-bottom:4px; }
.info-notice-card { padding:15px 16px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.info-notice-card strong { display:block; margin-bottom:7px; font-size:1rem; line-height:1.4; }
.info-notice-card p { margin:0; color:var(--muted); line-height:1.6; font-size:.9rem; }

.quick-scroll-hint {
  margin: -5px 0 8px;
  color: var(--muted);
  font-size: .76rem;
}
.quick-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.quick-grid::-webkit-scrollbar { display: none; }
.quick-btn {
  flex: 0 0 92px;
  min-height: 100px;
  scroll-snap-align: start;
}
.quick-btn strong { font-size: 1rem; }
.quick-btn small { font-size: .72rem; }

.meal-total-card { background: linear-gradient(145deg, var(--surface), color-mix(in srgb, #ffe6bd 60%, var(--surface))); }
.summary-card.meal-total-card { min-height: 142px; }
.summary-card.meal-total-card .feed-breakdown { gap: 6px; }
.summary-card.meal-total-card .feed-row { gap: 5px; }
.summary-card.meal-total-card .feed-row > span:first-child { font-size: .82rem; }
.summary-card.meal-total-card .feed-row > span:last-child { font-size: .88rem; }

.field-title-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.field-inline-btn {
  border: 0;
  background: var(--surface-soft);
  color: var(--primary-strong);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: .78rem;
  cursor: pointer;
}
.amount-stepper {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: var(--surface);
}
.amount-stepper-buttons {
  display: grid;
  grid-template-columns: 48px 48px minmax(92px, 1fr) 48px 48px;
  gap: 6px;
  align-items: stretch;
}
.amount-step-btn {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 13px;
  min-height: 52px;
  padding: 0 4px;
  font-weight: 900;
  color: var(--primary-strong);
  cursor: pointer;
}
.amount-value-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--primary);
  background: var(--bg);
  border-radius: 14px;
  min-width: 0;
  padding: 5px 7px;
}
.amount-value-wrap input {
  width: 58px !important;
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
  text-align: right;
  font-size: 1.32rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.amount-value-wrap span { white-space: nowrap; font-size: .82rem; font-weight: 800; color: var(--muted); }
.amount-helper { display:block; margin-top:8px; color:var(--muted); font-size:.74rem; text-align:center; }

.stats-title-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.stats-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.stats-tab {
  border:0;
  border-radius:10px;
  padding:8px 11px;
  background:transparent;
  color:var(--muted);
  font-size:.82rem;
  font-weight:800;
  cursor:pointer;
}
.stats-tab.active { background:var(--surface); color:var(--primary-strong); box-shadow:0 3px 10px rgba(67,44,39,.07); }
.stats-panel { display:none; }
.stats-panel.active { display:block; }
.pattern-card { margin-top:14px; padding:16px; }
.pattern-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.pattern-head > div { display:grid; gap:2px; }
.pattern-head strong { font-size:1rem; }
.pattern-head small { color:var(--muted); font-size:.78rem; }
.daily-pattern-chart { width:min(100%, 360px); margin:8px auto 0; }
.daily-pattern-chart svg { width:100%; height:auto; display:block; overflow:visible; }
.pattern-ring { fill:none; stroke:var(--line); stroke-width:12; }
.pattern-tick { stroke:var(--line); stroke-width:1.6; }
.pattern-hour { fill:var(--muted); font-size:10px; font-weight:700; }
.pattern-sleep-arc { fill:none; stroke:#7aa8d8; stroke-width:15; stroke-linecap:round; }
.pattern-marker { stroke:var(--surface); stroke-width:2; }
.pattern-marker.direct { fill:#f095a5; }
.pattern-marker.bottle { fill:#edb34f; }
.pattern-marker.solid { fill:#79b77e; }
.pattern-marker.diaper { fill:#ab8ad8; }
.pattern-center-title { fill:var(--muted); font-size:12px; font-weight:800; }
.pattern-center-value { fill:var(--text); font-size:17px; font-weight:900; }
.pattern-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:8px 14px; margin-top:8px; color:var(--muted); font-size:.78rem; }
.pattern-legend span { display:inline-flex; align-items:center; gap:5px; }
.pattern-dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.pattern-dot.sleep { background:#7aa8d8; }
.pattern-dot.direct { background:#f095a5; }
.pattern-dot.bottle { background:#edb34f; }
.pattern-dot.solid { background:#79b77e; }
.pattern-dot.diaper { background:#ab8ad8; }

/* Calendar guide uses markers, not broad colored periods. */
.day-cell.development-day,
.day-cell.development-day.vaccine-day { background: transparent; }
.day-cell.vaccine-day,
.day-cell.development-day.vaccine-day { box-shadow:none; }
:root[data-theme="dark"] .day-cell.development-day { background:transparent; }
:root[data-theme="dark"] .day-cell.vaccine-day { box-shadow:none; }
.calendar-markers { font-size:.68rem; min-height:17px; }
.calendar-legend { row-gap:7px; }

@media (max-width: 520px) {
  .quick-scroll-hint { font-size:.72rem; }
  .quick-btn { flex-basis: 88px; min-height: 98px; }
  .quick-grid { margin-right:-12px; padding-right:28px; }
  .summary-card.meal-total-card { min-height: 148px; }
  .amount-stepper { padding:10px; }
  .amount-stepper-buttons { grid-template-columns: 44px 44px minmax(86px, 1fr) 44px 44px; gap:5px; }
  .amount-step-btn { min-height:50px; font-size:.86rem; }
  .amount-value-wrap input { width:52px !important; font-size:1.22rem; }
  .stats-title-row { align-items:flex-start; }
  .stats-tabs { width:100%; }
  .stats-tab { padding:9px 8px; }
}

@media (min-width: 680px) {
  .quick-grid { overflow-x:auto; }
  .quick-btn { flex: 1 0 78px; max-width: 100px; }
  .summary-card.meal-total-card { min-height: 136px; }
}


/* v0.4.1 smoother horizontal quick actions + drag sliders */
.quick-grid {
  scroll-snap-type: none !important;
  scroll-behavior: auto;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 0;
}
.quick-btn { scroll-snap-align: none !important; }

.amount-stepper, .amount-stepper-buttons, .amount-step-btn, .amount-value-wrap { display: none !important; }
.amount-slider,
.time-slider-field {
  min-width: 0;
}
.amount-slider {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px 12px 10px;
  background: var(--surface);
}
.slider-value-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  min-height: 58px;
  padding: 4px 8px 0;
  cursor: pointer;
}
.slider-value-button strong {
  font-size: 1.85rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.slider-value-button > span { color: var(--muted); font-size: 1rem; font-weight: 800; }
.slider-value-button small {
  display: block;
  position: absolute;
  margin-top: 46px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
}
.ruler-wrap {
  position: relative;
  margin-top: 20px;
  height: 48px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-radius: 14px;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  background-image:
    repeating-linear-gradient(to right,
      transparent 0,
      transparent 22px,
      color-mix(in srgb, var(--line) 85%, transparent) 22px,
      color-mix(in srgb, var(--line) 85%, transparent) 24px);
  background-position-x: var(--ruler-shift, 0px);
  transition: background-position-x 35ms linear;
}
.ruler-wrap::after {
  content: "";
  position: absolute;
  left: 50%; top: 5px; bottom: 5px;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--primary-strong);
  pointer-events: none;
}
.ruler-range {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 48px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.ruler-wrap.is-dragging {
  background-color: color-mix(in srgb, var(--surface-soft) 62%, transparent);
}
.ruler-center-dot {
  position: absolute;
  z-index: 3;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  background: var(--primary-strong);
  pointer-events: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--surface) 78%, transparent);
}
.ruler-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-top: 4px;
  color: var(--muted);
  font-size: .75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ruler-labels span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ruler-labels span:nth-child(3) { color: var(--text); font-weight: 900; }
.time-value-button { position: relative; min-height: 66px; }
.time-value-button strong { font-size: 1.62rem; }
.time-ruler-wrap { margin-top: 8px; }
.time-labels { margin-bottom: 2px; }
.direct-input-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.direct-input-row label { display: grid; gap: 6px; }
.direct-input-row label > span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.direct-input-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.amount-helper { margin-top: 6px; font-size: .72rem; }

@media (max-width: 520px) {
  .quick-grid { scroll-snap-type: none !important; }
  .slider-value-button strong { font-size: 2rem; }
  .time-value-button strong { font-size: 1.72rem; }
  .ruler-wrap { height: 52px; }
  .ruler-range { height: 52px; }
}


/* v0.5 account / sync */
.topbar-actions { display:flex; gap:8px; }
.account-icon-btn[data-signed-in="1"] { border-color: var(--primary); background: var(--surface-soft); }
.account-content { display:grid; gap:14px; padding-bottom:8px; }
.account-state { display:grid; gap:12px; }
.auth-google-btn { font-weight:800; }
.auth-divider { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.82rem; }
.auth-divider::before,.auth-divider::after { content:""; flex:1; height:1px; background:var(--line); }
.account-help { margin:0; color:var(--muted); font-size:.82rem; line-height:1.5; }
.account-summary-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; background:var(--surface-soft); border:1px solid var(--line); border-radius:16px; }
.account-summary-card div { min-width:0; display:grid; gap:3px; }
.account-summary-card small { color:var(--muted); }
.account-summary-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sync-badge { flex:none; border-radius:999px; padding:6px 9px; background:var(--surface); border:1px solid var(--line); color:var(--muted); font-size:.75rem; font-weight:800; }
.sync-badge.ok { color:#27865a; }
.sync-badge.busy { color:var(--primary-strong); }
.sync-badge.error { color:#c84a45; }
.sync-badge.offline { color:#8b756d; }
.account-actions { display:grid; grid-template-columns:1fr; gap:8px; }
.invite-result { display:grid; gap:9px; padding:14px; border:1px solid var(--line); border-radius:16px; background:var(--surface-soft); }
.invite-result p { margin:0; color:var(--muted); line-height:1.5; font-size:.86rem; }
.invite-accept-row { display:grid; gap:8px; }
.text-danger-btn { border:0; background:transparent; color:#c84a45; font-weight:800; padding:10px; cursor:pointer; }
@media (max-width:520px){ .account-actions { grid-template-columns:1fr; } }
