:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-card: #ffffff;
  --border: #e3e8ee;
  --text: #16202c;
  --text-muted: #5b6b7c;
  --accent: #437a77;
  --accent-soft: #e9f1f0;
  --success: #0f7b46;
  --success-soft: #e8f6ee;
  --warn: #9a5b00;
  --warn-soft: #fdf3e3;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-left: 16px;
}
.site-nav a:first-child { margin-left: 0; }
.site-nav a:hover { color: var(--accent); }

/* ---------- typography ---------- */
h1 { font-size: 28px; line-height: 1.28; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 21px; line-height: 1.32; letter-spacing: -0.01em; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
a { color: var(--accent); }
small { font-size: 13px; }
.lede { font-size: 17px; color: var(--text-muted); }
.muted { color: var(--text-muted); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 8px; }

/* ---------- cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card + .card { margin-top: 18px; }

/* ---------- form ---------- */
.fieldset { border: 0; padding: 0; margin: 0; }
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field > .field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 7px;
}
.hint {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  background: var(--bg);
  transition: border-color .12s, background .12s;
}
.radio-row label:hover { border-color: #c8d2dc; }
.radio-row input { margin: 0; accent-color: var(--accent); }
.radio-row input:checked + span { font-weight: 600; }
.radio-row label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.input-unit { display: flex; gap: 8px; }
.input-unit input[type="number"] { flex: 1 1 auto; min-width: 0; }
input[type="number"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
input[type="number"]:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
select.unit-select { flex: 0 0 96px; }

.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  padding: 13px 22px;
  cursor: pointer;
  width: 100%;
}
.btn:hover { background: #356360; }
.btn.secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
  padding: 10px 16px;
  width: auto;
  font-size: 14px;
}

.hidden { display: none !important; }

/* ---------- results ---------- */
.results { margin-top: 22px; }
.result-main {
  background: var(--success-soft);
  border: 1px solid #c7e6d5;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.result-main .big {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--success);
  display: block;
}
.result-main .big-unit { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.result-main .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
}
.result-cell {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg);
}
.result-cell .k { font-size: 13px; color: var(--text-muted); display: block; }
.result-cell .v { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.result-cell .u { font-size: 13px; color: var(--text-muted); font-weight: 400; }

.breakdown {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-size: 14px;
}
.breakdown dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.breakdown dt { color: var(--text-muted); }
.breakdown dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- notices ---------- */
.notice {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px;
  margin-bottom: 12px;
  border: 1px solid;
}
.notice.danger { background: var(--danger-soft); border-color: #f3c6c3; color: #7a1a15; }
.notice.warn { background: var(--warn-soft); border-color: #f0dcb8; color: #6f4200; }
.notice strong { display: block; margin-bottom: 3px; }

/* ---------- methodology ---------- */
.formula {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  overflow-x: auto;
  margin: 12px 0;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}
table.data th, table.data td {
  border: 1px solid var(--border);
  padding: 9px 11px;
  text-align: center;
  vertical-align: middle;
}
table.data th { background: var(--bg-soft); font-weight: 600; }
table.data td.num { text-align: center; font-variant-numeric: tabular-nums; }

/* 表格文字一律居中（2026-09-20 定）。
   这里曾经有一条 `table.data.prose td:nth-child(2) { text-align: left; }`，
   本意是"整段文字的那一列保持左对齐，因为居中排版多行段落两侧参差、更难读"。
   但它假设了「第二列就是长段落列」，而实际上很多表不是 —— 例如幼猫喂食计划表，
   第二列是「每天几餐」（短内容），长段落在第三列。结果是：设计意图没达成，
   却让同一批表格里有的列居中、有的左对齐，看起来像没对齐。
   现在统一居中，不再区分 .prose —— 全站 table.data 只有一种对齐方式。 */

/* 超出零食额度的那几行 —— 用底色标出，而不是只靠文字说明 */
table.data tr.over-limit td {
  background: #fdecea;
  color: #8a1f18;
}

@media (max-width: 560px) {
  table.data { font-size: 13px; }
  table.data th, table.data td { padding: 7px 8px; }
}

details.faq {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: " +"; color: var(--text-muted); font-weight: 400; }
details.faq[open] summary::after { content: " –"; }
details.faq p { margin: 10px 0 2px; color: var(--text-muted); }

/* ---------- compliance ---------- */
.disclaimer {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: #4a5560;
  margin-top: 34px;
}
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.site-footer nav { margin-bottom: 12px; }
.site-footer nav a { margin-right: 16px; color: var(--text-muted); }
.site-footer nav a:hover { color: var(--accent); }

/* ---------- cookie banner ---------- */
#cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #16202c;
  color: #e8eef5;
  padding: 16px 20px;
  font-size: 14px;
  z-index: 50;
}
#cookie-banner .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
#cookie-banner p { margin: 0; color: #c3cede; }
#cookie-banner .actions { display: flex; gap: 10px; flex-shrink: 0; }
#cookie-banner button {
  font-family: inherit;
  font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  cursor: pointer;
  border: 1px solid transparent;
}
#cookie-banner .accept { background: var(--accent); color: #fff; font-weight: 600; }
#cookie-banner .decline { background: transparent; color: #c3cede; border-color: #46586c; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 560px) {
  h1 { font-size: 24px; }
  h2 { font-size: 19px; }
  .hero { padding: 26px 0 4px; }
  .card { padding: 18px; }
  .result-main .big { font-size: 28px; }
  .site-nav a { margin-left: 12px; }
}

/* ---------- 分享 / 打印 辅助 ---------- */
.print-only { display: none; }

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.share-row .btn.secondary { padding: 9px 15px; }
#share-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 10px 0 0;
}

#print-hint {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin: 10px 0 0;
}

/* 用默认克数时的行内提示：紧贴结果数字，不靠用户自己发现 */
#grams-inline {
  font-size: 13px;
  line-height: 1.55;
  color: #7a4a00;
  background: #fdf3e3;
  border: 1px solid #e8cfa0;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin: 14px 0 0;
}
/* 受"每杯克数"影响的单元格加虚线标记 —— 让"哪个数字是估的"一眼可见 */
.result-cell.estimated .v {
  border-bottom: 2px dotted #b8860b;
  padding-bottom: 2px;
}

/* ---------- 典型区间（把"估计值"显示成"估计值"）----------
   外部审阅意见：界面不能在承诺一个数据支撑不了的精确度。
   原来的 2.09 cups/day 是三位有效数字，而个体离散度约 ±35%（≈一位有效数字）。 */
.result-main .best-line {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 10px 0 0;
}
.result-main .range-dash {
  padding: 0 4px;
  font-weight: 600;
}
.result-main .range-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  margin: 12px 0 0;
}

@media print {
  .site-header,
  .site-nav,
  .site-footer,
  #cookie-banner,
  #guides,
  #faq,
  #method,
  form,
  .share-row,
  .btn,
  .no-print { display: none !important; }

  html, body { background: #fff; }
  body { font-size: 11.5pt; color: #000; }
  .wrap { max-width: none; padding: 0; margin: 0; }
  .hero { padding: 0 0 10px; }
  h1 { font-size: 18pt; }

  .print-only { display: block !important; }
  .print-head {
    border-bottom: 1px solid #999;
    padding-bottom: 8px;
    margin-bottom: 14px;
  }
  .print-head strong { display: block; font-size: 12pt; }
  .print-head span { font-size: 9.5pt; color: #444; }

  .hero .lede { display: none !important; }

  .print-profile {
    border: 1px solid #aaa;
    border-radius: 6px;
    padding: 11px 14px;
    margin: 0 0 14px;
    break-inside: avoid;
  }
  .print-profile h2 {
    font-size: 11pt;
    margin: 0 0 9px;
    padding: 0;
  }
  .print-profile dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 20px;
    margin: 0;
    font-size: 10.5pt;
  }
  .print-profile dt { color: #444; }
  .print-profile dd { margin: 0; font-weight: 600; }

  .card,
  .result-main,
  .result-cell,
  .notice,
  .disclaimer {
    border: 1px solid #aaa !important;
    background: #fff !important;
    break-inside: avoid;
  }
  .result-main .big { color: #000; font-size: 22pt; }
  .notice strong { color: #000; }
  .notice.danger, .notice.warn { color: #000; }
  #results { display: block !important; }
  a { color: #000; text-decoration: none; }
  details.faq { display: none; }
}

/* ---------- BCS 九分量程参照 ---------- */
.bcs-scale {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
  margin: 20px 0 12px;
}
.bcs-scale span {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.bcs-low  { background: #fdf3e3; color: #7a4a00; border: 1px solid #e8cfa0; }
.bcs-good { background: #e8f6ee; color: #0b5c35; border: 1px solid #a8d9bf; }
.bcs-high { background: #fdf3e3; color: #7a4a00; border: 1px solid #e8cfa0; }
.bcs-obese{ background: #fdecea; color: #8a1f18; border: 1px solid #e8b4b0; }

.bcs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.bcs-legend i {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: 0;
}

.dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}

.checks {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}
.checks ol { margin: 0; padding-left: 22px; }
.checks li { margin-bottom: 12px; }
.checks li:last-child { margin-bottom: 0; }
.checks strong { display: block; }

@media (max-width: 560px) {
  .bcs-scale { gap: 2px; }
  .bcs-scale span { font-size: 12px; padding: 8px 0; }
}

/* ---------- 插图 ---------- */
.figure {
  margin: 26px 0;
}
.figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.figure figcaption {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 11px;
}

.hero-figure {
  margin: 24px 0 30px;
}
.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 560px) {
  .figure { margin: 20px 0; }
  .figure figcaption { font-size: 13px; }
  .hero-figure { margin: 18px 0 22px; }
}

/* ---------- 粮袋标签示意图 ----------
   用 HTML/CSS 而非图片：这张图的价值全在文字上，
   文字必须真实、可选中、可搜索、可被屏幕阅读器读取。 */
.label-figure { margin: 24px 0; }
.label-mock {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.label-title { font-size: 14px; font-weight: 600; margin: 0 0 3px; }
.label-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 20px; }
.label-sec { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.label-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0 0 20px;
}
.label-table td {
  padding: 3px 0;
  text-align: left;
  color: var(--text-muted);
}
.label-table td:last-child {
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.label-callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.label-callout-h {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 6px;
}
.label-callout-v {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.label-note { font-size: 13px; color: var(--accent); margin: 10px 0 20px; }
.label-foot { font-size: 12.5px; color: var(--text-muted); margin: 0; }

@media (max-width: 560px) {
  .label-mock { padding: 16px; }
  .label-callout-v { font-size: 14px; }
}

/* =========================================================
   响应式收口层 —— 放在文件最后，确保覆盖前面的零散移动端规则。
   按视口宽度分三档：
     ≤760px  手机 + 竖屏平板
     ≤560px  主流手机
     ≤380px  小屏手机
   ========================================================= */

@media (max-width: 760px) {
  /* 关键修复：数据表列多（体重对照表有 6 列），窄屏下必须横向滚动，
     否则各列被压到几十像素宽、换行错乱，完全读不了。
     .prose 表只有 2–3 列且是整段文字，保持正常换行，不要 nowrap。 */
  table.data:not(.prose) {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  table.data:not(.prose) th,
  table.data:not(.prose) td { padding: 8px 14px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }

  /* iOS Safari 在输入框字号小于 16px 时会在聚焦时自动放大整页，必须顶到 16px */
  input[type="number"],
  select { font-size: 16px; }

  h1 { font-size: 22px; }
  h2 { font-size: 19px; }
  .hero { padding: 22px 0 4px; }
  .lede { font-size: 16px; }

  .card { padding: 16px; }
  .result-main { padding: 16px; }
  .result-main .big { font-size: 26px; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .result-cell { padding: 10px 12px; }
  .result-cell .v { font-size: 17px; }

  .radio-row { gap: 6px; }
  .radio-row label { padding: 9px 13px; }

  .checks { padding: 15px 16px; }
  .disclaimer { padding: 13px 14px; font-size: 13.5px; }

  .bcs-scale span { padding: 8px 0; }

  #cookie-banner { padding: 14px 16px; }
  #cookie-banner .inner { gap: 10px; }
  #cookie-banner .actions { width: 100%; }
  #cookie-banner button { flex: 1 1 0; }
}

@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  h1 { font-size: 20px; }
  h2 { font-size: 17px; }
  .result-grid { grid-template-columns: 1fr; }
  .site-nav a { margin-left: 10px; font-size: 13px; }
  .bcs-scale span { font-size: 11px; }
}


.affiliate-box {
  background: #f8f9fa;
  border-left: 3px solid #457b9d;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.6;
}
.affiliate-box a { color: #457b9d; }
.affiliate-note { font-size: 13px; color: #495057; margin-top: 8px; }
.precision-tip { font-size: 14px; color: #495057; margin: 12px 0; padding: 0 20px; }
.precision-tip a { color: #457b9d; }

.codeblock {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 14px;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre;
  margin: 12px 0;
}
.codeblock code { background: none; padding: 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.table-wrap table { min-width: 640px; }

/* ---------- 信任横幅（B2 · 2026-10-04）----------
   位置：全站 </header> 之后、<main> 之前。
   注意：本段必须留在样式表**末尾** —— .trust-banner-inner 与 .wrap 同优先级(0,1,0)，
   靠"后出现者胜"覆盖 .wrap 的 padding（含媒体查询里 .wrap{padding:0} 那条）。 */
.trust-banner { background: #FDF3E3; border-top: 3px solid #437A77; }
.trust-banner-inner { display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.trust-banner-icon { flex: none; border-radius: 50%; }
.trust-banner-text { margin: 0; font-size: 13px; color: #16202C; line-height: 1.4; }
.trust-banner-text a { color: #437A77; font-weight: 600; text-decoration: none; }
.trust-banner-text a:hover { text-decoration: underline; }
@media (max-width: 640px) { .trust-banner-inner { flex-wrap: wrap; gap: 4px 8px; } }

/* ---- Feeding log (MVP v1) ---- */
.feeding-log-section { margin-top: 28px; }
.feeding-log { border: 1px solid #e5e6eb; border-radius: 12px; padding: 20px; background: #fff; }
.fl-head h2 { margin: 0 0 6px; font-size: 20px; }
.fl-switch { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; }
.fl-pet { font-size: 13px; padding: 3px 10px; border: 1px solid #e5e6eb; background: #f7f8fa; border-radius: 999px; cursor: pointer; }
.fl-pet.on { background: #165DFF; color: #fff; border-color: #165DFF; }
.fl-sub { margin: 0 0 16px; color: #86909c; font-size: 13px; }
.fl-today { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #f7f8fa; border-radius: 10px; margin-bottom: 18px; }
.fl-k strong { font-size: 22px; margin: 0 8px 0 6px; }
.fl-lab { color: #86909c; font-size: 13px; }
.fl-muted { color: #86909c; font-size: 13px; }
.fl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fl-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }
.fl-fig { margin: 0; }
.fl-fig figcaption { font-size: 13px; color: #4e5969; margin-bottom: 6px; }
.fl-delta.down { color: #00b42a; font-weight: 600; }
.fl-delta.up { color: #f53f3f; font-weight: 600; }
.fl-axis { display: flex; justify-content: space-between; font-size: 11px; color: #86909c; margin-top: 2px; }
.fl-recent { margin: 14px 0; font-size: 14px; }
.fl-recent summary { cursor: pointer; color: #165DFF; }
.fl-recent ul { list-style: none; padding: 8px 0 0; margin: 0; }
.fl-recent li { padding: 6px 0; border-bottom: 1px solid #f2f3f5; display: flex; align-items: center; gap: 8px; }
.fl-date { color: #86909c; font-variant-numeric: tabular-nums; min-width: 88px; }
.fl-del { margin-left: auto; border: 0; background: none; color: #c9cdd4; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.fl-del:hover { color: #f53f3f; }
.fl-data { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.fl-danger { color: #f53f3f !important; border-color: #ffd6d6 !important; }
.fl-import { display: inline-flex; align-items: center; cursor: pointer; }
.fl-note { font-size: 12px; color: #86909c; margin: 12px 0 0; line-height: 1.6; }
@media (max-width: 640px) {
  .fl-today { flex-direction: column; align-items: stretch; }
  .fl-actions .btn { flex: 1 1 auto; }
}

/* ---- Feeding log V2: inline form, photo, thumbnails ---- */
.fl-form { border: 1px solid #e5e6eb; border-radius: 12px; padding: 16px; background: #f7f8fa; margin: 16px 0; }
.fl-form-head { font-weight: 700; font-size: 15px; color: #1d2129; margin-bottom: 12px; }
.fl-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.fl-form label { display: flex; flex-direction: column; font-size: 13px; color: #4e5969; gap: 4px; }
.fl-form label.fl-wide { grid-column: 1 / -1; }
.fl-form input[type=number],
.fl-form input[type=text],
.fl-form input[type=date] {
  padding: 8px 10px; border: 1px solid #e5e6eb; border-radius: 8px;
  font-size: 15px; background: #fff; color: #1d2129; width: 100%; box-sizing: border-box;
}
.fl-form input:focus { outline: 2px solid #165DFF33; border-color: #165DFF; }
.fl-opt { color: #a9aeb8; font-weight: 400; font-size: 12px; }
.fl-photo-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.fl-photo-lab { font-size: 13px; color: #4e5969; display: flex; flex-direction: column; gap: 4px; }
.fl-photo-lab input[type=file] { font-size: 13px; }
.fl-photo-preview img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e6eb; }
.fl-form-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.fl-form-note { font-size: 12px; color: #86909c; margin: 10px 0 0; min-height: 1em; }

.fl-recent-head { font-weight: 700; font-size: 14px; color: #1d2129; margin: 16px 0 4px; }
.fl-recent ul { list-style: none; padding: 0; margin: 0; }
.fl-recent li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f2f3f5; font-size: 14px; }
.fl-thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid #e5e6eb; flex: 0 0 auto; }
.fl-thumb.ph { background: #f2f3f5; border: 1px dashed #e5e6eb; }
.fl-main { font-variant-numeric: tabular-nums; }
.fl-brand { color: #4e5969; font-size: 13px; }
.fl-note-inline { color: #a9aeb8; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-edit {
  margin-left: auto; border: 0; background: none; color: #165DFF; font-size: 12px;
  cursor: pointer; padding: 2px 6px; text-decoration: underline;
}
.fl-del { border: 0; background: none; color: #c9cdd4; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.fl-del:hover { color: #f53f3f; }
@media (max-width: 640px) {
  .fl-form-grid { grid-template-columns: 1fr; }
  .fl-recent li { flex-wrap: wrap; }
  .fl-note-inline { max-width: 100%; }
}

/* ---- V2.1: inline pet naming (replaces native prompt) ---- */
.fl-name-form { background: #fff; border-color: #165DFF44; }
.fl-name-sub { font-size: 13px; color: #86909c; margin: 0 0 12px; line-height: 1.6; }
.fl-name-meta { font-size: 13px; color: #4e5969; margin: 10px 0 0; }
