:root {
  color-scheme: light;
  --bg: #fff6f0;
  --card: #ffffff;
  --ink: #3d3330;
  --muted: #8c7b74;
  --faint: #b7a8a1;
  --line: #f3e4da;
  --orange: #ff7a45;
  --orange-press: #e8632e;
  --peach: #f6b99a;
  --red: #e15b4c;
  --red-bg: #ffe8ee;
  --amber: #9a6a12;
  --amber-bg: #fff6d6;
  --shadow: 0 8px 24px rgba(120, 64, 36, 0.06);
  --chip: #fff1e8;
  --chip-off: #f6f1ec;
  --care-on: #c46a45;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

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

button { cursor: pointer; }

.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
}

@media (min-width: 480px) {
  body { padding: 28px 0 40px; }
  .phone {
    min-height: calc(100vh - 68px);
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(120, 64, 36, 0.08);
  }
}

.noscript {
  max-width: 430px;
  margin: 12px auto;
  padding: 0 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 8px 16px 2px;
}

.roles, .tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.roles {
  padding: 2px;
  background: var(--card);
  box-shadow: none;
}

.roles button, .tabs button {
  flex: 1 1 0;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.roles button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.roles button[aria-selected="true"],
.tabs button[aria-selected="true"] {
  background: var(--orange);
  color: #fff;
}

.roles button[aria-selected="true"]:active,
.tabs button[aria-selected="true"]:active,
.save:active {
  background: var(--orange-press);
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
}

h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.meta, .lede, .hint, .house-sub { color: var(--muted); }

.meta { margin: 6px 0 0; font-size: 15px; }

.accent-name {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.lede, .hint { margin: 8px 0 0; }

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 10px;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.group-baby .dot { background: var(--peach); }

.group-mother .dot { background: var(--orange); }

.status { margin: 0; font-size: 14px; font-weight: 650; color: var(--muted); }

.status.ok { color: #6e8b74; }

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 16px 12px;
}

.card, .house {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--card);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.card {
  min-height: 64px;
  background: var(--card);
}

.card.is-done,
.card:not(.is-done) { background: var(--card); }

.card.day-card,
.card.card-block { align-items: stretch; }

.card .card-name,
.card.is-done .card-name,
.card:not(.is-done) .card-name {
  font-weight: 700;
  color: var(--ink);
}

.card:active, .house:active { background: #fff8f4; }

.abbr {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.card-main, .house-main { flex: 1; min-width: 0; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.card-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  min-width: 0;
}

.house-title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.recorded { font-weight: 650; color: var(--ink); }

.empty { color: var(--muted); font-size: 15px; font-weight: 500; }

.num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.num.compact { font-size: 16px; letter-spacing: -0.02em; }

.unit {
  margin-left: 1px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.sep { color: var(--muted); }

.feed-list {
  margin: 8px 0 0;
  padding-left: 1.1em;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.feed-list .num { font-size: 18px; }

.house p { margin: 8px 0 0; font-size: 14px; }

.line-submit, .line-rate, .line-alert { margin: 8px 0 0; }

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
  background: var(--orange);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.card, .day, .house, .fields { overflow-wrap: anywhere; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.line-alert .tag-row, .day-banner { justify-content: flex-start; }

.tag-red, .tag-yellow, .tag-miss, .tag-ok {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.tag-red { background: var(--red-bg); color: var(--red); }

.tag-yellow { background: var(--amber-bg); color: var(--amber); }

.tag-miss { background: #f8ebe3; color: #9a5b45; }

.tag-ok { background: #eef6f0; color: #5e8a68; }

.quiet { color: var(--muted); font-size: 14px; }

.thumb, .preview {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 18px;
  background: #fff1e8;
  flex: none;
}

.photo-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  overflow-x: auto;
}

.preview { width: 100%; height: 180px; margin-top: 8px; }

main { padding-bottom: 28px; }

.tabs-wrap { padding: 8px 16px 0; }

.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px 4px;
}

.day-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  width: 44px;
  min-height: 64px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.day-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.day-dot.on .day-num {
  background: var(--orange);
  color: #fff;
}

.day-label { font-size: 11px; font-weight: 650; }

.day-dot.on .day-label { color: var(--orange); }

.back {
  min-height: 40px;
  min-width: 72px;
  margin-bottom: 8px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--orange);
  font-size: 16px;
  font-weight: 700;
}

.form-top { padding: 8px 20px 4px; }

.fields { padding: 8px 16px 12px; }

.field { display: block; margin-bottom: 16px; }

.field > span, .label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input[type="text"],
input[type="number"],
input[type="time"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 0;
  background: var(--bg);
  font-size: 16px;
}

textarea { min-height: 96px; resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 0;
  background: var(--chip);
  color: var(--ink);
  font-size: 15px;
}

.chip.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.chip:active { background: #ffe4d6; }

.chip.on:active { background: var(--orange-press); }

.photo-actions { display: flex; flex-direction: column; gap: 8px; }

.file-btn, .sample-btn, .save {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 0;
  font-size: 16px;
  font-weight: 700;
}

.file-btn, .sample-btn {
  border: 1px solid #f0e0d6;
  background: #fff;
  position: relative;
}

.file-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.already {
  margin: 8px 16px;
  padding: 14px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.already p { margin: 0 0 6px; font-weight: 700; }

.savebar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 0;
  padding: 8px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.save {
  min-height: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--orange);
  color: #fff;
  font-size: 17px;
}

.savebar .save {
  min-height: 48px;
  height: 48px;
  border-radius: 14px;
}

.form-error {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}

.day {
  margin: 12px 16px 20px;
  padding: 16px 18px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.day-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.day h3 {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
}

.block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.block h4 { margin: 0 0 4px; font-size: 14px; color: var(--muted); font-weight: 700; }

.block p { margin: 0; }

.block ul { margin: 4px 0 0; padding-left: 1.2em; }

.block li { margin: 2px 0; }

button:focus-visible, .chip:focus-visible, .file-btn:focus-within, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.card-block {
  flex-direction: column;
  align-items: stretch;
}

.card-id {
  display: flex;
  gap: 12px;
  width: 100%;
}

.entry-list, .log-list, .report-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.entry-list li, .log-row {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.log-list { margin-top: 4px; }

.log-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.log-time {
  min-width: 72px;
  font-weight: 700;
}

.log-body { flex: 1; min-width: 0; }

.add-btn { margin-top: 10px; }

.sos {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 2px 20px 4px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--red);
  font-size: 14px;
  font-weight: 650;
}

.sos:active { color: var(--orange-press); background: transparent; }

.sync-note {
  margin: 8px 0 0;
  color: #6e8b74;
  font-weight: 700;
}

.draft-line {
  min-height: 1.4em;
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.duration {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.live-tags { justify-content: flex-start; min-height: 8px; }

.help-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #f0e0d6;
  background: #fff;
  color: var(--orange);
  font-size: 16px;
  font-weight: 700;
  vertical-align: middle;
}

.tip {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff4e8;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.day-caption {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.summary-card { display: block; }

.big-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 12px 8px;
  margin: 2px 0 14px;
}

.big-panel.single { grid-template-columns: 1fr; }

.big-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.big-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 42px;
  margin-top: 2px;
}

.big-value .num {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.big-value .unit { font-size: 13px; font-weight: 600; }

.range-line,
.range-note {
  margin-top: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.field + .range-note {
  margin-top: -8px;
  margin-bottom: 14px;
}

.metric {
  margin: 8px 0 0;
  font-size: 16px;
}

.metric.warn, .warn { color: var(--red); font-weight: 700; }

.warn {
  display: inline-flex;
  width: auto;
  max-width: calc(100% - 32px);
  margin: 8px 16px 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.sheet .warn {
  display: flex;
  width: auto;
  margin: 8px 0;
}

.metric.warn .num, .metric.warn .unit { color: inherit; }

.thumb-sm {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  cursor: pointer;
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(61, 51, 48, 0.45);
}

.sheet {
  width: 100%;
  max-width: 430px;
  max-height: min(86vh, 740px);
  overflow: auto;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.sheet-chart {
  display: flex;
  flex-direction: column;
  height: min(78vh, 680px);
  overflow: hidden;
}

.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1 1 auto;
  padding-bottom: 8px;
}

.sheet .block {
  margin-top: 22px;
  padding-top: 0;
  border-top: 0;
}

.sheet .chart-svg { margin: 6px 0 4px; }

.sheet h2 { margin-bottom: 8px; }

.sheet p { margin: 8px 0; }

.lightbox {
  display: block;
  width: 100%;
  border-radius: 16px;
  background: #fff1e8;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
}

.bubble {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 18px;
}

.bubble.mom { background: #fff; border: 1px solid var(--line); }

.bubble.aunt { background: var(--chip); }

.bubble.boss { background: #fff1e8; }

.who {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bubble p { margin: 0; }

.when {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.follow {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 0;
  background: #fff1e8;
  font: inherit;
}

.fact { margin-top: 12px; }

.report {
  margin: 4px 16px 20px;
  padding: 16px 18px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.report h2 { margin-bottom: 8px; }

.report h3 {
  margin: 12px 0 4px;
  font-size: 15px;
  color: var(--muted);
}

.report-list li { margin: 6px 0; }

.stack-gap { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.care-box, .care-block { margin: 0; }

.care-block h4, .care-box h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.care-list {
  margin: 0;
  padding-left: 1.2em;
}

.care-list li { margin: 4px 0; }

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

.care-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.care-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip-off);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}

.care-chip.on { background: var(--chip); color: var(--care-on); }

.care-chip.hot { background: var(--red-bg); color: var(--red); }

.care-chip.warm { background: var(--amber-bg); color: var(--amber); }

.care-grid .care-chip { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 36px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
}

.text-link:active { color: var(--orange-press); }

.fold-details { width: 100%; }

.fold summary {
  display: flex;
  width: 100%;
  list-style: none;
  cursor: pointer;
}

.fold summary::-webkit-details-marker { display: none; }

.fold summary::marker { content: ""; }

.fold-body { padding-top: 4px; }

.card-figure {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  flex: none;
}

.card-figure::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translateY(-3px);
  align-self: center;
}

.fold details[open] .card-figure::after {
  transform: rotate(225deg) translateY(-1px);
}

.header-tags { justify-content: flex-start; margin-top: 8px; }

.stat-empty {
  color: var(--faint);
  font-size: 15px;
  font-weight: 700;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.stat-cell { min-width: 0; text-align: center; }

.stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 34px;
}

.stat-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.stat-sub, .fine {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}

.stat-sub .help-btn, .fine .help-btn {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

.day-card { flex-direction: column; align-items: stretch; }

.day-card .card-id { width: 100%; }

.day-card .card-top { flex-wrap: wrap; }

.day-card .card-status {
  flex: 1 1 100%;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}

.day-card .recorded {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.day-card .text-link { margin-top: 2px; min-height: 28px; }

.day-card .card-top { flex-wrap: nowrap; align-items: center; }

.day-card .card-status {
  flex: 0 1 auto;
  max-width: 58%;
  align-items: flex-end;
  text-align: right;
}

.day-card .recorded {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .num { font-size: 20px; font-weight: 700; }

.card .empty,
.card .stat-empty {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.save.add-btn {
  width: auto;
  min-height: 40px;
  margin-top: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--orange);
  font-size: 15px;
  justify-content: flex-start;
}

.save.add-btn:active { background: transparent; color: var(--orange-press); }

.entry-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
}

.entry-list li b { min-width: 72px; font-variant-numeric: tabular-nums; }

.line-rate .num { font-size: 22px; }

.stat-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  margin: 0 0 12px;
  padding: 16px 14px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.stat-board .num,
.stat-board .num.compact {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-board .stat-cell { text-align: left; }

.stat-board .stat-value { justify-content: flex-start; }

.stat-board .stat-cell:last-child { grid-column: 1 / -1; }

.stat-board-temp { grid-template-columns: 1fr; }

.compare {
  margin: 2px 2px 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.summary-card {
  margin: 4px 0 0;
  padding: 4px 16px 8px;
  background: transparent;
  box-shadow: none;
}

.panel {
  margin: 0 0 12px;
  padding: 16px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.panel h4 { margin: 0 0 12px; }

.meal-phase {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.meal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.meal-row:first-of-type { border-top: 0; }

.meal-when {
  flex: 0 1 58%;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.meal-what {
  flex: 1 1 auto;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  text-align: right;
}

.meal-what.is-empty {
  color: var(--muted);
  font-weight: 500;
}

.chart-card {
  margin-top: 12px;
  padding: 14px 14px 8px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.chart-head h3 { margin: 0; font-size: 15px; }

.chart-head .range-note { margin: 0; }

.chart-svg { height: 140px; }

.stat-strip .num { font-size: 24px; }

.stat-strip .num.compact { font-size: 13px; line-height: 1.25; }

.stat-strip .unit { font-size: 11px; }

.fold summary .help-btn { position: relative; z-index: 1; }

#print-root { display: none; }

@media print {
  body { margin: 0; padding: 0; background: #fff; }
  .phone { display: none !important; }
  #print-root {
    display: block !important;
    max-width: none;
    color: #3d3330;
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  }
  .print-day { break-inside: avoid; margin: 0 0 16px; }
  .print-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
}
