/* ==========================================================================
   我的防跌倒评估记录 —— 基础设计系统
   清爽蓝白 / 浅灰底 / 白色卡片 / 亮蓝色
   ========================================================================== */

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --sky-400: #38bdf8;

  --ink: #0f1f33;
  --ink-2: #33465e;
  --ink-3: #51677f;
  --muted: #6b7f96;
  --muted-2: #8fa3b9;

  --bg: #f3f7fc;
  --card: #ffffff;
  --line: #e4ebf4;
  --line-strong: #d5e0ee;

  --green: #16a34a;
  --green-soft: #ecfdf3;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;

  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(15, 31, 51, 0.04), 0 8px 22px -16px rgba(15, 31, 51, 0.18);
  --shadow-md: 0 2px 6px rgba(15, 31, 51, 0.03), 0 24px 50px -30px rgba(15, 31, 51, 0.25);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(900px 440px at 90% -10%, #e4efff 0%, rgba(228, 239, 255, 0) 62%),
    radial-gradient(760px 400px at -8% 8%, #eaf4ff 0%, rgba(234, 244, 255, 0) 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

a {
  color: var(--blue-600);
}

button {
  font-family: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.18em;
}

.shell {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* --------------------------------------------------------------------------
   顶部栏
   -------------------------------------------------------------------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(219, 231, 245, 0.9);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #4b93f8, #1d5fe0);
  box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.75);
}

.brand-mark .icon {
  width: 23px;
  height: 23px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.brand-text strong {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.brand-short {
  display: none;
}

.brand-date {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.date-short {
  display: none;
}

.brand-text small {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  min-width: 0;
  flex: 0 0 auto;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #63a9fb, #2563eb);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.32);
  flex: 0 0 auto;
}

.avatar .icon {
  width: 18px;
  height: 18px;
}

.profile-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.profile-label {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

.profile-text strong {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.nickname-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-600);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.nickname-edit .icon {
  width: 14px;
  height: 14px;
}

.nickname-edit:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.patient-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe7f4;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.patient-switch:hover {
  border-color: var(--blue-300);
  color: var(--blue-600);
}

/* --------------------------------------------------------------------------
   步骤条
   -------------------------------------------------------------------------- */

.stepper-wrap {
  padding: 0 0 12px;
}

.stepper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.stepper-inner {
  display: flex;
  align-items: center;
  background: #f8fbff;
  border: 1px solid #e2ecf9;
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 3px 12px -10px rgba(15, 31, 51, 0.35);
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.step:disabled {
  cursor: default;
}

.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef4fb;
  color: #97aac0;
  font-size: 12px;
  font-weight: 750;
  font-family: var(--mono);
  transition: all 0.18s;
}

.step-dot .icon {
  width: 14px;
  height: 14px;
}

.step.is-active {
  background: var(--blue-50);
  color: var(--blue-700);
}

.step.is-active .step-dot {
  background: linear-gradient(135deg, #3b82f6, #1d5fe0);
  color: #fff;
  box-shadow: 0 6px 14px -7px rgba(37, 99, 235, 0.85);
}

.step.is-done {
  color: var(--blue-600);
}

.step.is-done .step-dot {
  background: var(--blue-100);
  color: var(--blue-700);
}

.step.is-locked {
  opacity: 0.5;
}

.step-line {
  flex: 1 1 auto;
  height: 1px;
  min-width: 10px;
  margin: 0 2px;
  background: linear-gradient(90deg, #e3ecf8, #d7e5f7);
}

/* --------------------------------------------------------------------------
   通用按钮 / 文字
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s, color 0.16s;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d5fe0);
  box-shadow: 0 10px 22px -13px rgba(37, 99, 235, 0.9);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px -14px rgba(37, 99, 235, 0.95);
}

.btn-ghost {
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  color: var(--blue-700);
  border-color: #bcd4f2;
  background: #f9fcff;
}

.btn-quiet {
  color: var(--blue-700);
  background: var(--blue-50);
}

.btn-quiet:hover {
  background: var(--blue-100);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #f05252, #dc2626);
  box-shadow: 0 10px 22px -14px rgba(220, 38, 38, 0.9);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sub {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue-600);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  color: var(--blue-600);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.only-mobile {
  display: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   主区域 / 动效
   -------------------------------------------------------------------------- */

.app-main {
  min-height: calc(100vh - 240px);
}

.boot {
  min-height: 56vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.view {
  animation: view-in 0.34s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   首页
   -------------------------------------------------------------------------- */

.view-home {
  padding-top: 26px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(290px, 0.84fr);
  align-items: center;
  gap: 20px;
  padding: 46px 44px;
  border: 1px solid #e2edfb;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #edf6ff 100%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.9), rgba(219, 234, 254, 0) 68%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 16px 0 16px;
  font-size: clamp(34px, 4.3vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero-lead {
  max-width: 520px;
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
  text-wrap: balance;
}

.hero-lead .nowrap {
  white-space: nowrap;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 26px;
}

.hero-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 31, 51, 0.03);
  color: var(--ink-3);
  font-size: 12.5px;
}

.hero-chips .icon {
  width: 15px;
  height: 15px;
  color: var(--blue-500);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-art {
  position: relative;
  z-index: 1;
  padding: 4px 6px;
}

.hero-svg {
  display: block;
  width: 100%;
  height: auto;
}

.draft-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-500);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.draft-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--blue-50);
  color: var(--blue-600);
  flex: 0 0 auto;
}

.draft-icon .icon {
  width: 18px;
  height: 18px;
}

.draft-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.draft-copy strong {
  font-size: 14px;
}

.draft-copy span {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.records-section {
  margin-top: 40px;
  scroll-margin-top: 100px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.015em;
}

.section-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.section-count {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.record-card:hover {
  transform: translateY(-1px);
  border-color: #cfe2fa;
  box-shadow: 0 14px 30px -24px rgba(15, 31, 51, 0.35);
}

.record-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.level-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.level-dot.level-low {
  background: #22c55e;
}

.level-dot.level-medium {
  background: #f59e0b;
}

.level-dot.level-high {
  background: #ef4444;
}

.record-title {
  min-width: 0;
}

.record-title h3 {
  margin: 0 0 2px;
  font-size: 15px;
}

.record-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.metric {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.metric b {
  color: var(--ink);
  font-size: 15px;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
  white-space: nowrap;
}

.level-pill.level-low {
  color: #15803d;
  background: var(--green-soft);
}

.level-pill.level-medium {
  color: #b45309;
  background: var(--amber-soft);
}

.level-pill.level-high {
  color: #b91c1c;
  background: var(--red-soft);
}

.mini-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef2f7;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.mini-tag.tag-patient {
  background: #eef2f7;
  color: #64748b;
}

.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 42px 28px;
  border: 1px dashed #cfe0f4;
  border-radius: 20px;
  background: #fff;
}

.empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
}

.empty-icon .icon {
  width: 28px;
  height: 28px;
}

.empty-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.empty-card p {
  max-width: 420px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.feature-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
}

.feature-icon .icon {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   步骤页公共
   -------------------------------------------------------------------------- */

.view-step {
  padding-top: 4px;
}

.page-head {
  padding: 28px 4px 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.back-link:hover {
  color: var(--blue-600);
}

.back-link .icon {
  width: 15px;
  height: 15px;
}

.page-head h1 {
  margin: 6px 0 8px;
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.progress-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.progress-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 0 0 auto;
}

.progress-kicker {
  color: var(--muted);
  font-size: 11.5px;
}

.progress-copy strong {
  font-size: 14px;
  color: var(--ink-2);
}

.progress-copy strong b {
  color: var(--blue-600);
  font-size: 22px;
  line-height: 1;
  margin-right: 2px;
}

.progress-copy strong span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.progress-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #eaf1fa;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.28s ease;
}

.progress-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
  flex: 0 0 auto;
}

.progress-save .icon {
  width: 14px;
  height: 14px;
}

.category-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category {
  padding: 20px 22px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.category-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 5px;
  border-bottom: 1px dashed #e8eef7;
}

.cat-no {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d7e6fb;
  background: linear-gradient(135deg, #f3f9ff, #dbeafe);
  color: var(--blue-600);
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cat-title {
  flex: 1;
  min-width: 0;
}

.cat-title h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.cat-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.cat-count {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid #eaf1fb;
  border-radius: 999px;
  background: #f7fafe;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.cat-count b {
  color: var(--blue-600);
  font-size: 13.5px;
}

.check-list {
  display: flex;
  flex-direction: column;
}

.chk {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s;
}

.chk:hover {
  background: #f8fbff;
  border-color: #e8f1fd;
}

.chk input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chk-box {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid #c8d6e8;
  border-radius: 7px;
  background: #fff;
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.chk-box .icon {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s, transform 0.18s;
}

.chk input:checked ~ .chk-box {
  border-color: var(--blue-600);
  background: linear-gradient(135deg, #3b82f6, #1d5fe0);
  box-shadow: 0 4px 10px -5px rgba(37, 99, 235, 0.8);
}

.chk input:checked ~ .chk-box .icon {
  opacity: 1;
  transform: none;
}

.chk:has(input:focus-visible) {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 1px;
}

.chk.is-on {
  background: #f6faff;
  border-color: #dbeafe;
}

.chk.is-locked {
  background: #f8fafc;
  border-color: #eef2f7;
  cursor: default;
}

.chk.is-locked:hover {
  background: #f8fafc;
  border-color: #eef2f7;
}

.chk.is-locked .chk-box {
  background: #eef2f7;
  border-color: #dbe3ed;
  color: #8fa3b9;
}

.chk.is-locked input:checked ~ .chk-box {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #2563eb;
  box-shadow: none;
}

.chk-no {
  width: 22px;
  flex: 0 0 auto;
  margin-top: 3px;
  color: #93a7c0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.chk-text {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.65;
}

.chk.is-on .chk-text {
  color: var(--ink);
}

.chk-text small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}

.chk-tag {
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.tag-patient {
  background: #eef2f7;
  color: #64748b;
}

.tag-own {
  display: none;
  background: var(--blue-50);
  color: var(--blue-700);
}

.chk.is-on:not(.is-locked) .tag-own {
  display: inline-block;
}

.src-chips {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-top: 2px;
}

.src-chip {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.src-patient {
  color: #0369a1;
  background: #e0f2fe;
}

.src-caregiver {
  color: #6d28d9;
  background: #ede9fe;
}

.src-nurse {
  color: #15803d;
  background: #dcfce7;
}

.chk-other-wrap {
  margin-top: 6px;
  padding: 2px 0 0;
  border: 1px dashed #dbe6f4;
  border-radius: 14px;
  background: #fbfdff;
}

.chk-other-wrap.is-on {
  border-color: #bcd8fa;
  background: #f7fbff;
}

.chk-other .chk-box {
  border-style: dashed;
}

.chk-other-wrap.is-on .chk-other .chk-box {
  border-style: solid;
}

.other-title {
  display: block;
  font-weight: 650;
}

.other-field {
  display: none;
  padding: 0 12px 12px 46px;
}

.other-field.is-open {
  display: block;
}

.other-supplement {
  margin: 2px 0 10px;
  padding: 12px 14px 14px 46px;
  border-top: 1px dashed #e2e9f3;
  background: #f8fbff;
}

.other-supplement-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}

.other-supplement-label span {
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.other-supplement .textarea {
  min-height: 64px;
  background: #fff;
}

.other-source-line {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}
/* 输入控件 */

.text-input,
.textarea {
  width: 100%;
  border: 1px solid #d9e4f2;
  border-radius: 12px;
  background: #fff;
  padding: 11px 13px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.text-input::placeholder,
.textarea::placeholder {
  color: #a3b3c7;
}

.text-input:focus,
.textarea:focus {
  outline: none;
  border-color: #7fb2f5;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

.text-input:disabled {
  background: #f4f7fb;
}

/* 提示 / 汇总 */

.soft-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 4px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.soft-note .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
  color: #8aa4c0;
}

.merge-summary {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 20px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.merge-summary > div:not(.merge-hint) {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.merge-summary b {
  color: var(--blue-700);
  font-size: 22px;
  font-weight: 750;
}

.merge-summary span {
  color: var(--muted);
  font-size: 11.5px;
}

.merge-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
}

.merge-hint .icon {
  width: 14px;
  height: 14px;
}

.role-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.role-hint .icon {
  width: 15px;
  height: 15px;
  color: var(--blue-500);
}

.form-card {
  padding: 20px 22px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.form-card-head h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.form-card-head p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.field-label .optional {
  padding: 2px 7px;
  border-radius: 6px;
  background: #f3f7fc;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.field-help {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.other-eval {
  padding: 14px 0;
  border-top: 1px dashed #e8eef7;
}

.other-eval:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.other-eval-label p {
  margin: 6px 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7faff;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}

.other-eval-label p strong {
  color: var(--ink);
  font-weight: 650;
}

.other-eval-patient {
  border-left: 3px solid #bae6fd;
}

.other-eval-caregiver {
  border-left: 3px solid #c4b5fd;
  background: #faf8ff !important;
}

.empty-inline {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   底部操作栏
   -------------------------------------------------------------------------- */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(219, 231, 245, 0.92);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 -12px 34px -28px rgba(15, 31, 51, 0.4);
}

.action-bar-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.action-summary {
  display: block;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.3;
  color: var(--ink-2);
  font-size: 13px;
}

.action-summary b {
  color: var(--blue-700);
  font-size: 20px;
}

.action-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

body.has-actionbar .app-main {
  padding-bottom: 108px;
}

body.has-actionbar .app-footer {
  display: none;
}

/* --------------------------------------------------------------------------
   结论页
   -------------------------------------------------------------------------- */

.view-conclusion {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 26px;
}

.conclusion-hero {
  position: relative;
  padding: 34px 38px;
  border: 1px solid #dfeaf9;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f9ff 58%, #eaf4ff 100%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.conclusion-hero::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.95), rgba(219, 234, 254, 0) 68%);
  pointer-events: none;
}

.conclusion-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.conclusion-date {
  color: var(--muted);
  font-size: 12px;
}

.conclusion-hero h1 {
  position: relative;
  margin: 16px 0 8px;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.conclusion-hero > p {
  position: relative;
  margin: 0 0 22px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.conclusion-hero > p b {
  color: var(--blue-700);
  font-size: 18px;
}

.conclusion-meta {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #e6eef8;
  border-radius: 14px;
  background: #e6eef8;
  overflow: hidden;
}

.conclusion-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: #fff;
  min-width: 0;
}

.conclusion-meta span {
  color: var(--muted);
  font-size: 10.5px;
}

.conclusion-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 650;
}

.edu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 30px 4px 14px;
}

.edu-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.edu-head span {
  color: var(--muted);
  font-size: 12px;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edu-card {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.edu-index {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--blue-50);
  color: var(--blue-600);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

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

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

.edu-title-row h3 {
  margin: 0;
  font-size: 16.5px;
  letter-spacing: -0.01em;
}

.edu-text {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.95;
}

.inline-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pending-link {
  border-bottom: 1px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 13px;
}

.media-card {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 540px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #dceafb;
  border-radius: 14px;
  background: #f6faff;
  color: inherit;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
}

.media-card:hover {
  border-color: #c3dcfa;
  background: #eff7ff;
}

.media-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d5fe0);
}

.media-icon .icon {
  width: 16px;
  height: 16px;
}

.media-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.media-copy strong {
  font-size: 13.5px;
}

.media-copy small {
  color: var(--muted);
  font-size: 11.5px;
}

.media-arrow {
  color: var(--blue-500);
}

.media-card.is-pending {
  border-style: dashed;
  border-color: #dbe3ee;
  background: #f8fafc;
  cursor: default;
}

.media-video-card {
  max-width: 720px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dceafb;
  border-radius: 14px;
  background: #f6faff;
}

.media-video-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.media-video-title .media-copy strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.media-video-title .media-copy small {
  color: var(--muted);
  font-size: 11px;
}

.media-video {
  display: block;
  width: 100%;
  max-height: 460px;
  border-radius: 10px;
  background: #000;
  object-fit: contain;
}

.media-video-card .print-url {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  word-break: break-all;
}

.media-card.is-pending .media-icon {
  background: #cbd5e1;
}

.badge-pending {
  padding: 3px 8px;
  border-radius: 6px;
  background: #fef3c7;
  color: #b45309;
  font-size: 10.5px;
  white-space: nowrap;
}

.media-image {
  max-width: 520px;
  margin: 16px 0 0;
  border: 1px solid #e6eef8;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.media-image img {
  display: block;
  width: 100%;
  height: auto;
}

.media-image figcaption {
  padding: 10px 12px;
  border-top: 1px solid #eef4fb;
  background: #fbfdff;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.65;
}

.print-url {
  display: none;
}

.empty-edu {
  margin-top: 24px;
  padding: 40px 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  text-align: center;
}

.empty-edu h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.empty-edu p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-edu ul {
  max-width: 520px;
  margin: 14px auto 0;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 2;
  text-align: left;
}

.conclusion-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 10px;
}

.backend-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.backend-note .icon {
  width: 14px;
  height: 14px;
}

.print-head,
.print-foot {
  display: none;
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.app-footer {
  margin-top: 56px;
  padding: 26px 0 40px;
  border-top: 1px solid #e4ecf6;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.footer-links a {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.version-mark {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border: 1px solid #dbe7f4;
  border-radius: 5px;
  background: #f7fafd;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   弹窗 / Toast
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 31, 51, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px -30px rgba(15, 31, 51, 0.55);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.modal-backdrop.is-open .modal {
  transform: none;
}

.modal-title {
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -0.015em;
}

.modal-text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f4f7fb;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  background: #eaf1fb;
  color: var(--ink);
}

.modal-close .icon {
  width: 16px;
  height: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal .field-label {
  margin-top: 4px;
}

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 120;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

body.has-actionbar .toast-root {
  bottom: 104px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0f1f33;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 18px 40px -18px rgba(15, 31, 51, 0.65);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast .icon {
  width: 16px;
  height: 16px;
  color: #4ade80;
}

.toast-error .icon {
  color: #fca5a5;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 920px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 300px;
    padding: 38px 32px;
  }

  .hero h1 {
    font-size: 40px;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 34px 30px;
  }

  .hero-art {
    display: none;
  }

  .hero h1 {
    font-size: 38px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .only-mobile {
    display: inline;
  }
}

@media (max-width: 680px) {
  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-inner {
    height: 66px;
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .brand-full {
    display: none;
  }

  .brand-short {
    display: inline;
  }

  .brand-date {
    margin-top: 1px;
    font-size: 10.5px;
  }

  .date-full {
    display: none;
  }

  .date-short {
    display: inline;
  }

  .brand-text small {
    display: none;
  }

  .profile {
    gap: 8px;
    padding: 4px 6px 4px 4px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }

  .avatar .icon {
    width: 16px;
    height: 16px;
  }

  .profile-label {
    font-size: 9px;
    letter-spacing: 0.05em;
  }

  .profile-text strong {
    max-width: 100px;
    font-size: 12.5px;
  }

  .nickname-edit {
    padding: 6px;
  }

  .nickname-edit span {
    display: none;
  }

  .stepper-wrap {
    padding: 0 0 8px;
  }

  .stepper {
    padding: 0 12px;
  }

  .stepper-inner {
    padding: 6px 10px;
  }

  .step {
    gap: 6px;
    padding: 4px 6px;
    font-size: 11.5px;
  }

  .step-dot {
    width: 23px;
    height: 23px;
    font-size: 11px;
  }

  .step-label {
    white-space: nowrap;
  }

  .view-home {
    padding-top: 18px;
  }

  .hero {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .hero-actions .btn {
    flex: 1;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-actions {
    gap: 10px;
  }

  .draft-banner {
    flex-wrap: wrap;
    padding: 13px 14px;
  }

  .draft-copy {
    flex: 1 1 100%;
    order: 2;
  }

  .draft-icon {
    order: 1;
  }

  .draft-actions {
    order: 3;
    margin-left: 52px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-tools {
    width: 100%;
    justify-content: space-between;
  }

  .record-card {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 15px;
  }

  .record-main {
    flex: 1 1 100%;
  }

  .record-metrics {
    margin-left: 22px;
  }

  .record-card > .btn {
    margin-left: auto;
  }

  .page-head {
    padding: 20px 2px 14px;
  }

  .page-head h1 {
    font-size: 25px;
  }

  .page-head p {
    font-size: 13px;
  }

  .progress-card {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .progress-copy {
    flex: 1;
  }

  .progress-copy strong b {
    font-size: 19px;
  }

  .progress-track {
    order: 3;
    flex: 1 1 100%;
  }

  .progress-save {
    font-size: 11px;
  }

  .category {
    padding: 16px 14px 10px;
    border-radius: 20px;
  }

  .category-head {
    gap: 10px;
    padding-bottom: 12px;
  }

  .cat-no {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 12px;
  }

  .cat-title h2 {
    font-size: 15.5px;
  }

  .cat-title p {
    font-size: 11px;
  }

  .cat-count {
    padding: 3px 8px;
    font-size: 10.5px;
  }

  .chk {
    gap: 10px;
    padding: 11px 8px;
  }

  .chk-box {
    width: 21px;
    height: 21px;
  }

  .chk-no {
    width: 19px;
    font-size: 10px;
  }

  .chk-text {
    font-size: 14px;
  }

  .chk-tag {
    display: inline-block;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
  }

  .chk-tag.tag-own {
    display: none;
  }

  .chk.is-on:not(.is-locked) .tag-own {
    display: none;
  }

  .src-chips {
    margin-top: 1px;
  }

  .other-field {
    padding-left: 38px;
  }

  .other-supplement {
    padding-left: 38px;
  }

  .merge-summary {
    gap: 16px;
    padding: 12px 15px;
  }

  .merge-summary b {
    font-size: 19px;
  }

  .merge-hint {
    font-size: 10.5px;
  }

  .form-card {
    padding: 16px;
    border-radius: 20px;
  }

  .action-bar-inner {
    padding: 0 14px;
    gap: 10px;
  }

  .action-summary {
    display: none;
  }

  .action-buttons {
    flex: 1;
  }

  .action-buttons .btn {
    flex: 1;
    padding-left: 12px;
    padding-right: 12px;
  }

  .action-buttons .btn .icon {
    display: none;
  }

  .view-conclusion {
    padding-top: 18px;
  }

  .conclusion-hero {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .conclusion-hero h1 {
    font-size: 26px;
  }

  .conclusion-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edu-card {
    gap: 12px;
    padding: 18px 16px;
    border-radius: 18px;
  }

  .edu-index {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 11.5px;
  }

  .edu-title-row h3 {
    font-size: 15.5px;
  }

  .edu-text {
    font-size: 14.5px;
    line-height: 1.9;
  }

  .conclusion-actions .btn {
    flex: 1 1 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .app-footer {
    margin-top: 40px;
    padding: 22px 0 32px;
  }

  .toast-root {
    bottom: 88px;
  }
}

@media (max-width: 420px) {
  .step {
    font-size: 10.5px;
    padding: 3px 4px;
    gap: 5px;
  }

  .step-dot {
    width: 21px;
    height: 21px;
    font-size: 10px;
  }

  .step-line {
    min-width: 4px;
  }

  .brand-text strong {
    font-size: 13.5px;
  }

  .profile-text strong {
    max-width: 92px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-chips span:nth-child(3) {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   打印
   -------------------------------------------------------------------------- */

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  html,
  body {
    background: #fff !important;
    color: #000;
  }

  .app-header,
  .app-footer,
  .stepper-wrap,
  .action-bar,
  .no-print,
  .toast-root,
  .modal-root,
  .modal-backdrop,
  .backend-note,
  .soft-note {
    display: none !important;
  }

  .app-main {
    max-width: none;
    padding: 0 !important;
    margin: 0;
    min-height: 0;
  }

  .view-conclusion {
    max-width: none;
    width: 182mm;
    margin: 0 auto;
    padding: 0;
  }

  .print-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px 12px;
    padding-bottom: 9px;
    margin-bottom: 16px;
    border-bottom: 2px solid #1e3a8a;
  }

  .print-brand {
    color: #1e3a8a;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .print-meta {
    color: #333;
    font-size: 9.5pt;
    text-align: right;
    line-height: 1.5;
  }

  .conclusion-hero {
    padding: 14px 0;
    border: 0;
    border-top: 1px solid #d5dde8;
    border-bottom: 1px solid #d5dde8;
    border-radius: 0;
    background: #fff !important;
    box-shadow: none;
    overflow: visible;
  }

  .conclusion-hero::before {
    display: none;
  }

  .conclusion-hero h1 {
    margin: 8px 0 6px;
    font-size: 22pt;
  }

  .conclusion-hero > p {
    margin-bottom: 12px;
    font-size: 10.5pt;
  }

  .conclusion-meta {
    border-color: #d5dde8;
    background: #d5dde8;
  }

  .conclusion-meta > div {
    padding: 8px 10px;
  }

  .edu-head {
    margin: 16px 0 10px;
    break-after: avoid;
    page-break-after: avoid;
  }

  .edu-head h2 {
    font-size: 15pt;
  }

  .edu-list {
    display: block;
    gap: 0;
  }

  .edu-card {
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #d5dde8;
    border-radius: 8px;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .edu-index {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #eef4fb !important;
    color: #1e40af !important;
    font-size: 9pt;
  }

  .edu-title-row h3 {
    font-size: 12pt;
  }

  .edu-text {
    margin-top: 6px;
    font-size: 11.5pt;
    line-height: 1.8;
    color: #111;
  }

  .src-chip {
    display: none;
  }

  .media-card {
    max-width: 100% !important;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #d5dde8 !important;
    background: #fff !important;
    print-color-adjust: exact;
  }

  .media-icon {
    width: 28px;
    height: 28px;
    background: #1e40af !important;
    print-color-adjust: exact;
  }

  .media-image {
    max-width: 78mm;
    margin-top: 10px;
  }

  .print-url {
    display: block;
    margin: 4px 0 0;
    color: #444;
    font-size: 7.5pt;
    line-height: 1.4;
    word-break: break-all;
  }

  .inline-link {
    display: inline;
    overflow: visible;
    white-space: normal;
    word-break: break-all;
    text-overflow: clip;
  }

  .media-copy small {
    display: none;
  }

  .print-foot {
    display: none !important;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .level-pill {
    border: 1px solid #999;
    background: #fff !important;
    color: #000 !important;
  }

  .empty-edu {
    border: 1px solid #d5dde8;
    box-shadow: none;
  }
}

/* 患者身份核验 */
.gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 31, 51, 0.46);
  backdrop-filter: blur(5px);
}
.gate-backdrop[hidden] {
  display: none !important;
}
.gate-card {
  width: min(480px, 100%);
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 31, 51, 0.24);
}
.gate-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.gate-card h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.35;
}
.gate-lead {
  margin: 0 0 18px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
}
.gate-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}
.gate-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #cfddec;
  border-radius: 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  outline: none;
}
.gate-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.gate-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0 14px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}
.gate-consent input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--blue-600);
  flex: none;
}
.gate-consent a {
  color: var(--blue-600);
  font-weight: 650;
}
.gate-error {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff2f2;
  color: #b42318;
  font-size: 12px;
}
.gate-submit {
  width: 100%;
  min-height: 48px;
}
.gate-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
@media (max-width: 560px) {
  .gate-card { padding: 22px 18px; border-radius: 16px; }
  .gate-card h2 { font-size: 21px; }
}

/* ------------------------------------------------------------------ */
/* 出入量小记 / 出入量登记表                                           */
/* ------------------------------------------------------------------ */
.intake-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin: 8px 0 22px;
}
.intake-head h1 { margin: 8px 0 8px; font-size: 32px; letter-spacing: -.03em; }
.intake-head p { margin: 0; max-width: 720px; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.intake-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr);
  gap: 22px;
  align-items: start;
}
.intake-form-card,
.intake-guide,
.intake-recent {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.intake-form-card { padding: 18px; }
.intake-kind-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #f2f6fb;
  margin-bottom: 16px;
}
.intake-kind-tab {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 26px;
  cursor: pointer;
}
.intake-kind-tab.is-active { background: #fff; color: #1457c8; box-shadow: 0 2px 8px rgba(31, 77, 150, .1); }
.intake-form { display: grid; gap: 14px; }
.intake-datetime { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.intake-datetime label,
.intake-row label,
.intake-conversion-row label,
.intake-note-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.intake-datetime label { width: 150px; }
.intake-datetime label span,
.intake-row label > span,
.intake-conversion-row label > span,
.intake-note-row > span {
  color: #5a6b80;
  font-size: 11.5px;
  font-weight: 600;
}
.intake-datetime small { color: var(--muted); font-size: 11px; padding-bottom: 9px; }
.intake-datetime input,
.intake-row input,
.intake-row select,
.intake-conversion-row input,
.intake-note-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fbfdff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 9px 11px;
}
.intake-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.intake-conversion-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.intake-inline { display: flex; align-items: center; gap: 7px; }
.intake-inline input { flex: 1; }
.intake-inline b { color: #1457c8; font-size: 12px; white-space: nowrap; }
.intake-convert-result {
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f3f8ff;
  color: #315273;
  font-size: 13px;
}
.intake-convert-result strong { color: #1457c8; font-size: 22px; margin: 0 3px; }
.intake-hint { margin: 0; color: #728196; font-size: 11.5px; line-height: 1.6; }
.intake-message { min-height: 18px; margin: 0; color: #b42318; font-size: 12px; }
.intake-submit { width: 100%; min-height: 46px; }
.intake-guide { padding: 18px; }
.intake-guide h2,
.intake-recent h2 { margin: 0 0 8px; font-size: 17px; }
.intake-guide ol { margin: 0 0 12px; padding-left: 18px; color: #596a7d; font-size: 12px; line-height: 1.8; }
.intake-guide details { border-top: 1px solid #edf2f7; padding: 10px 0; }
.intake-guide summary { cursor: pointer; color: #1457c8; font-size: 12px; font-weight: 700; }
.intake-ref-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 10.5px; }
.intake-ref-table th,
.intake-ref-table td { border: 1px solid #e3ebf4; padding: 5px 4px; text-align: left; }
.intake-ref-table th { background: #f5f9fe; color: #52677e; font-weight: 600; }
.intake-source { margin: 10px 0 0; color: #8a98aa; font-size: 10px; line-height: 1.5; }
.intake-recent { margin-top: 24px; padding: 20px; }
.intake-event-list { display: grid; gap: 8px; }
.intake-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #edf2f8;
  border-radius: 12px;
  background: #fbfdff;
}
.intake-event-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.intake-event-main strong { color: var(--ink); font-size: 12.5px; }
.intake-event-main span { color: #1457c8; font-size: 14px; font-weight: 700; }
.intake-event-meta { color: #7a899b; font-size: 10.5px; text-align: right; line-height: 1.5; }
.intake-event .link-btn { flex: 0 0 auto; }
.intake-panel[hidden],
.intake-row [hidden],
.intake-conversion-row [hidden] { display: none !important; }
.intake-filter-card { padding: 16px 18px; }
.intake-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.intake-panel-head h2 { margin: 0 0 5px; font-size: 18px; }
.intake-panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.intake-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(2, minmax(130px, .8fr)) minmax(110px, .7fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 15px;
}
.intake-filter-grid label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.intake-filter-grid label > span { color: #5a6b80; font-size: 11px; font-weight: 600; }
.intake-filter-grid input,
.intake-filter-grid select { width: 100%; min-height: 38px; border: 1px solid #dbe4ef; border-radius: 9px; background: #fbfdff; padding: 7px 9px; font: inherit; font-size: 12px; }
.intake-table-card { margin-top: 14px; padding: 0; overflow: hidden; }
.intake-patient-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid #edf2f7; background: #fbfdff; }
.intake-patient-head div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.intake-patient-head strong { font-size: 15px; }
.intake-patient-head span { color: #63758a; font-size: 11.5px; }
.intake-patient-head small { color: #8b9aab; font-size: 10.5px; white-space: nowrap; }
.intake-table { min-width: 980px; }
.intake-table th { white-space: nowrap; }
.intake-table td { font-size: 11.5px; }
.intake-table .time { white-space: nowrap; color: #64748b; }
@media (max-width: 980px) {
  .intake-layout { grid-template-columns: 1fr; }
  .intake-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-filter-grid .btn { width: 100%; }
}
@media (max-width: 620px) {
  .intake-head { flex-direction: column; gap: 10px; }
  .intake-head h1 { font-size: 27px; }
  .intake-row,
  .intake-conversion-row { grid-template-columns: 1fr; }
  .intake-datetime label { width: calc(50% - 6px); }
  .intake-event { align-items: flex-start; flex-wrap: wrap; }
  .intake-event-meta { width: 100%; text-align: left; }
  .intake-patient-head { flex-direction: column; align-items: flex-start; }
  .intake-filter-grid { grid-template-columns: 1fr; }
}
.intake-row[hidden],
.intake-conversion-row[hidden],
.intake-row label[hidden],
.intake-conversion-row label[hidden],
.intake-row [hidden],
.intake-conversion-row [hidden] {
  display: none !important;
}
/* 首页双模块 */
.home-modules {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 20px;
  margin: 8px 0 18px;
}
.home-module {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 10px;
  min-height: 360px;
  padding: 28px;
  border: 1px solid #dce8f5;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.home-module.module-fall { background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%); }
.home-module.module-intake { background: linear-gradient(135deg, #f7fdff 0%, #eefaf7 100%); border-color: #d8eee8; }
.home-module h1 { margin: 10px 0 10px; font-size: clamp(30px, 3vw, 44px); line-height: 1.15; letter-spacing: -.04em; }
.home-module p { margin: 0 0 16px; color: #5e7086; font-size: 13px; line-height: 1.8; }
.home-module .hero-chips { margin-bottom: 20px; }
.home-module .module-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.home-module .module-actions .btn { min-height: 44px; }
.module-footnote { display: block; margin-top: 14px; color: #8a98aa; font-size: 11px; }
.home-module-art { align-self: center; justify-self: center; width: 200px; max-width: 100%; opacity: .95; }
.home-module-art svg { width: 100%; height: auto; }
.intake-art { position: relative; height: 180px; }
.intake-art-ring {
  position: absolute;
  inset: 10px 20px 10px auto;
  width: 150px;
  height: 150px;
  border: 14px solid rgba(33, 157, 139, .18);
  border-radius: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  color: #168c7b;
  font-size: 22px;
  font-weight: 800;
}
.intake-art-card {
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 128px;
  padding: 14px;
  border: 1px solid #d9eee9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(25, 110, 96, .12);
  transform: rotate(-5deg);
}
.intake-art-card b { display: block; color: #168c7b; font-size: 30px; line-height: 1; }
.intake-art-card small { display: block; margin-top: 5px; color: #78958e; font-size: 10px; }
.record-type-chip {
  display: inline-block;
  margin-bottom: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #e9f2ff;
  color: #1d5fe0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.record-type-chip.is-intake { background: #e6f8f3; color: #13806e; }
.intake-record-card .record-metrics { justify-content: flex-end; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.feature-grid[hidden] { display: none !important; }

/* 自定义选择控件，避免原生下拉占满屏幕 */
.intake-section-label { margin: 14px 0 7px; color: #4f6277; font-size: 11.5px; font-weight: 700; }
.intake-section-label:first-child { margin-top: 2px; }
.intake-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.intake-choice {
  min-height: 56px;
  border: 1px solid #dbe7f3;
  border-radius: 13px;
  background: #fbfdff;
  color: #5e7086;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .16s ease;
}
.intake-choice.is-active { border-color: #4d8df5; background: #eef6ff; color: #1457c8; box-shadow: 0 0 0 3px rgba(77, 141, 245, .1); }
.intake-food-block { display: block; }
.intake-food-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  color: #1d334d;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.intake-food-trigger-action { color: #1457c8; font-size: 11px; font-weight: 600; white-space: nowrap; }
.intake-quick-foods { display: flex; gap: 6px; overflow-x: auto; padding: 9px 1px 2px; scrollbar-width: thin; }
.intake-quick-food {
  display: grid;
  gap: 2px;
  min-width: 88px;
  padding: 8px 9px;
  border: 1px solid #e4edf5;
  border-radius: 10px;
  background: #fbfdff;
  color: #42566d;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.intake-quick-food strong { font-size: 11.5px; }
.intake-quick-food small { color: #8a9aab; font-size: 9.5px; }
.intake-quick-food.is-active { border-color: #68a3f3; background: #eff7ff; color: #1457c8; }
.intake-mode-tabs { display: flex; gap: 5px; padding: 4px; border-radius: 11px; background: #f2f6fb; }
.intake-mode-tabs button {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.intake-mode-tabs button.is-active { background: #fff; color: #1457c8; box-shadow: 0 2px 6px rgba(31, 77, 150, .12); }
.intake-mode-tabs button:disabled { opacity: .35; cursor: not-allowed; }
.intake-water-only { margin-top: 6px; padding: 12px; border: 1px dashed #cfe3f6; border-radius: 12px; background: #f8fbff; }
.intake-water-only .intake-section-label { margin-top: 0; }
.intake-big-input { display: flex; align-items: center; gap: 7px; }
.intake-big-input input { flex: 1; min-height: 48px; font-size: 20px; font-weight: 800; color: #1457c8; }
.intake-big-input b { color: #5d7188; font-size: 12px; white-space: nowrap; }
.intake-quick-amounts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.intake-quick-amounts button {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #dbe8f6;
  border-radius: 7px;
  background: #fff;
  color: #3f6f9f;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.intake-custom-row { margin-top: 12px; }
.intake-custom-row label { display: flex; flex-direction: column; gap: 6px; }
.intake-custom-row label span { color: #5a6b80; font-size: 11.5px; font-weight: 600; }
.intake-custom-row input { min-height: 42px; border: 1px solid #dbe4ef; border-radius: 10px; padding: 9px 11px; font: inherit; }
.intake-output-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.intake-output-tile {
  display: grid;
  gap: 3px;
  min-height: 60px;
  padding: 9px 5px;
  border: 1px solid #dbe7f3;
  border-radius: 11px;
  background: #fbfdff;
  color: #52677e;
  font: inherit;
  cursor: pointer;
}
.intake-output-tile strong { font-size: 12px; }
.intake-output-tile small { color: #93a1b1; font-size: 9.5px; }
.intake-output-tile.is-active { border-color: #4d8df5; background: #eef6ff; color: #1457c8; }
.intake-picker { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.intake-picker-backdrop { position: absolute; inset: 0; background: rgba(15, 35, 60, .36); backdrop-filter: blur(2px); }
.intake-picker-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(78vh, 680px);
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid #dbe8f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(18, 43, 75, .25);
}
.intake-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.intake-picker-head h3 { margin: 0; font-size: 18px; }
.intake-picker-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.intake-picker-close { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #f1f5f9; color: #53657a; font-size: 22px; line-height: 1; cursor: pointer; }
.intake-search { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; padding: 0 11px; border: 1px solid #dbe7f3; border-radius: 10px; background: #fbfdff; }
.intake-search .icon { width: 16px; height: 16px; color: #7b8da1; }
.intake-search input { flex: 1; min-height: 40px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; }
.intake-picker-panel { overflow-y: auto; }
.intake-picker-group h4 { margin: 14px 0 7px; color: #64748b; font-size: 11px; }
.intake-picker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.intake-picker-item {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid #e5edf5;
  border-radius: 9px;
  background: #fbfdff;
  color: #40556c;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.intake-picker-item strong { font-size: 12px; }
.intake-picker-item span { color: #8b9aab; font-size: 9.5px; }
.intake-picker-item.is-active { border-color: #5f9df5; background: #eef6ff; color: #1457c8; }
.intake-picker-custom { margin-top: 12px; min-height: 40px; border: 1px dashed #cbdff2; border-radius: 9px; background: #f8fbff; color: #3c6c9d; font: inherit; font-size: 11.5px; cursor: pointer; }
@media (max-width: 1100px) {
  .home-modules { grid-template-columns: 1fr; }
  .home-module { min-height: 0; }
  .intake-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .home-module { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 18px; }
  .home-module-art { display: none; }
  .home-module h1 { font-size: 31px; }
  .intake-output-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intake-picker { padding: 10px; }
  .intake-picker-panel { max-height: 88vh; padding: 14px; }
  .intake-picker-grid { grid-template-columns: 1fr 1fr; }
}
.intake-picker[hidden],
.intake-water-only[hidden],
.intake-custom-row[hidden],
.intake-food-block[hidden],
.intake-mode-block[hidden] {
  display: none !important;
}
.intake-layout,
.intake-form-card,
.intake-guide,
.intake-form,
.intake-food-block,
.intake-quick-foods { min-width: 0; max-width: 100%; }
.intake-form-card { box-sizing: border-box; overflow: hidden; }
.intake-food-trigger { box-sizing: border-box; max-width: 100%; }
/* 首页模块紧凑化：文字优先，插画作为背景水印 */
.home-module {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 26px;
}
.home-module-copy { position: relative; z-index: 2; max-width: none; }
.home-module h1 { font-size: clamp(30px, 2.7vw, 40px); white-space: nowrap; }
.home-module p { max-width: 430px; }
.home-module .hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.home-module .module-actions { gap: 9px; }
.home-module-art {
  position: absolute;
  right: -18px;
  bottom: -28px;
  z-index: 1;
  width: 190px;
  opacity: .16;
  pointer-events: none;
}
.home-module-art.intake-art { opacity: .16; transform: scale(.86); transform-origin: bottom right; }
@media (max-width: 1100px) {
  .home-module h1 { white-space: normal; }
}
@media (max-width: 720px) {
  .home-module { min-height: 0; }
  .home-module-art { display: none; }
}
/* 出入量页面改为单列，优先保证表单可读性和手机操作 */
.intake-layout { grid-template-columns: 1fr; gap: 16px; align-items: stretch; }
.intake-form-card, .intake-guide { width: 100%; max-width: 940px; }
.intake-guide { display: block; }
.intake-guide details { margin-top: 8px; }
@media (min-width: 1101px) {
  .intake-form-card { margin: 0 auto; }
  .intake-guide { margin: 0 auto; }
}
/* 移动端防止横向溢出 */
html, body { max-width: 100%; overflow-x: hidden; }
.view-intake,
.intake-layout,
.intake-form-card,
.intake-form { min-width: 0; width: 100%; box-sizing: border-box; }
.intake-form input,
.intake-form select,
.intake-form button { box-sizing: border-box; max-width: 100%; }
@media (max-width: 620px) {
  .intake-form-card { padding: 14px; border-radius: 16px; }
  .intake-datetime { gap: 8px; }
  .intake-datetime label { width: calc(50% - 8px); }
  .intake-datetime small { flex-basis: 100%; padding-bottom: 0; }
  .intake-choice-row { grid-template-columns: 1fr 1fr; }
  .intake-choice { min-height: 50px; font-size: 12px; }
  .intake-mode-tabs button { font-size: 10.5px; padding: 0 4px; }
  .intake-quick-food { min-width: 82px; }
  .intake-quick-foods { width: 100%; max-width: 100%; }
  .intake-food-trigger { font-size: 12px; }
  .intake-food-trigger-action { font-size: 10px; }
  .intake-conversion-row { grid-template-columns: 1fr; }
  .intake-output-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intake-big-input input { font-size: 18px; }
  .intake-submit { position: sticky; bottom: 8px; z-index: 5; box-shadow: 0 8px 20px rgba(37, 99, 235, .22); }
}
@media (max-width: 620px) {
  .view-intake { padding-left: 12px !important; padding-right: 12px !important; }
  .intake-form-card {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .intake-head h1 { font-size: 30px; }
  .intake-head p { font-size: 12px; }
  .intake-datetime { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .intake-datetime label { width: auto; }
  .intake-datetime small { grid-column: 1 / -1; }
  .intake-quick-foods { overflow-x: auto; }
  .intake-picker-panel { width: calc(100vw - 20px); }
}
/* 关键：grid/flex 子项允许收缩，避免移动端被原生控件撑宽 */
.intake-datetime { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
.intake-datetime label,
.intake-datetime input,
.intake-choice-row,
.intake-choice,
.intake-conversion-row,
.intake-conversion-row label,
.intake-conversion-row input,
.intake-section-label { min-width: 0 !important; }
.intake-choice { width: 100%; }
.intake-datetime input { width: 100%; min-width: 0 !important; }@media (max-width: 620px) {
  .intake-datetime { grid-template-columns: 1fr !important; }
  .intake-datetime small { grid-column: 1; }
  .intake-choice-row { grid-template-columns: 1fr !important; }
  .intake-choice { min-height: 48px; }
}
/* 选择面板搜索过滤 */
.intake-picker-item[hidden],
.intake-picker-group[hidden] {
  display: none !important;
}
/* 首页模块等宽、右下角清晰图标 */
.home-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-module-art.module-art-badge {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 96px;
  height: 96px;
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(46, 125, 220, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 12px 28px rgba(47, 106, 170, .10);
  backdrop-filter: blur(4px);
}
.home-module-art.module-art-badge .icon { width: 34px; height: 34px; }
.home-module-art.module-art-badge span { font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.module-art-fall { color: #2c72d6; }
.module-art-intake { color: #168c7b; border-color: rgba(22, 140, 123, .18); }
@media (max-width: 1100px) {
  .home-modules { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .home-module-art.module-art-badge { display: none; }
}
/* 出入量记录修改提示与卡片按钮 */
.intake-edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 940px;
  margin: 0 auto 14px;
  padding: 11px 14px;
  border: 1px solid #f4d58a;
  border-radius: 12px;
  background: #fffbeb;
}
.intake-edit-banner div { display: grid; gap: 3px; }
.intake-edit-banner strong { color: #92400e; font-size: 12.5px; }
.intake-edit-banner span { color: #a16207; font-size: 10.5px; }
.intake-record-card .record-main { align-items: flex-start; }
.intake-record-card .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .intake-edit-banner { align-items: flex-start; }
  .intake-record-card .record-metrics { justify-content: flex-start; }
  .intake-record-card .btn { width: 100%; }
}
/* 按天折叠的出入量记录 */
.intake-day-list { display: grid; gap: 10px; }
.intake-day {
  border: 1px solid #e4edf6;
  border-radius: 14px;
  background: #fbfdff;
  overflow: hidden;
}
.intake-day summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.intake-day summary::-webkit-details-marker { display: none; }
.intake-day summary::marker { content: ""; }
.intake-day-title { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.intake-day-title strong { color: #263b53; font-size: 13px; }
.intake-day-title span { color: #8a9aab; font-size: 10.5px; }
.intake-day-totals { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.intake-day-totals span {
  padding: 4px 7px;
  border-radius: 6px;
  background: #eef6ff;
  color: #31659e;
  font-size: 10.5px;
  white-space: nowrap;
}
.intake-day-chevron { width: 16px; height: 16px; display: grid; place-items: center; color: #8aa0b6; transition: transform .18s ease; flex: 0 0 auto; }
.intake-day-chevron .icon { width: 14px; height: 14px; transform: rotate(90deg); }
.intake-day[open] .intake-day-chevron .icon { transform: rotate(-90deg); }
.intake-day-records { display: grid; gap: 6px; padding: 0 10px 10px; border-top: 1px solid #edf3f9; }
.intake-event-actions { display: flex; gap: 8px; flex: 0 0 auto; align-items: center; }
.intake-event-actions .danger { color: #b42318; }
.intake-day-records .intake-event { background: #fff; }
@media (max-width: 720px) {
  .intake-day summary { align-items: flex-start; flex-wrap: wrap; }
  .intake-day-title { flex-basis: 100%; }
  .intake-day-totals { justify-content: flex-start; }
  .intake-day-chevron { position: absolute; right: 14px; margin-top: 2px; }
  .intake-day { position: relative; }
  .intake-day-records .intake-event { flex-wrap: wrap; }
  .intake-event-actions { width: 100%; justify-content: flex-end; }
}
/* 出入量记录与跌倒评估左对齐，并补充患者姓名 */
.intake-dot {
  background: #1f9d8b;
  box-shadow: 0 0 0 3px rgba(31, 157, 139, .12);
}
.intake-record-card .record-main { align-items: flex-start; }
.intake-record-card .record-title { min-width: 0; }
.intake-record-card .record-title p { overflow-wrap: anywhere; }
/* 首页我的记录：出入量在上、跌倒评估在下 */
.record-category { margin-top: 16px; }
.record-category + .record-category { margin-top: 22px; }
.record-category-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 2px 9px;
}
.record-category-head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.record-category-head span { color: #8796a8; font-size: 11px; }
.home-intake-days { display: grid; gap: 9px; }
.home-intake-day { background: #fff; }
.home-intake-day .intake-day-records { padding: 0 9px 9px; }
.home-intake-day .intake-event-actions { display: none; }
.home-intake-day .intake-record-card { margin: 0; }
.home-intake-day .intake-record-card .record-metrics { display: none; }
.empty-category {
  padding: 18px;
  border: 1px dashed #dbe6f1;
  border-radius: 14px;
  background: #fbfdff;
  text-align: center;
}
.empty-category strong { display: block; color: #34495f; font-size: 13px; }
.empty-category p { margin: 5px 0 10px; color: #8a98aa; font-size: 11.5px; }
@media (max-width: 720px) {
  .record-category-head { align-items: center; }
  .home-intake-day summary { padding: 11px; }
}
/* 首页说明信息与按钮的视觉区分 */
.home-module .hero-chips {
  gap: 14px;
  margin: 0 0 20px;
}
.home-module .hero-chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #7f91a5;
  font-size: 11px;
  font-weight: 500;
  cursor: default;
}
.home-module .hero-chips .icon {
  width: 13px;
  height: 13px;
  opacity: .7;
}
.home-module-art.module-art-badge {
  width: auto;
  height: auto;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: .38;
  pointer-events: none;
  user-select: none;
}
.home-module-art.module-art-badge .icon { width: 42px; height: 42px; }
.home-module-art.module-art-badge span {
  color: currentColor;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
}
@media (max-width: 720px) {
  .home-module .hero-chips { gap: 10px 14px; }
  .home-module-art.module-art-badge { display: none; }
}
/* 记录卡状态点与类型标签左对齐 */
.record-main { align-items: flex-start; }
.record-main .level-dot { margin-top: 4px; }
.intake-record-card .record-main .level-dot { margin-top: 4px; }
/* 护理端患者筛选：可输入、下拉只显示当天有记录的患者 */
.intake-patient-field { position: relative; }
.intake-patient-combobox { position: relative; }
#intake-patient-search {
  width: 100%;
  min-height: 38px;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #fbfdff;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  color: #273b51;
}
#intake-patient-search:focus { outline: 2px solid rgba(49, 110, 196, .18); border-color: #78a7e6; }
.intake-patient-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 50, 82, .16);
}
.intake-patient-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #334a61;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.intake-patient-option:hover { background: #f0f7ff; }
.intake-patient-option strong { font-size: 12px; }
.intake-patient-option span { color: #8a9aab; font-size: 10.5px; }
.intake-patient-empty { padding: 12px 9px; color: #8a9aab; font-size: 11px; text-align: center; }
@media (max-width: 980px) {
  .intake-patient-options { max-height: 220px; }
}.intake-patient-option[hidden] { display: none !important; }
/* 首页模块小圆点与记录卡状态色一致 */
.home-module.module-fall .eyebrow-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.home-module.module-intake .eyebrow-dot {
  background: #1f9d8b;
  box-shadow: 0 0 0 3px rgba(31, 157, 139, .12);
}
/* 出入量表单：强制单列，防止快捷食物行撑宽整张表单 */
.intake-form { grid-template-columns: minmax(0, 1fr); }
.intake-form > *,
.intake-form .intake-panel,
.intake-form .intake-datetime,
.intake-form .intake-food-block,
.intake-form .intake-quick-foods { min-width: 0 !important; max-width: 100% !important; width: 100% !important; box-sizing: border-box; }
@media (max-width: 620px) {
  .intake-form-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* 网站备案号：首页底部居中 */
.footer-beian {
  margin-top: 14px;
  color: #8a9aab;
  font-size: 11px;
  text-align: center;
}
.footer-beian a {
  color: #7b8da1;
  text-decoration: none;
}
.footer-beian a:hover {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* PWA 安装按钮 */
.footer-install {
  display: block;
  margin: 12px auto 0;
  padding: 7px 14px;
  border: 1px solid #cfe0f3;
  border-radius: 999px;
  background: #f6faff;
  color: #31679e;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.footer-install[hidden] { display: none !important; }
.footer-install:hover { background: #eef6ff; border-color: #9cc2ea; }
/* 首页页脚紧凑排版，兼容三端 */
.app-footer { margin-top: 28px; padding: 18px 0 24px; font-size: 11px; }
.footer-inner { align-items: flex-start; flex-wrap: wrap; gap: 8px 16px; }
.footer-inner > p { flex: 1 1 420px; max-width: 720px; line-height: 1.6; }
.footer-links { gap: 9px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.footer-install {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid #cfe0f3;
  border-radius: 999px;
  background: #f6faff;
  color: #31679e;
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
}
.footer-install[hidden] { display: none !important; }
.footer-install:hover { background: #eef6ff; border-color: #9cc2ea; }
.footer-beian { margin-top: 7px; font-size: 10.5px; line-height: 1.4; }
@media (max-width: 720px) {
  .app-footer { margin-top: 22px; padding: 14px 0 18px; }
  .footer-inner { flex-direction: column; gap: 8px; }
  .footer-inner > p { flex: none; width: 100%; }
  .footer-links { width: 100%; justify-content: center; margin-left: 0; }
  .footer-beian { margin-top: 6px; }
}