:root {
  --ink: #15304c;
  --muted: #6d7d8c;
  --blue: #1769c2;
  --blue-deep: #123765;
  --sky: #dff3ff;
  --sun: #ffc82e;
  --sun-soft: #fff1b9;
  --mint: #dff4e7;
  --green: #278a62;
  --paper: #fffdf8;
  --canvas: #f5f2e9;
  --line: #dedbd1;
  --danger: #d54b42;
  --shadow: 0 14px 34px rgba(21, 48, 76, .09);
  --radius: 28px;
  --font-scale: 1;
}
* {
  box-sizing: border-box;
}
html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
  z-index: -1;
}
.ambient-sun {
  width: 32rem;
  height: 32rem;
  left: -14rem;
  top: 14rem;
  background: radial-gradient(circle, rgba(255, 200, 46, .25), transparent 70%);
}
.ambient-sky {
  width: 38rem;
  height: 38rem;
  right: -18rem;
  top: 2rem;
  background: radial-gradient(circle, rgba(46, 161, 234, .2), transparent 70%);
}
.topbar {
  height: 82px;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) auto minmax(270px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 8px 3.5vw;
  border-bottom: 1px solid rgba(21, 48, 76, .12);
  background: rgba(255, 253, 248, .88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  border: 0;
  padding: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}
.brand img {
  width: 60px;
  height: 58px;
  object-fit: contain;
}
.brand strong {
  display: block;
  font-size: 1.22rem;
  letter-spacing: .12em;
}
.brand small {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .04em;
}
.topbar-center {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  font-size: .86rem;
}
.today {
  font-weight: 700;
}
.weather {
  color: var(--muted);
}
.weather i {
  color: #e9a600;
  font-style: normal;
}
.access-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.tool-button {
  display: grid;
  place-items: center;
  min-width: 58px;
  border: 0;
  background: transparent;
  font-size: .72rem;
  cursor: pointer;
}
.tool-button span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 12px rgba(21,48,76,.12);
  font-size: .9rem;
}
main {
  width: min(1450px, 94vw);
  margin: 0 auto;
  padding: 34px 0 128px;
}
.page {
  display: none;
  animation: page-in .32s ease both;
}
.page.active {
  display: block;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.paper-card {
  border: 1px solid rgba(21,48,76,.1);
  border-radius: var(--radius);
  background: rgba(255,253,248,.93);
  box-shadow: var(--shadow);
}
.eyebrow {
  color: var(--blue);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.section-heading h2 {
  margin: 3px 0 0;
  font-size: 1.35rem;
  line-height: 1.2;
}
.text-link,
.round-plus {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}
.round-plus {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sky);
  font-size: 1.5rem;
}
.home-grid {
  display: grid;
  grid-template-columns: 1.18fr .92fr .9fr;
  gap: 18px;
}
.welcome-card {
  grid-column: 1 / 3;
  min-height: 350px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  background: linear-gradient(135deg, #fffdf8 0 62%, #e8f6ff 62%);
}
.welcome-copy {
  padding: 48px 0 38px 48px;
  position: relative;
  z-index: 2;
}
.welcome-copy h1 {
  margin: 10px 0 12px;
  max-width: 630px;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.04em;
}
.welcome-copy h1 b {
  color: var(--blue);
}
.welcome-copy p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}
.quick-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
.primary-action,
.secondary-action {
  min-height: 50px;
  padding: 0 24px;
  border-radius: 15px;
  border: 1px solid var(--blue-deep);
  font-weight: 800;
  cursor: pointer;
}
.primary-action {
  background: var(--blue-deep);
  color: white;
}
.secondary-action {
  background: transparent;
}
.pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 5px rgba(255,200,46,.16);
}
.orbit-stage {
  position: relative;
  min-height: 350px;
  overflow: hidden;
}
.orbit-stage img {
  position: absolute;
  z-index: 2;
  width: 92%;
  height: 83%;
  bottom: 0;
  right: -3%;
  object-fit: contain;
  object-position: bottom;
}
.orbit {
  position: absolute;
  border: 2px solid rgba(23,105,194,.24);
  border-radius: 50%;
}
.orbit-one {
  width: 330px;
  height: 330px;
  right: -20px;
  top: 10px;
}
.orbit-two {
  width: 260px;
  height: 260px;
  right: 18px;
  top: 46px;
  border-color: rgba(255,200,46,.5);
}
.orbit-star {
  position: absolute;
  color: var(--sun);
  font-size: 1.2rem;
  z-index: 4;
}
.star-one { right: 18px; top: 48px; }
.star-two { left: 30px; top: 80px; }
.orbit-note {
  position: absolute;
  z-index: 5;
  right: 18px;
  bottom: 22px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(18,55,101,.9);
  color: white;
  font-size: .7rem;
  line-height: 1.4;
}
.safety-card {
  min-height: 350px;
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  border-radius: var(--radius);
  background: var(--blue-deep);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.safety-card::before,
.safety-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}
.safety-card::before { width: 280px; height: 280px; }
.safety-card::after { width: 210px; height: 210px; }
.safety-card > * { position: relative; z-index: 1; }
.safety-icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: radial-gradient(circle, var(--sun) 0 42%, transparent 44%);
  color: var(--blue-deep);
  font-size: 1.3rem;
  font-weight: 900;
}
.safety-card small,
.safety-card span { display: block; opacity: .72; }
.safety-card strong { display: block; margin: 2px 0 4px; font-size: 1.65rem; }
.safety-card button {
  margin-top: 25px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--blue-deep);
  font-weight: 800;
  cursor: pointer;
}
.timeline-card,
.health-glance,
.family-glance,
.daily-card {
  padding: 27px;
}
.today-timeline {
  margin-top: 18px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 58px 14px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
}
.timeline-item time {
  font-weight: 800;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px var(--sky);
}
.timeline-item strong { display: block; }
.timeline-item small { color: var(--muted); }
.timeline-item em {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--sun-soft);
  color: #8a6300;
  font-style: normal;
  font-size: .72rem;
}
.health-number-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 22px 0 12px;
}
.health-number-row > div {
  padding: 16px;
  border-radius: 17px;
  background: #f2f7fb;
}
.health-number-row span,
.health-number-row small { display: block; color: var(--muted); font-size: .7rem; }
.health-number-row strong { font-size: 1.62rem; line-height: 1.2; }
.mini-chart {
  height: 58px;
  margin-top: 8px;
}
.mini-chart svg { width: 100%; height: 100%; overflow: visible; }
.steady-message { margin: 10px 0 0; color: var(--green); font-size: .8rem; }
.steady-message i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.contact-strip {
  display: flex;
  gap: 14px;
  margin: 24px 0;
}
.contact-button {
  border: 0;
  background: none;
  cursor: pointer;
  text-align: center;
}
.contact-avatar {
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  border-radius: 20px 20px 8px 20px;
  background: var(--sky);
  color: var(--blue-deep);
  font-weight: 900;
  font-size: 1.1rem;
}
.contact-button:nth-child(2) .contact-avatar { background: var(--sun-soft); }
.contact-button:nth-child(3) .contact-avatar { background: var(--mint); }
.contact-button small { display: block; margin-top: 4px; }
.family-message {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #f5f2e9;
}
.family-message span { font-weight: 800; }
.family-message p { margin: 0; font-size: .78rem; color: var(--muted); }
.family-message time { font-size: .68rem; color: var(--muted); }
.daily-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 24px;
  background: linear-gradient(90deg, #fff9dd, #fffdf8);
}
.daily-card h2 { margin: 2px 0; }
.daily-card p { margin: 0; color: var(--muted); }
.daily-card button {
  padding: 11px 18px;
  border: 1px solid #bf9626;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.daily-art {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px dashed #bf9626;
  font-size: 2rem;
}
.mobile-family-note {
  display: none;
}
.page-hero {
  min-height: 210px;
  margin-bottom: 24px;
  padding: 36px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
}
.page-hero::after {
  content: "";
  width: 280px;
  height: 280px;
  position: absolute;
  right: 9%;
  top: -90px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .12;
  box-shadow: 0 0 0 45px transparent, 0 0 0 46px currentColor, 0 0 0 90px transparent, 0 0 0 91px currentColor;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 { margin: 6px 0; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.15; }
.page-hero p { margin: 0; color: var(--muted); }
.health-hero { background: linear-gradient(135deg, #e4f4ff, #f7fcff); }
.medicine-hero { background: linear-gradient(135deg, #fff3bd, #fffaf0); }
.family-hero { background: linear-gradient(135deg, #e5f5ec, #f8fdf9); }
.calendar-hero { background: linear-gradient(135deg, #ecedff, #fbfbff); }
.knowledge-hero { background: linear-gradient(135deg, #ffe8da, #fffaf6); }
.settings-hero { background: linear-gradient(135deg, #e9eef5, #fbfcfd); }
.hero-button {
  min-width: 150px;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 17px;
  background: var(--blue-deep);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.metric-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.metric-card {
  padding: 20px 22px;
  border-radius: 22px;
  background: white;
  border: 1px solid var(--line);
}
.metric-card span,
.metric-card small { display: block; color: var(--muted); }
.metric-card strong { font-size: 1.8rem; }
.metric-card em { color: var(--green); font-style: normal; font-size: .74rem; }
.two-column-layout {
  display: grid;
  grid-template-columns: 1.55fr .85fr;
  gap: 20px;
}
.chart-card,
.record-list-card { padding: 28px; min-height: 430px; }
.legend { font-size: .72rem; color: var(--muted); }
.legend span { display: inline-block; width: 8px; height: 8px; margin: 0 5px 0 12px; border-radius: 50%; }
.legend .sys { background: var(--blue); }
.legend .dia { background: var(--sun); }
.health-chart { height: 320px; margin-top: 25px; }
.health-chart svg { width: 100%; height: 100%; overflow: visible; }
.record-list { margin-top: 18px; }
.record-row {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.record-row time { font-weight: 800; }
.record-row strong { font-size: 1.1rem; }
.record-row span { color: var(--muted); }
.status-pill { padding: 3px 9px; border-radius: 999px; background: var(--mint); color: var(--green)!important; font-size: .72rem; }
.medical-note { margin-top: 16px; padding: 14px 18px; border-radius: 14px; background: #fff6d7; color: #795e14; font-size: .82rem; }
.medicine-layout {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 20px;
}
.day-clock {
  min-height: 480px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--blue-deep);
  color: white;
}
.clock-face {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 20px rgba(255,255,255,.03);
}
.clock-face::before { content:""; position:absolute; width:7px; height:7px; border-radius:50%; background:var(--sun); }
.clock-hand { position:absolute; left:50%; bottom:50%; width:3px; height:65px; background:white; transform-origin:bottom; border-radius:4px; }
.clock-hand.minute { height:83px; background:var(--sun); }
.clock-face strong { margin-top: 74px; font-size: 1.7rem; }
.day-clock h2 { margin: 22px 0 4px; }
.day-clock p { margin: 0; opacity: .7; }
.medicine-board { padding: 30px; }
.date-chip { padding: 7px 13px; border-radius: 999px; background: var(--sun-soft); font-size: .75rem; }
.medicine-list { margin-top: 20px; }
.medicine-item {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}
.medicine-item.completed { opacity: .68; background: #f0f7f2; }
.medicine-time { font-size: 1.35rem; font-weight: 900; }
.medicine-copy strong { display: block; font-size: 1.1rem; }
.medicine-copy span { color: var(--muted); }
.complete-med {
  min-width: 110px;
  padding: 10px;
  border: 1px solid var(--blue);
  border-radius: 12px;
  background: white;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}
.completed .complete-med { border-color: var(--green); background: var(--green); color: white; }
.assistant-stage {
  min-height: calc(100vh - 250px);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.assistant-stage::before,
.assistant-stage::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(23,105,194,.16);
  border-radius: 50%;
  pointer-events: none;
}
.assistant-stage::before { width: 640px; height: 640px; top: -90px; }
.assistant-stage::after { width: 510px; height: 510px; top: -25px; border-color: rgba(255,200,46,.24); }
.assistant-intro,
.voice-orb,
.assistant-form,
.suggestion-chips,
.assistant-reply { position: relative; z-index: 2; }
.assistant-intro img { width: 120px; height: 90px; object-fit: contain; }
.assistant-intro h1 { margin: 4px 0; font-size: 2.5rem; }
.assistant-intro p { margin: 0; color: var(--muted); }
.voice-orb {
  width: 180px;
  height: 180px;
  margin: 28px 0 20px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 12px solid #dcefff;
  border-radius: 50%;
  background: var(--blue-deep);
  color: white;
  box-shadow: 0 0 0 1px var(--blue), 0 20px 50px rgba(23,105,194,.25);
  cursor: pointer;
}
.voice-orb strong { display:block; margin-top:10px; font-size:1.1rem; }
.voice-orb small { opacity:.62; font-size:.65rem; }
.voice-waves { display:flex; gap:4px; align-items:center; height:30px; }
.voice-waves i { width:4px; height:12px; border-radius:4px; background:var(--sun); }
.voice-waves i:nth-child(2) { height:27px; }
.voice-waves i:nth-child(3) { height:20px; }
.assistant-form { width:min(680px,100%); display:flex; gap:10px; }
.assistant-form input,
.hero-search input { flex:1; min-width:0; padding:15px 18px; border:1px solid var(--line); border-radius:15px; background:white; outline:none; }
.assistant-form button,
.hero-search button { padding:0 24px; border:0; border-radius:15px; background:var(--blue); color:white; font-weight:800; cursor:pointer; }
.suggestion-chips { display:flex; flex-wrap:wrap; justify-content:center; gap:9px; margin-top:14px; }
.suggestion-chips button { padding:7px 13px; border:1px solid var(--line); border-radius:999px; background:white; cursor:pointer; font-size:.78rem; }
.assistant-reply { width:min(680px,100%); margin-top:18px; padding:18px; border-radius:18px; background:white; box-shadow:var(--shadow); text-align:left; }
.hidden { display:none!important; }
.family-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.family-card { min-height:260px; padding:28px; border-radius:28px; background:white; border:1px solid var(--line); display:flex; flex-direction:column; }
.family-avatar { width:70px; height:70px; display:grid; place-items:center; border-radius:26px 26px 10px 26px; background:var(--sky); font-size:1.5rem; font-weight:900; }
.family-card:nth-child(2n) .family-avatar { background:var(--sun-soft); }
.family-card:nth-child(3n) .family-avatar { background:var(--mint); }
.family-card h2 { margin:15px 0 0; }
.family-card p { margin:0; color:var(--muted); }
.family-card footer { margin-top:auto; display:flex; gap:9px; }
.family-card footer button { flex:1; padding:10px; border:1px solid var(--blue); border-radius:12px; background:white; color:var(--blue); font-weight:800; cursor:pointer; }
.emergency-panel { margin-top:20px; padding:28px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:25px; }
.emergency-mark { width:76px; height:76px; display:grid; place-items:center; border-radius:50%; background:#ffe1de; color:var(--danger); font-weight:900; }
.emergency-panel h2 { margin:2px 0; }
.emergency-panel p { margin:0; color:var(--muted); }
.emergency-panel > button { padding:13px 24px; border:0; border-radius:14px; background:var(--danger); color:white; font-weight:900; cursor:pointer; }
.calendar-layout { display:grid; grid-template-columns:1.4fr .8fr; gap:20px; }
.month-card,
.agenda-card { padding:28px; }
.month-card > header { display:flex; justify-content:space-between; align-items:center; }
.month-card > header button { width:38px; height:38px; border:1px solid var(--line); border-radius:50%; background:white; font-size:1.4rem; cursor:pointer; }
.week-row,
.calendar-days { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; text-align:center; }
.week-row { margin:22px 0 10px; color:var(--muted); font-size:.76rem; }
.calendar-day { min-height:74px; padding:8px; border:1px solid transparent; border-radius:15px; background:#f8f7f2; text-align:left; position:relative; }
.calendar-day.muted { opacity:.34; }
.calendar-day.today { border-color:var(--blue); background:var(--sky); font-weight:900; }
.calendar-day.has-event::after { content:""; position:absolute; left:10px; bottom:9px; width:7px; height:7px; border-radius:50%; background:var(--sun); }
.agenda-list { margin-top:18px; }
.agenda-item { display:grid; grid-template-columns:60px 1fr; gap:14px; padding:15px 0; border-bottom:1px solid var(--line); }
.agenda-date { width:55px; height:55px; display:grid; place-items:center; align-content:center; border-radius:16px; background:var(--sky); line-height:1.15; }
.agenda-date strong { font-size:1.2rem; }
.agenda-date small { font-size:.65rem; }
.agenda-item h3 { margin:0; font-size:1rem; }
.agenda-item p { margin:2px 0 0; color:var(--muted); font-size:.76rem; }
.hero-search { width:min(430px,44%); display:flex; gap:9px; }
.category-row { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.category-row button { padding:9px 17px; border:1px solid var(--line); border-radius:999px; background:white; cursor:pointer; }
.category-row button.active { border-color:var(--blue); background:var(--blue); color:white; }
.knowledge-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.knowledge-card { min-height:250px; padding:26px; border-radius:27px; background:white; border:1px solid var(--line); position:relative; overflow:hidden; }
.knowledge-card::after { content:attr(data-icon); position:absolute; right:-5px; bottom:-26px; font-size:6rem; opacity:.07; }
.knowledge-card small { color:var(--blue); font-weight:800; }
.knowledge-card h2 { margin:8px 0; font-size:1.25rem; }
.knowledge-card p { margin:0; color:var(--muted); }
.knowledge-card button { position:absolute; left:26px; bottom:22px; border:0; background:transparent; color:var(--blue); font-weight:800; cursor:pointer; }
.checkin-shell { width:min(980px,100%); margin:auto; padding:20px 0; }
.checkin-shell > header { text-align:center; margin-bottom:24px; }
.checkin-shell h1 { margin:5px 0; font-size:2.5rem; }
.checkin-shell header p { margin:0; color:var(--muted); }
.checkin-form { padding:32px; border:1px solid var(--line); border-radius:32px; background:white; box-shadow:var(--shadow); }
.checkin-form fieldset { margin:0 0 26px; padding:0; border:0; }
.checkin-form legend { margin-bottom:12px; font-weight:900; font-size:1.15rem; }
.choice-row { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.choice-row input { position:absolute; opacity:0; }
.choice-row span { min-height:66px; display:grid; place-items:center; border:1px solid var(--line); border-radius:16px; background:#faf9f5; cursor:pointer; }
.mood-row span { font-size:1.7rem; }
.mood-row span b { font-size:.72rem; }
.choice-row input:checked + span { border-color:var(--blue); background:var(--sky); box-shadow:inset 0 0 0 1px var(--blue); }
.note-input span { display:block; margin-bottom:8px; font-weight:800; }
.note-input textarea { width:100%; min-height:90px; padding:13px; border:1px solid var(--line); border-radius:14px; resize:vertical; }
.checkin-submit { width:100%; margin-top:20px; padding:15px; border:0; border-radius:15px; background:var(--blue-deep); color:white; font-weight:900; cursor:pointer; }
.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.setting-card { min-height:170px; padding:28px; display:grid; grid-template-columns:auto 1fr; gap:18px; align-items:start; }
.setting-icon { width:54px; height:54px; display:grid; place-items:center; border-radius:18px; background:var(--sky); font-size:1.2rem; font-weight:900; }
.setting-card h2 { margin:0; }
.setting-card p { margin:2px 0; color:var(--muted); }
.segmented { grid-column:1/-1; display:flex; padding:4px; border-radius:13px; background:#f0eee7; }
.segmented button { flex:1; padding:8px; border:0; border-radius:10px; background:transparent; cursor:pointer; }
.segmented button.selected { background:white; color:var(--blue); box-shadow:0 3px 10px rgba(21,48,76,.1); font-weight:800; }
.switch { align-self:center; justify-self:end; }
.switch input { display:none; }
.switch span { display:block; width:58px; height:32px; padding:4px; border-radius:999px; background:#c8ced4; cursor:pointer; }
.switch span::after { content:""; display:block; width:24px; height:24px; border-radius:50%; background:white; transition:.2s; }
.switch input:checked + span { background:var(--blue); }
.switch input:checked + span::after { transform:translateX(26px); }
.profile-setting form { grid-column:1/-1; display:flex; gap:8px; }
.profile-setting input { min-width:0; flex:1; padding:10px; border:1px solid var(--line); border-radius:11px; }
.profile-setting button { padding:0 16px; border:0; border-radius:11px; background:var(--blue); color:white; cursor:pointer; }
.main-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(960px, 92vw);
  min-height: 76px;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 26px;
  background: rgba(18,55,101,.95);
  box-shadow: 0 18px 45px rgba(18,55,101,.28);
  backdrop-filter: blur(18px);
}
.main-nav button {
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.66);
  cursor: pointer;
}
.main-nav button span,
.main-nav button b { display: block; }
.main-nav button span { font-size: 1.2rem; line-height:1.2; }
.main-nav button b { margin-top:3px; font-size:.67rem; font-weight:500; }
.main-nav button.active { color:var(--sun); }
.main-nav button.active b { font-weight:900; }
.main-nav .voice-nav {
  width: 76px;
  height: 76px;
  justify-self: center;
  margin-top: -28px;
  border: 7px solid var(--canvas);
  border-radius: 50%;
  background: var(--sun);
  color: var(--blue-deep);
  box-shadow: 0 5px 20px rgba(255,200,46,.25);
}
.main-nav .voice-nav b { font-weight:900; }
.app-dialog {
  width:min(620px,92vw);
  padding:0;
  border:0;
  border-radius:28px;
  background:transparent;
  color:var(--ink);
  box-shadow:0 30px 90px rgba(15,34,53,.3);
}
.app-dialog::backdrop { background:rgba(10,31,53,.6); backdrop-filter:blur(6px); }
.dialog-shell { margin:0; padding:32px; border-radius:28px; background:var(--paper); position:relative; }
.dialog-close { position:absolute; right:18px; top:16px; width:38px; height:38px; border:0; border-radius:50%; background:#eceae3; font-size:1.4rem; cursor:pointer; }
.dialog-shell h2 { margin:4px 0 22px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-grid label span { display:block; margin-bottom:5px; color:var(--muted); font-size:.78rem; font-weight:700; }
.form-grid input,
.form-grid select,
.form-grid textarea { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:11px; background:white; }
.form-grid textarea { min-height:75px; resize:vertical; }
.form-grid .wide { grid-column:1/-1; }
.dialog-submit { width:100%; margin-top:18px; padding:13px; border:0; border-radius:13px; background:var(--blue-deep); color:white; font-weight:900; cursor:pointer; }
.compact-dialog { width:min(430px,90vw); text-align:center; }
.call-avatar { width:80px; height:80px; margin:0 auto 16px; display:grid; place-items:center; border-radius:28px 28px 10px 28px; background:var(--sky); color:var(--blue); font-size:1.7rem; font-weight:900; }
.call-actions { display:flex; gap:10px; margin-top:22px; }
.call-actions button,
.call-actions a { flex:1; padding:11px; border:1px solid var(--line); border-radius:12px; background:white; text-decoration:none; color:var(--ink); cursor:pointer; }
.call-actions a,
#sosCall { border-color:var(--blue); background:var(--blue); color:white; font-weight:900; }
.sos-symbol { width:90px; height:90px; margin:0 auto 15px; display:grid; place-items:center; border-radius:50%; background:#ffe2df; color:var(--danger); font-size:1.3rem; font-weight:900; }
.sos-dialog ol { text-align:left; padding-left:25px; color:var(--muted); }
.toast { position:fixed; z-index:100; left:50%; bottom:112px; transform:translate(-50%,30px); padding:12px 20px; border-radius:13px; background:var(--ink); color:white; opacity:0; pointer-events:none; transition:.25s; box-shadow:var(--shadow); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.family-desktop {
  display: none;
  min-height: 100vh;
  background: #f3f0e8;
  color: #19324b;
}
.care-rail {
  width: 270px;
  min-height: 100vh;
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
  background: #173653;
  color: white;
  overflow: hidden;
}
.care-rail::before,
.care-rail::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  pointer-events: none;
}
.care-rail::before {
  width: 310px;
  height: 310px;
  left: -170px;
  bottom: 80px;
}
.care-rail::after {
  width: 220px;
  height: 220px;
  left: -125px;
  bottom: 125px;
}
.care-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 20px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
}
.care-brand img {
  width: 52px;
  height: 45px;
  object-fit: contain;
}
.care-brand strong,
.care-brand small {
  display: block;
}
.care-brand strong {
  font-size: 1.15rem;
  letter-spacing: .12em;
}
.care-brand small {
  color: rgba(255,255,255,.56);
  font-size: .67rem;
}
.elder-card {
  margin: 21px 3px 17px;
  padding: 13px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}
.elder-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px 15px 6px 15px;
  background: #ffd457;
  color: #173653;
  font-weight: 900;
}
.elder-card small,
.elder-card strong,
.elder-card em {
  display: block;
}
.elder-card small {
  color: rgba(255,255,255,.55);
  font-size: .62rem;
}
.elder-card em {
  color: #a9d6c4;
  font-size: .6rem;
  font-style: normal;
}
.elder-card em i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: #62d3a2;
}
.elder-card > button {
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}
.care-nav {
  display: grid;
  gap: 5px;
}
.care-nav button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(255,255,255,.65);
  text-align: left;
  cursor: pointer;
}
.care-nav button span {
  font-size: 1rem;
}
.care-nav button b {
  font-size: .82rem;
  font-weight: 600;
}
.care-nav button.active {
  background: rgba(255,255,255,.12);
  color: white;
  box-shadow: inset 3px 0 #ffd457;
}
.rail-help {
  margin: auto 3px 10px;
  padding: 18px;
  border-radius: 20px;
  position: relative;
  z-index: 1;
  background: #f8eee0;
  color: #173653;
}
.rail-help span {
  color: #b45a38;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.rail-help strong {
  display: block;
  margin: 5px 0 13px;
  line-height: 1.4;
}
.rail-help button {
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: #173653;
  color: white;
  font-size: .7rem;
  cursor: pointer;
}
.rail-version {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255,255,255,.32);
  text-align: center;
  font-size: .56rem;
}
.care-workspace {
  min-width: 0;
}
.care-topbar {
  height: 76px;
  padding: 0 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd9cf;
  background: rgba(255,253,248,.84);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 12;
}
.care-topbar > div:first-child span,
.care-topbar > div:first-child strong {
  display: block;
}
.care-topbar > div:first-child span {
  color: #74828d;
  font-size: .68rem;
}
.care-topbar > div:first-child strong {
  font-size: 1rem;
}
.care-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.care-top-actions > button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #d8d5cc;
  border-radius: 12px;
  background: white;
  cursor: pointer;
}
.care-top-actions .care-user {
  border: 0;
  background: transparent;
}
.care-user span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  margin-right: 6px;
  border-radius: 50%;
  background: #f2d6c5;
  color: #8b3f28;
  font-weight: 900;
}
.care-main {
  width: auto;
  margin: 0;
  padding: 30px 38px 55px;
}
.care-view {
  display: none;
  animation: page-in .28s ease both;
}
.care-view.active {
  display: block;
}
.care-kicker {
  color: #b45a38;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .15em;
}
.care-welcome {
  min-height: 170px;
  padding: 30px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 30px;
  background: linear-gradient(120deg,#fffdf7 0 60%,#e4f2ed 60%);
  box-shadow: 0 13px 34px rgba(25,50,75,.07);
  position: relative;
  overflow: hidden;
}
.care-welcome::after {
  content: "";
  position: absolute;
  right: 130px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(25,50,75,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px transparent,0 0 0 35px rgba(255,200,46,.28);
}
.care-welcome > * {
  position: relative;
  z-index: 1;
}
.care-welcome h1 {
  margin: 5px 0 3px;
  font-size: 2.2rem;
  line-height: 1.2;
}
.care-welcome p {
  margin: 0;
  color: #71808c;
}
.care-state {
  min-width: 160px;
  padding: 18px 22px;
  border-radius: 22px;
  background: #173653;
  color: white;
  text-align: center;
}
.care-state i {
  display: block;
  width: 9px;
  height: 9px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: #62d3a2;
  box-shadow: 0 0 0 6px rgba(98,211,162,.14);
}
.care-state span,
.care-state small {
  display: block;
  color: rgba(255,255,255,.58);
  font-size: .65rem;
}
.care-state strong {
  display: block;
  font-size: 1.4rem;
}
.care-dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr .85fr;
  gap: 16px;
  margin-top: 16px;
}
.care-panel {
  padding: 23px;
  border: 1px solid #ddd9cf;
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 10px 28px rgba(25,50,75,.06);
}
.care-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}
.care-panel header small {
  color: #b45a38;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.care-panel h2 {
  margin: 2px 0 0;
  font-size: 1.18rem;
}
.care-panel header button,
.care-panel header > span {
  border: 0;
  background: transparent;
  color: #52718a;
  font-size: .66rem;
  cursor: pointer;
}
.day-story {
  grid-row: span 2;
}
.desk-timeline {
  margin-top: 20px;
}
.desk-time-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px 12px 1fr;
  gap: 12px;
  align-items: start;
  position: relative;
}
.desk-time-row::after {
  content: "";
  position: absolute;
  left: 53px;
  top: 22px;
  bottom: -4px;
  width: 1px;
  background: #dedbd2;
}
.desk-time-row:last-child::after {
  display: none;
}
.desk-time-row time {
  color: #52718a;
  font-size: .74rem;
  font-weight: 800;
}
.desk-time-row i {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 2px solid #fffdf8;
  border-radius: 50%;
  background: #2b7c63;
  box-shadow: 0 0 0 1px #2b7c63;
  position: relative;
  z-index: 1;
}
.desk-time-row.pending i {
  background: #ffc82e;
  box-shadow: 0 0 0 1px #c59400;
}
.desk-time-row strong,
.desk-time-row small {
  display: block;
}
.desk-time-row strong {
  font-size: .85rem;
}
.desk-time-row small {
  color: #71808c;
  font-size: .68rem;
}
.health-story {
  min-height: 240px;
}
.desk-health-values {
  display: flex;
  gap: 30px;
  margin: 17px 0 6px;
}
.desk-health-values span,
.desk-health-values small {
  display: block;
  color: #71808c;
  font-size: .62rem;
}
.desk-health-values strong {
  font-size: 1.5rem;
}
.desk-mini-chart {
  height: 75px;
}
.desk-mini-chart svg,
.desk-health-chart svg {
  width: 100%;
  height: 100%;
}
.percent-badge {
  padding: 5px 9px;
  border-radius: 99px;
  background: #e2f2eb!important;
  color: #287357!important;
  font-weight: 900;
}
.desk-medicine {
  margin-top: 13px;
}
.desk-med-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #ebe8e0;
}
.desk-med-row time {
  font-weight: 900;
  font-size: .76rem;
}
.desk-med-row strong,
.desk-med-row small {
  display: block;
}
.desk-med-row strong {
  font-size: .75rem;
}
.desk-med-row small {
  color: #71808c;
  font-size: .6rem;
}
.desk-med-row em {
  color: #287357;
  font-size: .62rem;
  font-style: normal;
}
.panel-action {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid #c8d3dc;
  border-radius: 10px;
  background: #f7fafc;
  color: #214c70;
  font-size: .68rem;
  cursor: pointer;
}
.phone-story {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 24px;
  background: linear-gradient(120deg,#e5eff5,#fffdf8);
}
.mini-phone {
  height: 175px;
  padding: 12px;
  border: 5px solid #173653;
  border-radius: 25px;
  background: #faf5e9;
  box-shadow: 0 8px 20px rgba(23,54,83,.15);
}
.mini-phone-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .55rem;
  font-weight: 900;
}
.mini-phone-top img {
  width: 35px;
  height: 30px;
  object-fit: contain;
}
.mini-phone-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 14px;
}
.mini-phone-buttons i {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: white;
  color: #31536e;
  font-size: .5rem;
  font-style: normal;
}
.phone-story > div:last-child small {
  color: #b45a38;
  font-size: .65rem;
  font-weight: 800;
}
.phone-story p {
  margin: 5px 0 14px;
  color: #71808c;
}
.phone-story button {
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: #173653;
  color: white;
  cursor: pointer;
}
.family-note {
  grid-column: 1 / -1;
}
.family-note form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}
.family-note textarea {
  min-height: 64px;
  padding: 12px;
  border: 1px solid #d7d5ce;
  border-radius: 12px;
  resize: none;
}
.family-note form button {
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #b45a38;
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.care-page-title {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.care-page-title h1 {
  margin: 4px 0 2px;
  font-size: 2rem;
  line-height: 1.25;
}
.care-page-title p {
  margin: 0;
  color: #71808c;
}
.care-primary,
.title-actions button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #173653;
  border-radius: 12px;
  background: white;
  color: #173653;
  font-weight: 800;
  cursor: pointer;
}
.care-primary,
.title-actions .care-primary {
  background: #173653;
  color: white;
}
.title-actions {
  display: flex;
  gap: 8px;
}
.desk-metrics {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 13px;
  margin-bottom: 16px;
}
.desk-metric {
  padding: 19px;
  border-radius: 20px;
  border: 1px solid #ddd9cf;
  background: #fffdf8;
}
.desk-metric span,
.desk-metric small {
  display: block;
  color: #71808c;
  font-size: .65rem;
}
.desk-metric strong {
  font-size: 1.55rem;
}
.care-two-columns,
.plan-board {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 16px;
}
.desk-health-chart {
  height: 330px;
  margin-top: 20px;
}
.desk-health-list {
  margin-top: 12px;
}
.desk-health-row {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #ebe8e0;
}
.desk-health-row time {
  color: #71808c;
  font-size: .7rem;
}
.desk-health-row strong {
  font-size: .86rem;
}
.desk-health-row em {
  padding: 3px 7px;
  border-radius: 99px;
  background: #e2f2eb;
  color: #287357;
  font-size: .6rem;
  font-style: normal;
}
.desk-plan-list {
  margin-top: 16px;
}
.desk-plan-item {
  min-height: 78px;
  padding: 13px;
  margin-bottom: 9px;
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e3e0d8;
  border-radius: 15px;
  background: #faf8f2;
}
.desk-plan-item time {
  color: #214c70;
  font-weight: 900;
}
.desk-plan-item strong,
.desk-plan-item small {
  display: block;
}
.desk-plan-item small {
  color: #71808c;
  font-size: .67rem;
}
.desk-plan-item em {
  color: #b45a38;
  font-size: .63rem;
  font-style: normal;
}
.desk-contact-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 15px;
}
.desk-contact-card {
  min-height: 215px;
  padding: 23px;
  border: 1px solid #ddd9cf;
  border-radius: 23px;
  background: #fffdf8;
  position: relative;
}
.desk-contact-card .contact-avatar {
  width: 60px;
  height: 60px;
}
.desk-contact-card h2 {
  margin: 13px 0 0;
  font-size: 1.1rem;
}
.desk-contact-card p {
  margin: 0;
  color: #71808c;
  font-size: .72rem;
}
.desk-contact-card footer {
  position: absolute;
  left: 23px;
  right: 23px;
  bottom: 18px;
  display: flex;
  gap: 7px;
}
.desk-contact-card footer button {
  flex: 1;
  padding: 7px;
  border: 1px solid #ccd5dc;
  border-radius: 9px;
  background: white;
  color: #31536e;
  font-size: .65rem;
  cursor: pointer;
}
.contact-explain {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}
.explain-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff0b8;
  color: #7b5b00;
  font-weight: 900;
}
.contact-explain p {
  margin: 2px 0 0;
  color: #71808c;
}
.contact-explain button {
  padding: 9px 15px;
  border: 1px solid #ccd5dc;
  border-radius: 10px;
  background: white;
  cursor: pointer;
}
.phone-setting-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  align-items: start;
}
.device-preview {
  min-height: 690px;
  padding: 28px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(145deg,#dceaf1,#f6eee2);
  position: sticky;
  top: 98px;
}
.device-frame {
  width: 280px;
  min-height: 590px;
  padding: 17px;
  border: 9px solid #173653;
  border-radius: 38px;
  background: #fffaf0;
  box-shadow: 0 20px 40px rgba(23,54,83,.18);
}
.device-status {
  display: flex;
  justify-content: space-between;
  font-size: .6rem;
  font-weight: 900;
}
.device-status i {
  font-style: normal;
  letter-spacing: 2px;
}
.device-brand {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #173653;
  font-size: .68rem;
}
.device-brand img {
  width: 44px;
  height: 37px;
  object-fit: contain;
}
.device-frame h2 {
  margin: 20px 0 2px;
  font-size: 1.3rem;
}
.device-frame > p {
  margin: 0;
  color: #71808c;
  font-size: .65rem;
}
.preview-todo {
  margin: 20px 0 12px;
  padding: 13px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
  border-radius: 14px;
  background: #173653;
  color: white;
}
.preview-todo span {
  grid-row: span 2;
  color: #ffd457;
  font-weight: 900;
}
.preview-todo strong {
  font-size: .7rem;
}
.preview-todo em {
  color: #9dd9bf;
  font-size: .58rem;
  font-style: normal;
}
.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preview-actions span {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 13px;
  background: white;
  color: #214c70;
  text-align: center;
  font-size: .65rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(23,54,83,.07);
}
.preview-message {
  margin-top: 13px;
  padding: 10px;
  border-radius: 11px;
  background: #fff0b8;
  color: #6d5307;
  font-size: .6rem;
}
.phone-setting-cards {
  display: grid;
  gap: 15px;
}
.family-setting-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #ebe8e0;
}
.family-setting-row:last-child {
  border-bottom: 0;
}
.family-setting-row strong {
  font-size: .85rem;
}
.family-setting-row p {
  margin: 2px 0 0;
  color: #71808c;
  font-size: .68rem;
}
.desk-segment {
  min-width: 260px;
}
.desk-profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.desk-profile-form label span,
.message-compose label span {
  display: block;
  margin-bottom: 5px;
  color: #71808c;
  font-size: .68rem;
}
.desk-profile-form input,
.message-compose input,
.message-compose textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7d5ce;
  border-radius: 10px;
  background: white;
}
.desk-profile-form button {
  min-height: 42px;
  align-self: end;
  border: 0;
  border-radius: 10px;
  background: #173653;
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.message-compose {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
}
.message-compose form {
  display: grid;
  gap: 13px;
}
.message-compose textarea {
  min-height: 160px;
  resize: vertical;
}
.message-preview {
  padding: 22px;
  border-radius: 20px;
  background: #e7f0f4;
}
.message-preview > small {
  color: #71808c;
  font-size: .65rem;
}
.message-preview > div {
  margin-top: 12px;
  padding: 18px;
  border-radius: 17px;
  background: white;
}
.message-preview p {
  margin: 4px 0;
}
.message-preview time {
  color: #71808c;
  font-size: .62rem;
}
body.child-mode .family-desktop {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}
body.child-mode > .topbar,
body.child-mode > #app,
body.child-mode > .main-nav,
body.child-mode > .ambient {
  display: none;
}
body.high-contrast {
  --ink:#071a2c;
  --muted:#33495d;
  --blue:#0058b8;
  --blue-deep:#062d57;
  --canvas:#fff;
  --paper:#fff;
  --line:#738293;
}
body.high-contrast .paper-card,
body.high-contrast .family-card,
body.high-contrast .knowledge-card { border-width:2px; }
@media (max-width: 1100px) {
  .care-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .day-story {
    grid-row: auto;
  }
  .phone-story {
    grid-column: 1 / -1;
  }
  .family-note {
    grid-column: 1 / -1;
  }
  .desk-contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .phone-setting-layout {
    grid-template-columns: 320px 1fr;
  }
  .topbar { grid-template-columns:1fr auto; }
  .topbar-center { display:none; }
  .home-grid { grid-template-columns:1fr 1fr; }
  .welcome-card { grid-column:1/-1; }
  .safety-card { min-height:280px; }
  .daily-card { grid-column:1/-1; }
  .two-column-layout,
  .calendar-layout { grid-template-columns:1fr; }
  .family-grid,
  .knowledge-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 720px) {
  :root { --radius:22px; }
  .ambient { display:none; }
  .topbar { height:68px; padding:6px 16px; }
  .brand img { width:48px; height:46px; }
  .brand strong { font-size:1rem; }
  .brand small { font-size:.56rem; }
  .access-tools .tool-button:nth-child(2),
  .access-tools .tool-button:nth-child(3) { display:none; }
  .tool-button { min-width:42px; }
  main { width:auto; margin:0; padding:18px 14px 102px; }
  .home-grid { display:block; }
  .home-grid > * { margin-bottom:14px; }
  .welcome-card { min-height:520px; display:block; background:linear-gradient(180deg,#fffdf8 0 55%,#e8f6ff 55%); }
  .welcome-copy { padding:30px 24px 0; }
  .welcome-copy h1 { font-size:2.2rem; }
  .welcome-copy p { font-size:.92rem; }
  .quick-actions { margin-top:22px; }
  .primary-action,
  .secondary-action { padding:0 15px; }
  .orbit-stage { min-height:290px; }
  .orbit-stage img { width:100%; height:100%; right:0; }
  .orbit-note { bottom:10px; }
  .safety-card { min-height:240px; }
  .daily-card { display:block; text-align:center; }
  .daily-art { margin:0 auto 12px; }
  .daily-card button { margin-top:12px; }
  .page-hero { min-height:260px; padding:28px 24px; display:block; }
  .page-hero h1 { font-size:2rem; }
  .hero-button { margin-top:24px; }
  .metric-ribbon { grid-template-columns:1fr 1fr; }
  .metric-card { padding:15px; }
  .metric-card strong { font-size:1.45rem; }
  .medicine-layout,
  .settings-grid { grid-template-columns:1fr; }
  .day-clock { min-height:410px; }
  .medicine-board { padding:20px; }
  .medicine-item { grid-template-columns:68px 1fr; padding:16px; }
  .medicine-item .complete-med { grid-column:1/-1; }
  .assistant-stage { padding:15px 0; }
  .assistant-stage::before { width:400px; height:400px; }
  .assistant-stage::after { width:320px; height:320px; }
  .assistant-intro h1 { font-size:2rem; }
  .family-grid,
  .knowledge-grid { grid-template-columns:1fr; }
  .emergency-panel { grid-template-columns:auto 1fr; }
  .emergency-panel > button { grid-column:1/-1; }
  .month-card,
  .agenda-card { padding:18px; }
  .calendar-day { min-height:52px; padding:5px; }
  .hero-search { width:100%; margin-top:22px; }
  .choice-row { grid-template-columns:1fr 1fr; }
  .checkin-form { padding:22px 16px; }
  .profile-setting form { flex-wrap:wrap; }
  .profile-setting input { flex-basis:45%; }
  .profile-setting button { min-height:42px; flex-basis:100%; }
  .main-nav { width:100%; min-height:75px; bottom:0; padding:6px 4px calc(6px + env(safe-area-inset-bottom)); border-radius:20px 20px 0 0; grid-template-columns:repeat(5,1fr); }
  .main-nav button:nth-child(6),
  .main-nav button:nth-child(7),
  .main-nav button:nth-child(8) { display:none; }
  .main-nav .voice-nav { width:68px; height:68px; margin-top:-22px; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid .wide { grid-column:auto; }
  .topbar {
    background: #fffaf0;
    border-bottom: 1px solid #e3ded2;
  }
  .brand img {
    width: 43px;
    height: 42px;
  }
  .brand strong {
    letter-spacing: .05em;
  }
  .home-grid .welcome-card {
    min-height: 292px;
    display: grid;
    grid-template-columns: 1fr 130px;
    background: linear-gradient(135deg,#fff7d9,#f9fcff);
  }
  .welcome-copy {
    padding: 27px 0 22px 22px;
  }
  .welcome-copy h1 {
    max-width: 240px;
    margin: 5px 0 7px;
    font-size: 1.78rem;
    line-height: 1.16;
  }
  .welcome-copy p {
    max-width: 235px;
    font-size: .83rem;
    line-height: 1.6;
  }
  .quick-actions {
    display: grid;
    gap: 8px;
    margin-top: 17px;
  }
  .primary-action,
  .secondary-action {
    width: 150px;
    min-height: 45px;
    padding: 0 10px;
    border-radius: 13px;
    font-size: .78rem;
  }
  .orbit-stage {
    min-height: 292px;
  }
  .orbit-stage img {
    width: 188px;
    height: 188px;
    right: -30px;
    bottom: 36px;
  }
  .orbit-one {
    width: 180px;
    height: 180px;
    right: -70px;
    top: 48px;
  }
  .orbit-two {
    width: 125px;
    height: 125px;
    right: -35px;
    top: 74px;
  }
  .orbit-note {
    display: none;
  }
  .safety-card {
    min-height: 118px;
    padding: 18px;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 13px;
    text-align: left;
  }
  .safety-icon {
    width: 52px;
    height: 52px;
    margin: 0;
    font-size: .9rem;
  }
  .safety-card strong {
    font-size: 1.15rem;
  }
  .safety-card span {
    font-size: .68rem;
  }
  .safety-card button {
    margin: 0;
    padding: 9px 11px;
    font-size: .68rem;
  }
  .mobile-family-note {
    min-height: 82px;
    padding: 13px 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #ecd796;
    border-radius: 18px;
    background: #fff5cc;
  }
  .note-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px 14px 5px 14px;
    background: #173653;
    color: white;
    font-weight: 900;
  }
  .mobile-family-note small {
    display: block;
    color: #8b6911;
    font-size: .58rem;
    font-weight: 900;
  }
  .mobile-family-note p {
    margin: 1px 0 0;
    color: #4f4426;
    font-size: .72rem;
    line-height: 1.45;
  }
  .mobile-family-note button {
    padding: 7px 9px;
    border: 1px solid #b58b19;
    border-radius: 9px;
    background: transparent;
    color: #72570e;
    font-size: .62rem;
  }
  .timeline-card,
  .health-glance,
  .family-glance,
  .daily-card {
    padding: 21px;
  }
  .timeline-item {
    grid-template-columns: 50px 12px 1fr;
  }
  .timeline-item em {
    display: none;
  }
  .family-glance,
  .daily-card {
    display: none;
  }
  .page-hero {
    min-height: 210px;
    padding: 24px 22px;
  }
  .page-hero h1 {
    font-size: 1.72rem;
  }
  .page-hero p {
    font-size: .8rem;
  }
  .hero-button {
    min-height: 48px;
    margin-top: 17px;
  }
  .health-number-row strong {
    font-size: 1.42rem;
  }
  .main-nav button span {
    font-size: 1.3rem;
  }
  .main-nav button b {
    font-size: .62rem;
  }
  .assistant-stage {
    min-height: calc(100vh - 190px);
  }
  .assistant-intro img {
    width: 100px;
    height: 75px;
  }
  .voice-orb {
    width: 160px;
    height: 160px;
  }
}

/* Device layout is independent of the selected family role. */
.daily-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:12px; margin:0 0 16px; }
.daily-metric { min-width:0; display:grid; gap:4px; padding:15px; border:1px solid var(--line); border-radius:16px; background:var(--paper); }
.daily-metric strong { font-size:1.15rem; }
.daily-metric small, .feature-row small { color:var(--muted); }
.care-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.care-shortcuts button, .record-voice, button.weather {
  min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--blue-deep);
}
.calendar-day[aria-pressed="true"] { outline:2px solid var(--blue-deep); outline-offset:-2px; }
#holidayName { color:var(--blue-deep); font-weight:700; }
.portrait { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.contact-avatar, .call-avatar, .family-avatar { overflow:hidden; }
.feature-form, .voice-compose, #communityForm { display:grid; gap:10px; }
.feature-form label, .voice-compose label, #communityForm label, #pairForm label { display:grid; gap:5px; }
.dialog-shell :is(input,textarea), .daily-entry input {
  max-width:100%; min-width:0; padding:9px; border:1px solid var(--line); border-radius:8px; font:inherit;
}
.message-list { max-height:340px; overflow:auto; margin-bottom:16px; }
.feature-row { display:grid; gap:3px; padding:10px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.feature-row p { margin:0; white-space:pre-wrap; }
.feature-row audio { width:100%; max-width:360px; }
#familyCode { display:block; padding:12px; border:1px solid var(--line); border-radius:12px; font:700 1rem monospace; user-select:all; overflow-wrap:anywhere; }
.voice-compose input[type=file] { width:100%; }
.voice-compose button:disabled { opacity:.58; cursor:default; }
.profile-setting form { flex-wrap:wrap; }
@media (max-width:900px) {
  body.child-mode .family-desktop { grid-template-columns:minmax(0,1fr); }
  .care-rail { position:relative; width:100%; min-height:0; padding:12px 14px; }
  .care-brand { padding:0 0 9px; }
  .care-rail :is(.elder-card,.rail-help,.rail-version) { display:none; }
  .care-nav { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:8px; }
  .care-nav button { display:flex; justify-content:center; gap:4px; padding:4px; font-size:.83rem; }
  .care-topbar { position:static; flex-wrap:wrap; gap:8px; padding:12px 14px; }
  .care-top-actions { flex-wrap:wrap; }
  .care-main { width:100%; padding:14px; }
  .care-dashboard-grid, .plan-board, .phone-setting-layout, .message-compose,
  .desk-contact-grid, .care-two-columns { grid-template-columns:minmax(0,1fr); }
  .desk-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .care-dashboard-grid > * { grid-column:auto; }
  .care-welcome, .care-page-title { flex-wrap:wrap; padding:18px; }
  .care-page-title > * { min-width:0; }
  .care-panel { min-width:0; }
  .care-view { min-width:0; }
}
@media (max-width:720px) {
  .access-tools .tool-button:nth-child(2) { display:inline-flex; }
  .access-tools .tool-button:nth-child(4) { display:none; }
  .access-tools { gap:4px; }
  .topbar { padding-inline:8px; }
  .brand small { display:none; }
  .main-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .main-nav button:nth-child(n) { display:grid; min-height:42px; }
  .main-nav .voice-nav { width:auto; height:auto; margin:0; }
  #app { padding-bottom:128px; }
  .daily-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .daily-metric { padding:10px; }
  .dialog-shell { padding:20px; }
  .assistant-stage::before { width: min(400px, 100%); }
  .assistant-stage::after { width: min(320px, 90%); }
}

