:root {
  color-scheme: light;
  --ink: #153335;
  --ink-strong: #09282b;
  --muted: #668082;
  --muted-light: #8da2a3;
  --surface: #ffffff;
  --surface-soft: #f3f8f7;
  --canvas: #edf4f3;
  --line: #dce9e7;
  --line-strong: #c8dcd9;
  --teal-900: #075b58;
  --teal-800: #0b6965;
  --teal-700: #0f7b74;
  --teal-500: #2ea69c;
  --teal-300: #8fd5cd;
  --teal-100: #dff3f0;
  --teal-50: #eef9f7;
  --blue: #476fa6;
  --amber: #c97920;
  --amber-bg: #fff4df;
  --red: #bc3d45;
  --red-strong: #942f38;
  --red-bg: #fff0f0;
  --green: #2b8062;
  --green-bg: #e8f5ef;
  --shadow-sm: 0 3px 14px rgb(20 70 68 / 7%);
  --shadow-md: 0 12px 36px rgb(19 63 61 / 12%);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --nav-height: 74px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #dfeceb; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgb(101 186 177 / 18%), transparent 32rem),
    linear-gradient(135deg, #e8f1f0 0%, #dce9e8 100%);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
.fatal-error { max-width: 560px; margin: 80px auto; padding: 24px; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgb(46 166 156 / 30%);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: white;
  background: var(--teal-900);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.app-shell {
  position: relative;
  width: 100%;
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: clip;
  background: var(--surface-soft);
  box-shadow: 0 0 55px rgb(28 72 70 / 14%);
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: max(12px, env(safe-area-inset-top)) 20px 10px;
  border-bottom: 1px solid rgb(214 230 227 / 78%);
  background: rgb(247 251 250 / 88%);
  backdrop-filter: blur(18px) saturate(150%);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink-strong);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--teal-700);
  background: var(--teal-100);
}
.brand-mark svg { width: 27px; height: 27px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }

.header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.icon-button, .avatar-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatar-button { border: 0; color: white; background: linear-gradient(145deg, var(--teal-500), var(--teal-800)); font-weight: 750; }

main { padding-bottom: calc(var(--nav-height) + 34px + env(safe-area-inset-bottom)); }
.page { padding: 22px 18px 36px; animation: page-in .28s ease both; }
.page[hidden] { display: none; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 2px 20px;
}
.compact-intro { margin-bottom: 16px; }
.with-action { align-items: center; }
.eyebrow, .section-kicker, .overline, .report-label {
  margin: 0 0 5px;
  color: var(--teal-700);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; color: var(--ink-strong); font-size: clamp(25px, 6.8vw, 32px); line-height: 1.18; letter-spacing: -.035em; }
h2 { margin-bottom: 0; color: var(--ink-strong); font-size: 19px; line-height: 1.3; letter-spacing: -.02em; }
.subtle { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.demo-chip {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 9px 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.demo-chip svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); box-shadow: 0 0 0 4px rgb(46 166 156 / 12%); }

.bp-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 21px 19px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 92% -4%, rgb(122 220 210 / 32%), transparent 14rem),
    radial-gradient(circle at -10% 120%, rgb(41 134 128 / 45%), transparent 15rem),
    linear-gradient(145deg, #0d716c 0%, #095d5a 54%, #074c4b 100%);
  box-shadow: 0 18px 42px rgb(6 82 78 / 24%);
}
.bp-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -72px;
  width: 190px;
  height: 190px;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 50%;
  box-shadow: 0 0 0 23px rgb(255 255 255 / 3%), 0 0 0 48px rgb(255 255 255 / 2%);
  pointer-events: none;
}
.hero-topline { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bp-hero .overline { color: rgb(225 248 245 / 78%); }
.hero-time { margin: 0; color: rgb(239 252 250 / 77%); font-size: 11px; }
.status-pill { padding: 7px 10px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 999px; color: white; background: rgb(255 255 255 / 12%); font-size: 11px; font-weight: 700; backdrop-filter: blur(10px); }
.status-pill.good { color: #d8fff4; background: rgb(94 205 171 / 18%); }
.status-pill.attention, .status-pill.warning { color: #fff1cf; background: rgb(255 185 72 / 18%); }
.status-pill.danger { color: white; background: rgb(255 99 104 / 26%); }

.bp-reading { position: relative; z-index: 1; display: flex; align-items: flex-end; margin: 21px 0 24px; }
.bp-number-block { display: flex; flex-direction: column; }
.bp-number {
  font-size: clamp(55px, 16vw, 76px);
  font-weight: 690;
  line-height: .88;
  letter-spacing: -.065em;
  font-variant-numeric: tabular-nums;
}
.bp-label { margin-top: 10px; color: rgb(225 248 245 / 66%); font-size: 10px; font-weight: 650; letter-spacing: .08em; }
.bp-divider { align-self: center; margin: 0 9px 7px 6px; color: rgb(255 255 255 / 34%); font-size: 45px; font-weight: 300; }
.bp-unit { margin: 0 0 27px 9px; color: rgb(225 248 245 / 68%); font-size: 10px; }
.hero-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding-top: 15px; border-top: 1px solid rgb(255 255 255 / 13%); }
.pulse-metric { display: flex; gap: 9px; align-items: center; }
.pulse-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: rgb(255 255 255 / 10%); }
.pulse-icon svg { width: 20px; fill: none; stroke: white; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pulse-metric small { display: block; color: rgb(225 248 245 / 64%); font-size: 9px; }
.pulse-metric strong { font-size: 19px; font-weight: 680; font-variant-numeric: tabular-nums; }
.pulse-metric em { color: rgb(225 248 245 / 62%); font-size: 9px; font-style: normal; font-weight: 500; }
.ghost-on-dark { min-height: 38px; padding: 8px 0 8px 12px; border: 0; color: rgb(241 255 253 / 84%); background: transparent; font-size: 11px; font-weight: 650; cursor: pointer; }
.ghost-on-dark span { margin-left: 4px; }

.triage-slot:empty { display: none; }
.triage-slot { margin-top: 14px; }
.triage-banner { display: flex; gap: 12px; padding: 15px; border: 1px solid #f0d39c; border-radius: var(--radius-md); background: var(--amber-bg); box-shadow: var(--shadow-sm); }
.triage-banner.emergency { border-color: #e9b7b9; background: var(--red-bg); }
.triage-symbol { display: grid; flex: none; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: var(--amber); background: rgb(255 255 255 / 72%); font-size: 18px; font-weight: 800; }
.triage-banner.emergency .triage-symbol { color: var(--red); }
.triage-banner h3 { margin: 0 0 4px; color: #704512; font-size: 14px; line-height: 1.35; }
.triage-banner.emergency h3 { color: var(--red-strong); }
.triage-banner p { margin: 0 0 8px; color: #805b2f; font-size: 11px; line-height: 1.55; }
.triage-banner.emergency p { color: #744045; }
.triage-banner ol { margin: 0; padding-left: 18px; color: #69471f; font-size: 11px; line-height: 1.6; }
.triage-banner.emergency ol { color: #6f3b40; }

.section-block { margin-top: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 2px 13px; }
.section-heading h2 { font-size: 19px; }
.section-heading .section-kicker { margin-bottom: 2px; }
.text-button, .inline-link { min-height: 36px; padding: 6px 0 6px 10px; border: 0; color: var(--teal-700); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.metric-card { min-width: 0; min-height: 116px; padding: 15px 13px 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-card .metric-icon { display: grid; width: 28px; height: 28px; margin-bottom: 11px; place-items: center; border-radius: 9px; color: var(--teal-700); background: var(--teal-50); }
.metric-card .metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metric-card strong { display: block; overflow: hidden; color: var(--ink-strong); font-size: clamp(17px, 4.6vw, 22px); line-height: 1.1; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-card strong small { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: 0; }
.metric-card strong { overflow: visible; text-overflow: clip; white-space: normal; }
.metric-card strong small { display: block; margin-top: 4px; line-height: 1.1; }
.metric-card > span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.metric-card .mini-status { color: var(--teal-700); font-weight: 700; }

.action-stack { display: grid; gap: 9px; margin-bottom: 12px; }
.action-card { display: flex; gap: 12px; align-items: flex-start; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.action-rank { display: grid; flex: none; width: 31px; height: 31px; place-items: center; border-radius: 10px; color: var(--teal-800); background: var(--teal-100); font-size: 13px; font-weight: 800; }
.action-card h3 { margin: 1px 0 4px; color: var(--ink-strong); font-size: 14px; }
.action-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.action-card .timeframe { display: inline-block; margin-top: 7px; color: var(--teal-700); font-size: 9px; font-weight: 750; }
.loading-panel { display: flex; min-height: 92px; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--muted); background: var(--surface); font-size: 11px; }
.loading-orb { width: 18px; height: 18px; border: 2px solid var(--teal-100); border-top-color: var(--teal-700); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.primary-button, .secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 17px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.primary-button { border: 0; color: white; background: linear-gradient(135deg, var(--teal-700), var(--teal-900)); box-shadow: 0 8px 20px rgb(8 103 98 / 19%); }
.secondary-button { border: 1px solid var(--line-strong); color: var(--teal-800); background: var(--surface); }
.primary-button svg, .secondary-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.full-width { width: 100%; }

.inference-card { display: flex; gap: 13px; margin-top: 26px; padding: 16px; border: 1px dashed #b8d4d0; border-radius: var(--radius-md); background: rgb(235 247 245 / 72%); }
.inference-icon { display: grid; flex: none; width: 37px; height: 37px; place-items: center; border-radius: 12px; color: var(--teal-700); background: white; }
.inference-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tag-inferred { display: inline-block; margin-bottom: 4px; color: var(--teal-700); font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.inference-card h2 { margin-bottom: 4px; font-size: 14px; }
.inference-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.inference-card .inline-link { min-height: 30px; padding-left: 0; }

.segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #e8f0ef; }
.segmented-control button { min-height: 36px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.segmented-control button.active { color: var(--teal-800); background: white; box-shadow: 0 2px 8px rgb(23 71 69 / 9%); }

.chart-card { margin-top: 14px; padding: 18px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.chart-header { display: flex; justify-content: space-between; gap: 15px; align-items: flex-end; }
.chart-header h2 { font-size: 26px; font-variant-numeric: tabular-nums; }
.chart-header h2 small { color: var(--muted); font-size: 10px; letter-spacing: 0; }
.trend-change { padding: 6px 9px; border-radius: 999px; color: var(--teal-700); background: var(--teal-50); font-size: 9px; font-weight: 750; }
.trend-change.warning { color: #9b5d18; background: var(--amber-bg); }
.chart-legend { display: flex; gap: 17px; margin: 16px 2px 5px; color: var(--muted); font-size: 9px; }
.chart-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 3px; vertical-align: -1px; }
.legend-systolic::before { background: var(--teal-700); }
.legend-diastolic::before { background: var(--blue); }
.legend-event::before { background: var(--amber); }
.chart-wrap { width: 100%; overflow: hidden; }
#trend-chart { display: block; width: 100%; height: auto; min-height: 185px; overflow: visible; }
#trend-chart text { font-family: var(--font); }
.chart-note { display: flex; gap: 6px; margin: 5px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.trend-metrics { margin-top: 12px; }

.association-list { display: grid; gap: 9px; }
.association-card { position: relative; overflow: hidden; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.association-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--amber); }
.association-top { display: flex; justify-content: space-between; gap: 12px; }
.association-card h3 { margin: 0 0 6px; color: var(--ink-strong); font-size: 14px; }
.confidence { flex: none; color: var(--amber); font-size: 9px; font-weight: 750; }
.association-card p { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.55; }
.association-card small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.empty-insight { padding: 22px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--muted); background: var(--surface); text-align: center; font-size: 11px; line-height: 1.6; }

.record-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.record-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 67px; padding: 12px 14px; border: 0; border-bottom: 1px solid #edf3f2; background: transparent; text-align: left; cursor: pointer; }
.record-row:last-child { border-bottom: 0; }
.record-date { flex: 0 0 46px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.record-date strong { display: block; color: var(--ink); font-size: 13px; }
.record-values { flex: 1; }
.record-values strong { color: var(--ink-strong); font-size: 17px; font-variant-numeric: tabular-nums; }
.record-values strong small { color: var(--muted); font-size: 9px; font-weight: 500; }
.record-values span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.record-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.record-status-dot.warning { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-bg); }
.record-status-dot.danger { background: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }

.circle-add-button { display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 17px; color: white; background: linear-gradient(135deg, var(--teal-500), var(--teal-800)); box-shadow: 0 9px 22px rgb(8 103 98 / 20%); cursor: pointer; }
.circle-add-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.filter-chips { display: flex; gap: 8px; margin: 4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { flex: none; min-height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 650; cursor: pointer; }
.filter-chips button.active { border-color: var(--teal-700); color: white; background: var(--teal-700); }
.timeline { display: grid; gap: 19px; }
.timeline-day h2 { margin: 0 0 10px 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.timeline-items { position: relative; display: grid; gap: 9px; }
.timeline-item { position: relative; display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.timeline-icon { display: grid; flex: none; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: var(--teal-700); background: var(--teal-50); }
.timeline-icon.food { color: #9b641d; background: var(--amber-bg); }
.timeline-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.timeline-body { min-width: 0; flex: 1; }
.timeline-body h3 { margin: 0 0 4px; color: var(--ink-strong); font-size: 13px; }
.timeline-body p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.source-tag { display: inline-block; margin-top: 7px; padding: 3px 6px; border-radius: 6px; color: var(--teal-700); background: var(--teal-50); font-size: 8px; font-weight: 750; }
.source-tag.inferred { color: #96601d; background: var(--amber-bg); }

.assistant-hero { display: flex; align-items: center; gap: 14px; margin: 2px 2px 20px; }
.assistant-avatar { display: grid; flex: none; width: 58px; height: 58px; place-items: center; border-radius: 21px; color: white; background: linear-gradient(145deg, var(--teal-500), var(--teal-900)); box-shadow: 0 10px 25px rgb(8 103 98 / 20%); }
.assistant-avatar svg { width: 31px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.assistant-hero h1 { margin: 1px 0 3px; font-size: 25px; }
.assistant-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.assistant-online { color: var(--teal-700); font-size: 9px; font-weight: 750; }
.assistant-online i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #3baa7f; box-shadow: 0 0 0 3px var(--green-bg); }
.provider-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border-radius: 999px; color: var(--teal-700); background: var(--teal-50); font-size: 8px; font-weight: 800; letter-spacing: .03em; }

.report-card { margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.report-summary-card { overflow: hidden; color: white; background: linear-gradient(145deg, #125f5d, #0a4a4a); }
.report-summary-card::before { content: ""; float: right; width: 100px; height: 100px; margin: -45px -45px 0 0; border: 20px solid rgb(255 255 255 / 4%); border-radius: 50%; }
.report-meta { display: flex; align-items: center; justify-content: space-between; clear: both; }
.report-summary-card .report-label { color: rgb(225 248 245 / 72%); }
.report-summary-card .provider-badge { color: #d8fff6; background: rgb(255 255 255 / 10%); }
.report-summary-card h2 { max-width: 95%; margin: 13px 0 8px; color: white; font-size: 20px; line-height: 1.45; }
.report-summary-card > p { margin: 0; color: rgb(236 251 249 / 76%); font-size: 11px; line-height: 1.65; }
.evidence-strip { display: flex; gap: 8px; align-items: flex-start; margin-top: 15px; padding-top: 13px; line-height: 1.5; border-top: 1px solid rgb(255 255 255 / 11%); color: rgb(236 251 249 / 70%); font-size: 9px; }
.evidence-strip svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.evidence-strip strong { color: white; }

.report-section-title { display: flex; gap: 11px; align-items: center; margin-bottom: 15px; }
.number-badge { display: grid; flex: none; width: 32px; height: 32px; place-items: center; border-radius: 11px; color: var(--teal-800); background: var(--teal-100); font-size: 12px; font-weight: 800; }
.report-section-title span:not(.number-badge) { color: var(--teal-700); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.report-section-title h2 { margin-top: 1px; font-size: 16px; }
.observation-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: observation; }
.observation-list li { position: relative; padding-left: 18px; color: var(--ink); font-size: 11px; line-height: 1.65; }
.observation-list li::before { content: ""; position: absolute; top: .58em; left: 0; width: 7px; height: 7px; border: 2px solid var(--teal-500); border-radius: 50%; }

.recommendation-list { display: grid; gap: 10px; }
.recommendation-item { position: relative; padding: 14px 13px 13px 47px; border: 1px solid var(--line); border-radius: 16px; background: #fbfdfd; }
.recommendation-check { position: absolute; top: 14px; left: 13px; display: grid; width: 24px; height: 24px; padding: 0; place-items: center; border: 1.5px solid var(--teal-300); border-radius: 8px; color: transparent; background: white; cursor: pointer; }
.recommendation-check svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.recommendation-item.completed { opacity: .68; }
.recommendation-item.completed .recommendation-check { color: white; border-color: var(--teal-700); background: var(--teal-700); }
.recommendation-item.completed h3 { text-decoration: line-through; }
.recommendation-item h3 { margin: 0 0 4px; color: var(--ink-strong); font-size: 13px; }
.recommendation-item p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.recommendation-item small { display: inline-block; margin-top: 7px; color: var(--teal-700); font-size: 8px; font-weight: 750; }

.plan-block { display: flex; gap: 12px; align-items: flex-start; padding: 13px; border-radius: 15px; background: var(--teal-50); }
.plan-icon { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: white; background: var(--teal-700); font-size: 12px; font-weight: 800; }
.plan-block p { margin: 0; color: var(--ink); font-size: 10px; line-height: 1.65; }
.followup-block { display: flex; gap: 11px; margin-top: 12px; padding: 13px; border: 1px solid #f0dfbf; border-radius: 15px; background: #fffaf0; }
.followup-block svg { flex: none; width: 21px; fill: none; stroke: var(--amber); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.followup-block strong { display: block; margin-bottom: 3px; color: #754b18; font-size: 11px; }
.followup-block p { margin: 0; color: #80623c; font-size: 9px; line-height: 1.55; }
.question-list { display: flex; flex-wrap: wrap; gap: 8px; }
.question-chip { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-soft); font-size: 9px; line-height: 1.45; }
.medical-disclaimer { margin: 13px 4px 0; color: var(--muted); font-size: 9px; line-height: 1.55; text-align: center; }
#refresh-advice-button { margin-top: 14px; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 720px;
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 8px 9px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid rgb(210 227 224 / 84%);
  background: rgb(255 255 255 / 93%);
  box-shadow: 0 -10px 30px rgb(24 61 60 / 7%);
  backdrop-filter: blur(18px) saturate(160%);
}
.bottom-nav button { display: flex; min-height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 14px; color: #809494; background: transparent; font-size: 9px; font-weight: 650; cursor: pointer; }
.bottom-nav button.active { color: var(--teal-800); background: var(--teal-50); }
.bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sheet-backdrop { position: fixed; z-index: 60; inset: 0; background: rgb(4 31 32 / 46%); backdrop-filter: blur(3px); animation: fade-in .18s ease; }
.bottom-sheet {
  position: fixed;
  z-index: 70;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(720px, 100%);
  max-height: min(84vh, 720px);
  max-height: min(84dvh, 720px);
  margin: 0 auto;
  padding: 10px 19px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: 0 -22px 55px rgb(3 40 39 / 20%);
  animation: sheet-in .25s cubic-bezier(.22, .8, .26, 1);
}
.bottom-sheet[hidden], .sheet-backdrop[hidden] { display: none; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; margin: 0 auto 17px; border-radius: 999px; background: #d7e4e2; }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.sheet-header h2 { font-size: 22px; }
.sheet-close { display: grid; flex: none; width: 44px; height: 44px; padding: 0 0 2px; place-items: center; border: 0; border-radius: 13px; color: var(--muted); background: var(--surface-soft); font-size: 25px; font-weight: 300; cursor: pointer; }
.sheet-description { margin: 8px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.scenario-options { display: grid; gap: 9px; }
.scenario-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; cursor: pointer; }
.scenario-option.active { border-color: var(--teal-500); background: var(--teal-50); box-shadow: 0 0 0 2px rgb(46 166 156 / 9%); }
.scenario-option-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--teal-700); background: var(--teal-100); font-weight: 800; }
.scenario-option.danger .scenario-option-icon { color: var(--red); background: var(--red-bg); }
.scenario-option.warning .scenario-option-icon { color: var(--amber); background: var(--amber-bg); }
.scenario-option strong { display: block; margin-bottom: 3px; font-size: 13px; }
.scenario-option small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.scenario-check { margin-left: auto; color: var(--teal-700); font-weight: 800; }

.detail-reading { display: flex; align-items: baseline; gap: 7px; margin: 21px 0; color: var(--ink-strong); }
.detail-reading strong { font-size: 48px; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.detail-reading span { color: var(--muted); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.detail-cell { padding: 12px; border-radius: 14px; background: var(--surface-soft); }
.detail-cell span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.detail-cell strong { color: var(--ink); font-size: 11px; line-height: 1.45; }
.measurement-guidance { margin-top: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.measurement-guidance strong { display: block; margin-bottom: 4px; color: var(--ink); }

.privacy-points { display: grid; gap: 10px; margin-top: 19px; }
.privacy-points > div { display: flex; gap: 12px; padding: 13px; border-radius: 15px; background: var(--surface-soft); }
.privacy-points > div > span { display: grid; flex: none; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: var(--teal-700); background: white; font-size: 10px; font-weight: 800; }
.privacy-points p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.privacy-points strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 11px; }

.record-form { margin-top: 18px; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.record-form label { position: relative; display: block; color: var(--muted); font-size: 9px; font-weight: 700; }
.record-form input, .record-form select { width: 100%; margin-top: 6px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--ink-strong); background: var(--surface-soft); }
.record-form input { height: 58px; padding: 9px 8px 20px; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.record-form label > span { position: absolute; bottom: 6px; left: 9px; color: var(--muted-light); font-size: 7px; }
.record-form .full-field { margin: 13px 0; }
.record-form select { height: 48px; padding: 0 12px; font-size: 11px; }
.form-hint { margin: 0 0 13px; color: var(--muted); font-size: 9px; }

.toast { position: fixed; z-index: 90; right: 18px; bottom: calc(var(--nav-height) + 22px + env(safe-area-inset-bottom)); left: 18px; max-width: 520px; margin: 0 auto; padding: 12px 15px; border-radius: 13px; color: white; background: rgb(8 45 46 / 92%); box-shadow: var(--shadow-md); font-size: 11px; text-align: center; animation: toast-in .25s ease; }
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.skeleton-card { position: relative; overflow: hidden; background: #e8f0ef; }
.skeleton-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 20%, rgb(255 255 255 / 65%) 45%, transparent 70%); transform: translateX(-100%); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ai-brief-card {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #cfe5e1;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff 0%, #eef9f7 100%);
  box-shadow: var(--shadow-sm);
}
.ai-brief-card.urgent { border-color: #e8b8bb; background: linear-gradient(135deg, #fff 0%, var(--red-bg) 100%); }
.ai-brief-icon {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--teal-700);
  background: var(--teal-100);
}
.ai-brief-card.urgent .ai-brief-icon { color: var(--red); background: #ffe1e2; }
.ai-brief-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ai-brief-content { min-width: 0; flex: 1; }
.ai-brief-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--teal-700); font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.ai-brief-heading small { color: var(--muted); font-size: 8px; font-weight: 650; letter-spacing: 0; }
.ai-brief-card.urgent .ai-brief-heading { color: var(--red); }
.ai-brief-card h2 { margin: 5px 0 4px; font-size: 14px; line-height: 1.45; }
.ai-brief-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ai-brief-evidence { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-brief-evidence span { padding: 4px 7px; border-radius: 8px; color: var(--teal-700); background: white; font-size: 8px; font-weight: 700; }
.ai-brief-card.urgent .ai-brief-evidence span { color: var(--red-strong); }
.ai-brief-actions { display: flex; flex-wrap: wrap; gap: 4px 15px; margin-top: 6px; }
.ai-brief-actions .inline-link { min-height: 30px; padding: 3px 0; font-size: 10px; }
.ai-brief-card.urgent .inline-link { color: var(--red-strong); }

.record-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0 0 16px; }
.record-hub-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 112px;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 31px 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
}
.record-hub-card.profile { grid-column: 1 / -1; min-height: 86px; flex-direction: row; align-items: center; gap: 12px; }
.record-hub-icon { display: grid; flex: none; width: 34px; height: 34px; margin-bottom: 11px; place-items: center; border-radius: 11px; color: var(--teal-700); background: var(--teal-50); }
.record-hub-card.exercise .record-hub-icon { color: var(--blue); background: #edf3fb; }
.record-hub-card.profile .record-hub-icon { margin-bottom: 0; color: #8b641e; background: var(--amber-bg); }
.record-hub-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.record-hub-copy { display: block; min-width: 0; width: 100%; }
.record-hub-copy > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 700; }
.record-hub-copy strong { display: block; overflow: hidden; color: var(--ink-strong); font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.record-hub-copy small { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.record-hub-arrow { position: absolute; top: 50%; right: 13px; color: var(--muted-light); font-size: 22px; transform: translateY(-50%); }
.record-hub-card:active { transform: translateY(1px); }

.timeline-measurement { width: 100%; color: inherit; text-align: left; cursor: pointer; }
.timeline-icon.metric { color: #845f1e; background: #fff7e8; }
.timeline-icon.exercise { color: var(--blue); background: #edf3fb; }
.timeline-item[data-edit-kind] { width: 100%; color: inherit; text-align: left; cursor: pointer; }
.timeline-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.timeline-edit-hint { margin-left: auto; color: var(--teal-700); font-size: 9px; font-weight: 700; }

.data-sheet { max-height: min(90vh, 780px); max-height: min(90dvh, 780px); }
.sheet-record-list { display: grid; gap: 8px; margin: 15px 0 11px; }
.sheet-record-list:empty::before { content: "暂无记录，添加后会用于个性化分析。"; display: block; padding: 18px 13px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); background: var(--surface-soft); font-size: 10px; line-height: 1.5; text-align: center; }
.sheet-record-item { display: flex; width: 100%; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); text-align: left; cursor: pointer; }
.sheet-record-item > span:first-child { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--teal-700); background: white; font-size: 9px; font-weight: 800; }
.sheet-record-copy { min-width: 0; flex: 1; }
.sheet-record-copy strong { display: block; color: var(--ink-strong); font-size: 12px; line-height: 1.4; }
.sheet-record-copy small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-record-edit { flex: none; color: var(--teal-700); font-size: 9px; font-weight: 700; }
.sheet-add-button { min-height: 43px; margin-top: 7px; }
.extended-form { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.extended-form[hidden], .profile-entry-form[hidden] { display: none; }
.form-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.form-section-heading h3 { margin: 0; color: var(--ink-strong); font-size: 15px; }
.form-section-heading button, .profile-editor-heading > button { min-height: 32px; padding: 5px 8px; border: 0; color: var(--teal-700); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.form-grid { display: grid; gap: 11px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-two { grid-column: 1 / -1; }
.extended-form .full-field { min-width: 0; margin: 0; }
.extended-form input, .extended-form select { height: 47px; margin-top: 6px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--ink-strong); background: var(--surface-soft); font-size: 11px; font-weight: 600; }
.extended-form input { font-variant-numeric: tabular-nums; }
.extended-form input[type="hidden"] { display: none; }
.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 54px; }
.input-with-unit > span { position: absolute; right: 11px; bottom: 15px; color: var(--muted); font-size: 8px; font-weight: 650; pointer-events: none; }
.extended-form .primary-button, .extended-form .secondary-button { min-height: 43px; margin-top: 13px; }
.form-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 9px; }
.profile-editor-section { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.profile-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-editor-heading > div { display: flex; align-items: center; gap: 9px; }
.profile-editor-heading > div > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: var(--teal-700); background: white; font-size: 8px; font-weight: 800; }
.profile-editor-heading h3 { margin: 0; color: var(--ink-strong); font-size: 14px; }
.profile-entry-list { display: grid; gap: 7px; margin-top: 11px; }
.profile-entry-list:empty::before { content: "尚未记录"; display: block; padding: 10px; border-radius: 11px; color: var(--muted); background: white; font-size: 9px; text-align: center; }
.profile-entry-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 0; border-radius: 12px; background: white; text-align: left; cursor: pointer; }
.profile-entry-item strong { display: block; font-size: 11px; }
.profile-entry-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.profile-entry-item > span:last-child { color: var(--teal-700); font-size: 9px; font-weight: 700; }
.profile-entry-form { margin-top: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.habits-form { margin-top: 11px; padding-top: 0; border-top: 0; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin-top: 18px; }
.danger-button { min-height: 48px; padding: 12px 17px; border: 0; border-radius: 15px; color: white; background: var(--red); font-size: 13px; font-weight: 750; cursor: pointer; }

.chat-page { padding-bottom: calc(142px + var(--nav-height) + env(safe-area-inset-bottom)); }
.chat-heading { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 17px; padding-right: 43px; }
.chat-ai-avatar { display: grid; flex: none; width: 50px; height: 50px; place-items: center; border-radius: 18px; color: white; background: linear-gradient(145deg, var(--teal-500), var(--teal-900)); box-shadow: 0 8px 20px rgb(8 103 98 / 18%); }
.chat-ai-avatar svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.chat-heading h1 { margin: 1px 0 2px; font-size: 22px; }
.chat-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.chat-clear-button { position: absolute; top: 2px; right: 0; min-height: 32px; padding: 5px 7px; border: 0; color: var(--muted); background: transparent; font-size: 9px; font-weight: 650; cursor: pointer; }
.chat-context-card { padding: 16px; border: 1px solid #cfe4e0; border-radius: var(--radius-lg); background: linear-gradient(145deg, #fff, #eef9f7); box-shadow: var(--shadow-sm); }
.chat-context-top { display: flex; align-items: flex-start; gap: 11px; }
.chat-context-icon { display: grid; flex: none; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: var(--teal-700); background: var(--teal-100); }
.chat-context-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chat-context-top > div { min-width: 0; flex: 1; }
.chat-context-top > div > span { color: var(--teal-700); font-size: 8px; font-weight: 800; letter-spacing: .05em; }
.chat-context-top h2 { margin: 3px 0 3px; font-size: 22px; font-variant-numeric: tabular-nums; }
.chat-context-top h2 small { color: var(--muted); font-size: 8px; letter-spacing: 0; }
.chat-context-top p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.chat-context-card .status-pill { flex: none; padding: 5px 8px; border-color: var(--line); color: var(--teal-700); background: white; }
.chat-context-card .status-pill.warning { color: #956018; background: var(--amber-bg); }
.chat-context-card .status-pill.danger { color: var(--red); background: var(--red-bg); }
.chat-context-details { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-context-details summary { color: var(--teal-700); font-size: 9px; font-weight: 700; cursor: pointer; }
.chat-context-details ul { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 17px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.chat-prompts { margin-top: 20px; }
.chat-prompts .section-heading { margin-bottom: 10px; }
.chat-prompt-list { display: grid; gap: 8px; }
.chat-prompt { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; cursor: pointer; }
.chat-prompt > span:first-child { display: grid; flex: none; width: 26px; height: 26px; place-items: center; border-radius: 9px; color: var(--teal-700); background: var(--teal-50); font-size: 13px; font-weight: 800; }
.chat-prompt strong { min-width: 0; flex: 1; color: var(--ink); font-size: 11px; font-weight: 650; line-height: 1.45; }
.chat-prompt > span:last-child { color: var(--muted-light); font-size: 18px; }
.chat-thread { display: grid; gap: 13px; margin-top: 22px; }
.chat-message { display: flex; gap: 8px; align-items: flex-end; }
.chat-message.user { justify-content: flex-end; }
.chat-message-avatar { display: grid; flex: none; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: white; background: var(--teal-700); font-size: 9px; font-weight: 800; }
.chat-bubble { max-width: min(82%, 520px); padding: 11px 13px; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; color: var(--ink); background: white; box-shadow: var(--shadow-sm); font-size: 11px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.user .chat-bubble { border: 0; border-radius: 16px 16px 5px 16px; color: white; background: linear-gradient(135deg, var(--teal-700), var(--teal-900)); }
.chat-message.safety-warning .chat-bubble { border-color: #eed39f; background: var(--amber-bg); }
.chat-message.safety-emergency .chat-bubble { border-color: #e6b1b5; color: #6f3439; background: var(--red-bg); }
.chat-message-meta { display: block; margin-top: 5px; color: var(--muted-light); font-size: 7px; line-height: 1.3; }
.chat-message.user .chat-message-meta { color: rgb(235 255 251 / 62%); }
.chat-welcome { padding: 14px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); background: rgb(255 255 255 / 62%); font-size: 10px; line-height: 1.6; text-align: center; }
.chat-typing { display: flex; width: fit-content; align-items: center; gap: 4px; margin: 13px 0 0 35px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 15px 15px 15px 5px; color: var(--muted); background: white; }
.chat-typing[hidden] { display: none; }
.chat-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--teal-500); animation: chat-dot 1.1s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .12s; }
.chat-typing span:nth-child(3) { animation-delay: .24s; }
.chat-typing em { margin-left: 4px; font-size: 8px; font-style: normal; }
@keyframes chat-dot { 0%, 70%, 100% { transform: translateY(0); opacity: .4; } 35% { transform: translateY(-3px); opacity: 1; } }
.chat-disclaimer { margin: 18px 6px 0; color: var(--muted); font-size: 8px; line-height: 1.55; text-align: center; }
.chat-composer { position: fixed; z-index: 39; right: 0; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); left: 0; display: flex; width: min(720px, 100%); align-items: flex-end; gap: 8px; margin: 0 auto; padding: 9px 13px; border-top: 1px solid rgb(210 227 224 / 80%); background: rgb(247 251 250 / 94%); box-shadow: 0 -8px 24px rgb(24 61 60 / 6%); backdrop-filter: blur(18px) saturate(150%); }
.chat-composer[hidden] { display: none; }
.chat-composer textarea { min-width: 0; min-height: 44px; max-height: 96px; flex: 1; padding: 11px 13px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 15px; color: var(--ink-strong); background: white; font-size: 12px; line-height: 1.45; resize: none; }
.chat-composer button { display: grid; flex: none; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; border-radius: 15px; color: white; background: linear-gradient(135deg, var(--teal-500), var(--teal-800)); box-shadow: 0 7px 17px rgb(8 103 98 / 17%); cursor: pointer; }
.chat-composer button:disabled { opacity: .45; box-shadow: none; cursor: default; }
.chat-composer button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-keyboard-open .bottom-nav { visibility: hidden; transform: translateY(110%); pointer-events: none; }
.chat-keyboard-open .chat-composer { bottom: 0; }


/* Household member switching */
.app-header { gap: 9px; }
.brand { flex: none; }
.member-selector-button {
  display: flex;
  min-width: 0;
  max-width: 152px;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  order: -1;
  margin-left: 0;
  padding: 4px 8px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink-strong);
  background: rgb(255 255 255 / 86%);
  box-shadow: 0 4px 14px rgb(24 61 60 / 6%);
  text-align: left;
  cursor: pointer;
}
.member-selector-button:active { transform: translateY(1px); }
.member-selector-avatar, .member-avatar, .member-role-avatar {
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #08726c;
  background: #dff3f0;
  font-weight: 800;
}
.member-selector-avatar { width: 36px; height: 36px; font-size: 12px; }
.member-selector-copy { min-width: 0; flex: 1; }
.member-selector-copy small, .member-selector-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-selector-copy small { margin-bottom: 1px; color: var(--teal-700); font-size: 10px; font-weight: 750; }
.member-selector-copy strong { font-size: 12px; }
.member-selector-button > svg { width: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.member-selector-avatar[data-member-role="father"], .member-avatar[data-member-role="father"], .member-role-avatar[data-member-role="father"] { color: #386b91; background: #e4f0f8; }
.member-selector-avatar[data-member-role="mother"], .member-avatar[data-member-role="mother"], .member-role-avatar[data-member-role="mother"] { color: #9a5877; background: #f7e8ef; }
.member-selector-avatar[data-member-role="husband"], .member-avatar[data-member-role="husband"], .member-role-avatar[data-member-role="husband"] { color: #476fa6; background: #e8eef8; }
.member-selector-avatar[data-member-role="wife"], .member-avatar[data-member-role="wife"], .member-role-avatar[data-member-role="wife"] { color: #ad5968; background: #fae8eb; }
.member-selector-avatar[data-member-role="son"], .member-avatar[data-member-role="son"], .member-role-avatar[data-member-role="son"] { color: #4d70b3; background: #e9eefc; }
.member-selector-avatar[data-member-role="daughter"], .member-avatar[data-member-role="daughter"], .member-role-avatar[data-member-role="daughter"] { color: #8b5bad; background: #f0e9f8; }
.member-selector-avatar[data-member-role="other"], .member-avatar[data-member-role="other"], .member-role-avatar[data-member-role="other"] { color: #90672b; background: #fff0d7; }
.member-switcher-sheet, .member-editor-sheet { max-height: min(90vh, 780px); max-height: min(90dvh, 780px); }
.member-switcher-summary { display: flex; align-items: center; gap: 12px; margin: 8px 0 15px; padding: 10px 12px; border-radius: 13px; color: var(--muted); background: var(--surface-soft); }
.member-switcher-summary p { min-width: 0; flex: 1; margin: 0; font-size: 11px; line-height: 1.5; }
.member-switcher-summary span { flex: none; padding: 5px 8px; border-radius: 9px; color: var(--teal-700); background: white; font-size: 11px; font-weight: 800; }
.member-switcher-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.member-slot { position: relative; min-width: 0; min-height: 94px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); }
.member-slot.active { border-color: var(--teal-500); background: var(--teal-50); box-shadow: 0 0 0 2px rgb(46 166 156 / 10%); }
.member-slot-main { display: flex; width: 100%; min-height: 94px; align-items: center; gap: 10px; padding: 13px 47px 13px 12px; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.member-avatar { width: 43px; height: 43px; font-size: 13px; }
.member-slot-copy { min-width: 0; flex: 1; }
.member-slot-copy strong, .member-slot-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-slot-copy strong { color: var(--ink-strong); font-size: 13px; }
.member-slot-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.member-slot.active .member-slot-copy span { color: var(--teal-700); font-weight: 700; }
.member-slot-edit { position: absolute; top: 3px; right: 3px; display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; border-radius: 11px; color: var(--muted); background: transparent; cursor: pointer; }
.member-slot-edit svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.member-slot.empty { border-style: dashed; box-shadow: none; }
.member-slot.empty .member-slot-main { justify-content: center; padding: 13px; color: var(--teal-700); }
.member-empty-plus { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--teal-50); font-size: 22px; }
.member-add-button { margin-top: 12px; }
.member-add-button:disabled { color: var(--muted-light); border-color: var(--line); background: var(--surface-soft); opacity: 1; cursor: default; }
.member-privacy-note { display: flex; align-items: flex-start; gap: 7px; margin: 12px 4px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.member-privacy-note svg { width: 16px; flex: none; fill: none; stroke: var(--teal-700); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.member-role-fieldset { padding: 0; border: 0; }
.member-role-fieldset legend { margin-bottom: 12px; color: var(--ink-strong); font-size: 13px; font-weight: 800; }
.member-role-fieldset legend span, .member-fields > label > span { color: var(--red); }
.member-role-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 7px; }
.member-role-options label { position: relative; display: flex; min-width: 0; min-height: 76px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 7px 3px; border: 1px solid transparent; border-radius: 14px; color: var(--ink); font-size: 11px; font-weight: 650; cursor: pointer; }
.member-role-options label:has(input:checked) { border-color: var(--teal-500); background: var(--teal-50); }
.member-role-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.member-role-avatar { width: 43px; height: 43px; font-size: 12px; }
.member-role-options input:focus-visible + .member-role-avatar { outline: 3px solid rgb(46 166 156 / 30%); outline-offset: 2px; }
.member-fields { display: grid; gap: 12px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.member-fields label { color: var(--ink); font-size: 10px; font-weight: 700; }
.member-fields input, .member-fields select { width: 100%; height: 48px; margin-top: 7px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--ink-strong); background: var(--surface-soft); font: inherit; font-size: 11px; }
.member-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.member-form-hint { margin-top: 12px; }
.member-form-actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 10px; align-items: center; margin-top: 14px; }
.member-form-actions .primary-button { min-height: 48px; }
.danger-text-button { min-height: 44px; padding: 8px 10px; border: 0; border-radius: 13px; color: var(--red); background: var(--red-bg); font-size: 10px; font-weight: 750; cursor: pointer; }
.danger-text-button[hidden] { display: none; }

@media (min-width: 721px) {
  .app-shell { min-height: calc(100vh - 32px); margin-top: 16px; margin-bottom: 16px; border-radius: 30px; }
  .bottom-nav { bottom: 16px; border-radius: 0 0 30px 30px; }
  .chat-composer { bottom: calc(16px + var(--nav-height) + env(safe-area-inset-bottom)); }
  .bottom-sheet { bottom: 16px; border-radius: 26px; }
}

@media (max-width: 390px) {
  .page { padding-right: 14px; padding-left: 14px; }
  .app-header { padding-right: 12px; padding-left: 12px; }
  .brand-copy { display: none; }
  .member-selector-button { max-width: 150px; }
  .bp-hero { padding-right: 17px; padding-left: 17px; }
  .bp-unit { margin-left: 5px; }
  .metric-card { padding-right: 10px; padding-left: 10px; }
  .home-intro { gap: 9px; }
  .demo-chip { max-width: 115px; }
  .demo-chip span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .record-hub-card { padding-right: 27px; padding-left: 12px; }
  .chat-heading { padding-right: 39px; }
  .chat-bubble { max-width: 86%; }
  .chat-composer { padding-right: 10px; padding-left: 10px; }
}


/* Global menu, device pairing, and member-specific care modes */
.app-menu-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  order: -2;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink-strong);
  background: rgb(255 255 255 / 86%);
  box-shadow: 0 4px 14px rgb(24 61 60 / 6%);
  cursor: pointer;
}
.app-menu-button svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.app-menu-button svg circle { fill: var(--red); stroke: var(--surface); stroke-width: 1.2; }
.app-menu-button:active { transform: translateY(1px); }

.bottom-sheet.side-menu-sheet {
  top: 0;
  right: auto;
  bottom: 0;
  left: max(0px, calc((100vw - 720px) / 2));
  display: flex;
  width: min(88vw, 352px);
  height: 100vh;
  height: 100dvh;
  max-height: none;
  flex-direction: column;
  margin: 0;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  overflow: hidden;
  border-radius: 0 25px 25px 0;
  background: var(--surface-soft);
  box-shadow: 20px 0 55px rgb(3 40 39 / 22%);
  animation: drawer-in .22s cubic-bezier(.22, .8, .26, 1);
  overscroll-behavior: contain;
}
.bottom-sheet.side-menu-sheet[hidden] { display: none; }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.side-menu-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.side-menu-header h2 { font-size: 25px; }
.side-menu-profile { display: flex; align-items: center; gap: 11px; margin: 12px 0; padding: 12px; border-radius: 18px; background: linear-gradient(135deg, #e4f5f2, #fff); border: 1px solid #d3e9e5; }
.menu-profile-avatar { display: grid; width: 46px; height: 46px; flex: none; place-items: center; border-radius: 50%; color: var(--teal-800); background: var(--teal-100); font-weight: 850; }
.side-menu-profile div { min-width: 0; }
.side-menu-profile small, .side-menu-profile strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-menu-profile small { margin-bottom: 3px; color: var(--teal-700); font-size: 11px; font-weight: 700; }
.side-menu-profile strong { font-size: 15px; }
.menu-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.menu-action-grid button { display: flex; min-width: 0; min-height: 94px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 11px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink-strong); background: var(--surface); text-align: left; box-shadow: var(--shadow-sm); cursor: pointer; }
.menu-action-grid strong, .menu-action-grid small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-action-grid strong { font-size: 13px; }
.menu-action-grid small { color: var(--muted); font-size: 11px; }
.menu-action-icon { display: grid; width: 34px; height: 34px; margin-bottom: 3px; place-items: center; border-radius: 11px; color: var(--teal-700); background: var(--teal-50); }
.menu-action-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-history-section { display: flex; min-height: 0; flex: 1; flex-direction: column; margin-top: 16px; }
.menu-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.menu-section-heading h3 { font-size: 17px; }
.menu-section-heading button { min-height: 44px; padding: 7px 2px 7px 10px; border: 0; color: var(--teal-700); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.menu-history-search { display: flex; height: 46px; align-items: center; gap: 8px; margin: 10px 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.menu-history-search svg { width: 19px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.menu-history-search input { min-width: 0; height: 42px; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.menu-history-list { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.menu-history-item { display: flex; width: 100%; min-height: 58px; align-items: center; gap: 10px; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.menu-history-item > span:first-child { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 10px; color: var(--teal-700); background: var(--teal-50); font-weight: 850; }
.menu-history-item > span:nth-child(2) { min-width: 0; flex: 1; }
.menu-history-item strong, .menu-history-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-history-item strong { font-size: 12px; }
.menu-history-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.menu-history-empty { padding: 28px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.menu-privacy-copy { flex: none; margin: 10px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.device-status-card { min-height: 112px; margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.device-status-main { display: flex; align-items: center; gap: 12px; }
.device-status-icon { display: grid; width: 46px; height: 46px; flex: none; place-items: center; border-radius: 14px; color: var(--teal-700); background: var(--teal-100); font-weight: 850; }
.device-status-copy { min-width: 0; flex: 1; }
.device-status-copy strong, .device-status-copy small { display: block; }
.device-status-copy strong { font-size: 14px; }
.device-status-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.device-status-tag { padding: 5px 8px; border-radius: 9px; color: var(--teal-700); background: white; font-size: 10px; font-weight: 800; }
.device-demo-button { margin-top: 9px; }

.mode-option-list { display: grid; gap: 9px; }
.mode-option-list label { position: relative; display: grid; min-height: 76px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); cursor: pointer; }
.mode-option-list label:has(input:checked) { border-color: var(--teal-500); background: var(--teal-50); box-shadow: 0 0 0 2px rgb(46 166 156 / 9%); }
.mode-option-list input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mode-option-list label > span:nth-of-type(2) { min-width: 0; }
.mode-option-list strong, .mode-option-list small { display: block; }
.mode-option-list strong { margin-bottom: 4px; font-size: 13px; }
.mode-option-list small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.mode-option-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 14px; color: var(--teal-700); background: var(--teal-100); font-weight: 850; }
.mode-option-icon.senior { color: #8b6826; background: #fff1ce; }
.mode-option-icon.pregnancy { color: #a35278; background: #f9e8ef; }
.mode-option-icon.remote { color: #4d70a8; background: #e8eef8; }
.mode-option-check { color: var(--teal-700); font-size: 17px; opacity: 0; }
.mode-option-list label:has(input:checked) .mode-option-check { opacity: 1; }
.mode-consent { display: flex; align-items: flex-start; gap: 9px; margin: 12px 2px; padding: 11px; border-radius: 14px; color: var(--ink); background: var(--amber-bg); font-size: 11px; line-height: 1.5; }
.mode-consent input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--teal-700); }

.care-mode-panel { margin: 13px 0; }
.care-mode-panel[hidden], .senior-home-panel[hidden], .pregnancy-home-panel[hidden], .remote-care-home-panel[hidden] { display: none; }
.senior-home-panel, .pregnancy-home-panel, .remote-care-home-panel { padding: 15px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); box-shadow: var(--shadow-sm); }
.mode-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.mode-panel-heading > div { display: flex; min-width: 0; align-items: center; gap: 10px; }
.mode-panel-heading p { color: var(--muted); font-size: 10px; font-weight: 750; }
.mode-panel-heading h2 { margin-top: 2px; font-size: 17px; }
.mode-panel-icon { display: grid; width: 42px; height: 42px; flex: none; place-items: center; border-radius: 14px; color: #8b6826; background: #fff1ce; font-weight: 850; }
.mode-panel-icon.pregnancy { color: #a35278; background: #f9e8ef; }
.mode-panel-icon.remote { color: #4d70a8; background: #e8eef8; }
.mode-chip { flex: none; padding: 6px 8px; border-radius: 10px; color: var(--teal-700); background: var(--teal-50); font-size: 10px; font-weight: 800; }
.senior-primary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.senior-action {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 136px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  color: var(--ink-strong);
  background: #f3f8f7;
  box-shadow: 0 4px 14px rgb(20 70 68 / 7%);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.senior-action.primary {
  color: #fff;
  border-color: var(--teal-800);
  background: linear-gradient(145deg, var(--teal-700), var(--teal-900));
  box-shadow: 0 7px 18px rgb(7 91 88 / 22%);
}
.senior-action-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  color: var(--teal-800);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(11 105 101 / 10%);
}
.senior-action.primary .senior-action-icon {
  color: #fff;
  background: rgb(255 255 255 / 16%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 24%);
}
.senior-action-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.senior-action-icon svg path:first-child:not(:only-child) { fill: currentColor; stroke: none; }
.senior-action-copy { display: block; min-width: 0; }
.senior-action strong { display: block; font-size: 18px; font-weight: 850; line-height: 1.3; }
.senior-action small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1.4; }
.senior-action.primary small { color: rgb(255 255 255 / 88%); }
.senior-action[data-reading="true"] { border-color: var(--teal-500); background: var(--teal-50); box-shadow: 0 0 0 3px rgb(46 166 156 / 13%); }
.senior-action[data-reading="true"] .senior-action-icon { color: #fff; background: var(--teal-700); }
.senior-action[data-reading="true"] small { color: var(--teal-800); }
.senior-action:active { transform: scale(.975); filter: brightness(.96); box-shadow: 0 2px 7px rgb(20 70 68 / 12%); }
.senior-action:focus-visible { outline: 3px solid #e8a93c; outline-offset: 3px; }
@media (hover: hover) { .senior-action:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgb(20 70 68 / 14%); } }
@media (max-width: 350px) { .senior-primary-actions { grid-template-columns: 1fr; } .senior-action { min-height: 116px; } }
.mode-safety-note { margin-top: 11px; padding: 10px; border-radius: 13px; color: #7b5417; background: var(--amber-bg); font-size: 11px; line-height: 1.5; }
.senior-home-panel .mode-safety-note { padding: 12px; font-size: 13px; }

.pregnancy-config-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 11px; }
.pregnancy-config-form label, .remote-medication-fields label { color: var(--ink); font-size: 10px; font-weight: 750; }
.pregnancy-config-form input, .remote-medication-fields input { width: 100%; height: 46px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: var(--surface-soft); font: inherit; font-size: 12px; }
.pregnancy-config-form button { grid-column: 1 / -1; min-height: 44px; }
.pregnancy-ai-card { padding: 13px; border-radius: 17px; color: #5f3b4c; background: linear-gradient(145deg, #fff6fa, #f9e9f0); }
.pregnancy-ai-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pregnancy-ai-heading span { font-size: 11px; font-weight: 850; }
.pregnancy-ai-heading small { color: #9a5b77; font-size: 9px; text-align: right; }
.pregnancy-ai-card h3 { margin: 9px 0 6px; font-size: 15px; line-height: 1.4; }
.pregnancy-ai-card p { font-size: 11px; line-height: 1.55; }
.pregnancy-ai-card > small { display: block; margin-top: 8px; font-size: 9px; opacity: .76; }

.remote-reminder-form { display: grid; gap: 9px; }
.reminder-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.reminder-row span { min-width: 0; }
.reminder-row strong, .reminder-row small { display: block; }
.reminder-row strong { font-size: 12px; }
.reminder-row small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.reminder-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--teal-700); }
.reminder-row input[type="time"] { width: 82px; height: 40px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 11px; background: white; font-size: 11px; }
.remote-medication-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.remote-reminder-status { margin: 10px 0; padding: 10px; border-radius: 13px; color: var(--muted); background: var(--surface-soft); font-size: 10px; line-height: 1.45; }
.confirm-medication-button { width: 100%; min-height: 48px; border: 1px solid var(--teal-500); border-radius: 14px; color: var(--teal-800); background: var(--teal-50); font-size: 12px; font-weight: 800; cursor: pointer; }

.app-shell[data-care-mode="senior"] .bp-number { font-size: clamp(58px, 17vw, 78px); }
.app-shell[data-care-mode="senior"] .bp-label, .app-shell[data-care-mode="senior"] .hero-time { font-size: 13px; }
.app-shell[data-care-mode="senior"] #home-ai-brief-title { font-size: 18px; }
.app-shell[data-care-mode="senior"] #home-ai-brief-copy { font-size: 14px; line-height: 1.65; }

@media (max-width: 430px) {
  .app-header { gap: 7px; }
  .app-menu-button { width: 44px; height: 44px; flex-basis: 44px; }
  .member-selector-button { max-width: 122px; }
  .side-menu-profile { margin-top: 8px; }
}
@media (max-width: 350px) {
  .app-header .brand { display: none; }
  .member-selector-button { max-width: 132px; }
  .pregnancy-config-form, .remote-medication-fields { grid-template-columns: 1fr; }
}
\r\n@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
