:root {
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --line: rgba(17, 24, 39, 0.1);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --blue: #0071e3;
  --teal: #087f8c;
  --green: #248a3d;
  --red: #d70015;
  --shadow: 0 18px 50px rgba(24, 39, 75, 0.08), 0 2px 8px rgba(24, 39, 75, 0.05);
  --shadow-hover: 0 24px 62px rgba(24, 39, 75, 0.12), 0 4px 14px rgba(24, 39, 75, 0.06);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: auto; scrollbar-gutter: stable; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0, rgba(245, 245, 247, 0.76) 360px), var(--bg);
  letter-spacing: 0;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: #0077ed; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--blue); }
.skip-link:focus { transform: translateY(0); }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; min-height: 64px; padding: 10px clamp(16px, 3vw, 40px); border-bottom: 1px solid rgba(17, 24, 39, 0.08); background: rgba(250, 250, 252, 0.78); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-size: 17px; font-weight: 720; white-space: nowrap; }
.brand-icon, .auth-symbol { display: block; object-fit: cover; box-shadow: 0 7px 18px rgba(0, 113, 227, 0.16); }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; }
.auth-symbol { width: 56px; height: 56px; margin-bottom: 22px; border-radius: 8px; }
.nav { display: flex; flex: 1; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px; border-radius: 8px; color: #515154; font-size: 14px; font-weight: 620; white-space: nowrap; transition: background 160ms ease, color 160ms ease; }
.nav a:hover { color: var(--text); background: rgba(0, 0, 0, 0.045); }
.nav a.active { color: var(--blue); background: rgba(0, 113, 227, 0.09); }
.logout-form { margin: 0; }

.page { width: min(1240px, 100%); min-height: calc(100vh - 130px); margin: 0 auto; padding: 30px clamp(14px, 3vw, 32px) 56px; }
.hero, .panel, .auth-card, .form-shell { border: 1px solid rgba(255, 255, 255, 0.88); border-radius: 8px; background: rgba(255, 255, 255, 0.82); box-shadow: var(--shadow); backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-bottom: 20px; padding: clamp(26px, 4vw, 44px); background: rgba(255, 255, 255, 0.72); }
.hero h1, .auth-card h1, .form-heading h1 { margin: 0; color: var(--text); font-size: 36px; font-weight: 740; line-height: 1.2; letter-spacing: 0; overflow-wrap: anywhere; }
.hero p, .auth-card > p, .form-heading p { max-width: 720px; margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.eyebrow { margin-bottom: 8px !important; color: var(--teal) !important; font-size: 12px !important; font-weight: 750; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr); gap: 18px; align-items: start; }
.layout-single { grid-template-columns: 1fr; max-width: none; width: 100%; }
.hidden-form { display: none !important; }
/* Care timeline — spacious todo list */
.care-panel-title { align-items: flex-start; gap: 6px; }
.care-panel-title h2 { margin: 0; }
.care-panel-hint { margin: 0; font-size: 14px; line-height: 1.45; }
.care-timeline { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; width: 100%; }
.care-row {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(108px, 132px);
  gap: 14px 16px;
  align-items: center;
  width: 100%;
  min-height: 108px;
  box-sizing: border-box;
  padding: 16px 16px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  border-left: 4px solid #c5c5ca;
  overflow: visible;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.care-row-med { border-left-color: #5b8def; background: linear-gradient(90deg, rgba(91, 141, 239, 0.06), #fff 48px); }
.care-row-feed { border-left-color: #2f9d5c; background: linear-gradient(90deg, rgba(47, 157, 92, 0.07), #fff 48px); }
.care-row:hover {
  border-color: rgba(0, 113, 227, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.care-row.done { border-left-color: var(--green); background: rgba(238, 249, 240, 0.92); opacity: 0.96; }
.care-row.done:hover {
  background: rgba(36, 138, 61, 0.1);
  border-color: rgba(36, 138, 61, 0.28);
}
.care-row.due:not(.done) {
  border-left-color: #e6a23c;
  background: linear-gradient(90deg, rgba(230, 162, 60, 0.1), #fff 56px);
}
.care-row.due:not(.done)::after {
  content: "已到点";
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  color: #b06a00;
  letter-spacing: 0.02em;
}
.care-row.dragging { opacity: 0.45; }
.care-row.drag-over-swap { outline: 2px solid var(--blue); outline-offset: -2px; }
.care-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 44px;
  cursor: grab;
  color: #86868b;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  user-select: none;
  touch-action: none;
}
.care-drag:active { cursor: grabbing; background: rgba(0, 113, 227, 0.12); color: var(--blue); }
.care-row-main { min-width: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.care-row-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.care-clock {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #1d1d1f;
  font-variant-numeric: tabular-nums;
}
.care-kind-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  color: #3a3a3c;
}
.care-row-med .care-kind-tag { background: rgba(91, 141, 239, 0.16); color: #2f5fbf; }
.care-row-feed .care-kind-tag { background: rgba(47, 157, 92, 0.14); color: #1d7a45; }
.care-title {
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.care-detail {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.care-done-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #136329;
}
.care-row-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  align-self: stretch;
  gap: 10px;
  min-width: 0;
  padding-top: 14px;
}
.care-row.due:not(.done) .care-row-side { padding-top: 22px; }
.care-row-top,
.care-row-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.care-row-top form,
.care-row-bottom form { margin: 0; width: 100%; }
.care-row-bottom .inline-checkin { width: 100%; }
.care-row-top { order: 2; opacity: 0.92; }
.care-row-bottom { order: 1; }
button.care-btn,
.care-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-width: 72px;
  max-width: none;
  height: 36px;
  min-height: 36px;
  max-height: none;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  transform: none !important;
  box-shadow: none !important;
}
.care-row-bottom .care-btn.ok,
.care-row-bottom .care-fed {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  font-size: 15px;
  border-radius: 12px;
}
button.care-btn:hover,
button.care-btn:active,
.care-btn:hover,
.care-btn:active {
  transform: none !important;
  filter: none;
}
.care-btn.ghost {
  color: #3a3a3c;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  min-width: 56px;
  height: 32px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 600;
}
.care-btn.danger {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
  min-width: 56px;
  height: 32px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 600;
}
.care-btn.ok { color: #fff; border-color: var(--green); background: var(--green); }
.care-fed {
  color: #136329;
  border-color: rgba(36, 138, 61, 0.35);
  background: rgba(238, 249, 240, 0.96);
  pointer-events: none;
  cursor: default;
  user-select: none;
}
.care-timeline button:hover,
.care-timeline button:active { transform: none; }
.care-add-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 100px;
  box-sizing: border-box;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}
.care-fab {
  width: auto;
  min-width: 88px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.18);
  transition: filter 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  transform: none !important;
}
.care-fab[data-open-feed-modal] { background: #14733a; box-shadow: 0 6px 16px rgba(20, 115, 58, 0.18); }
.care-fab:hover {
  transform: none !important;
  filter: brightness(1.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}
.care-fab:active {
  transform: none !important;
  filter: brightness(0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.care-fab:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.45);
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .care-row {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas:
      "drag main"
      "drag side";
    gap: 10px 12px;
    padding: 14px 12px 14px 8px;
  }
  .care-drag { grid-area: drag; }
  .care-row-main { grid-area: main; }
  .care-row-side { grid-area: side; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; padding-top: 0; }
  .care-row.due:not(.done) .care-row-side { padding-top: 0; }
  .care-row.due:not(.done)::after { left: 40px; right: auto; top: 8px; }
  .care-row-bottom { flex: 1 1 140px; }
  .care-row-top { flex: 0 0 auto; }
}

#care { scroll-margin-top: 88px; }
.schedule-times-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.schedule-time-item {
  display: grid;
  gap: 6px;
  margin: 0;
}
.schedule-time-item > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.column { display: grid; gap: 18px; }
.panel { padding: clamp(18px, 2.5vw, 26px); transition: box-shadow 180ms ease; }
.panel:hover { box-shadow: var(--shadow-hover); }
.panel h1 { margin: 0 0 22px; font-size: 34px; }
.panel h2 { margin: 0 0 15px; font-size: 20px; font-weight: 700; }
.panel p { color: var(--muted); line-height: 1.65; }
.form-shell { width: min(860px, 100%); margin: 18px auto; padding: clamp(24px, 4vw, 42px); }
.form-heading { margin-bottom: 28px; }
.form-heading h1 { font-size: 32px; }
.auth-card { width: min(430px, calc(100vw - 28px)); margin: 56px auto; padding: 38px; }
.auth-card h1 { font-size: 36px; }
.auth-card form { margin-top: 26px; }
.auth-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; font-size: 14px; }
.panel-title, .medicine-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.stack, .grid-form, .quick-form, .grid-3, .grid-2 { display: grid; gap: 13px; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wide, .wide-panel { grid-column: 1 / -1; }
.separated-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
label { display: grid; gap: 8px; color: #3a3a3c; font-size: 13px; font-weight: 650; }
.required { color: var(--red); font-size: 11px; font-weight: 650; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 500; }
.compact-field { min-width: 120px; }
.compact-field span { color: var(--muted); font-size: 11px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #d7d7dc; border-radius: 8px; color: var(--text); background: rgba(255, 255, 255, 0.88); outline: none; font: inherit; transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease; }
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #98989d; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12); }
input[type="file"] { padding: 9px; color: var(--muted); }

button, .link-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 680; cursor: pointer; transition: background 150ms ease, box-shadow 150ms ease, opacity 150ms ease; }
button:disabled { cursor: wait; opacity: 0.62; }
.compact { min-height: 36px; padding: 7px 11px; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 7px 18px rgba(0, 113, 227, 0.2); }
.primary:hover { color: #fff; background: #0077ed; }
.secondary { color: var(--blue); border-color: rgba(0, 113, 227, 0.18); background: rgba(0, 113, 227, 0.08); }
.ghost { color: #3a3a3c; border-color: var(--line); background: rgba(255, 255, 255, 0.72); }
.ok { color: #fff; background: var(--green); }
.danger { color: #fff; background: var(--red); }
.toast, .alert, .notice { padding: 13px 15px; border: 1px solid; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.toast { position: fixed; top: 76px; left: 50%; z-index: 120; width: min(640px, calc(100% - 28px)); margin: 0; transform: translateX(-50%); box-shadow: var(--shadow); transition: opacity 220ms ease, transform 220ms ease; }
.toast.success, .notice { color: #136329; border-color: rgba(36, 138, 61, 0.22); background: rgba(235, 248, 238, 0.94); }
.toast.info { color: #075b9c; border-color: rgba(0, 113, 227, 0.2); background: rgba(235, 245, 255, 0.96); }
.toast.error, .alert { color: #9f0011; border-color: rgba(215, 0, 21, 0.2); background: rgba(255, 238, 240, 0.96); }
.toast.dismissed { opacity: 0; transform: translateX(-50%) translateY(-8px); pointer-events: none; }
.alert, .notice { margin: 16px 0; }

.task-list, .medicine-grid, .timeline, .mini-list, .custom-list { display: grid; gap: 11px; }
.task-card, .medicine-card, .custom-record-card, .settings-drawer, .stool-gallery article, .milk-summary div { border: 1px solid var(--line); border-radius: 8px; background: rgba(249, 249, 251, 0.86); }
.task-card, .medicine-card, .custom-record-card { display: grid; gap: 12px; padding: 15px; }
.task-card { border-left: 3px solid #b8b8bd; }
.task-card.done { border-left-color: var(--green); background: rgba(238, 249, 240, 0.88); }
.task-card.overdue { border-left-color: var(--red); background: rgba(255, 243, 244, 0.9); }
.task-card strong { font-size: 16px; }
.task-card p { margin: 5px 0; }
.task-card small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.5; }
.dose-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 5px 0; }
.dose-input {
  width: auto;
  min-width: 4.5em;
  max-width: 11em;
  margin: 0;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
}
.dose-input:hover, .dose-input:focus {
  border-color: rgba(0, 113, 227, 0.35);
  outline: none;
  background: #fff;
}
.dose-meta { color: var(--muted); }
.danger-text { color: var(--red) !important; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.medicine-head h2, .medicine-head p { margin: 0; }
.medicine-card.disabled { opacity: 0.62; }
.pill, .chips span { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 8px; color: #075b9c; background: rgba(0, 113, 227, 0.09); font-size: 12px; font-weight: 680; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.baby-switch { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.baby-switch::-webkit-scrollbar { display: none; }
.baby-switch a { padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, 0.72); font-size: 13px; font-weight: 650; white-space: nowrap; }
.baby-switch a.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.summary, .muted, .mini-list, .timeline { color: var(--muted); }
.milk-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0 0 14px; }
.milk-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
}
.milk-summary strong { display: inline; color: var(--text); font-size: 18px; white-space: nowrap; }
.milk-summary span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.milk-weight-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.milk-weight-row > p { margin: 0; flex: 1 1 180px; }
.weight-inline { display: inline-flex; align-items: center; gap: 8px; }
.weight-inline input { width: 104px; margin: 0; }
.feed-list { display: grid; gap: 10px; }
.feed-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px 40px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(249, 249, 251, 0.92);
}
.feed-card.done { border-color: rgba(36, 138, 61, 0.22); background: rgba(238, 249, 240, 0.9); }
.feed-card-add { border-style: dashed; }
.feed-card-meta { color: var(--muted); font-size: 12px; font-weight: 650; }
.feed-card-delete { position: absolute; top: 8px; right: 8px; margin: 0; }
.icon-x {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #86868b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.icon-x:hover { color: var(--red); background: rgba(215, 0, 21, 0.08); }
.feed-checkin {
  display: grid;
  grid-template-columns: minmax(88px, 0.9fr) minmax(110px, 1.2fr) auto;
  gap: 8px 10px;
  align-items: end;
}
.feed-mode-trigger {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-weight: 650;
  cursor: pointer;
}
.feed-mode-trigger::before { content: "喂养模式 · "; color: var(--muted); font-weight: 550; font-size: 12px; }
.feed-amount { display: grid; gap: 4px; margin: 0; }
.feed-amount span { color: var(--muted); font-size: 12px; }
.feed-amount input { margin: 0; }
.feed-checkin .ok { min-width: 72px; }
.feed-checkin-time {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}
.feed-readonly { margin: 0; color: var(--text); }
.sheet[hidden] { display: none !important; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 20, 22, 0.42);
  cursor: pointer;
}
.sheet-panel {
  position: relative;
  z-index: 1;
  padding: 12px 16px 24px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.16);
}
.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 999px;
  background: #d2d2d7;
}
.sheet-panel h3 { margin: 0 0 12px; font-size: 17px; }
.sheet-options { display: grid; gap: 8px; }
.sheet-options button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f5f7;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.sheet-options button:hover { border-color: rgba(0, 113, 227, 0.35); background: rgba(0, 113, 227, 0.08); }
.sheet.care-modal {
  align-items: center;
  justify-items: center;
  place-items: center;
  padding: 20px 16px;
}
.sheet.care-modal .sheet-panel,
.sheet.care-modal .care-modal-panel {
  width: min(520px, calc(100vw - 32px));
  max-height: min(86vh, 720px);
  overflow: auto;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(24, 39, 75, 0.2), 0 4px 16px rgba(24, 39, 75, 0.08);
}
.sheet.care-modal .sheet-handle { display: none; }
.care-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}
.care-modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.care-modal-close {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #6e6e73;
  background: rgba(0, 0, 0, 0.05);
  font-size: 22px;
  line-height: 1;
}
.care-modal-close:hover { background: rgba(0, 0, 0, 0.09); }
.care-modal-form {
  padding: 16px 22px 20px;
  gap: 12px;
}
.care-modal-form label { gap: 6px; }
.care-modal-form input,
.care-modal-form select,
.care-modal-form textarea {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f8fa;
}
.care-modal-form textarea { min-height: 72px; }
.care-modal-actions {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 10px;
}
.care-modal-actions .ghost,
.care-modal-actions .primary {
  min-width: 88px;
  min-height: 40px;
}
.layout-indicators {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: none;
}
.indicator-module { position: relative; }
.indicator-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.indicator-module-head h2 { margin: 0; padding-right: 8px; }
.indicator-delete-form {
  position: static;
  flex: 0 0 auto;
  margin: 0;
}
.indicator-delete {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #9f0011;
  background: rgba(215, 0, 21, 0.08);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.indicator-delete:hover { background: rgba(215, 0, 21, 0.16); }
.indicators-hero .hero-actions {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.period-banner { margin: -8px 0 16px; font-size: 14px; }
.settings-drawer { margin-top: 14px; padding: 13px; }
.settings-drawer summary { cursor: pointer; color: var(--blue); font-weight: 650; }
.settings-drawer form { margin-top: 13px; }
.mini-list > div, .timeline > div { padding: 11px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.mini-list > div:last-child, .timeline > div:last-child { border-bottom: 0; }
.stool-gallery { display: grid; gap: 9px; margin-top: 14px; }
.stool-gallery article { display: flex; align-items: center; gap: 12px; padding: 10px; }
.stool-gallery img { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; }
.site-footer { padding: 0 16px 24px; color: #86868b; font-size: 12px; text-align: center; }

@media (max-width: 860px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; }
  .logout-form { margin-left: auto; }
  .page { padding-top: 20px; }
  .hero, .layout { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .quick-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .brand span:last-child { display: none; }
  .topbar { padding: 9px 12px; }
  .nav a { padding: 7px 10px; }
  .page { padding: 14px 10px 42px; }
  .hero { padding: 24px 18px; }
  .hero h1 { font-size: 31px; }
  .panel, .form-shell, .auth-card { padding: 20px 16px; }
  .auth-card { margin: 24px auto; }
  .grid-form, .quick-form, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .schedule-times-list { grid-template-columns: 1fr; }
  .milk-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .milk-summary div { padding: 10px 8px; gap: 4px; }
  .milk-summary span { font-size: 12px; }
  .milk-summary strong { font-size: 15px; }
  .feed-checkin { grid-template-columns: 1fr; }
  .feed-checkin .ok { width: 100%; }
  .inline-actions button { flex: 1 1 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.admin-user { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.month-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.care-photo { display: block; width: 100%; max-width: 320px; max-height: 240px; object-fit: contain; margin-top: 10px; border-radius: 8px; background: #f5f5f7; }
.hero { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 16px 0 24px; }
.panel { border-color: #e7e7ec; box-shadow: none; background: rgba(255,255,255,.72); }
.auth-card { min-height: 430px; }

.compact-hero { padding-top: 6px; }
.report-layout { margin-bottom: 18px; }
.report-list-panel { margin-top: 18px; }
.report-list { display: grid; }
.report-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; min-height: 74px; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--text); transition: background 150ms ease; }
.report-row:last-child { border-bottom: 0; }
.report-row:hover { color: var(--text); background: rgba(0, 113, 227, 0.035); }
.report-date { color: #3a3a3c; font-variant-numeric: tabular-nums; }
.report-main { display: grid; gap: 5px; min-width: 0; }
.report-main strong, .report-main small { overflow-wrap: anywhere; }
.report-main small { color: var(--muted); }
.report-chevron { color: #8e8e93; font-size: 25px; }
.status-badge { display: inline-flex; align-items: center; width: max-content; min-height: 28px; padding: 5px 9px; border-radius: 8px; color: #515154; background: rgba(0, 0, 0, 0.055); font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-verified { color: #136329; background: rgba(36, 138, 61, 0.1); }
.status-needs_review, .status-pending { color: #8a4b00; background: rgba(255, 149, 0, 0.13); }
.status-failed, .status-ocr_unavailable, .status-no_fields { color: #9f0011; background: rgba(215, 0, 21, 0.08); }
.metric-overview { display: grid; gap: 2px; }
.metric-overview a { display: grid; grid-template-columns: minmax(110px, 1fr) auto; gap: 3px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.metric-overview a:last-child { border-bottom: 0; }
.metric-overview strong { text-align: right; font-variant-numeric: tabular-nums; }
.metric-overview small { grid-column: 1 / -1; }
.trend-up { color: #d04a02 !important; }
.trend-down { color: #14733a !important; }
.trend-changed { color: #a24800 !important; }
.trend-same, .trend-first { color: var(--muted) !important; }
.report-detail-layout { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); margin-bottom: 18px; }
.report-image-panel { min-width: 0; }
.report-image { display: block; width: 100%; max-height: 72vh; border: 1px solid var(--line); border-radius: 8px; object-fit: contain; background: #f5f5f7; }
.lab-panel {
  --lab-blue: #2b6de0;
  --lab-ink: #1f2d3d;
  --lab-gray: #57606a;
  --lab-muted: #8a949e;
  --lab-line: #eaeef2;
  --lab-green: #2f9e63;
  --lab-red: #e5484d;
  --lab-low: #2563eb;
  --lab-mono: "SF Mono", ui-monospace, Consolas, "JetBrains Mono", monospace;
  overflow: hidden;
  padding: 0;
  border-color: rgba(234, 238, 242, 0.95);
  background: #fff;
  box-shadow: 0 20px 50px rgba(31, 45, 61, 0.08);
}
.lab-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--lab-line);
}
.lab-head-title { display: flex; gap: 12px; align-items: center; }
.lab-head-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--lab-blue);
  background: linear-gradient(135deg, #e8f0ff, #e5f7ea);
  box-shadow: inset 0 0 0 1px #fff;
  font-size: 15px;
  font-weight: 780;
}
.lab-head-title h2 {
  margin: 0;
  color: var(--lab-ink);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: 0.02em;
}
.lab-head-title p {
  margin: 3px 0 0;
  color: var(--lab-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.lab-head-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--lab-line);
  border-radius: 999px;
  color: var(--lab-gray);
  background: #f4f7fb;
  font-size: 12px;
}
.lab-stat-chip b { color: var(--lab-ink); font-size: 13px; }
.lab-stat-chip.warn {
  color: #b42318;
  border-color: #fecaca;
  background: #fff5f5;
}
.lab-stat-chip.warn b { color: var(--lab-red); }

.lab-table-wrap { overflow-x: auto; }
.lab-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
}
.lab-table thead th {
  padding: 12px 18px;
  border-bottom: 1px solid var(--lab-line);
  color: var(--lab-gray);
  background: #f6f8fa;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}
.lab-table tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--lab-line);
  color: var(--lab-ink);
  font-size: 14px;
  transition: background 0.15s ease;
  vertical-align: middle;
}
.lab-table tbody tr:last-child td { border-bottom: 0; }
.lab-table tbody tr { transition: background 0.15s ease; }
.lab-table tbody tr:hover td { background: #f7fafc; }
.lab-table tbody tr[data-verdict="high"] td:first-child { box-shadow: inset 3px 0 0 var(--lab-red); }
.lab-table tbody tr[data-verdict="low"] td:first-child { box-shadow: inset 3px 0 0 var(--lab-low); }

.lab-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lab-item-code {
  flex: none;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--lab-gray);
  background: #eef2f7;
  font-family: var(--lab-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lab-item-name {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.lab-num {
  font-family: var(--lab-mono);
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lab-num-text { font-family: inherit; font-weight: 650; }
.lab-num-empty { color: var(--lab-muted); font-weight: 600; }
.lab-table tbody tr[data-verdict="high"] .lab-num { color: var(--lab-red); }
.lab-table tbody tr[data-verdict="low"] .lab-num { color: var(--lab-low); }
.lab-arrow {
  margin-left: 5px;
  font-size: 12px;
  font-weight: 700;
}
.lab-table tbody tr[data-verdict="high"] .lab-arrow { color: var(--lab-red); }
.lab-table tbody tr[data-verdict="low"] .lab-arrow { color: var(--lab-low); }
.lab-unit { color: var(--lab-gray); }
.lab-range {
  color: var(--lab-muted);
  font-family: var(--lab-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.lab-panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 24px;
  border-top: 1px solid var(--lab-line);
  background: #fbfcfe;
}
.lab-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--lab-gray);
  font-size: 12px;
}
.lab-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lab-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.lab-empty { margin: 0; padding: 18px 24px 22px; }
.danger-text { color: #9f0011 !important; }

.lab-add-form {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) repeat(5, minmax(105px, 0.7fr));
  gap: 11px;
  align-items: end;
  margin-top: 8px;
}
.observation-list { display: grid; gap: 12px; }
.observation-editor { position: relative; padding: 15px; border: 1px solid var(--line); border-left: 3px solid #b8b8bd; border-radius: 8px; background: rgba(249, 249, 251, 0.82); }
.observation-editor.abnormal-high { border-left-color: #d04a02; }
.observation-editor.abnormal-low { border-left-color: #0071e3; }
.observation-form { display: grid; grid-template-columns: minmax(150px, 1.5fr) repeat(5, minmax(105px, .7fr)); gap: 11px; align-items: end; }
.observation-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.field-origin { margin-right: auto; color: var(--muted); font-size: 12px; }
.observation-delete { display: flex; justify-content: flex-end; margin-top: 8px; opacity: .7; transition: opacity 150ms ease; }
.observation-editor:hover .observation-delete, .observation-delete:focus-within { opacity: 1; }
.observation-readonly { display: grid; grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr) auto; align-items: center; gap: 12px; }
.observation-readonly small { color: var(--muted); }
.add-observation-form { margin-top: 8px; }
.raw-ocr summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.raw-ocr pre { max-height: 360px; overflow: auto; padding: 14px; border-radius: 8px; color: #3a3a3c; background: #f5f5f7; white-space: pre-wrap; overflow-wrap: anywhere; }
.metric-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); scrollbar-width: thin; }
.metric-tabs a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 12px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.metric-tabs a.active { color: #fff; background: var(--blue); }
.metric-tabs small { opacity: .72; }
.trend-panel { margin-bottom: 18px; }
.trend-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.trend-heading h2 { margin-bottom: 0; }
.trend-latest { display: grid; justify-items: end; }
.trend-latest strong { font-size: 34px; font-variant-numeric: tabular-nums; }
.trend-latest span { color: var(--muted); font-size: 13px; }
.trend-latest small { margin-top: 5px; font-weight: 700; }
.trend-chart-wrap { height: 260px; margin: 24px 0 12px; padding: 12px 6px; border-radius: 8px; background: rgba(245, 245, 247, .74); }
.trend-chart { width: 100%; height: 100%; overflow: visible; }
.chart-axis { stroke: rgba(17, 24, 39, .14); stroke-width: .45; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-dot { fill: #fff; stroke: var(--blue); stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.trend-table-wrap { width: 100%; overflow-x: auto; }
.trend-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.trend-table th, .trend-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }

@media (max-width: 980px) {
  .observation-form, .lab-add-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .report-row { grid-template-columns: 88px minmax(0, 1fr) 18px; gap: 9px; }
  .report-row .status-badge { grid-column: 2; }
  .report-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .observation-form, .lab-add-form { grid-template-columns: 1fr 1fr; }
  .observation-readonly { grid-template-columns: 1fr auto; }
  .observation-readonly small { grid-column: 1 / -1; }
  .trend-heading { align-items: flex-end; }
  .trend-latest strong { font-size: 28px; }
  .trend-chart-wrap { height: 210px; }
  .lab-table { min-width: 0; }
  .lab-table thead { display: none; }
  .lab-table, .lab-table tbody, .lab-table tr, .lab-table td { display: block; width: 100%; }
  .lab-table tbody tr {
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--lab-line, #eaeef2);
  }
  .lab-table tbody td {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 0;
  }
  .lab-table tbody td::before {
    content: attr(data-label);
    color: var(--lab-muted, #8a949e);
    font-size: 11px;
    font-weight: 700;
  }
  .lab-table tbody tr[data-verdict="high"],
  .lab-table tbody tr[data-verdict="low"] {
    box-shadow: none;
  }
  .lab-panel-head, .lab-panel-foot { padding-left: 16px; padding-right: 16px; }
}
.trend-table th { color: var(--muted); font-size: 12px; }
.trend-table td { font-variant-numeric: tabular-nums; }
.abnormal-label { display: inline-flex; margin-left: 5px; padding: 3px 6px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.abnormal-label.high { color: #a43a00; background: rgba(255, 149, 0, .12); }
.abnormal-label.low { color: #075b9c; background: rgba(0, 113, 227, .09); }

@media (max-width: 1080px) {
  .observation-form, .lab-add-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .report-detail-layout { grid-template-columns: 1fr; }
  .observation-delete { position: static; margin-top: 9px; opacity: 1; }
}

@media (max-width: 560px) {
  .report-row { grid-template-columns: 1fr auto 14px; gap: 8px; }
  .report-date { grid-column: 1 / -1; font-size: 12px; }
  .status-badge { font-size: 11px; }
  .observation-form, .observation-readonly, .lab-add-form { grid-template-columns: 1fr; }
  .observation-actions { justify-content: flex-start; }
  .field-origin { width: 100%; }
  .trend-heading { display: grid; }
  .trend-latest { justify-items: start; }
  .trend-chart-wrap { height: 210px; }
}

.user-chip { max-width: 180px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.wechat-auth-card { width: min(100%, 520px); text-align: center; }
.auth-lead { max-width: 390px; margin: 0 auto 18px; color: var(--muted); }
.wechat-login-container { display: grid; width: 320px; min-height: 390px; margin: 8px auto 4px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .82); }
.wechat-login-container iframe { width: 300px !important; height: 390px !important; border: 0; }
.qr-loading { color: var(--muted); font-size: 14px; }
.wechat-help, .privacy-note { color: var(--muted); font-size: 13px; }
.text-link { display: inline-block; margin: 4px 0 18px; color: var(--blue); font-size: 13px; font-weight: 700; }
.account-auth-card {
  display: grid;
  width: min(1100px, calc(100vw - 32px));
  height: clamp(560px, calc(100dvh - 148px), 640px);
  max-height: calc(100dvh - 148px);
  margin: 0 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
  text-align: left;
  padding: clamp(20px, 2.5vw, 32px);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(31, 45, 61, .08);
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}
.page:has(.account-auth-card) {
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - 64px - 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 8px;
  box-sizing: border-box;
}
body:has(.account-auth-card) .site-footer {
  display: block;
  padding: 4px 16px 16px;
  flex-shrink: 0;
}
.auth-panel, .auth-side { min-width: 0; }
.account-auth-card .auth-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.auth-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #eaf3ff, #e5f7ea);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(96, 138, 255, .15), inset 0 0 0 1px #fff;
}
.account-auth-card .auth-symbol {
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 8px;
  box-shadow: none;
  object-fit: cover;
}
.account-auth-card .auth-eyebrow {
  margin: 0 0 8px !important;
  color: #0e8a7b !important;
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: .5px;
}
.account-auth-card h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vh, 32px);
  font-weight: 740;
  letter-spacing: 1px;
  line-height: 1.25;
  color: #1f2d3d;
}
.account-auth-card .auth-lead {
  max-width: none;
  margin: 0 0 18px;
  color: #6b7a8c;
  font-size: 13px;
  line-height: 1.7;
}
.account-auth-card .alert { margin: 0 0 12px; }
.auth-form { display: grid; gap: 14px; margin-top: 0; }
.auth-form label {
  display: grid;
  gap: 6px;
  color: #33475b;
  font-size: 13px;
  font-weight: 600;
}
.auth-form input {
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #1f2d3d;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-form input::placeholder { color: #a8b3c0; }
.auth-form input:hover { border-color: #c9d4e3; }
.auth-form input:focus {
  border-color: #2b6de0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 109, 224, .12);
}
.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}
.auth-code-row input {
  min-width: 0;
}
.auth-code-btn {
  flex: none;
  min-width: 108px;
  padding: 0 14px;
  border: 1px solid rgba(43, 109, 224, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, #f7faff, #eef4ff);
  color: #2b6de0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.auth-code-btn:hover:not(:disabled) {
  border-color: rgba(43, 109, 224, 0.4);
  background: linear-gradient(180deg, #eef4ff, #e4edff);
  color: #1f5dcc;
}
.auth-code-btn:disabled {
  opacity: 0.72;
  cursor: default;
  color: #7a8aa0;
  border-color: #e5e9f0;
  background: #f4f6f9;
}
.full { width: 100%; }
.account-auth-card .auth-submit {
  width: 100%;
  min-height: 46px;
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b7bff, #2b6de0);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  box-shadow: 0 10px 24px rgba(43, 109, 224, .28);
}
.account-auth-card .auth-submit:hover {
  background: linear-gradient(135deg, #4584ff, #2f73e8);
  box-shadow: 0 14px 28px rgba(43, 109, 224, .34);
}
.auth-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  font-size: 13px;
}
.auth-switch .text-link {
  margin: 0;
  color: #2b6de0;
  font-weight: 600;
  text-decoration: none;
}
.auth-switch .text-link:hover { text-decoration: underline; }
.auth-side.bb-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 24px 22px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(165deg, #eaf3ff 0%, #eefaf3 52%, #fff7ea 100%);
  box-shadow: none;
}
.bb-blob { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5; pointer-events: none; }
.bb-b1 { width: 200px; height: 200px; background: #c3dcff; top: -70px; right: -60px; animation: bbFloat 9s ease-in-out infinite; }
.bb-b2 { width: 160px; height: 160px; background: #c9f0d8; bottom: -60px; left: -50px; animation: bbFloat 12s ease-in-out infinite reverse; }
.bb-b3 { width: 110px; height: 110px; background: #ffe6c2; top: 44%; right: 8%; animation: bbFloat 14s ease-in-out infinite; }
@keyframes bbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes bbRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.bb-head { position: relative; z-index: 1; flex: 0 0 auto; animation: bbRise .6s .05s both; }
.bb-head h2 { margin: 0; font-size: clamp(18px, 2.6vh, 24px); line-height: 1.35; letter-spacing: .5px; color: #1f2d3d; font-weight: 740; }
.bb-sub { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: #6b7a8c; }
.bb-avatars { display: flex; }
.bb-avatars i { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid #fff; display: grid; place-items: center; font-size: 12px; font-style: normal; margin-left: -8px; box-shadow: 0 2px 6px rgba(31, 45, 61, .12); }
.bb-avatars i:first-child { margin-left: 0; }
.bb-card { position: relative; z-index: 1; flex: 0 1 auto; min-height: 0; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border: 1px solid #fff; border-radius: 16px; padding: 14px 14px 12px; box-shadow: 0 16px 40px rgba(96, 138, 255, .16); animation: bbRise .6s .15s both; }
.bb-card-head { display: flex; align-items: center; gap: 10px; }
.bb-avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #e8f0ff, #e5f7ea); display: grid; place-items: center; font-size: 18px; }
.bb-who strong { display: block; font-size: 13px; color: #1f2d3d; }
.bb-who span { font-size: 11px; color: #8a97a6; }
.bb-badge { margin-left: auto; font-style: normal; font-size: 11px; color: #fff; padding: 3px 9px; border-radius: 999px; background: linear-gradient(135deg, #ff9f43, #ff7a59); box-shadow: 0 4px 10px rgba(255, 122, 89, .35); white-space: nowrap; }
.bb-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 10px 0 6px; background: #f6f9ff; border-radius: 12px; padding: 8px 4px; }
.bb-stats div { text-align: center; }
.bb-stats b { display: block; font-size: 15px; color: #2b6de0; font-variant-numeric: tabular-nums; }
.bb-stats span { font-size: 11px; color: #8a97a6; }
.bb-chart-title { font-size: 11px; color: #8a97a6; }
.bb-chart { display: block; width: 100%; height: 48px; margin-top: 2px; }
.bb-chip { position: absolute; z-index: 2; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 11px; color: #33475b; border: 1px solid #eef2f7; box-shadow: 0 8px 20px rgba(31, 45, 61, .14); white-space: nowrap; }
.bb-chip-1 { top: -10px; right: 4px; transform: rotate(3deg); animation: bbFloat 7s ease-in-out infinite; }
.bb-chip-2 { bottom: -10px; left: 4px; transform: rotate(-4deg); animation: bbFloat 8.5s ease-in-out infinite reverse; }
.bb-feats { position: relative; z-index: 1; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0; padding: 0; flex: 0 0 auto; animation: bbRise .6s .25s both; }
.bb-feats li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #33475b; background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); border-radius: 12px; padding: 8px 9px; }
.bb-feats i { font-style: normal; width: 28px; height: 28px; border-radius: 8px; background: var(--tint, #eef2f7); display: grid; place-items: center; font-size: 14px; flex: none; }
.bb-foot { position: relative; z-index: 1; margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: #5c6b7a; flex: 0 0 auto; animation: bbRise .6s .35s both; }
.bb-foot span { display: flex; align-items: center; gap: 6px; }
.bb-foot span::before { content: "✓"; width: 16px; height: 16px; border-radius: 50%; background: #e5f7ea; color: #2f9e63; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

@media (max-height: 820px) {
  .account-auth-card {
    gap: 24px;
    padding: 18px;
    height: calc(100dvh - 132px);
    max-height: calc(100dvh - 132px);
  }
  .auth-brand-icon { width: 48px; height: 48px; margin-bottom: 12px; }
  .account-auth-card .auth-symbol { width: 26px; height: 26px; }
  .account-auth-card .auth-lead { margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .auth-side.bb-hero { gap: 10px; padding: 18px 16px; }
  .bb-chart { height: 40px; }
  .bb-chip { display: none; }
}
.qq-login-card { display: grid; gap: 10px; }
.qq-login-card strong { color: var(--text); font-size: 18px; }
.qq-login-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.public-service-note { display: grid; gap: 8px; }
.public-service-note strong { color: var(--text); font-size: 18px; }
.public-service-note span { color: var(--muted); font-size: 14px; line-height: 1.7; }
.wechat-unconfigured { margin: 20px 0; padding: 22px; border: 1px solid rgba(255, 149, 0, .24); border-radius: 8px; color: #6b4300; background: rgba(255, 249, 235, .82); }
.wechat-unconfigured p { margin: 7px 0 0; }
.public-service-note { display: grid; gap: 5px; margin-top: 18px; padding: 16px; border: 1px solid rgba(7, 148, 85, .2); border-radius: 8px; color: #155f3d; background: rgba(235, 249, 241, .82); text-align: left; }
.public-service-note span { color: #4d6759; font-size: 13px; }
.app-download-panel { display: grid; grid-template-columns: minmax(0, 1fr) 178px; gap: 22px; align-items: center; margin: 18px 0; background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(242,248,255,.78)); }
.app-download-panel h2 { margin: 0 0 8px; font-size: 24px; }
.app-download-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.download-qr-card { display: grid; justify-items: center; gap: 8px; padding: 14px; border: 1px solid rgba(0, 113, 227, .14); border-radius: 8px; background: rgba(255,255,255,.78); text-align: center; }
.download-qr-card img, .qr-placeholder { width: 132px; height: 132px; border-radius: 8px; }
.download-qr-card img { object-fit: contain; }
.download-qr-card span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.qr-placeholder { display: grid; place-items: center; color: #6e6e73; background: #f5f5f7; font-weight: 800; }
.pill.warning { color: #8a4b00; background: rgba(255, 149, 0, .12); }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .66); backdrop-filter: blur(20px); }
.admin-stats div { display: grid; gap: 3px; padding: 18px 20px; border-right: 1px solid var(--line); }
.admin-stats div:last-child { border-right: 0; }
.admin-stats strong { font-size: 27px; font-variant-numeric: tabular-nums; }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-section { margin-bottom: 18px; }
.admin-user-list { display: grid; }
.admin-user-row { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(150px, .7fr) minmax(320px, 1.5fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.admin-user-row:last-child { border-bottom: 0; }
.admin-identity { display: flex; gap: 11px; align-items: center; min-width: 0; }
.admin-identity img, .avatar-fallback { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; color: #fff; background: #1677c8; font-weight: 800; }
.admin-identity div { display: grid; min-width: 0; }
.admin-identity strong, .admin-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity small { color: var(--muted); }
.role-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.role-tags span { padding: 5px 8px; border-radius: 6px; color: #24556f; background: #edf7fb; font-size: 11px; font-weight: 700; }
.role-assignment-form { display: flex; gap: 10px; align-items: center; min-width: 0; }
.permission-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; }
.permission-checks label { display: flex; gap: 7px; align-items: flex-start; min-height: 31px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: #3a3a3c; background: rgba(255, 255, 255, .64); font-size: 12px; }
.permission-checks input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.compact-checks { display: flex; flex-wrap: wrap; }
.compact-checks label { white-space: nowrap; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.role-card { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: rgba(249, 249, 251, .78); }
.create-role-card { border-color: rgba(0, 113, 227, .25); background: rgba(244, 249, 255, .78); }
.role-card-heading { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; }
.role-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.role-card-footer small { color: var(--muted); }
.audit-table-wrap { overflow-x: auto; }
.ocr-line-list { display: grid; margin-top: 15px; }
.ocr-line-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 64px 88px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ocr-line-row span, .ocr-line-row small { color: var(--muted); font-variant-numeric: tabular-nums; }
.ocr-line-row em { padding: 4px 7px; border-radius: 5px; font-size: 11px; font-style: normal; font-weight: 700; text-align: center; }
.ocr-line-row em.parsed { color: #17633b; background: rgba(52, 168, 83, .1); }
.ocr-line-row em.unparsed { color: #8a4b00; background: rgba(255, 149, 0, .12); }

@media (max-width: 1050px) {
  .user-chip { display: none; }
  .admin-user-row { grid-template-columns: 1fr 1fr; }
  .role-assignment-form { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-stats div:nth-child(2) { border-right: 0; }
  .admin-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .admin-user-row, .role-grid { grid-template-columns: 1fr; }
  .role-assignment-form { align-items: stretch; flex-direction: column; }
  .permission-checks { grid-template-columns: 1fr; }
  .wechat-login-container { width: min(100%, 320px); }
  .account-auth-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .page:has(.account-auth-card) {
    justify-content: flex-start;
    min-height: auto;
  }
  .account-auth-card h1 { font-size: 28px; }
  .auth-side.bb-hero {
    order: -1;
    padding: 20px 16px;
    overflow: hidden;
    max-height: none;
    height: auto;
  }
  .bb-chip { display: none; }
  .bb-head h2 { font-size: 22px; }
  .app-download-panel { grid-template-columns: 1fr; }
  .download-qr-card { justify-self: stretch; }
  .ocr-line-row { grid-template-columns: 28px minmax(0, 1fr) 72px; }
  .ocr-line-row small { display: none; }
}


/* Password show/hide */
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  width: 100%;
  padding-right: 44px;
  box-sizing: border-box;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  font-size: 16px;
  color: var(--muted, #6b7280);
  border-radius: 6px;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}
.pw-strength { margin-top: 8px; }
.pw-strength-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}
.pw-strength-head strong { font-weight: 700; }
.pw-strength-track { display: flex; gap: 6px; }
.pw-strength-track i {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(17, 24, 39, 0.08);
}
.pw-strength p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pw-strength.is-weak .pw-strength-head strong { color: var(--red); }
.pw-strength.is-medium .pw-strength-head strong { color: #b54708; }
.pw-strength.is-strong .pw-strength-head strong { color: var(--green); }
.pw-strength.is-weak .pw-strength-track i.on { background: var(--red); }
.pw-strength.is-medium .pw-strength-track i.on { background: #b54708; }
.pw-strength.is-strong .pw-strength-track i.on { background: var(--green); }
a.user-chip {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--text, #1d1d1f);
}
a.user-chip:hover {
  background: rgba(0, 113, 227, 0.14);
}
.profile-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
}
.profile-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.profile-meta dt {
  margin: 0;
  color: var(--muted, #6b7280);
  font-size: 13px;
}
.profile-meta dd {
  margin: 0;
  font-weight: 600;
  word-break: break-all;
}
/* reports redesign */

/* reports redesign */
.report-privacy-note { margin: 0 0 12px; line-height: 1.5; }
.report-card-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.report-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: box-shadow .15s ease, border-color .15s ease;
}
.report-card:hover { border-color: rgba(0,113,227,.28); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.report-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.report-card-date { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.report-card-title { font-size: 16px; }
.report-card-meta { margin: 0; color: var(--muted); font-size: 13px; }
.report-card-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #3a3a3c; }
.report-card-stats .warn { color: #b42318; font-weight: 700; }
.report-card-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.report-card-keys span {
  font-size: 12px; padding: 4px 8px; border-radius: 999px; background: rgba(0,0,0,.05);
}
.report-card-keys .flag-high { background: rgba(229,72,77,.12); color: #b42318; }
.report-card-keys .flag-low { background: rgba(37,99,235,.12); color: #1d4ed8; }
.report-card-keys .draft { opacity: .7; border: 1px dashed rgba(0,0,0,.15); }
.lab-verify-list { display: grid; gap: 14px; }
.lab-verify-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff;
}
.lab-verify-card.needs-verify { border-color: rgba(230,162,60,.45); background: rgba(255,247,237,.65); }
.lab-verify-card.is-verified { border-left: 4px solid #2f9e63; }
.lab-verify-card[data-verdict="high"] { border-left: 4px solid #e5484d; }
.lab-verify-card[data-verdict="low"] { border-left: 4px solid #2563eb; }
.lab-verify-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.lab-verify-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.06); }
.pill.ok { background: rgba(47,158,99,.14); color: #136329; }
.pill.warn { background: rgba(230,162,60,.18); color: #9a6700; }
.pill.high { background: rgba(229,72,77,.14); color: #b42318; }
.pill.low { background: rgba(37,99,235,.14); color: #1d4ed8; }
.lab-verify-form { gap: 10px; }
.lab-verify-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; }
.lab-add-box { margin-top: 14px; }
.lab-add-box summary { cursor: pointer; font-weight: 700; }
.tiny { font-size: 12px; }
.chart-band { fill: rgba(47, 158, 99, 0.14); }
.report-image-link { display: block; }
.inline { display: inline; }


/* clinic visit archive */
.advice-body { white-space: pre-wrap; line-height: 1.6; font-size: 15px; }
.audio-list { display: grid; gap: 12px; margin-top: 12px; }
.audio-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.audio-row audio { display: block; width: 100%; max-width: 360px; margin-top: 8px; }
.audio-row small { display: block; color: var(--muted); margin-top: 2px; }
.abnormal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.abnormal-list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(229,72,77,.08); }
.abnormal-list li.flag-low { background: rgba(37,99,235,.08); }
.warn-notice { border-color: rgba(230,162,60,.45); background: rgba(255,247,237,.9); }


.lab-table-toolbar {
  display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:flex-end;
  margin: 4px 12px 16px; padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,.06);
  background: rgba(248,250,252,.9);
  border-radius: 0 0 12px 12px;
}
.lab-table-wrap { overflow-x:auto; padding:0 12px 16px; }
.lab-table { width:100%; border-collapse:collapse; font-size:14px; }
.lab-table th, .lab-table td { padding:10px 8px; border-bottom:1px solid rgba(0,0,0,.06); text-align:left; vertical-align:middle; }
.lab-table th { font-size:12px; color:#6b7280; font-weight:600; white-space:nowrap; }
.lab-table .lab-result { font-variant-numeric:tabular-nums; font-weight:600; }
.lab-table tr[data-verdict="high"] td.lab-result,
.lab-table tr[data-verdict="high"] td.lab-flag { color:#e5484d; }
.lab-table tr[data-verdict="low"] td.lab-result,
.lab-table tr[data-verdict="low"] td.lab-flag { color:#2563eb; }
.lab-table tr.is-draft { background:rgba(255,247,237,.55); }
.lab-table .cell-edit, .lab-table .cell-edit-ref { width:100%; }
.lab-table .cell-edit-ref { display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.lab-table .cell-edit-ref input { min-width:4.5em; flex:1; }
.lab-table-form.is-editing .cell-view { display:none; }
.lab-table-form.is-editing .cell-edit,
.lab-table-form.is-editing .cell-edit-ref { display:block; }
.lab-table-form.is-editing .cell-edit-ref { display:flex; }
.lab-table-form:not(.is-editing) .cell-edit,
.lab-table-form:not(.is-editing) .cell-edit-ref { display:none !important; }
.lab-table-form.is-editing [data-lab-confirm-all] { display:none; }

.lab-metric-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.lab-metric-link:hover { color: #2563eb; }
.focus-metric-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.focus-metric-chip { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid rgba(0,0,0,.06); text-decoration: none; color: inherit; }
.focus-metric-chip:hover { border-color: rgba(37,99,235,.35); box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.focus-metric-chip strong { font-size: 1.15rem; }
.trend-switcher { padding: 0 16px 12px; }
.trend-switcher select { min-width: 220px; }
.trend-chart-wrap-lg { padding: 8px 16px 4px; }
.trend-chart-lg { width: 100%; max-width: 720px; height: auto; display: block; }
.chart-tick { fill: #6b7280; font-size: 11px; }
.chart-grid { stroke: rgba(0,0,0,.04); stroke-width: 1; }
.chart-dot.dot-high { fill: #e5484d; }
.chart-dot.dot-low { fill: #2563eb; }
.chart-dot.dot-current { stroke: #111; stroke-width: 1.5; }

.table-wrap {
  overflow-x: auto;
  padding: 4px 16px 20px;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
}
.data-table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  white-space: nowrap;
  background: #f8fafc;
}
.data-table thead th:first-child { border-radius: 10px 0 0 0; }
.data-table thead th:last-child { border-radius: 0 10px 0 0; }
.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: middle;
  color: #111827;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(248, 250, 252, 0.9); }
.data-table td:nth-child(1) { min-width: 7.5rem; white-space: nowrap; color: #4b5563; }
.data-table td:nth-child(2) { min-width: 7rem; font-variant-numeric: tabular-nums; }
.data-table td:nth-child(3) { min-width: 5.5rem; white-space: nowrap; }
.data-table td:nth-child(4) { min-width: 7rem; color: #4b5563; }
.data-table td:nth-child(5) { min-width: 6rem; }
.data-table a { color: #2563eb; text-decoration: none; font-weight: 500; }
.data-table a:hover { text-decoration: underline; }
.trend-history {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  overflow: hidden;
}
.trend-history tr.is-current td { background: rgba(37, 99, 235, 0.06); }
.trend-history tr.row-high td:nth-child(2) { color: #e5484d; }
.trend-history tr.row-low td:nth-child(2) { color: #2563eb; }
.abnormal-label {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.abnormal-label.high { background: rgba(229, 72, 77, 0.12); color: #e5484d; }
.abnormal-label.low { background: rgba(37, 99, 235, 0.12); color: #2563eb; }

.trend-drill .trend-heading { padding: 16px 16px 8px; }
.trend-drill .trend-switcher { margin-bottom: 4px; }


/* —— 我要提问题 / 留言板（对齐案例，作用域限定在 .bb-page，避免污染登录页 bb-*） —— */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

@keyframes bbBoardRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bbBoardPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bbHeartPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.bb-page {
  --bb-blue: #2b6de0;
  --bb-ink: #1f2d3d;
  --bb-gray: #6b7a8c;
  --bb-muted: #9aa5b1;
  --bb-line: #edf0f4;
  --bb-teal: #0e8a7b;
  --bb-red: #e5484d;
  --bb-green: #2f9e63;
  --bb-amber: #b7791f;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 0 24px;
  color: var(--bb-ink);
}
.bb-page.bb-detail-page {
  max-width: none;
  animation: none;
}
.page:has(.bb-page) {
  overflow-anchor: none;
}

.bb-page .bb-card {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(31, 45, 61, .06);
}
.bb-page .bb-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e6f7f2;
  color: var(--bb-teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 12px;
}
.bb-page .bb-crumb::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bb-teal);
}
.bb-page .bb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(31, 45, 61, .15);
}
.bb-page .bb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bb-page .bb-avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.bb-page .bb-av-blue { background: linear-gradient(135deg, #3b7bff, #2b6de0); }
.bb-page .bb-av-pink { background: linear-gradient(135deg, #ff8fab, #e5484d); }
.bb-page .bb-av-green { background: linear-gradient(135deg, #4ade80, #0e9f6e); }
.bb-page .bb-av-orange { background: linear-gradient(135deg, #fbbf24, #f97316); }
.bb-page .bb-av-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.bb-page .bb-av-me { background: linear-gradient(135deg, #38c4b8, #0e8a7b); }

.bb-page .bb-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}
.bb-page .bb-badge-op { background: #e6f7f2; color: var(--bb-teal); }
.bb-page .bb-badge-me { background: #e8f0ff; color: var(--bb-blue); }
.bb-page .bb-badge-solved { background: #e9f9ef; color: var(--bb-green); }
.bb-page .bb-count-pill {
  background: #e8f0ff;
  color: var(--bb-blue);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
}

.bb-page .bb-btn-primary {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #3b7bff, #2b6de0);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 10px 26px;
  box-shadow: 0 8px 18px rgba(43, 109, 224, .28);
  transition: .18s;
}
.bb-page .bb-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(43, 109, 224, .34);
}
.bb-page .bb-btn-primary:disabled {
  background: #dfe5ec;
  color: #a8b3c0;
  box-shadow: none;
  cursor: not-allowed;
}
.bb-page .bb-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--bb-line);
  background: #fff;
  color: var(--bb-gray);
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 16px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(31, 45, 61, .05);
  transition: .18s;
}
.bb-page .bb-btn-back:hover {
  color: var(--bb-blue);
  border-color: #bcd6ff;
  background: #f3f8ff;
  transform: translateY(-1px);
}
.bb-page .bb-btn-back svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-page .bb-editor textarea,
.bb-page .bb-composer-main > textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f6f8fb;
  padding: 12px 14px;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--bb-ink);
  resize: none;
  outline: none;
  transition: .18s;
  overflow: hidden;
}
.bb-page .bb-editor textarea::placeholder,
.bb-page .bb-composer-main > textarea::placeholder { color: var(--bb-muted); }
.bb-page .bb-editor textarea:focus,
.bb-page .bb-composer-main > textarea:focus {
  background: #fff;
  border-color: var(--bb-blue);
}
.bb-page .bb-editor-foot,
.bb-page .bb-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.bb-page .bb-hint { font-size: 12px; color: var(--bb-muted); }
.bb-page .bb-hint kbd {
  background: #f2f5f9;
  border: 1px solid var(--bb-line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: inherit;
  color: var(--bb-gray);
}
.bb-page .bb-foot-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.bb-page .bb-char {
  font-size: 12px;
  color: var(--bb-muted);
  font-variant-numeric: tabular-nums;
}
.bb-page .bb-char.warn { color: var(--bb-red); }

.bb-page > .bb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  animation: none;
  position: static;
  flex: initial;
}
.bb-page > .bb-head h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 740;
  letter-spacing: 1px;
  line-height: 1.25;
  color: var(--bb-ink);
}
.bb-page .bb-sub {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--bb-gray);
  line-height: 1.6;
}
.bb-page .bb-stats {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  grid-template-columns: none;
}
.bb-page .bb-stat {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 12px;
  padding: 10px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(31, 45, 61, .05);
}
.bb-page .bb-stat b {
  display: block;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.bb-page .bb-stat span { font-size: 11px; color: var(--bb-muted); }
.bb-page .bb-stat:nth-child(1) b { color: var(--bb-blue); }
.bb-page .bb-stat:nth-child(2) b { color: var(--bb-green); }
.bb-page .bb-stat:nth-child(3) b { color: var(--bb-amber); }

.bb-page .bb-composer {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  animation: none;
  transition: border-color .2s, box-shadow .2s;
}
.bb-page .bb-composer:focus-within {
  border-color: #bcd6ff;
  box-shadow: 0 0 0 3px rgba(43, 109, 224, .10);
}
.bb-page .bb-composer-main { flex: 1; min-width: 0; }

.bb-page .bb-toolbar {
  position: sticky;
  top: 72px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  margin: 24px 0 16px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--bb-line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(31, 45, 61, .06);
}
.bb-page .bb-tabs {
  background: #eef1f6;
  border-radius: 10px;
  padding: 4px;
  display: flex;
  gap: 4px;
}
.bb-page .bb-tab {
  border: none;
  background: transparent;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bb-gray);
  cursor: pointer;
  transition: .15s;
}
.bb-page .bb-tab:hover { color: var(--bb-ink); }
.bb-page .bb-tab.active {
  background: #fff;
  color: var(--bb-blue);
  box-shadow: 0 2px 6px rgba(31, 45, 61, .12);
}
.bb-page .bb-search { position: relative; width: 240px; flex: none; }
.bb-page .bb-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: var(--bb-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.bb-page .bb-search input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--bb-line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0 12px 0 34px;
  font-size: 13px;
  color: var(--bb-ink);
  outline: none;
  transition: .15s;
}
.bb-page .bb-search input:focus {
  border-color: var(--bb-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 109, 224, .12);
}
.bb-page .bb-list-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 2px 12px;
}
.bb-page .bb-list-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--bb-ink); }

.bb-page .bb-msg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  contain: layout style;
  content-visibility: auto;
}
.bb-page .bb-msg {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  cursor: pointer;
  contain: layout paint;
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
  transition: border-color .18s, box-shadow .18s;
}
.bb-page .bb-msg:hover {
  border-color: #d8e4f8;
  box-shadow: 0 12px 28px rgba(31, 45, 61, .10);
}
.bb-page .bb-msg.new { animation: none; }
.bb-page .bb-msg-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 16px;
}
.bb-page .bb-msg-main {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.bb-page .bb-msg-main .bb-inline-form,
.bb-page .bb-msg-main .bb-pill,
.bb-page .bb-msg-main .bb-go,
.bb-page .bb-msg-main .bb-msg-image,
.bb-page .bb-msg-main a,
.bb-page .bb-msg-main button { pointer-events: auto; }
.bb-page .bb-msg-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bb-page .bb-msg-head strong { font-size: 14.5px; color: var(--bb-ink); }
.bb-page .bb-msg-head time { font-size: 12.5px; color: var(--bb-muted); }
.bb-page .bb-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid;
}
.bb-page .bb-status.wait { color: var(--bb-amber); background: #fff7e6; border-color: #ffe3b3; }
.bb-page .bb-status.replied { color: var(--bb-blue); background: #e8f0ff; border-color: #cfe0ff; }
.bb-page .bb-status.solved { color: var(--bb-green); background: #e9f9ef; border-color: #bfe8cd; }
.bb-page .bb-msg-text {
  margin: 8px 0 12px;
  font-size: 15px;
  line-height: 1.8;
  color: #33475b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bb-page .bb-msg-foot { display: flex; align-items: center; gap: 10px; }
.bb-page .bb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: #f4f6fa;
  color: var(--bb-gray);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 13px;
  min-height: 0;
  cursor: pointer;
  text-decoration: none;
  transition: .15s;
}
.bb-page .bb-pill svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bb-page .bb-pill:hover { background: #e9edf3; color: var(--bb-ink); }
.bb-page .bb-pill:active { transform: scale(.95); }
.bb-page .bb-pill.like.on { background: #ffecec; color: var(--bb-red); }
.bb-page .bb-pill.like.on svg { fill: var(--bb-red); stroke: var(--bb-red); }
.bb-page .bb-pill svg.pop { animation: bbHeartPop .35s; }
.bb-page .bb-pill b { font-variant-numeric: tabular-nums; }
.bb-page .bb-go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--bb-blue);
  font-size: 12.5px;
  font-weight: 600;
  opacity: .65;
  text-decoration: none;
  transition: .18s;
}
.bb-page .bb-go svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bb-page .bb-msg:hover .bb-go { opacity: 1; transform: translateX(3px); }

.bb-page .bb-empty {
  padding: 52px 20px;
  text-align: center;
  border: 1.5px dashed #d5dde6;
  border-radius: 16px;
  background: rgba(255, 255, 255, .6);
}
.bb-page .bb-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #f6f8fb;
  border: 1.5px dashed #d5dde6;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.bb-page .bb-empty p {
  margin: 0;
  font-size: 14.5px;
  color: var(--bb-gray);
  font-weight: 600;
}
.bb-page .bb-empty span,
.bb-page .bb-empty-sub {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--bb-muted);
  font-weight: 500;
}
.bb-page .bb-empty button,
.bb-page .bb-empty-btn {
  margin-top: 14px;
  border: 1px solid var(--bb-line);
  background: #fff;
  border-radius: 9px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bb-blue);
  cursor: pointer;
  transition: .15s;
}
.bb-page .bb-empty button:hover,
.bb-page .bb-empty-btn:hover {
  border-color: var(--bb-blue);
  background: #f3f8ff;
}

.bb-page .bb-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.bb-page .bb-detail-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.45;
  letter-spacing: .5px;
  font-weight: 740;
  color: var(--bb-ink);
}
.bb-page .bb-head-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--bb-muted);
}
.bb-page .bb-q-card { padding: 26px 28px; margin: 20px 0 16px; }
.bb-page .bb-q-main { display: flex; gap: 14px; }
.bb-page .bb-q-body { flex: 1; min-width: 0; }
.bb-page .bb-q-author {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bb-page .bb-q-author strong { font-size: 15px; color: var(--bb-ink); }
.bb-page .bb-q-author time { font-size: 12.5px; color: var(--bb-muted); }
.bb-page .bb-q-text {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.9;
  color: #33475b;
  white-space: pre-wrap;
  word-break: break-word;
}
.bb-page .bb-q-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #f2f4f8;
}
.bb-page .bb-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: #f4f6fa;
  color: var(--bb-gray);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 0;
  cursor: pointer;
  transition: .18s;
}
.bb-page .bb-act-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bb-page .bb-act-btn:hover { background: #e9edf3; color: var(--bb-ink); }
.bb-page .bb-act-btn:active { transform: scale(.96); }
.bb-page .bb-act-btn.like.on { background: #e8f0ff; color: var(--bb-blue); }
.bb-page .bb-act-btn.like.on svg { fill: var(--bb-blue); stroke: var(--bb-blue); }
.bb-page .bb-act-btn.star.on { background: #fff7e6; color: var(--bb-amber); }
.bb-page .bb-act-btn.star.on svg { fill: var(--bb-amber); stroke: var(--bb-amber); }
.bb-page .bb-act-btn b { font-variant-numeric: tabular-nums; }

.bb-page .bb-r-card { padding: 26px 28px; }
.bb-page .bb-r-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.bb-page .bb-r-head h2 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--bb-ink);
}
.bb-page .bb-r-sort { font-size: 12px; color: var(--bb-muted); }
.bb-page .bb-reply-list { list-style: none; margin: 0; padding: 0; }
.bb-page .bb-reply-item {
  display: flex;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid #f2f4f8;
}
.bb-page .bb-reply-list .bb-reply-item:first-child { border-top: none; }
.bb-page .bb-reply-item.new { animation: bbBoardPop .35s both; }
.bb-page .bb-reply-item.accepted {
  background: #f4fbf7;
  border: 1px solid #d9f0e2;
  border-radius: 12px;
  padding: 18px;
  margin: 10px 0;
}
.bb-page .bb-reply-body { flex: 1; min-width: 0; }
.bb-page .bb-reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bb-page .bb-reply-head strong { font-size: 14px; color: var(--bb-ink); }
.bb-page .bb-reply-head time { font-size: 12px; color: var(--bb-muted); }
.bb-page .bb-reply-body > p {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: #33475b;
  word-break: break-word;
  white-space: pre-wrap;
}
.bb-page .bb-reply-actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.bb-page .bb-mini {
  border: none;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bb-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  min-height: 0;
  border-radius: 7px;
  transition: .15s;
}
.bb-page .bb-mini svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bb-page .bb-mini:hover { background: #f2f5f9; color: var(--bb-gray); }
.bb-page .bb-mini.like.on { color: var(--bb-red); background: #ffecec; }
.bb-page .bb-mini.like.on svg { fill: var(--bb-red); stroke: var(--bb-red); }

.bb-page .bb-composer-block {
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid #f2f4f8;
}
.bb-page .bb-composer-label {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
  color: var(--bb-ink);
}
.bb-page .bb-composer-block:focus-within .bb-composer-label { color: var(--bb-blue); }
.bb-page .bb-page-foot {
  margin-top: 34px;
  text-align: center;
  font-size: 12.5px;
  color: var(--bb-muted);
}
.bb-page .bb-inline-form { margin: 0; display: inline-flex; }

.bb-toast {
  position: fixed;
  top: 26px;
  left: 50%;
  transform: translate(-50%, -16px);
  opacity: 0;
  z-index: 99;
  background: rgba(31, 45, 61, .92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 20px;
  pointer-events: none;
  transition: .3s;
  backdrop-filter: blur(6px);
}
.bb-toast.show { opacity: 1; transform: translate(-50%, 0); }
.bb-toast[hidden] { display: none !important; }
.bb-toast[hidden].show { display: block !important; }

@media (max-width: 640px) {
  .bb-page > .bb-head h1 { font-size: 26px; }
  .bb-page .bb-detail-head h1 { font-size: 22px; }
  .bb-page .bb-toolbar { flex-direction: column; align-items: stretch; }
  .bb-page .bb-search { width: 100%; }
  .bb-page .bb-msg,
  .bb-page .bb-q-card,
  .bb-page .bb-r-card { padding: 16px; }
  .bb-page .bb-stats { width: 100%; }
  .bb-page .bb-stat { flex: 1; padding: 10px 12px; }
}

/* composer media: emoji + image */
.bb-page .bb-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.bb-page .bb-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  max-width: 34px;
  max-height: 34px;
  margin: 0;
  padding: 0;
  gap: 0;
  border: 1px solid var(--bb-line);
  border-radius: 10px;
  background: #f6f8fb;
  cursor: pointer;
  font-size: 0;
  font-weight: 400;
  line-height: 0;
  color: #4a5a6a;
  transition: .15s;
  flex: none;
}
.bb-page label.bb-tool-btn {
  display: inline-flex;
  color: #4a5a6a;
}
.bb-page .bb-tool-btn svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  display: block;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.bb-page .bb-tool-btn:hover,
.bb-page .bb-tool-btn.on {
  border-color: #bcd6ff;
  background: #f3f8ff;
  color: var(--bb-blue);
}
.bb-page .bb-pill.danger,
.bb-page .bb-mini.danger,
.bb-page .bb-act-btn.danger {
  color: #c62828;
  background: transparent;
}
.bb-page .bb-pill.danger:hover,
.bb-page .bb-mini.danger:hover,
.bb-page .bb-act-btn.danger:hover {
  background: #ffecec;
  color: #b71c1c;
}
.bb-page .bb-emoji-panel {
  margin-top: 10px;
  padding: 10px 10px 8px;
  border: 1px solid var(--bb-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 45, 61, .08);
}
.bb-page .bb-emoji-panel[hidden] { display: none !important; }
.bb-page .bb-emoji-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--bb-muted);
  margin: 0 2px 8px;
}
.bb-page .bb-emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  max-height: 180px;
  overflow: auto;
}
.bb-page .bb-emoji-item {
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1.35;
  cursor: pointer;
  padding: 6px 0;
}
.bb-page .bb-emoji-item:hover { background: #eef3fb; }
.bb-page .bb-emoji-item:active { transform: scale(.92); }
.bb-page .bb-media-preview {
  position: relative;
  display: inline-block;
  margin-top: 10px;
  max-width: min(240px, 100%);
}
.bb-page .bb-media-preview[hidden] { display: none !important; }
.bb-page .bb-media-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--bb-line);
  background: #f6f8fb;
}
.bb-page .bb-media-preview img:not([src]),
.bb-page .bb-media-preview img[src=""] {
  display: none;
}
.bb-page .bb-foot-right .bb-hint {
  margin-right: 2px;
  white-space: nowrap;
}
.bb-page .bb-media-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 45, 61, .72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.bb-page .bb-msg-image {
  margin: 0 0 10px;
  max-width: 148px;
}
.bb-page .bb-msg-image img {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--bb-line);
  cursor: zoom-in;
}
.bb-page .bb-attach {
  display: inline-block;
  margin-top: 10px;
  max-width: 160px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--bb-line);
  cursor: zoom-in;
  vertical-align: top;
}
.bb-page .bb-attach img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  background: #f6f8fb;
}
.bb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 36, .78);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.bb-lightbox[hidden] { display: none !important; }
.bb-lightbox img {
  max-width: min(1100px, 94vw);
  max-height: min(92vh, 100%);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  background: #111;
  cursor: default;
}
.bb-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 640px) {
  .bb-page .bb-emoji-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .bb-page .bb-foot-right { width: 100%; justify-content: flex-end; }
  .bb-page .bb-editor-foot { flex-direction: column; align-items: stretch; }
  .bb-page .bb-attach,
  .bb-page .bb-attach img,
  .bb-page .bb-msg-image,
  .bb-page .bb-msg-image img {
    max-width: 132px;
    width: 132px;
    height: 132px;
  }
}

/* Homepage care refresh — scoped so other pages and the app-download panel stay as they are. */
body:has(.baby-hero) {
  background:
    radial-gradient(600px 320px at 8% -60px, rgba(62, 123, 250, .10), transparent 60%),
    radial-gradient(700px 360px at 96% 120px, rgba(142, 92, 246, .08), transparent 60%),
    linear-gradient(180deg, #f7f9ff 0%, #f2f6fb 40%, #f4f7fc 100%);
}
body:has(.care-dock) { padding-bottom: 96px; }
body:has(.baby-hero) .page { width: min(1180px, 100%); }

a.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 200px;
  padding: 5px 12px 5px 5px;
  border: 1px solid #e6ecf5;
  border-radius: 999px;
  background: #fff;
  color: #17233b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
a.user-chip:hover {
  color: #17233b;
  background: #fff;
  border-color: #cdd7e4;
  box-shadow: 0 4px 12px rgba(23, 35, 59, .08);
}
a.user-chip .ava {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd9e8, #ffe9d2);
  font-size: 14px;
  flex: none;
}
a.user-chip .user-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero.baby-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin: 0 0 6px;
  padding: 38px 0 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  flex-wrap: wrap;
  animation: careFadeUp .6s ease both;
}
.hero.baby-hero h1 {
  margin: 14px 0 8px;
  color: #17233b;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.2;
}
.hero.baby-hero h1 .name {
  background: linear-gradient(120deg, #2f6ae0, #7c5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero.baby-hero p.sub {
  max-width: 640px;
  margin: 0;
  color: #69788f;
  font-size: 14px;
  line-height: 1.6;
}
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid #e6ecf5;
  border-radius: 999px;
  background: #fff;
  color: #69788f;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(23, 35, 59, .05);
}
.date-chip svg { color: #2f6ae0; flex: none; }
.remind {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  padding: 12px 16px;
  border: 1px solid #e6ecf5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 35, 59, .08);
}
.remind .r-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff4e0;
  color: #d97706;
  flex: none;
}
.remind .r-t { color: #17233b; font-size: 14px; font-weight: 700; }
.remind .r-s { color: #69788f; font-size: 12px; }
.remind .sw {
  position: relative;
  width: 44px;
  height: 25px;
  min-height: 25px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #d6dde8;
  box-shadow: none;
  cursor: pointer;
  flex: none;
  transition: background .25s;
}
.remind .sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  transition: left .25s;
}
.remind .sw.on { background: linear-gradient(135deg, #34c77b, #1a9e5c); }
.remind .sw.on::after { left: 22px; }

.care-board {
  padding: 24px 26px 28px;
  border: 1px solid #e6ecf5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 35, 59, .08);
  animation: careFadeUp .6s .12s ease both;
}
.care-board:hover { box-shadow: 0 10px 30px rgba(23, 35, 59, .08); }
.care-board .b-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}
.care-board .b-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #17233b;
  font-size: 20px;
  font-weight: 800;
}
.care-board .b-head h2::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 99px;
  background: linear-gradient(180deg, #3e7bfa, #8e5cf6);
}
.care-board .b-head p {
  margin: 6px 0 0;
  color: #69788f;
  font-size: 13px;
  line-height: 1.6;
}
.care-board .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.care-board .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 7px 13px;
  border: 1px solid #e6ecf5;
  border-radius: 999px;
  background: #fbfcfe;
  color: #69788f;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.care-board .chip b {
  padding: 0 7px;
  border-radius: 99px;
  background: #eef2f8;
  font-size: 11.5px;
  font-weight: 700;
}
.care-board .chip:hover { border-color: #cdd7e4; color: #17233b; }
.care-board .chip.on { background: #e8f0ff; border-color: #cddffb; color: #2f6ae0; }
.care-board .chip.on b { background: #d8e6ff; }
.care-board .prog { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; }
.care-board .bar { flex: 1; height: 10px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.care-board .bar i {
  display: block;
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #34d399, #10b981);
  transition: width .6s cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
}
.care-board .bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: careShine 2.4s infinite;
}
.care-board .prog span { color: #69788f; font-size: 13px; flex: none; }
.care-board .prog span b { color: #1a9e5c; font-size: 15px; }

.care-board .care-timeline { gap: 12px; margin-top: 8px; }
.care-board .group {
  position: relative;
  margin-top: 26px;
  padding-left: 62px;
}
.care-board .group:first-child { margin-top: 8px; }
.care-board .group::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 56px;
  bottom: -6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #dfe9f8, #eef3fa 85%, transparent);
}
.care-board .timeline-groups .group:last-child::before { display: none; }
.care-board .group.is-filtered-out { display: none !important; }
.care-board .t-tile {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e6ecf5;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #f2f6ff);
  box-shadow: 0 4px 10px rgba(23, 35, 59, .08);
  font-size: 20px;
}
.care-board .g-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.care-board .g-time { color: #17233b; font-size: 17px; font-weight: 800; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.care-board .g-label { color: #69788f; font-size: 12px; }
.care-board .g-status { margin-left: auto; }
.care-board .items { display: flex; flex-direction: column; gap: 12px; }
.care-board .care-time-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 0; color: #69788f; font-size: 12.5px; }
.care-board .actual-time { color: #1a9e5c; font-weight: 700; }
.care-board .care-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid #e6ecf5;
  border-left: 1px solid #e6ecf5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
  box-shadow: none;
  overflow: visible;
  transition: transform .22s, box-shadow .22s, border-color .22s, opacity .3s;
}
.care-board .care-row:not(:has(.care-drag)) { grid-template-columns: auto minmax(0, 1fr) auto; }
.care-board .care-row-med,
.care-board .care-row-feed { background: linear-gradient(180deg, #fff, #fbfcfe); border-left-color: #e6ecf5; }
.care-board .care-row:hover {
  transform: translateY(-2px);
  border-color: #d9e2ef;
  box-shadow: 0 12px 28px rgba(23, 35, 59, .09);
}
.care-board .care-row.dragging,
.care-board .care-row.dragging:hover {
  opacity: .45;
  transform: scale(.99);
  box-shadow: none;
  border-style: dashed;
}
.care-board .care-row.drag-over-swap { outline: 2px solid #2f6ae0; outline-offset: -2px; }
.care-board .care-row.done {
  background: linear-gradient(180deg, #f5fbf7, #eefaf3);
  border-color: #c4e8d2;
  opacity: 1;
}
.care-board .care-row.done::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #34c77b, #1a9e5c);
}
.care-board .care-row.done:hover { background: linear-gradient(180deg, #f5fbf7, #eefaf3); border-color: #c4e8d2; }
.care-board .care-row.due:not(.done) {
  border-left-color: #e6ecf5;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
.care-board .care-row.due:not(.done)::after { content: none; }
.care-board .care-row.stopped { opacity: .6; filter: grayscale(.5); }
.care-board .care-row.pop { animation: carePop .45s cubic-bezier(.34, 1.56, .64, 1); }
.care-board .care-row.is-filtered-out { display: none !important; }

.care-board .care-drag,
.care-board .grip {
  width: auto;
  height: auto;
  margin-left: -4px;
  padding: 6px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c3cdd9;
  font-size: 0;
  line-height: 0;
  cursor: grab;
  touch-action: none;
  transition: .2s;
}
.care-board .care-drag:hover,
.care-board .grip:hover { color: #2f6ae0; background: #e8f0ff; }
.care-board .care-drag:active { cursor: grabbing; background: #e8f0ff; color: #2f6ae0; }
.care-board .tile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 20px;
}
.care-board .tile.drug { background: linear-gradient(135deg, #eef4ff, #e2ecff); border-color: #dbe7ff; }
.care-board .tile.milk { background: linear-gradient(135deg, #eafaf0, #ddf6e8); border-color: #cdeeda; }
.care-board .care-row.done .tile { background: linear-gradient(135deg, #e9f9ef, #d9f3e3); border-color: #c4e8d2; }
.care-board .info,
.care-board .care-row-main { min-width: 0; display: flex; flex-direction: column; gap: 0; }
.care-board .r1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.care-board .care-clock {
  color: #17233b;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.care-board .r1 h4 { margin: 0; color: #17233b; font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.care-board .tag { padding: 2.5px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; }
.care-board .tag.drug { background: #e8f0ff; color: #2f6ae0; }
.care-board .tag.milk { background: #e9f9ef; color: #1a9e5c; }
.care-board .note { padding: 2.5px 8px; border-radius: 8px; background: #f1f4f9; color: #7a8698; font-size: 11.5px; font-weight: 600; }
.care-board .note.warn { background: #fff4e0; color: #d97706; }
.care-board .dose { margin: 4px 0 0; color: #69788f; font-size: 12.5px; line-height: 1.5; }
.care-board .care-done-meta { margin: 4px 0 0; color: #1a9e5c; font-size: 12px; font-weight: 600; }

.care-board .side,
.care-board .care-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  padding-top: 0;
  align-self: center;
}
.care-board .care-row.due:not(.done) .care-row-side { padding-top: 0; }
.care-board .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.care-board .status.due { background: #fff4e0; color: #d97706; }
.care-board .status.due::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: carePulse 1.6s infinite;
}
.care-board .status.upcoming { background: #f1f4f9; color: #8a94a6; }
.care-board .status.done { background: #e9f9ef; color: #1a9e5c; }
.care-board .status.stopped { background: #fdecec; color: #d3393f; }
.care-board .acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.care-board .acts form,
.care-board .inline-checkin { display: inline-flex; width: auto; margin: 0; }
.care-board .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 8px 16px;
  border: none;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: .2s;
}
.care-board .btn.go {
  color: #fff;
  background: linear-gradient(135deg, #34c77b, #1a9e5c);
  box-shadow: 0 6px 14px rgba(26, 158, 92, .28);
}
.care-board .btn.go:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.care-board .btn.ghost,
.care-board .care-fed {
  color: #69788f;
  border: 1px solid #e6ecf5;
  background: #fff;
  pointer-events: none;
  cursor: default;
}
.care-board .ibtn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid #e6ecf5;
  border-radius: 10px;
  background: #fff;
  color: #8a94a6;
  cursor: pointer;
  transition: .2s;
}
.care-board .ibtn:hover { color: #2f6ae0; border-color: #bcd7f5; background: #e8f0ff; }
.care-board .ibtn.danger:hover { color: #d3393f; border-color: #f3c2c4; background: #fdecec; }
.care-board .empty { padding: 56px 0; color: #69788f; text-align: center; }
.care-board .empty .e-ic { margin-bottom: 10px; font-size: 40px; }
.care-board svg { flex: none; }

.care-dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  display: flex;
  gap: 12px;
  padding: 9px;
  border: 1px solid rgba(230, 236, 245, .95);
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 16px 40px rgba(23, 35, 59, .16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%);
}
.care-dock button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .22s, filter .22s;
}
.care-dock button:hover { color: #fff; transform: translateY(-2px); }
.care-dock .milk { background: linear-gradient(135deg, #34c77b, #1a9e5c); box-shadow: 0 8px 18px rgba(26, 158, 92, .32); }
.care-dock .drug { background: linear-gradient(135deg, #4c8dff, #2f6ae0); box-shadow: 0 8px 18px rgba(47, 106, 224, .32); }
.care-dock svg { flex: none; }

body.sheet-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  padding-right: var(--sheet-scrollbar, 0px);
  scroll-behavior: auto;
}
html:has(body.sheet-open) {
  scroll-behavior: auto !important;
  overflow-anchor: none;
}
body.sheet-open .care-dock {
  transform: translateX(calc(-50% - (var(--sheet-scrollbar, 0px) / 2)));
}
.sheet.care-modal:not([hidden]) {
  animation: careFadeUp .22s ease;
}
.sheet.care-modal:not([hidden]) .care-modal-panel {
  animation: carePop .34s cubic-bezier(.34, 1.56, .64, 1);
}
.sheet.care-modal .sheet-backdrop {
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet.care-modal .care-modal-panel {
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100vw - 32px));
  max-height: min(86vh, 720px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}
.sheet.care-modal .care-modal-med { width: min(520px, calc(100vw - 32px)); }
.sheet.care-modal .care-modal-head {
  position: relative;
  top: auto;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 20px 22px 16px;
  border: 0;
  border-bottom: 1px solid #eef2f8;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}
.sheet.care-modal .care-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sheet.care-modal .care-modal-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e6ecf5;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #f2f6ff);
  box-shadow: 0 4px 10px rgba(23, 35, 59, .06);
  font-size: 18px;
  flex: none;
}
.sheet.care-modal .care-modal-feed .care-modal-ico {
  background: linear-gradient(135deg, #eafaf0, #ddf6e8);
  border-color: #cdeeda;
}
.sheet.care-modal .care-modal-med .care-modal-ico {
  background: linear-gradient(135deg, #eef4ff, #e2ecff);
  border-color: #dbe7ff;
}
.sheet.care-modal .care-modal-head h3 {
  margin: 0;
  color: #17233b;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}
.sheet.care-modal .care-modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f1f4f9;
  color: #69788f;
  transition: .2s;
}
.sheet.care-modal .care-modal-close:hover { background: #fdecec; color: #d3393f; }
.sheet.care-modal .care-modal-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: #fff;
}
.sheet.care-modal .care-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(86vh - 148px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 22px 8px;
  background: #fff;
  scrollbar-gutter: stable;
}
.sheet.care-modal .care-modal-scroll::-webkit-scrollbar { width: 8px; }
.sheet.care-modal .care-modal-scroll::-webkit-scrollbar-thumb {
  background: #cdd7e4;
  border-radius: 99px;
  border: 2px solid #fff;
}
.sheet.care-modal .grid-form .care-modal-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  align-content: start;
  align-items: start;
}
.sheet.care-modal .stack .care-modal-scroll {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-content: start;
  padding-bottom: 12px;
}
.sheet.care-modal .care-modal-form label {
  gap: 6px;
  margin: 0;
  color: #69788f;
  font-size: 12.5px;
  font-weight: 700;
}
.sheet.care-modal .care-modal-form .required {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fdecec;
  color: #d3393f;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
}
.sheet.care-modal .care-modal-form .field-help {
  display: block;
  margin-top: 2px;
  color: #9aa5b5;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}
.sheet.care-modal .care-modal-form input,
.sheet.care-modal .care-modal-form select,
.sheet.care-modal .care-modal-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #e6ecf5;
  border-radius: 12px;
  background: #fbfcfe;
  color: #17233b;
  font-family: inherit;
  font-size: 14px;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.sheet.care-modal .care-modal-form textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.55;
}
.sheet.care-modal .care-modal-form input:hover,
.sheet.care-modal .care-modal-form select:hover,
.sheet.care-modal .care-modal-form textarea:hover {
  border-color: #d9e2ef;
}
.sheet.care-modal .care-modal-form input:focus,
.sheet.care-modal .care-modal-form select:focus,
.sheet.care-modal .care-modal-form textarea:focus {
  border-color: #9dbdf7;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(62, 123, 250, .12);
  outline: none;
}
.sheet.care-modal .schedule-times-field,
.sheet.care-modal .schedule-times-field + label {
  min-width: 0;
  grid-template-rows: 20px auto;
  align-items: start;
}
.sheet.care-modal .schedule-times-field > input[type="hidden"] {
  display: none;
}
.sheet.care-modal .schedule-times-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}
.sheet.care-modal .care-modal-form .schedule-times-list input[type="time"],
.sheet.care-modal .schedule-times-field + label select {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  margin: 0;
  padding: 0 12px;
  line-height: 42px;
}
.sheet.care-modal .care-modal-actions {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 16px 22px 20px;
  border: 0;
  border-top: 1px solid #eef2f8;
  border-radius: 0 0 20px 20px;
  background: #fff;
}
.sheet.care-modal .care-modal-actions .ghost,
.sheet.care-modal .care-modal-actions .primary {
  min-width: 88px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  transition: .2s;
}
.sheet.care-modal .care-modal-actions .ghost {
  border: 1px solid #e6ecf5;
  background: #fff;
  color: #69788f;
  box-shadow: none;
}
.sheet.care-modal .care-modal-actions .ghost:hover {
  border-color: #cdd7e4;
  color: #17233b;
  background: #fff;
}
.sheet.care-modal .care-modal-actions .primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #4c8dff, #2f6ae0);
  box-shadow: 0 8px 18px rgba(47, 106, 224, .3);
}
.sheet.care-modal .care-modal-feed .care-modal-actions .primary {
  background: linear-gradient(135deg, #34c77b, #1a9e5c);
  box-shadow: 0 8px 18px rgba(26, 158, 92, .28);
}
.sheet.care-modal .care-modal-actions .primary:hover {
  color: #fff;
  filter: brightness(1.06);
}
@media (max-width: 560px) {
  .sheet.care-modal .grid-form .care-modal-scroll,
  .sheet.care-modal .schedule-times-list { grid-template-columns: 1fr; }
  .sheet.care-modal .care-modal-panel,
  .sheet.care-modal .care-modal-med { width: min(100%, calc(100vw - 24px)); }
}

@keyframes careFadeUp { from { opacity: 0; } to { opacity: 1; } }
@keyframes carePop { 0% { transform: scale(.97); } 55% { transform: scale(1.015); } 100% { transform: scale(1); } }
@keyframes careShine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes carePulse { 0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .45); } 70% { box-shadow: 0 0 0 7px rgba(217, 119, 6, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); } }

@media (max-width: 1050px) {
  a.user-chip { display: inline-flex; }
}
@media (max-width: 760px) {
  .hero.baby-hero { padding-top: 26px; }
  .remind { width: 100%; }
  .care-board { padding: 18px 16px 22px; }
  .care-board .group { margin-top: 18px; padding-left: 0; }
  .care-board .group::before { display: none; }
  .care-board .t-tile { position: static; width: 38px; height: 38px; font-size: 17px; }
  .care-board .g-head { margin-bottom: 10px; }
  .care-board .care-row {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .care-board .care-row:not(:has(.care-drag)) { grid-template-columns: auto minmax(0, 1fr); }
  .care-board .side,
  .care-board .care-row-side {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed #e6ecf5;
  }
  .care-dock { max-width: calc(100% - 24px); }
  .care-dock button { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero.baby-hero,
  .care-board,
  .care-board .bar i::after,
  .care-board .status.due::before,
  .sheet.care-modal:not([hidden]),
  .sheet.care-modal:not([hidden]) .care-modal-panel { animation: none; }
}



/* ===== Indicators list (scoped) ===== */
body:has(.indicators-hero) {
  --ind-ink: #17233b;
  --ind-sub: #69788f;
  --ind-line: #e6ecf5;
  --ind-blue: #2f6ae0;
  --ind-blue-l: #e8f0ff;
  --ind-red: #d3393f;
  --ind-red-l: #fdecec;
  --ind-green: #1a9e5c;
}
body:has(.indicators-hero) .page {
  width: min(1240px, 100%);
}
body:has(.indicators-hero) .indicators-hero .tot-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--ind-line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ind-sub);
  box-shadow: 0 3px 10px rgba(23, 35, 59, 0.05);
}
body:has(.indicators-hero) .indicators-hero .tot-chip b {
  color: var(--ind-blue);
  font-size: 15px;
}
body:has(.indicators-hero) .indicators-hero .hero-actions .primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  min-height: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #4c8dff, #2f6ae0);
  box-shadow: 0 8px 18px rgba(47, 106, 224, 0.3);
  transition: 0.2s;
}
body:has(.indicators-hero) .indicators-hero .hero-actions .primary:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
}
body:has(.indicators-hero) .layout-indicators {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: none;
}
.ind-sec {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--ind-line, #e6ecf5);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(23, 35, 59, 0.05);
  overflow: hidden;
  margin-bottom: 18px;
  transition: 0.25s;
  animation: indFadeUp 0.55s ease both;
}
.ind-sec:hover {
  box-shadow: 0 14px 34px rgba(23, 35, 59, 0.09);
  border-color: #dde6f2;
}
.ind-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px dashed var(--ind-line, #e6ecf5);
  background: linear-gradient(180deg, #fff, #fbfcfe);
  flex-wrap: wrap;
}
.ind-sec-ic {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  border: 1px solid;
  transition: 0.25s;
  flex: none;
}
.ind-sec:hover .ind-sec-ic { transform: rotate(-6deg) scale(1.06); }
.ind-sec-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ind-ink, #17233b);
}
.ind-unit {
  font-size: 11px;
  color: var(--ind-sub, #69788f);
  font-weight: 600;
}
.ind-cnt {
  font-size: 11.5px;
  background: #eef2f8;
  color: var(--ind-sub, #69788f);
  border-radius: 99px;
  padding: 2.5px 10px;
  font-weight: 700;
  transition: 0.2s;
}
.ind-sec:hover .ind-cnt {
  background: var(--ind-blue-l, #e8f0ff);
  color: var(--ind-blue, #2f6ae0);
}
.ind-sec-add {
  margin-left: auto;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 14px !important;
  font-size: 12.5px !important;
  border-radius: 10px !important;
  min-height: 0 !important;
}
.ind-sec-add::before {
  content: "+";
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}
.ind-hide-form { margin: 0; }
.ind-sec-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ind-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--ind-line, #e6ecf5);
  border-radius: 14px;
  background: #fbfcfe;
  transition: 0.22s;
  position: relative;
}
.ind-row:hover {
  background: #fff;
  border-color: #d3e0f5;
  box-shadow: 0 8px 22px rgba(23, 35, 59, 0.08);
  transform: translateY(-2px);
}
.ind-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, #4c8dff, #8e5cf6);
  opacity: 0;
  transition: 0.22s;
}
.ind-row:hover::before { opacity: 1; }
.ind-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--ind-line, #e6ecf5);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ind-sub, #69788f);
  font-variant-numeric: tabular-nums;
  transition: 0.2s;
}
.ind-row:hover .ind-time-pill {
  border-color: #cddffb;
  color: var(--ind-blue, #2f6ae0);
  background: var(--ind-blue-l, #e8f0ff);
}
.ind-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ind-stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: #f1f5fb;
  border-radius: 10px;
  padding: 6px 11px;
  transition: 0.2s;
}
.ind-row:hover .ind-stat-chip { background: #eef4fd; }
.ind-stat-chip em {
  font-style: normal;
  color: var(--ind-sub, #69788f);
  font-size: 11.5px;
  font-weight: 600;
}
.ind-stat-chip b {
  font-size: 13.5px;
  color: var(--ind-ink, #17233b);
  font-weight: 800;
}
.ind-stat-chip b i {
  font-style: normal;
  font-size: 11px;
  color: var(--ind-sub, #69788f);
  margin-left: 2px;
  font-weight: 600;
}
.ind-remark {
  color: var(--ind-sub, #69788f);
  font-size: 12.5px;
  flex: 1;
  min-width: 140px;
}
.ind-remark::before { content: "💬 "; font-size: 11px; }
.ind-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--ind-line, #e6ecf5);
  cursor: zoom-in;
  transition: 0.22s;
}
.ind-thumb:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 8px 18px rgba(23, 35, 59, 0.18);
  border-color: #cddffb;
}
.ind-acts {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.ind-ibtn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--ind-line, #e6ecf5);
  background: #fff;
  color: #8a94a6;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.18s;
  position: relative;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}
.ind-ibtn:hover { transform: translateY(-2px); }
.ind-ibtn:active { transform: scale(0.9); }
.ind-ibtn.edit:hover {
  color: var(--ind-blue, #2f6ae0);
  border-color: #bcd7f5;
  background: var(--ind-blue-l, #e8f0ff);
}
.ind-ibtn.del:hover,
.ind-ibtn.ind-hide:hover {
  color: var(--ind-red, #d3393f);
  border-color: #f3c2c4;
  background: var(--ind-red-l, #fdecec);
}
.ind-ibtn[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #17233b;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 6;
}
.ind-empty {
  border: 1.5px dashed #dbe3ee;
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  color: var(--ind-sub, #69788f);
  background: #fbfcfe;
  transition: 0.2s;
}
.ind-empty:hover {
  border-color: #bcd7f5;
  background: var(--ind-blue-l, #e8f0ff);
}
.ind-empty-e { font-size: 30px; margin-bottom: 4px; opacity: 0.85; }
.ind-empty-link {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--ind-blue, #2f6ae0);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 1.5px dashed currentColor;
  padding: 0 2px 1px;
}
.ind-empty-link:hover {
  color: #1d4fc0;
  border-bottom-style: solid;
}
.ind-empty-page { margin-bottom: 18px; }

/* ===== Indicator dialogs (match case) ===== */
.sheet.ind-dialog {
  align-items: center;
  justify-items: center;
  place-items: center;
  padding: 16px;
}
.sheet.ind-dialog .sheet-backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet.ind-dialog .care-modal-panel,
.sheet.ind-dialog .ind-dialog-panel {
  display: block;
  width: min(540px, 100%);
  max-height: 88vh;
  margin: 0;
  padding: 24px;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  animation: carePop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sheet.ind-dialog.ind-dialog-sm .care-modal-panel,
.sheet.ind-dialog .ind-dialog-panel-sm {
  width: min(420px, 100%);
}
.sheet.ind-dialog .care-modal-panel::-webkit-scrollbar { width: 8px; }
.sheet.ind-dialog .care-modal-panel::-webkit-scrollbar-thumb {
  background: #d6dde8;
  border-radius: 99px;
}
.sheet.ind-dialog .care-modal-head,
.sheet.ind-dialog .ind-d-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.sheet.ind-dialog .ind-d-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  border: 1px solid #d6dde8;
  background: #eef2f8;
  flex: none;
}
.sheet.ind-dialog .ind-d-title-wrap { flex: 1; min-width: 0; }
.sheet.ind-dialog .ind-d-title-wrap h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ind-ink, #17233b);
  letter-spacing: 0;
  line-height: 1.25;
}
.sheet.ind-dialog .ind-d-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ind-sub, #69788f);
  font-weight: 600;
}
.sheet.ind-dialog .care-modal-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  background: #f1f4f9;
  color: var(--ind-sub, #69788f);
  transition: 0.2s;
}
.sheet.ind-dialog .care-modal-close:hover {
  background: var(--ind-red-l, #fdecec);
  color: var(--ind-red, #d3393f);
  transform: rotate(90deg);
}
.sheet.ind-dialog .care-modal-form {
  display: block;
  flex: none;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: visible;
  background: transparent;
}
.sheet.ind-dialog .care-modal-scroll {
  display: contents;
  max-height: none;
  overflow: visible;
  padding: 0;
  scrollbar-gutter: auto;
}
.sheet.ind-dialog .ind-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 14px;
  color: var(--ind-sub, #69788f);
  font-size: 12.5px;
  font-weight: 700;
}
.sheet.ind-dialog .ind-label-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  line-height: 1.3;
}
.sheet.ind-dialog .ind-field input,
.sheet.ind-dialog .ind-field select,
.sheet.ind-dialog .ind-field textarea {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--ind-line, #e6ecf5);
  border-radius: 12px;
  background-color: #fbfcfe;
  color: var(--ind-ink, #17233b);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.sheet.ind-dialog .ind-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-color: #fbfcfe;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2369788f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
.sheet.ind-dialog .ind-field input:hover,
.sheet.ind-dialog .ind-field select:hover,
.sheet.ind-dialog .ind-field textarea:hover {
  border-color: #cdd7e4;
  background-color: #fff;
}
.sheet.ind-dialog .ind-field input:focus,
.sheet.ind-dialog .ind-field select:focus,
.sheet.ind-dialog .ind-field textarea:focus {
  border-color: #9dbdf7;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(62, 123, 250, 0.12);
}
.sheet.ind-dialog .ind-field select:hover,
.sheet.ind-dialog .ind-field select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2369788f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
.sheet.ind-dialog .ind-field input::placeholder,
.sheet.ind-dialog .ind-field textarea::placeholder {
  color: #aeb8c6;
}
.sheet.ind-dialog .ind-opt {
  font-size: 11px;
  color: #9aa5b5;
  font-weight: 600;
}
.sheet.ind-dialog .ind-req { color: var(--ind-red, #d3393f); }
.sheet.ind-dialog .ind-field-row,
.sheet.ind-dialog .ind-field-row-3 {
  display: grid;
  gap: 12px;
  margin: 0 0 0;
}
.sheet.ind-dialog .ind-field-row { grid-template-columns: 1fr 1fr; }
.sheet.ind-dialog .ind-field-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.sheet.ind-dialog .ind-field-row > .ind-field,
.sheet.ind-dialog .ind-field-row-3 > .ind-field {
  margin-bottom: 14px;
}
.sheet.ind-dialog .ind-upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px dashed #d6dde8;
  border-radius: 14px;
  background: #fbfcfe;
  cursor: pointer;
  transition: 0.22s;
}
.sheet.ind-dialog .ind-upload:hover {
  border-color: #9dbdf7;
  background: var(--ind-blue-l, #e8f0ff);
  transform: translateY(-1px);
}
.sheet.ind-dialog .ind-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.sheet.ind-dialog .ind-u-ic {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--ind-blue-l, #e8f0ff);
  color: var(--ind-blue, #2f6ae0);
  display: grid;
  place-items: center;
  flex: none;
  transition: 0.2s;
}
.sheet.ind-dialog .ind-upload:hover .ind-u-ic {
  background: #d8e6ff;
  transform: scale(1.06);
}
.sheet.ind-dialog .ind-u-tx b {
  display: block;
  font-size: 13px;
  color: var(--ind-ink, #17233b);
  font-weight: 700;
}
.sheet.ind-dialog .ind-u-tx span {
  display: block;
  font-size: 11.5px;
  color: var(--ind-sub, #69788f);
  font-weight: 500;
}
.sheet.ind-dialog .ind-current-photo {
  margin: -6px 0 14px;
  font-size: 12.5px;
  color: var(--ind-sub, #69788f);
}
.sheet.ind-dialog .ind-current-photo a {
  color: var(--ind-blue, #2f6ae0);
  font-weight: 700;
}
.sheet.ind-dialog .care-modal-actions,
.sheet.ind-dialog .ind-d-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.sheet.ind-dialog .care-modal-actions .ghost,
.sheet.ind-dialog .care-modal-actions .primary,
.sheet.ind-dialog .ind-d-foot .ghost,
.sheet.ind-dialog .ind-d-foot .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 0;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  transition: 0.2s;
}
.sheet.ind-dialog .care-modal-actions .ghost,
.sheet.ind-dialog .ind-d-foot .ghost {
  border: 1px solid var(--ind-line, #e6ecf5);
  background: #fff;
  color: var(--ind-sub, #69788f);
  box-shadow: none;
}
.sheet.ind-dialog .care-modal-actions .ghost:hover,
.sheet.ind-dialog .ind-d-foot .ghost:hover {
  border-color: #cdd7e4;
  color: var(--ind-ink, #17233b);
  background: #fff;
  box-shadow: 0 4px 12px rgba(23, 35, 59, 0.07);
}
.sheet.ind-dialog .care-modal-actions .primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #4c8dff, #2f6ae0);
  box-shadow: 0 8px 18px rgba(47, 106, 224, 0.3);
}
.sheet.ind-dialog .care-modal-actions .primary:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.ind-mask .ind-d-foot .danger {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #f26065, #d3393f);
  box-shadow: 0 8px 18px rgba(211, 57, 63, 0.28);
}
.ind-mask .ind-d-foot .danger:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

body:has(.indicators-hero) .ind-dialog .ind-d-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
body:has(.indicators-hero) .ind-d-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  border: 1px solid #d6dde8;
  background: #eef2f8;
  flex: none;
}
body:has(.indicators-hero) .ind-d-title-wrap { flex: 1; min-width: 0; }
body:has(.indicators-hero) .ind-d-title-wrap h3 { margin: 0; font-size: 17px; font-weight: 800; }
body:has(.indicators-hero) .ind-d-sub {
  font-size: 12px;
  color: var(--ind-sub, #69788f);
  font-weight: 600;
  margin-top: 2px;
}
body:has(.indicators-hero) .ind-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ind-sub, #69788f);
  margin-bottom: 14px;
}
body:has(.indicators-hero) .ind-label-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
body:has(.indicators-hero) .ind-field input,
body:has(.indicators-hero) .ind-field select,
body:has(.indicators-hero) .ind-field textarea {
  width: 100%;
  border: 1px solid var(--ind-line, #e6ecf5);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ind-ink, #17233b);
  background-color: #fbfcfe;
  outline: none;
  font-weight: 500;
}
body:has(.indicators-hero) .ind-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2369788f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
body:has(.indicators-hero) .ind-field input:focus,
body:has(.indicators-hero) .ind-field select:focus,
body:has(.indicators-hero) .ind-field textarea:focus {
  border-color: #9dbdf7;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(62, 123, 250, 0.12);
}
body:has(.indicators-hero) .ind-field select:hover,
body:has(.indicators-hero) .ind-field select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2369788f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
body:has(.indicators-hero) .ind-opt {
  font-size: 11px;
  color: #9aa5b5;
  font-weight: 600;
}
body:has(.indicators-hero) .ind-req { color: var(--ind-red, #d3393f); }
body:has(.indicators-hero) .ind-field-row,
body:has(.indicators-hero) .ind-field-row-3 {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}
body:has(.indicators-hero) .ind-field-row { grid-template-columns: 1fr 1fr; }
body:has(.indicators-hero) .ind-field-row-3 { grid-template-columns: 1fr 1fr 1fr; }
body:has(.indicators-hero) .ind-current-photo {
  margin: -6px 0 14px;
  font-size: 12.5px;
  color: var(--ind-sub, #69788f);
}
body:has(.indicators-hero) .ind-current-photo a { color: var(--ind-blue, #2f6ae0); font-weight: 700; }

.ind-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ind-mask[hidden] { display: none !important; }
.ind-dialog-mini {
  background: #fff;
  border-radius: 20px;
  width: min(380px, 100%);
  text-align: center;
  padding: 28px 24px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}
.ind-c-ic {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--ind-red-l, #fdecec);
  color: var(--ind-red, #d3393f);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 22px;
}
.ind-dialog-mini h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
}
.ind-dialog-mini p {
  font-size: 13px;
  color: var(--ind-sub, #69788f);
  margin: 0 0 20px;
}
.ind-d-foot {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.ind-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 16, 28, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
}
.ind-lightbox[hidden] { display: none !important; }
.ind-lightbox img {
  max-width: 88vw;
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

@keyframes indFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .ind-acts {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
    border-top: 1px dashed var(--ind-line, #e6ecf5);
    padding-top: 9px;
  }
  body:has(.indicators-hero) .ind-field-row,
  body:has(.indicators-hero) .ind-field-row-3,
  .sheet.ind-dialog .ind-field-row,
  .sheet.ind-dialog .ind-field-row-3 {
    grid-template-columns: 1fr;
  }
  .ind-sec-add { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ind-sec { animation: none; }
  .ind-sec:hover .ind-sec-ic,
  .ind-row:hover,
  .ind-thumb:hover { transform: none; }
}

/* ===== Monthly care history (case style) ===== */
body:has(.month-page-hero) {
  --mr-ink: #17233b;
  --mr-sub: #69788f;
  --mr-line: #e6ecf5;
  --mr-blue: #2f6ae0;
  --mr-blue-l: #e8f0ff;
  --mr-green: #1a9e5c;
  --mr-green-l: #e9f9ef;
  --mr-amber: #d97706;
  --mr-amber-l: #fff4e0;
  --mr-red: #d3393f;
  --mr-red-l: #fdecec;
  --mr-cyan: #0891b2;
  --mr-cyan-l: #e0f7fa;
  --mr-brown: #78350f;
  --mr-brown-l: #fef3c7;
  --mr-purple: #7c3aed;
  --mr-purple-l: #f3e8ff;
}
body:has(.month-page-hero) .page { width: min(1180px, 100%); }
body:has(.month-page-hero) .month-page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
body:has(.month-page-hero) .month-page-hero .hero-actions {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mr-tot-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--mr-line, #e6ecf5);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mr-sub, #69788f);
  box-shadow: 0 3px 10px rgba(23, 35, 59, 0.05);
}
.mr-tot-chip b { color: var(--mr-blue, #2f6ae0); font-size: 15px; }
.mr-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  padding: 20px 24px;
  margin: 0 0 20px;
  background: #fff;
  border: 1px solid var(--mr-line, #e6ecf5);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(23, 35, 59, 0.04);
}
.mr-f-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 160px;
  margin: 0;
  color: var(--mr-sub, #69788f);
  font-size: 12px;
  font-weight: 700;
}
.mr-f-kind { max-width: 200px; }
.mr-f-group input,
.mr-f-group select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--mr-line, #e6ecf5);
  border-radius: 11px;
  background-color: #fbfcfe;
  color: var(--mr-ink, #17233b);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  transition: 0.2s;
}
.mr-f-group select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2369788f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.mr-f-group input:hover,
.mr-f-group select:hover {
  border-color: #cdd7e4;
  background-color: #fff;
}
.mr-f-group input:focus,
.mr-f-group select:focus {
  border-color: var(--mr-blue, #2f6ae0);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(47, 106, 224, 0.1);
}
.mr-f-group select:hover,
.mr-f-group select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2369788f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.mr-f-actions {
  display: flex;
  gap: 10px;
  flex: none;
  padding-bottom: 1px;
}
.mr-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 0 !important;
  height: 42px;
  padding: 0 20px !important;
  border-radius: 11px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  text-decoration: none;
}
a.mr-btn.ghost {
  border: 1px solid var(--mr-line, #e6ecf5);
  background: #fff;
  color: var(--mr-sub, #69788f);
}
a.mr-btn.ghost:hover {
  border-color: #cdd7e4;
  color: var(--mr-ink, #17233b);
  background: #f8fafc;
}
.mr-filter-bar .primary.mr-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #4c8dff, #2f6ae0);
  box-shadow: 0 6px 14px rgba(47, 106, 224, 0.25);
}
.mr-filter-bar .primary.mr-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.mr-table-card {
  background: #fff;
  border: 1px solid var(--mr-line, #e6ecf5);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(23, 35, 59, 0.04);
  overflow: hidden;
}
.mr-table-wrap { overflow-x: auto; }
.mr-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  table-layout: fixed;
}
.mr-table thead {
  background: #f8fafc;
  border-bottom: 1px solid var(--mr-line, #e6ecf5);
}
.mr-table th {
  padding: 15px 24px;
  color: var(--mr-sub, #69788f);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.mr-table td {
  position: relative;
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--mr-ink, #17233b);
  font-size: 13.5px;
  vertical-align: middle;
}
.mr-col-time { width: 18%; }
.mr-col-kind { width: 16%; }
.mr-col-detail { width: 66%; }
.mr-table tbody tr { transition: 0.2s; }
.mr-table tbody tr:hover { background: #f4f8ff; }
.mr-table tbody tr:hover td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #4c8dff, #2f6ae0);
}
.mr-table tbody tr:last-child td { border-bottom: 0; }
.mr-time-cell { display: flex; flex-direction: column; gap: 2px; }
.mr-date {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.mr-time {
  color: var(--mr-sub, #69788f);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mr-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.mr-tag.drug { background: var(--mr-blue-l); color: var(--mr-blue); border-color: #d4e4ff; }
.mr-tag.milk { background: var(--mr-green-l); color: var(--mr-green); border-color: #c4e8d2; }
.mr-tag.jaundice { background: var(--mr-amber-l); color: var(--mr-amber); border-color: #f5e3b3; }
.mr-tag.urine { background: var(--mr-cyan-l); color: var(--mr-cyan); border-color: #bcebf2; }
.mr-tag.stool { background: var(--mr-brown-l); color: var(--mr-brown); border-color: #fde68a; }
.mr-tag.temp { background: var(--mr-red-l); color: var(--mr-red); border-color: #f3c2c4; }
.mr-tag.weight { background: var(--mr-purple-l); color: var(--mr-purple); border-color: #e9d5ff; }
.mr-detail {
  display: block;
  color: var(--mr-ink, #17233b);
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.mr-empty {
  padding: 60px 20px;
  color: var(--mr-sub, #69788f);
  text-align: center;
}
.mr-empty-ic { margin-bottom: 12px; font-size: 48px; opacity: 0.6; }
.mr-empty h4 {
  margin: 0 0 6px;
  color: var(--mr-ink, #17233b);
  font-size: 16px;
}
.mr-empty p { margin: 0; font-size: 13px; }
.mr-pagi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  border-top: 1px solid var(--mr-line, #e6ecf5);
  background: #fcfcfd;
}
.mr-pagi-info {
  color: var(--mr-sub, #69788f);
  font-size: 13px;
  font-weight: 500;
}
.mr-pagi-info b { color: var(--mr-ink, #17233b); font-weight: 700; }
.mr-pagi-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mr-table-card.is-loading {
  opacity: 0.72;
  pointer-events: none;
}
.mr-table tbody {
  min-height: 420px;
}
.mr-table tbody tr {
  height: 64px;
}
.mr-p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--mr-line, #e6ecf5);
  border-radius: 10px;
  background: #fff;
  color: var(--mr-ink, #17233b);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}
.mr-p-btn svg { width: 14px; height: 14px; }
.mr-p-btn:hover:not(.active):not(.is-disabled):not(.is-ellipsis) {
  border-color: var(--mr-blue, #2f6ae0);
  color: var(--mr-blue, #2f6ae0);
  background: var(--mr-blue-l, #e8f0ff);
  transform: translateY(-1px);
}
.mr-p-btn.active {
  border-color: var(--mr-blue, #2f6ae0);
  color: #fff;
  background: linear-gradient(135deg, #4c8dff, #2f6ae0);
  box-shadow: 0 4px 10px rgba(47, 106, 224, 0.25);
}
.mr-p-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f8fafc;
}
.mr-p-btn.is-ellipsis {
  border: 0;
  background: transparent;
  cursor: default;
}
@media (max-width: 760px) {
  .mr-filter-bar { padding: 16px; }
  .mr-f-group,
  .mr-f-kind { min-width: 100%; max-width: none; }
  .mr-f-actions { width: 100%; }
  .mr-f-actions .mr-btn { flex: 1; }
  .mr-pagi { flex-direction: column; align-items: flex-start; }
  .mr-pagi-btns { width: 100%; justify-content: center; }
}

/* 检查档案：对齐首页，左右栏等高，化验表就地编辑不改行高 */
.visit-page .hero.baby-hero,
.visit-page .care-board { animation: none; }
.visit-page { overflow-anchor: none; }
.visit-page .remind .primary { margin-left: 8px; min-height: 36px; }
.visit-page .visit-board { margin-bottom: 18px; }
.visit-page .visit-card-list { display: grid; gap: 12px; margin-top: 16px; }
.visit-page .visit-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #e6ecf5;
  border-radius: 16px;
  background: #f8faff;
}
.visit-page .visit-card-hit { position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.visit-page .visit-card-main { min-width: 0; }
.visit-page .visit-card-top { display: flex; align-items: center; gap: 8px; }
.visit-page .visit-date { color: #17233b; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.visit-page .visit-hospital { display: block; margin-top: 4px; color: #17233b; font-size: 15px; }
.visit-page .visit-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: #69788f; font-size: 12px; }
.visit-page .visit-card-acts { position: relative; z-index: 2; display: flex; gap: 8px; flex: none; }
.visit-page .visit-card-acts form { margin: 0; }
.visit-page .visit-empty { margin: 8px 0 0; }

.visit-edit-panel { overflow: hidden; }
.visit-edit-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
  background:
    radial-gradient(180px 80px at 0 0, rgba(62, 123, 250, .16), transparent 70%),
    linear-gradient(180deg, #f7f9ff, #fff 72%);
  border-bottom: 1px solid #e6ecf5;
}
.visit-edit-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(47, 106, 224, .12);
  font-size: 20px;
  flex: none;
}
.visit-edit-kicker {
  margin: 0;
  color: #2f6ae0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.visit-edit-hero h3 {
  margin: 2px 0 0;
  color: #17233b;
  font-size: 18px;
  font-weight: 800;
}
.visit-edit-hero .care-modal-close { margin-left: auto; }
.visit-edit-form { display: grid; gap: 14px; padding: 18px 18px 16px; }
.visit-edit-field { display: grid; gap: 6px; margin: 0; }
.visit-edit-field span {
  color: #69788f;
  font-size: 12px;
  font-weight: 700;
}
.visit-edit-field input {
  min-height: 44px;
  border: 1px solid #e6ecf5;
  border-radius: 12px;
  background: #f8faff;
}
.visit-edit-error {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 650;
}
.visit-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}
.visit-edit-actions .ghost,
.visit-edit-actions .primary { min-width: 96px; }

.visit-page .equal-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  height: 560px;
  margin-bottom: 18px;
  align-items: stretch;
}
.visit-page .equal-pair > .panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
.visit-page .equal-pair .pair-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.visit-page .equal-pair .pair-image {
  display: flex;
  background: #f6f8fb;
  border-radius: 14px;
}
.visit-page .equal-pair .report-image-link {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.visit-page .equal-pair .report-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  border: 0;
  background: transparent;
}

.visit-page .lab-panel { overflow-anchor: none; }
.visit-page .lab-table { table-layout: fixed; }
.visit-page .lab-table tbody td {
  height: 56px;
  padding: 8px 14px;
  vertical-align: middle;
}
.visit-page .lab-table .cell-field {
  display: block;
  width: 100%;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  line-height: 30px;
  box-sizing: border-box;
  pointer-events: none;
  transition: none;
}
.visit-page .lab-table-form.is-editing .cell-field {
  border-color: #d6dde8;
  background-color: #fff;
  pointer-events: auto;
}
.visit-page .lab-table select.cell-field {
  appearance: none;
  -webkit-appearance: none;
}
.visit-page .lab-table-form.is-editing select.cell-field {
  padding-right: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2369788f' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px 8px;
}
.visit-page .lab-flag {
  display: flex;
  align-items: center;
  gap: 8px;
}
.visit-page .lab-flag .cell-field { width: 88px; flex: none; }
.visit-page .lab-table-toolbar { min-height: 58px; }
.visit-page .lab-table input.cell-field:focus,
.visit-page .lab-table select.cell-field:focus {
  border-color: #2f6ae0;
  box-shadow: 0 0 0 3px rgba(47, 106, 224, .12);
  background-color: #fff;
}

@media (max-width: 860px) {
  .visit-page .equal-pair {
    grid-template-columns: 1fr;
    height: auto;
  }
  .visit-page .equal-pair > .panel { height: auto; min-height: 280px; }
  .visit-page .equal-pair .pair-scroll { max-height: 420px; }
  .visit-page .visit-card { align-items: flex-start; flex-direction: column; }
}

