/* ==========================================================================
   龟场档案管理平台 · 样式
   基线来自原型 docs/yx.html，保持 1:1 视觉一致，并按新增页面扩展组件。
   ========================================================================== */

:root {
  --primary: #0f766e;
  --primary-light: #ecfdf5;
  --primary-soft: #f0fdfa;
  --primary-border: #99f6e4;
  --primary-dark: #0d5f58;
}
html[data-theme="red"] {
  --primary: #b91c1c; --primary-light: #fef2f2;
  --primary-soft: #fef2f2; --primary-border: #fecaca; --primary-dark: #991b1b;
}
html[data-theme="blue"] {
  --primary: #1d4ed8; --primary-light: #eff6ff;
  --primary-soft: #eff6ff; --primary-border: #bfdbfe; --primary-dark: #1e40af;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f2f4f7;
  color: #1f2937;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}
#app {
  width: 100%;
  max-width: 420px;
  background: #fff;
  min-height: 100vh;
  position: relative;
  padding-bottom: 64px;
  box-shadow: 0 0 24px rgba(0,0,0,.08);
}
a { color: inherit; text-decoration: none; }

/* ===== 顶栏 ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header h1 { font-size: 17px; font-weight: 600; }
.header .actions { display: flex; gap: 12px; font-size: 13px; opacity: .95; align-items: center; }
.header .actions span, .header .actions a { cursor: pointer; color: #fff; }
.header .back {
  font-size: 18px; line-height: 1; cursor: pointer; margin-right: 8px;
  display: flex; align-items: center;
}
.header .title-wrap { display: flex; align-items: center; min-width: 0; }
.header .title-wrap h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 顶栏的「当前龟厂」徽标：厂名可能较长，限宽 + 省略号，
   避免把右侧的主题切换挤出屏幕 */
.header .farm-badge {
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 7px; border-radius: 9px; font-size: 12px; line-height: 1.45;
  background: rgba(255, 255, 255, .18);
}
.theme-switch { display: flex; gap: 6px; align-items: center; }
.theme-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.7); cursor: pointer;
}
.theme-dot.green { background: #0f766e; }
.theme-dot.red { background: #b91c1c; }
.theme-dot.blue { background: #1d4ed8; }
.theme-dot.active { border-color: #fff; transform: scale(1.15); }

/* ===== 页面容器 ===== */
.page { display: none; padding: 12px 14px 20px; }
.page.active { display: block; }
.section-title {
  font-size: 13px; color: #6b7280;
  margin: 16px 0 8px; font-weight: 600;
}
/* 「更多 ›」入口：用浮动而非 flex，保持 .section-title 与原型一致的盒模型 */
.section-title .more {
  float: right; font-size: 12px; color: var(--primary); font-weight: 500; cursor: pointer;
}
.section-title::after { content: ""; display: block; clear: both; }
.section-title:first-child { margin-top: 4px; }

/* ===== 存栏概览 ===== */
.overview-card {
  background: #f9fafb;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 4px;
}
.overview-main { display: flex; align-items: center; gap: 16px; }
.ring {
  width: 84px; height: 84px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  display: block;
  background: conic-gradient(var(--primary) 0% 65%, #e5e7eb 65% 100%);
}
.ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: #f9fafb;
  border-radius: 50%;
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.ring-center .n { font-size: 17px; font-weight: 700; color: var(--primary); }
.ring-center .t { font-size: 9px; color: #9ca3af; }
.overview-list { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.overview-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.overview-row .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0;
}
.overview-row .name { width: 32px; color: #6b7280; flex-shrink: 0; }
.overview-row .bar-track {
  flex: 1; height: 6px; border-radius: 999px;
  background: #e5e7eb; overflow: hidden;
}
.overview-row .bar-fill { height: 100%; border-radius: 999px; background: var(--primary); }
.overview-row .val { width: 42px; text-align: right; font-weight: 600; }
.overview-row .pct { width: 30px; text-align: right; color: #9ca3af; font-size: 11px; }
.overview-bottom {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.overview-bottom .item {
  flex: 1; border-radius: 10px; padding: 8px; text-align: center; background: #fff;
  cursor: pointer; display: block;
}
.overview-bottom .item.warn { background: #fffbeb; }
.overview-bottom .item.ok { background: #ecfdf5; }
.overview-bottom .item.danger { background: #fef2f2; }
.overview-bottom .item.gray { background: #f3f4f6; }
.overview-bottom .n { font-size: 15px; font-weight: 700; }
.overview-bottom .item.warn .n { color: #b45309; }
.overview-bottom .item.ok .n { color: var(--primary); }
.overview-bottom .item.danger .n { color: #b91c1c; }
.overview-bottom .item.gray .n { color: #4b5563; }
.overview-bottom .t { font-size: 10px; color: #6b7280; margin-top: 2px; }

/* ===== 卡片 ===== */
.list-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: .15s;
  display: block;
}
.list-card:hover { border-color: var(--primary); }
.list-card.static { cursor: default; }
.list-card.static:hover { border-color: #e5e7eb; }
.list-card .title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.list-card .sub { font-size: 12px; color: #6b7280; line-height: 1.6; }
.list-card .head-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.list-card .chev { color: #d1d5db; font-size: 16px; flex-shrink: 0; }

/* 龟只卡片：左侧主图缩略图 + 右侧文字（没有主图时缩略图位显示 🐢 占位，
   这样一屏卡片的格子一样宽，有照片的和没照片的不会参差） */
.list-card.turtle-item { display: flex; align-items: flex-start; gap: 10px; }
.list-card .lc-body { flex: 1; min-width: 0; }
.list-card .lc-thumb {
  flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.list-card .lc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== 标签 ===== */
.tag {
  display: inline-block; font-size: 11px; padding: 1px 7px;
  border-radius: 999px; background: var(--primary-light);
  color: var(--primary); margin-right: 4px;
}
.tag.warn { background: #fef3c7; color: #b45309; }
.tag.danger { background: #fee2e2; color: #b91c1c; }
.tag.gray { background: #f3f4f6; color: #6b7280; }
.tag.blue { background: #e0f2fe; color: #0369a1; }
.tag.purple { background: #f3e8ff; color: #7e22ce; }
.tag.lg { font-size: 12px; padding: 2px 9px; }

/* ===== 通用排版 ===== */
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row.middle { align-items: center; }
.row.between { justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.muted { color: #6b7280; }
.tiny { font-size: 11px; color: #9ca3af; }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: #f3f4f6; margin: 10px 0; }
.text-danger { color: #b91c1c; } .text-warn { color: #b45309; } .text-ok { color: var(--primary); }

/* ===== 按钮 ===== */
.btn {
  border: none; background: var(--primary); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-family: inherit; transition: .15s;
}
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: #f3f4f6; color: #374151; }
.btn.ghost:hover { background: #e5e7eb; }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #b91c1c; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link {
  background: none; border: none; color: var(--primary); cursor: pointer;
  font-size: 13px; font-family: inherit; padding: 0;
}

/* ===== 待办 ===== */
.todo-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.todo-item:last-child { border-bottom: none; }
.todo-item .todo-main { flex: 1; min-width: 0; }
.todo-item .todo-text {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.checkbox {
  width: 18px; height: 18px;
  border: 2px solid var(--primary);
  border-radius: 5px; flex-shrink: 0;
}
/* 本实现中勾选框是可点击按钮，附加重置样式，不改动原型定义的尺寸与描边 */
button.checkbox, a.checkbox {
  display: block; padding: 0; margin: 0; background: #fff; cursor: pointer;
  font-family: inherit; line-height: normal; font-size: 13px; text-align: start;
  -webkit-appearance: none; appearance: none; color: transparent;
}
button.checkbox:hover { background: var(--primary-light); }
button.checkbox.checked { background: var(--primary); color: #fff; }
.alert-item {
  font-size: 13px; padding: 8px 10px; border-radius: 8px;
  background: #fffbeb; color: #92400e; margin-bottom: 6px;
  display: block;
}
.alert-item.danger { background: #fef2f2; color: #b91c1c; }
.alert-item .detail { font-size: 11px; opacity: .8; margin-top: 2px; }

/* ===== 快捷入口 ===== */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-item {
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 10px 4px; text-align: center; font-size: 12px;
  color: #374151; cursor: pointer; display: block;
}
.quick-item:hover { border-color: var(--primary); color: var(--primary); }
.quick-item .ico { font-size: 17px; display: block; margin-bottom: 3px; }

/* ==========================================================================
   「我的」页（样式稿 docs/mockup-me-redesign.html 的方案⑥）
   Hero → 数据统计 → 管理与设置 → 账号，一页到底、没有标签页。
   Hero 把「哪个厂、谁在用、三个关键数字」一次说完；下面两张图讲场地情况；
   再往下全是入口行（.lrow），分组用 .zone 标题。
   ========================================================================== */
.hero {
  border-radius: 16px; padding: 14px; margin-bottom: 12px; color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.hero-top { display: flex; align-items: center; gap: 10px; }
.hero .avatar {
  width: 44px; height: 44px; border-radius: 12px; font-size: 20px; flex-shrink: 0;
  background: rgba(255, 255, 255, .2); color: #fff;
}
.hero .hero-id { flex: 1; min-width: 0; }
.hero .nm { font-size: 15px; font-weight: 600; }
.hero .sub { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.hero .go { font-size: 12px; color: #fff; opacity: .92; white-space: nowrap; }
/* 三个数字本身就是入口：点「在池 / 待办 / 待完善」直接进对应列表 */
.hero-kpi { display: flex; margin-top: 13px; }
.hero-kpi > a { flex: 1; text-align: center; color: #fff; }
.hero-kpi > a + a { border-left: 1px solid rgba(255, 255, 255, .22); }
.hero-kpi .n { font-size: 21px; font-weight: 700; line-height: 1.1; }
.hero-kpi .t { font-size: 11px; opacity: .85; margin-top: 3px; }

/* 分区标题：比 .section-title 更轻，用于「数据统计 / 管理与设置 / 账号」 */
.zone {
  font-size: 12px; font-weight: 600; color: #94a3b8; letter-spacing: .04em;
  margin: 14px 2px 7px;
}
.zone:first-child { margin-top: 4px; }

/* 入口行：左侧图标、中间标题 + 副标题、右侧值 + ›（比 .settings-row 多一列图标） */
.lcard {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  margin-bottom: 10px; overflow: hidden;
}
.lrow {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-bottom: 1px solid #f3f4f6; color: inherit;
}
.lrow:last-child { border-bottom: none; }
.lrow .ico {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: #f3f4f6; color: #4b5563;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.lrow .body { flex: 1; min-width: 0; }
.lrow .t { font-size: 13.5px; color: #1f2937; }
.lrow .s { font-size: 11px; color: #9ca3af; margin-top: 1px; }
.lrow .v { font-size: 12px; color: #6b7280; white-space: nowrap; }
.lrow .v.hot { color: #b45309; font-weight: 600; }
.lrow .chev { color: #d1d5db; font-size: 15px; }

/* 账号资料里的头像编辑：左边一个圆预览（复用 .slot 的上传/失败/重拍三态），
   右边是说明与「删除头像」。点预览＝换一张，选图即异步上传，隐藏域带 file_id 随表单提交。 */
.avatar-edit { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.slot.avatar-slot {
  width: 72px; height: 72px; flex: none; border-radius: 50%;
  aspect-ratio: auto; display: flex; align-items: center; justify-content: center;
}
.slot.avatar-slot .add { position: static; }
.slot.avatar-slot .add .nm { font-size: 11px; }
.avatar-edit .avatar-tip { flex: 1; min-width: 0; }

/* 页脚一行小字（厂名 · 版本） */
.about-line { text-align: center; font-size: 11.5px; color: #b6bdc7; margin: 14px 0 2px; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; bottom: 0; width: 100%; max-width: 420px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid #e5e7eb; z-index: 20;
}
/* 原型使用 div，本实现改为 a（服务端路由），两类选择器同时保留 */
.tabbar div {
  text-align: center; padding: 8px 0 10px;
  font-size: 11px; color: #9ca3af; cursor: pointer;
}
.tabbar div.active { color: var(--primary); font-weight: 600; }
.tabbar div .icon { font-size: 18px; display: block; margin-bottom: 2px; }
.tabbar a {
  text-align: center; padding: 8px 0 10px;
  font-size: 11px; color: #9ca3af; cursor: pointer;
}
.tabbar a.active { color: var(--primary); font-weight: 600; }
.tabbar a .icon { font-size: 18px; display: block; margin-bottom: 2px; }

/* ===== 筛选标签 ===== */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-item {
  position: relative;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s ease;
  border: 1px solid transparent;
  user-select: none;
  display: inline-block;
}
.tab-item:hover { background: var(--primary-light); color: var(--primary); }
.tab-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
  transform: translateY(-1px);
}
.tab-item .badge {
  display: inline-block;
  font-size: 10px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  color: inherit;
  margin-left: 4px;
  transition: all .2s ease;
}
.tab-item.active .badge { background: rgba(255,255,255,.28); color: #fff; }
.tab-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.tab-item.ripple::after { opacity: .25; transform: scale(1); }

/* 列表切换动画 */
.list-group { display: none; }
.list-group.active { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 详情头 ===== */
.detail-head {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; background: #f9fafb; border-radius: 12px; margin-bottom: 12px;
}
.avatar {
  width: 64px; height: 64px; border-radius: 10px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  overflow: hidden; position: relative;
}
.avatar.sm { width: 44px; height: 44px; font-size: 18px; border-radius: 8px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* 简介卡右上角「编辑 ›」：卡片本身不增高，和编号同一行的最右侧。
   信息列留出右侧内边距，编号再长也不会压到它。 */
.detail-head .dh-info { position: relative; padding-right: 52px; }
.dh-edit-link {
  position: absolute; top: 0; right: 0; font-size: 12px; font-weight: 600;
  color: var(--primary); display: inline-flex; align-items: center; gap: 2px;
  white-space: nowrap;
}
.dh-edit-link .chev { font-size: 14px; line-height: 1; }
.dh-edit-link:hover { color: var(--primary-dark); }

/* ===== 时间线 ===== */
.timeline { border-left: 2px solid #e5e7eb; margin-left: 8px; padding-left: 14px; }
.timeline .item { position: relative; padding-bottom: 14px; font-size: 13px; }
.timeline .item::before {
  content: ""; position: absolute; left: -21px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
}
.timeline .item.death::before { background: #b91c1c; }
.timeline .item.entry::before { background: #9ca3af; }
.timeline .item .time { color: #9ca3af; font-size: 11px; margin-bottom: 2px; }
.timeline .item .line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ===== 表单 ===== */
.form-item { margin-bottom: 12px; }
.form-item label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.form-item label .req { color: #dc2626; margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #d1d5db;
  border-radius: 8px; font-size: 13px; outline: none;
  font-family: inherit; background: #fff; color: #1f2937;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--primary);
}
.form-item textarea { resize: vertical; }
.form-item .hint { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.form-item .err { font-size: 11px; color: #dc2626; margin-top: 4px; }
.form-item input.invalid, .form-item select.invalid { border-color: #dc2626; }
.form-row { display: flex; gap: 10px; }
.form-row .form-item { flex: 1; }
.readonly-value {
  padding: 9px 10px; background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 8px; font-size: 13px; color: #4b5563;
}

/* ===== 下次记录时间 ===== */
.next-time-box {
  background: var(--primary-soft); border: 1px solid var(--primary-border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
}
.next-time-box .label { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.next-time-box input[type="date"] {
  width: 100%; padding: 8px 10px; border: 1px solid #d1d5db;
  border-radius: 8px; font-size: 13px; outline: none;
}
.next-time-box .quick { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.next-time-box .quick span {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--primary-border);
  color: var(--primary); cursor: pointer;
}
.next-time-box .quick span:hover { background: var(--primary); color: #fff; }
.next-time-box .tip { font-size: 11px; color: var(--primary); margin-top: 6px; }

/* ===== 照片 ===== */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-box {
  aspect-ratio: 1; background: #f3f4f6; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #9ca3af; cursor: pointer;
  overflow: hidden; position: relative; border: 1px dashed transparent;
}
.photo-box:hover { border-color: var(--primary); color: var(--primary); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box .del {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; cursor: pointer;
}
.photo-box .cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.45); color: #fff; font-size: 9px;
  padding: 1px 3px; text-align: center;
}
.photo-picker { display: none; }
.photo-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f3f4f6; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 缩略图上传状态：选图后立刻上传，上传中 / 成功 / 失败三态要一眼看清 */
.photo-thumb .del {
  position: absolute; top: 2px; right: 2px; z-index: 2;
  width: 18px; height: 18px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; cursor: pointer;
}
.photo-thumb .up-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
}
.photo-thumb .up-mask[hidden] { display: none; }
.photo-thumb .up-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: photo-spin .7s linear infinite;
}
@keyframes photo-spin { to { transform: rotate(360deg); } }
.photo-thumb.is-failed { outline: 2px solid #dc2626; outline-offset: -2px; }
.photo-thumb .up-retry {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(220,38,38,.45); color: #fff; font-size: 20px; font-weight: 700;
}
.photo-thumb .up-retry[hidden] { display: none; }

/* ===== 记录附图：部位坑位（一个部位一张，方案 A） =====
   一行 4 个格子 = 背甲/腹甲/头部/全身，点哪个格子拍的照片就算哪个部位。
   归属由位置决定，所以不存在「标错部位」；空着的格子就是「还差这个部位」。
   原型与三方案对比见 docs/mockup-photo-multi-part.html。 */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot {
  position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden;
  background: #f3f4f6; border: 1px dashed #d1d5db; cursor: pointer;
}
.slot.filled { border-style: solid; border-color: transparent; }
.slot .add {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px; color: #9ca3af;
}
.slot .add .nm { font-size: 10.5px; }
.slot .add .plus { font-size: 15px; line-height: 1; }
.slot:hover .add { color: var(--primary); }
.slot .badge {
  display: none; position: absolute; left: 3px; bottom: 3px; z-index: 2;
  align-items: center; gap: 3px; height: 15px; padding: 0 5px 0 4px;
  border-radius: 999px; background: rgba(15,23,42,.58); color: #fff;
  font-size: 9.5px; line-height: 1;
}
.slot .badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--pc); flex: none; }
.slot.filled .badge { display: inline-flex; }
.slot.filled .add { display: none; }
/* 缩略图铺满整个格子：复用 .photo-thumb 的上传中 / 失败 / 重试三态 */
.slot .photo-thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }

/* 主图槽位（个体表单）：一只龟一张，横跨整行，比 4 个部位格子更显眼 */
.slots-cover { grid-template-columns: 1fr; }
.slot.cover-slot { aspect-ratio: 16 / 9; }
/* 已经有主图：把当前主图铺成背景当预览（点一下就是重拍覆盖） */
.slot.has-cover {
  border-style: solid; border-color: transparent;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.slot.has-cover .add { display: none; }
.slot .cover-tag {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 3px 8px; font-size: 10.5px; color: #fff;
  background: linear-gradient(transparent, rgba(15,23,42,.62));
}
.slot.filled .cover-tag { display: none; }   /* 重拍了就以新缩略图为准 */

/* 一组坑位 = 标题 + 格子 + 提示；个体表单有「主图」「部位照片」两组 */
.slot-group { margin-bottom: 4px; }

/* 计数与反馈：不弹窗，就地一行字 */
.pill-count { float: right; font-size: 11px; font-weight: 400; color: #6b7280; }
.pill-count b { color: var(--primary); font-weight: 600; }
.slots-hint { font-size: 11px; color: #9ca3af; margin-top: 7px; min-height: 15px; }
.slots-hint.ok { color: var(--primary); }
.slots-hint.warn { color: #b45309; }

/* ===== 照片墙（按时间 / 按类型双视图 + 大图 + 对比） ===== */
.metric-card { position: relative; }        /* 承载 .vw 的绝对定位 */
.wall-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.wall-head .wall-title { flex: 1; font-size: 13px; font-weight: 600; color: #1f2937; }
.hd-btn {
  flex: none; height: 26px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--primary-border); background: var(--primary-soft); color: var(--primary);
  font-family: inherit; font-size: 11.5px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.hd-btn:hover { background: var(--primary); color: #fff; }
.hd-btn.round { width: 26px; padding: 0; font-size: 16px; }
.hd-btn.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.hd-btn[disabled] { opacity: .4; cursor: not-allowed; }
.hd-btn[disabled]:hover { background: var(--primary); color: #fff; }

/* 视图切换：卡片级 radio + :checked 兄弟选择器，纯 CSS、不发请求
   （与成长曲线「体重 / 甲尺寸」同一套做法） */
.vw { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wall-body .vw-time { display: block; }     /* 默认「按时间」 */
.wall-body .vw-type { display: none; }
#wallViewTime:checked ~ .wall-body .vw-time { display: block; }
#wallViewTime:checked ~ .wall-body .vw-type { display: none; }
#wallViewType:checked ~ .wall-body .vw-time { display: none; }
#wallViewType:checked ~ .wall-body .vw-type { display: block; }
#wallViewTime:checked ~ .wall-head .seg label[for="wallViewTime"],
#wallViewType:checked ~ .wall-head .seg label[for="wallViewType"] {
  background: #fff; color: var(--primary); font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.12);
}

/* 单张照片 */
.shot { position: relative; display: block; border-radius: 8px; overflow: hidden; background: #f3f4f6; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot .pt-badge {
  position: absolute; left: 4px; bottom: 4px; font-size: 9.5px; line-height: 1.6;
  padding: 0 5px; border-radius: 999px; color: #fff; background: rgba(15,23,42,.55);
}
.shot .pt-badge i {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--pc); margin-right: 3px; vertical-align: middle;
}
.shot form { position: absolute; right: 4px; top: 4px; z-index: 2; margin: 0; }
.shot-del {
  width: 18px; height: 18px; padding: 0; border: none; border-radius: 50%;
  background: rgba(15,23,42,.55); color: #fff; font-size: 11px; line-height: 1;
  font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid3 .shot { aspect-ratio: 1 / 1; }

/* 类型配色：与成长曲线的系列色同一套，全站认同一组颜色 */
.pt-FULL { --pc: #0f766e; } .pt-BACK { --pc: #0ea5e9; }
.pt-BELLY { --pc: #f59e0b; } .pt-HEAD { --pc: #8b5cf6; } .pt-NONE { --pc: #9ca3af; }

/* 视图 A：按时间（每个拍摄批次一段） */
.tl { position: relative; padding-left: 16px; }
.tl::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: #e5e7eb; }
.tl-batch { position: relative; padding-bottom: 14px; }
.tl-batch:last-child { padding-bottom: 0; }
.tl-batch::before {
  content: ''; position: absolute; left: -16px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--primary); border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--primary);
}
.tl-batch .bh { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.tl-batch .bh .d { font-size: 12px; font-weight: 600; color: #374151; }
.tl-batch .bh .n { font-size: 11px; color: #9ca3af; }
.tl-batch .bh .types { flex: 1; text-align: right; font-size: 10px; color: #9ca3af; }

/* 视图 B：按类型（每个部位一条横向时间带） */
.strip-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 7px; }
.strip-head .t { font-size: 12.5px; font-weight: 600; color: #374151; }
.strip-head .t i {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--pc); margin-right: 5px; vertical-align: middle;
}
.strip-head .n { font-size: 11px; color: #9ca3af; }
.strip-head .span { flex: 1; text-align: right; font-size: 10.5px; color: #cbd5e1; }
.strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip:last-child { margin-bottom: 0; }
.strip figure { flex: none; width: 100px; margin: 0; }
.strip .shot { width: 100px; height: 100px; }
.strip figcaption { font-size: 9.5px; color: #9ca3af; text-align: center; margin-top: 3px; }

/* 选择模式：勾选框出现、删除让位 */
.pick-box {
  position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.95); background: rgba(15,23,42,.55); color: transparent;
  font-size: 12px; line-height: 1; z-index: 3; display: none;
  align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
#photoWall.selecting .pick-box { display: flex; }
#photoWall.selecting .shot form { display: none; }
#photoWall.selecting .shot { cursor: pointer; }
.shot.picked .pick-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.shot.picked::after {
  content: ''; position: absolute; inset: 0; border: 2px solid var(--primary);
  border-radius: 8px; pointer-events: none;
}
.shot.picked img { opacity: .72; }
.shot.dim { cursor: not-allowed; }
.shot.dim img { opacity: .35; }

/* 选择模式的底部操作条：贴着底部导航，本页底部按钮让位 */
.pick-bar {
  position: fixed; left: 0; right: 0; bottom: 64px; z-index: 30; display: none;
  align-items: center; gap: 8px; padding: 10px 14px 12px; max-width: 420px; margin: 0 auto;
  background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -6px 18px rgba(15,23,42,.08);
}
body.picking .pick-bar { display: flex; }
body.picking .footer-actions { display: none; }
.pick-bar .cnt { flex: 1; font-size: 12px; color: #4b5563; }
.pick-bar .cnt b { color: var(--primary); font-weight: 700; }
.pick-bar .cnt .hint { color: #9ca3af; font-size: 11px; }

/* 超限 / 越界提示 */
.wall-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 130px; z-index: 70;
  max-width: 380px; background: rgba(15,23,42,.9); color: #fff; font-size: 12px;
  text-align: center; padding: 9px 14px; border-radius: 8px;
  opacity: 0; transition: opacity .18s; pointer-events: none;
}
.wall-toast.on { opacity: 1; }

/* 大图查看 */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column;
  background: rgba(8,15,20,.94); padding: 14px;
}
.lightbox.on { display: flex; }
.lb-head { display: flex; align-items: center; gap: 8px; color: #fff; flex: none; }
.lb-head .idx { font-size: 12px; color: rgba(255,255,255,.65); }
.lb-head .sp { flex: 1; }
.lb-head .x {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.14);
  color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lb-body { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.lb-body img { max-width: 100%; max-height: 72vh; border-radius: 10px; display: block; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none;
}
.lb-nav.prev { left: 0; }
.lb-nav.next { right: 0; }
.lb-nav.off { opacity: .25; cursor: default; }
.lb-foot { flex: none; text-align: center; color: #fff; padding-top: 12px; }
.lb-foot .t { font-size: 13px; font-weight: 600; }
.lb-foot .s { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 3px; }

/* 对比 */
.compare {
  position: fixed; inset: 0; z-index: 55; display: none; flex-direction: column;
  background: #fff; padding: 16px 14px;
}
.compare.on { display: flex; }
.cmp-head { display: flex; align-items: center; gap: 8px; flex: none; margin-bottom: 4px; }
.cmp-head .t { flex: 1; font-size: 15px; font-weight: 600; }
.cmp-head .x {
  width: 30px; height: 30px; border-radius: 50%; background: #f3f4f6; color: #4b5563;
  font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cmp-sub { font-size: 11.5px; color: #6b7280; margin-bottom: 12px; flex: none; }
.cmp-body { flex: 1; display: flex; align-items: center; }
.cmp-row { display: flex; gap: 8px; width: 100%; }
.cmp-row figure { flex: 1; margin: 0; min-width: 0; }
.cmp-row .shot { width: 100%; aspect-ratio: 1 / 1; }
.cmp-row .pt-badge, .cmp-row .pick-box, .cmp-row form { display: none; }
.cmp-row figcaption { text-align: center; margin-top: 6px; }
.cmp-row .cd { font-size: 11.5px; font-weight: 600; color: #374151; }
.cmp-row .ct { font-size: 10px; color: #9ca3af; margin-top: 1px; }
.cmp-row .ct i {
  display: inline-block; width: 6px; height: 6px; border-radius: 2px;
  background: var(--pc); margin-right: 3px; vertical-align: middle;
}
.cmp-tip {
  margin-top: 16px; font-size: 11.5px; color: #9ca3af; text-align: center;
  background: #f9fafb; border-radius: 8px; padding: 9px; flex: none;
}

/* ===== 底部操作 =====
   同一行里的按钮一律等宽：写成 flex-basis: 0 而不是靠 .block 的 width:100%，
   否则「ghost 取消」按内容宽、「block 确认」按 100% 宽，同一行里一窄一宽不对称。
   单个按钮时 flex-grow 同样把它撑满整行，与原来的 .block 表现一致。 */
.footer-actions {
  position: sticky; bottom: 64px; background: #fff;
  padding: 10px 0; display: flex; gap: 8px; z-index: 5;
}
.footer-actions .btn { flex: 1 1 0; }
.footer-actions.fixed-bottom { bottom: 64px; }
.record-hint { font-size: 12px; color: #9ca3af; text-align: center; padding: 12px 0; }

/* ===== 个体选择器（公共组件：_macros.html 的 turtle_picker + picker.js） =====
   记录页与提醒页原来用一个装着全部在池个体的 <select>，存栏一多就没法找。
   现在字段是一行摘要，点开是底部弹层：搜索框 + 按池/最近标签 + 结果列表，
   选项不再渲染进页面 HTML（数据由 /turtles/picker-options 分页返回）。

   字段本身是「一行式」（方案 A，样式稿 docs/mockup-picker-field.html）：
   标签左置 + 值右对齐 + 一条细分隔线，46px 一行 —— 原来是「标签 + 43px 白框 + 说明行」共 84px。
   没有方框、没有 🐢 图标、没有字段说明；右侧 › 表示可点开，✕ 只在有值时出现。 */
.pk-field {
  display: flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 4px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px; cursor: pointer;
}
.pk-field:active { background: #fafbfc; }
.pk-field .pk-k { flex-shrink: 0; color: #6b7280; }
.pk-field .pk-k .req { color: #dc2626; margin-left: 2px; }
.pk-field .txt {
  flex: 1; min-width: 0; text-align: right; color: #1f2937;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 未选态：色浅一点。类名是 is-empty 而不是 empty —— 全局空状态样式
   .empty { text-align: center; padding: 36px 16px } 会把这个 span 撑到 112px，
   改版前「未选时字段特别高、选了值反而变矮」就是踩到了这个同名类。 */
.pk-field .txt.is-empty { color: #b8bec8; }
.pk-field .chev { flex-shrink: 0; color: #c8ced8; font-size: 15px; line-height: 1; }
.pk-field .pk-clear {
  flex-shrink: 0; display: none; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: #f3f4f6;
  color: #6b7280; font-size: 11px; line-height: 1;
}
.pk-field .pk-clear:hover { background: #e5e7eb; color: #374151; }

/* 弹层：沿用 .sheet-mask/.sheet，只是内部改成上中下三段，中间列表自己滚 */
.pk-sheet { padding: 0; display: flex; flex-direction: column; max-height: 78vh; overflow: hidden; }
.pk-head {
  flex-shrink: 0; padding: 14px 14px 10px; position: relative;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #f3f4f6;
}
.pk-head .t { font-size: 15px; font-weight: 600; }
.pk-head .x {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: #9ca3af; font-size: 16px; cursor: pointer; line-height: 1;
}
.pk-search { flex-shrink: 0; padding: 10px 14px 0; }
/* 调用方限定的可选范围（父母信息：只列种龟 + 同品种），弹层打开着也一眼看得见 */
.pk-filter {
  flex-shrink: 0; padding: 8px 14px 0; font-size: 11px; color: #6b7280;
}
.pk-filter::before { content: "仅显示 "; color: #9ca3af; }
.pk-chips { margin-top: 8px; }
.pk-body { flex: 1; min-height: 120px; overflow-y: auto; padding: 0 14px 8px; }
.pk-foot {
  flex-shrink: 0; padding: 8px 14px 2px; border-top: 1px solid #f3f4f6;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}

/* 结果行 */
.pk-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 2px; border-top: 1px solid #f3f4f6; cursor: pointer;
}
.pk-body .pk-row:first-child { border-top: none; }
.pk-row:hover { background: #f9fafb; }
.pk-row.on { background: var(--primary-light); }
.pk-row .rt { flex: 1; min-width: 0; }
.pk-row .no { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-row .meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.pk-row .side { flex-shrink: 0; font-size: 11px; color: #9ca3af; text-align: right; line-height: 1.5; }
.pk-row.on .side { color: var(--primary); font-weight: 600; }
.pk-row mark { background: #fef3c7; color: inherit; border-radius: 3px; padding: 0 1px; }
.pk-more {
  padding: 10px; text-align: center; font-size: 12px; color: var(--primary);
  cursor: pointer; border-top: 1px solid #f3f4f6;
}
/* 空态 / 失败态：不叫 pk-row，免得带上悬停与点击语义 */
.pk-empty { padding: 14px 2px; }
.pk-empty .no { font-size: 13px; font-weight: 600; color: #374151; }
.pk-empty .meta { font-size: 11px; color: #9ca3af; margin-top: 4px; line-height: 1.7; }
/* 骨架屏：服务端检索的等待态 */
.pk-sk { padding: 14px 2px; }
.pk-sk .bar {
  height: 11px; border-radius: 6px; margin-bottom: 7px;
  background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
  background-size: 200% 100%; animation: pkShimmer 1.1s linear infinite;
}
.pk-sk .bar.s { width: 45%; }
@keyframes pkShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ===== 设置行 ===== */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px;
  gap: 8px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row .val { color: var(--primary); font-weight: 600; cursor: pointer; }
.settings-row .val.plain { color: #4b5563; font-weight: 400; cursor: default; }
.settings-row .label-wrap { display: flex; flex-direction: column; gap: 2px; }

/* ===== 详情页关键指标（一张卡三列 + 相比上次的变化） =====
   三围是同一类信息，合并成一张卡：边框 3 条减到 1 条、间隙去掉，页面不再碎。 */
.mcard {
  display: flex; flex-direction: column;   /* 纵向：先三列，再页脚那行说明 */
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; margin-bottom: 12px;
}
.mcard .mrow { display: flex; }             /* 三列横排 */
.mcell { flex: 1; text-align: center; padding: 10px 4px 8px; min-width: 0; }
.mcell + .mcell { border-left: 1px solid #f3f4f6; }
.mcard .mv { font-size: 18px; font-weight: 700; color: var(--primary); }
.mcard .ml { font-size: 11px; color: #6b7280; margin-top: 2px; }
.mcard .md { font-size: 10.5px; margin-top: 3px; font-weight: 600; }
.mcard .md.up { color: var(--primary); }
.mcard .md.down { color: #b45309; }
.mcard .md.flat { color: #9ca3af; font-weight: 400; }
.mcard .mfoot {
  border-top: 1px solid #f3f4f6; padding: 6px 10px; text-align: center;
  font-size: 10px; color: #9ca3af;
}

/* ===== 统计卡片 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-cell {
  background: #f9fafb; border-radius: 10px; padding: 10px 6px; text-align: center;
}
.stat-cell .n { font-size: 18px; font-weight: 700; color: var(--primary); }
.stat-cell .t { font-size: 11px; color: #6b7280; margin-top: 2px; }
/* 区间格放的是「04-12→09-06」这类长文本，缩一号才不会被挤断行 */
.stat-cell.range .n { font-size: 13px; }
.stat-cell.warn .n { color: #b45309; }
.stat-cell.danger .n { color: #b91c1c; }
.stat-cell.gray .n { color: #4b5563; }

.metric-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 12px; margin-bottom: 10px;
  position: relative;   /* 承载 .curve-r（分段控件用的隐藏 radio） */
}
.metric-card .metric-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

/* 进度条（统计） */
.meter { margin-bottom: 10px; }
.meter:last-child { margin-bottom: 0; }
.meter .meter-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; margin-bottom: 4px;
}
.meter .meter-head .name { color: #4b5563; }
.meter .meter-head .val { color: #6b7280; }
.meter .track { height: 8px; border-radius: 999px; background: #f3f4f6; overflow: hidden; }
.meter .fill { height: 100%; border-radius: 999px; background: var(--primary); }

/* 柱状图（趋势） */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 96px; padding-top: 6px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.bars .bar-stack {
  width: 100%; display: flex; flex-direction: column-reverse;
  border-radius: 4px; overflow: hidden; min-height: 2px;
}
.bars .bar-seg { width: 100%; }
.bars .bar-label { font-size: 9px; color: #9ca3af; white-space: nowrap; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: #6b7280; margin-top: 8px; }
.legend i {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  margin-right: 3px; vertical-align: middle;
}

/* ===== 个体详情：区块切换栏（未吸顶＝分段控件 / 吸顶后＝紧凑细标签栏） =====
   顶栏是 sticky top:0，所以吸顶必须避开它 —— top 用 --header-h（app.js 量出后写入，
   不写死 52px，免得字体或换行一变就错位）。 */
.tabs-wrap {
  position: sticky; top: var(--header-h, 52px); z-index: 15;
  display: flex; align-items: center; gap: 8px;
  /* 负外边距抵消 .page 的左右内边距，吸顶后白底与分隔线能通到屏幕两边 */
  margin: 0 -14px 2px; padding: 8px 14px 10px;
  background: #fff; border-bottom: 1px solid transparent;
  transition: padding .18s ease, gap .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tabs-wrap .tabs-lbl {
  flex: 1; font-size: 13px; font-weight: 600; color: #1f2937; min-width: 0;
  white-space: nowrap; overflow: hidden; max-width: 240px; opacity: 1;
  transition: opacity .16s ease, max-width .2s ease;
}
.tabs-wrap .seg { transition: background .18s ease, padding .18s ease; }
.seg a {
  display: inline-block; font-size: 11px; line-height: 1.4; padding: 4px 10px;
  border-radius: 999px; color: #4b5563; white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg a:hover { color: var(--primary); }
.seg a.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.seg a b { font-weight: 600; opacity: .6; margin-left: 3px; }

/* 吸顶后：整条收成紧凑细标签栏（约 46 → 36px），药丸摊平成四等分文字标签 */
.tabs-wrap.stuck {
  gap: 0; padding-top: 0; padding-bottom: 0;
  border-bottom-color: #e5e7eb;
  box-shadow: 0 8px 14px -12px rgba(15,23,42,.55);
}
.tabs-wrap.stuck .tabs-lbl { opacity: 0; max-width: 0; }
.tabs-wrap.stuck .seg { flex: 1; background: transparent; padding: 0; border-radius: 0; }
.tabs-wrap.stuck .seg a {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 0;
  font-size: 12.5px; color: #6b7280; position: relative;
}
.tabs-wrap.stuck .seg a:hover { color: var(--primary); }
.tabs-wrap.stuck .seg a.active {
  background: transparent; box-shadow: none; color: var(--primary); font-weight: 600;
}
.tabs-wrap.stuck .seg a.active::after {
  content: ''; position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%);
  width: 20px; height: 2px; border-radius: 2px; background: var(--primary);
}

/* ===== 生长曲线（折线图 + 卡内分段切换） ===== */
/* 分段控件：状态由卡片级 radio 承载，配 :checked ~ 兄弟选择器切换两张图，
   纯 CSS、不依赖 JS，也不发请求。 */
.curve-r { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.curve-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.curve-head .metric-title { margin-bottom: 0; }
.seg { display: inline-flex; background: #f3f4f6; border-radius: 999px; padding: 2px; flex: none; }
.seg label {
  font-size: 11px; line-height: 1.4; padding: 4px 10px; border-radius: 999px;
  color: #4b5563; cursor: pointer; user-select: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg label:hover { color: var(--primary); }
.seg label.seg-off { color: #cbd5e1; cursor: not-allowed; }
#curveWeight:checked ~ .curve-head .seg label[for="curveWeight"],
#curveShell:checked ~ .curve-head .seg label[for="curveShell"] {
  background: #fff; color: var(--primary); font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.12);
}
/* 键盘走到 radio 时高亮对应标签（radio 本身被视觉隐藏） */
#curveWeight:focus-visible ~ .curve-head .seg label[for="curveWeight"],
#curveShell:focus-visible ~ .curve-head .seg label[for="curveShell"] {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
#curveWeight:checked ~ .curve-body .cur-shell,
#curveShell:checked ~ .curve-body .cur-weight { display: none; }

/* 图表本体：viewBox 等比缩放，窄屏整体缩小不变形 */
.gchart { display: block; width: 100%; height: auto; }
.gchart text { font-family: inherit; font-size: 8.5px; fill: #9ca3af; }
.gchart .grid { stroke: #f1f5f9; stroke-width: 1; }
.gchart .axis-line { stroke: #e2e8f0; stroke-width: 1; }
.gchart .unit { font-size: 9px; fill: #94a3b8; }
.gchart .gline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gchart .gdot { stroke: #fff; stroke-width: 1.2; }
.gchart .gstop-a { stop-color: var(--primary); stop-opacity: .22; }
.gchart .gstop-b { stop-color: var(--primary); stop-opacity: 0; }

/* 系列配色：「体重」跟随主题主色，三个甲尺寸用固定色，跨主题都能分辨 */
.gl-weight { stroke: var(--primary); }
.gd-weight { fill: var(--primary); }
.gl-len { stroke: #0ea5e9; }  .gd-len { fill: #0ea5e9; }
.gl-wid { stroke: #f59e0b; }  .gd-wid { fill: #f59e0b; }
.gl-hei { stroke: #8b5cf6; }  .gd-hei { fill: #8b5cf6; }

.glegend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 10.5px; color: #4b5563; margin-top: 8px; }
.glegend .li { display: inline-flex; align-items: center; gap: 4px; }
.glegend .lv { color: #9ca3af; }
.lg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.lg-weight { background: var(--primary); }
.lg-len { background: #0ea5e9; }
.lg-wid { background: #f59e0b; }
.lg-hei { background: #8b5cf6; }

/* ===== 搜索 ===== */
.search-bar {
  display: flex; gap: 8px; align-items: center;
  background: #f3f4f6; border-radius: 999px; padding: 7px 12px;
  margin-bottom: 10px;
}
.search-bar input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 13px; font-family: inherit; color: #1f2937;
}
.search-bar .ico { color: #9ca3af; font-size: 14px; }
.search-bar .clear { color: #9ca3af; cursor: pointer; font-size: 14px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: #f3f4f6; color: #4b5563; cursor: pointer;
  border: 1px solid transparent;
}
.chip:hover { background: var(--primary-light); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; }

/* ===== 空状态 ===== */
.empty {
  text-align: center; padding: 36px 16px; color: #9ca3af; font-size: 13px;
}
.empty .ico { font-size: 34px; display: block; margin-bottom: 8px; opacity: .55; }
.empty .sub { font-size: 12px; margin-top: 4px; color: #c0c4cc; }

/* ===== 提示 / 反馈 ===== */
.flash-wrap {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 420px; padding: 0 14px; z-index: 50;
  pointer-events: none;
}
.flash {
  background: #1f2937; color: #fff; font-size: 13px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  animation: fadeUp .22s ease;
  display: flex; align-items: flex-start; gap: 8px;
}
.flash.success { background: var(--primary); }
.flash.error { background: #b91c1c; }
.flash.warn { background: #b45309; }
.flash .close { margin-left: auto; cursor: pointer; opacity: .8; pointer-events: auto; }

/* 进度提示条（保存中） */
.saving-mask {
  position: fixed; inset: 0; background: rgba(255,255,255,.6);
  display: none; align-items: center; justify-content: center; z-index: 60;
}
.saving-mask.on { display: flex; }
.saving-mask .box {
  background: #1f2937; color: #fff; padding: 12px 18px;
  border-radius: 10px; font-size: 13px;
}

/* ===== 弹层 ===== */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  display: none; z-index: 40; justify-content: center; align-items: flex-end;
}
.sheet-mask.on { display: flex; }
.sheet {
  background: #fff; width: 100%; max-width: 420px;
  border-radius: 16px 16px 0 0; padding: 16px 14px 22px;
  animation: sheetUp .22s ease; max-height: 82vh; overflow-y: auto;
}
@keyframes sheetUp {
  from { transform: translateY(16px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}
.sheet .sheet-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.sheet .sheet-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ===== 登录（壳外版式：无顶栏 / 无底部导航） ===== */
/* #app.bare 用主色渐变铺满整屏，内容在 .page 里纵向居中 */
#app.bare {
  padding-bottom: 0;
  background: linear-gradient(165deg, var(--primary) 0%, var(--primary-dark) 100%);
}
/* 内容高于一屏时 #app 会拉长，用同色兜住两侧露出的 body 底色 */
body.bare { background: var(--primary-dark); }
body.bare .flash-wrap { top: 14px; }
#app.bare .page.active {
  display: flex; flex-direction: column; min-height: 100vh; padding: 0;
}
.login-wrap {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 36px 22px 26px;
}
.login-hero { text-align: center; margin-bottom: 26px; }
.login-logo {
  width: 74px; height: 74px; border-radius: 22px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: 0 auto 14px;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}
.login-title { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.login-sub { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 6px; }
.login-card {
  width: 100%; background: #fff; border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}
.login-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 15px; font-weight: 600; margin-bottom: 14px;
}
.login-card-head .tip { font-size: 11px; font-weight: 400; color: #9ca3af; }
/* 登录卡片内的输入框加高一点，拇指点得更准 */
.login-card .form-item input { padding: 11px 12px; font-size: 14px; }
.login-card .btn.block {
  padding: 12px; font-size: 15px; font-weight: 600; border-radius: 10px; margin-top: 4px;
}
.login-tip {
  font-size: 12px; color: #b45309; background: #fffbeb;
  border-radius: 8px; padding: 8px 10px; margin-bottom: 14px;
}
.login-foot { text-align: center; font-size: 11px; color: rgba(255,255,255,.62); margin-top: 22px; }
/* 主题切换本来挂在顶栏上，登录页收在底部 */
.login-foot .theme-switch { justify-content: center; margin-bottom: 12px; }

/* ===== 表格（导出/档案视图） ===== */
.kv { font-size: 13px; }
.kv .kv-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid #f3f4f6;
}
.kv .kv-row:last-child { border-bottom: none; }
.kv .kv-row .k { color: #6b7280; flex-shrink: 0; }
.kv .kv-row .v { text-align: right; word-break: break-all; }

/* ===== 分页 ===== */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 0 4px; font-size: 12px; color: #6b7280;
}
.pager a, .pager span.disabled {
  padding: 5px 11px; border-radius: 8px; background: #f3f4f6; color: #374151;
}
.pager span.disabled { opacity: .45; }
.pager a:hover { background: var(--primary-light); color: var(--primary); }

/* ===== 列表筛选（记录中心） ===== */
.filter-card {
  background: #f9fafb; border-radius: 12px; padding: 12px; margin-bottom: 10px;
}
.filter-card .form-item { margin-bottom: 8px; }
.filter-card .form-item:last-child { margin-bottom: 0; }
.filter-toggle {
  font-size: 12px; color: var(--primary); cursor: pointer;
  display: flex; align-items: center; gap: 4px; margin-bottom: 10px;
}

/* ==========================================================================
   快捷搜索面板（龟只列表）
   外部：类型 / 品种 / 池号 三行标签
   「更多」抽屉：左侧分类导航 + 右侧选项格子
   ========================================================================== */
.filter-panel {
  background: #f9fafb; border-radius: 12px; padding: 12px; margin-bottom: 10px;
}
.filter-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.filter-head .t { font-size: 13px; font-weight: 600; color: #374151; }
.filter-more, .filter-entry {
  font-size: 12px; color: var(--primary); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  user-select: none; line-height: 1;
}
.filter-more .caret { font-size: 9px; display: inline-block; }
.filter-more .cnt, .filter-entry .cnt, .filter-bar .fb-item .cnt {
  background: var(--primary); color: #fff; border-radius: 999px;
  font-size: 10px; line-height: 15px; min-width: 15px; height: 15px;
  padding: 0 4px; text-align: center; font-weight: 600; flex-shrink: 0;
}
.filter-entry .ico { font-size: 13px; line-height: 1; }

/* 标签行 */
.filter-chip-rows { display: flex; flex-direction: column; gap: 7px; }
.filter-chip-row { display: flex; align-items: flex-start; gap: 8px; }
.filter-chip-row .row-label {
  flex-shrink: 0; width: 34px; font-size: 11px; color: #9ca3af; line-height: 26px;
}
.filter-chip-row .tabs { flex: 1; min-width: 0; margin-bottom: 0; padding: 2px 2px 4px; }
.filter-chip-row .tab-item { font-size: 11px; padding: 4px 9px; }
.filter-chip-row .tab-item .badge { margin-left: 3px; }

/* 抽屉内已选条件的外部回显 */
.filter-active-row {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed #e5e7eb;
}
.filter-active-row .lbl {
  flex-shrink: 0; width: 52px; font-size: 11px; color: #9ca3af; line-height: 22px;
}
.filter-active-row .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-active-row .tag { margin-right: 0; cursor: pointer; }

.filter-actions { display: flex; gap: 8px; margin-top: 10px; }
.filter-actions .btn { flex: 1; }

/* ---------- 「更多」抽屉 ---------- */
.filter-sheet {
  padding: 0; display: flex; flex-direction: column;
  max-height: 78vh; overflow: hidden;
}
.fs-head {
  flex-shrink: 0; padding: 14px 14px 12px; border-bottom: 1px solid #f3f4f6;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.fs-head .fs-title { font-size: 15px; font-weight: 600; }
.fs-head .fs-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: #9ca3af; font-size: 16px; cursor: pointer; line-height: 1;
}
.fs-body { flex: 1; display: flex; min-height: 220px; }

.fs-nav {
  flex-shrink: 0; width: 88px; background: #f7f8fa; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.fs-nav .item {
  position: relative; padding: 14px 10px 14px 14px;
  font-size: 12px; color: #4b5563; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  transition: background .15s, color .15s;
}
.fs-nav .item:hover { color: var(--primary); }
.fs-nav .item.active { background: #fff; color: var(--primary); font-weight: 600; }
.fs-nav .item.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.fs-nav .item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; display: none;
}
.fs-nav .item.has .dot { display: block; }

.fs-panel { flex: 1; min-width: 0; padding: 14px 12px; overflow-y: auto; }
.fs-section { display: none; }
.fs-section.active { display: block; animation: fadeUp .18s ease; }
.fs-section-title { font-size: 12px; color: #6b7280; font-weight: 600; margin-bottom: 10px; }

.fs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fs-opt {
  position: relative;
  background: #f5f6f8; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 4px; text-align: center; cursor: pointer; transition: all .15s;
  user-select: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; min-height: 46px;
}
.fs-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fs-opt .nm { font-size: 12px; color: #374151; line-height: 1.25; }
.fs-opt .n { font-size: 10px; color: #9ca3af; margin-top: 2px; line-height: 1; }
.fs-opt:hover { border-color: var(--primary-border); }
/* 选中态：靠 :has() 读取内部 radio，无需 JS 也能正确显示 */
.fs-opt:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.fs-opt:has(input:checked) .nm { color: var(--primary); font-weight: 600; }
.fs-opt:has(input:checked) .n { color: var(--primary); opacity: .75; }
/* 数量为 0 的选项弱化 */
.fs-opt.zero .nm, .fs-opt.zero .n { color: #c0c4cc; }
.fs-opt.zero:has(input:checked) { background: #f5f6f8; border-color: #d1d5db; }
.fs-opt.zero:has(input:checked) .nm { color: #6b7280; }

.fs-foot {
  flex-shrink: 0; display: flex; gap: 10px;
  padding: 10px 14px 16px; border-top: 1px solid #f3f4f6;
}
.fs-foot .btn { flex: 1; }

/* 记录项 */
.rec-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border: 1px solid #e5e7eb; border-radius: 12px;
  margin-bottom: 10px; background: #fff;
}
.rec-item .rec-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: var(--primary-light);
}
.rec-item .rec-icon.water { background: #e0f2fe; }
.rec-item .rec-icon.growth { background: #ecfdf5; }
.rec-item .rec-icon.death { background: #fee2e2; }
.rec-item .rec-body { flex: 1; min-width: 0; }
.rec-item .rec-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rec-item .rec-title { font-size: 13px; font-weight: 600; }
.rec-item .rec-date { font-size: 11px; color: #9ca3af; white-space: nowrap; }
.rec-item .rec-meta { font-size: 12px; color: #6b7280; margin-top: 3px; line-height: 1.6; }

/* 只读提示 */
.readonly-banner {
  background: #fffbeb; color: #b45309; font-size: 12px;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 10px;
}

/* 危险操作区 */
.danger-zone { border: 1px solid #fecaca; border-radius: 12px; padding: 12px; }
.danger-zone .z-title { font-size: 13px; font-weight: 600; color: #b91c1c; margin-bottom: 8px; }

/* ==========================================================================
   今日待办卡片（首页 / 待办列表）与待办处理页
   设计说明见 docs/plans/2026-09-16-todo-handle-design.md
   ========================================================================== */

/* ---------- 待办卡片：整行可点，进处理页 ---------- */
.todo-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-bottom: 1px dashed #e5e7eb;
  cursor: pointer; transition: background .15s;
}
.todo-card:last-child { border-bottom: none; }
.todo-card:hover { background: #f9fafb; }
.todo-card .todo-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--primary-light); color: var(--primary);
}
.todo-card .todo-ico.feed { background: #fef3c7; color: #b45309; }
.todo-card .todo-ico.water { background: #e0f2fe; color: #0369a1; }
.todo-card .todo-ico.growth { background: var(--primary-light); color: var(--primary); }
.todo-card .todo-ico.pending { background: #f3e8ff; color: #7e22ce; }
.todo-card .todo-body { flex: 1; min-width: 0; }
.todo-card .todo-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
}
.todo-card .todo-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.todo-card .todo-last { font-size: 11px; color: #9ca3af; margin-top: 3px; }
.todo-card .todo-go {
  font-size: 12px; font-weight: 600; color: var(--primary);
  flex-shrink: 0; align-self: center; white-space: nowrap;
}
.todo-count { font-size: 12px; font-weight: 400; color: #9ca3af; margin-left: 4px; }

/* ---------- 处理页：待办上下文 ---------- */
.handle-top {
  display: flex; gap: 10px; align-items: center;
  background: var(--primary-soft); border: 1px solid var(--primary-border);
  border-radius: 12px; padding: 11px 12px; margin-bottom: 10px;
}
.handle-top.overdue { background: #fef2f2; border-color: #fecaca; }
.handle-top .ico { font-size: 19px; line-height: 1; }
.handle-top .t1 { font-size: 14px; font-weight: 600; }
.handle-top .t2 { font-size: 11px; color: #6b7280; margin-top: 2px; }

/* ---------- 处理页：上次记录上下文 ---------- */
.ctx-card { background: #f9fafb; border-radius: 12px; padding: 11px 12px; margin-bottom: 12px; }
.ctx-card .ctx-head { font-size: 12px; color: #4b5563; font-weight: 600; }
.ctx-card .ctx-val { font-size: 13px; margin-top: 6px; line-height: 1.7; }
.ctx-card .ctx-val b { color: var(--primary); font-size: 14px; }
.ctx-card .ctx-link { font-size: 11px; color: var(--primary); margin-top: 6px; display: block; }

/* ---------- 上次值提示 / 实时增量 ---------- */
.last-hint {
  font-size: 11px; color: #9ca3af; margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.delta { font-size: 11px; font-weight: 600; }
.delta.up { color: var(--primary); }
.delta.down { color: #b45309; }
.delta.flat { color: #9ca3af; }

/* ---------- 处理页：底部固定操作条 ---------- */
.handle-actions {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 420px; z-index: 25;
  display: flex; gap: 8px; align-items: center;
  background: #fff; border-top: 1px solid #e5e7eb;
  padding: 10px 14px; box-shadow: 0 -4px 14px rgba(15, 23, 42, .06);
}
.handle-actions .btn { flex-shrink: 0; }
.handle-actions .btn.block { flex: 1; width: auto; }
.handle-spacer { height: 62px; }

/* ---------- 轻提示块 ---------- */
.hint-card {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; padding: 9px 11px; font-size: 12px; line-height: 1.7; margin-bottom: 12px;
}
.hint-card.ok { background: var(--primary-soft); border-color: var(--primary-border); color: var(--primary-dark); }
.hint-card.err { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ---------- 改期弹层里的快捷天数 ---------- */
.quick-inline { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.quick-inline span {
  padding: 5px 11px; border-radius: 8px; background: #f3f4f6;
  color: var(--primary); font-size: 12px; cursor: pointer;
}
.quick-inline span.on, .quick-inline span:hover { background: var(--primary); color: #fff; }
