:root {
  --ink: #21352e;
  --muted: #7d8c85;
  --line: #e6ece8;
  --canvas: #f7faf7;
  --surface: #ffffff;
  --green: #397d66;
  --green-soft: #e6f3ec;
  --yellow: #fff4d9;
  --orange: #b47736;
  --red: #c76558;
  --blue: #5b86b3;
  --purple: #826eae;
  font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #e9efeb; font-size: 14px; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
.login-shell { width: min(100%, 430px); min-height: 100dvh; margin: 0 auto; padding: 38px 22px 28px; background: var(--canvas); }
.login-mark { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 19px; background: var(--green); color: white; font-size: 28px; font-weight: 800; box-shadow: 0 10px 22px rgba(57,125,102,.18); }
.login-shell h1 { margin: 8px 0 7px; font-size: 29px; }
.login-subtitle { margin: 0 0 22px; color: var(--muted); }
.login-account-list { display: grid; gap: 9px; }
.login-account { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: left; }
.login-account.active { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 2px rgba(57,125,102,.08); }
.login-account-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 13px; background: #f4c9b9; color: #8c5547; font-size: 18px; font-weight: 800; }
.login-account-avatar.family { background: #dceafa; color: #557da7; }.login-account-avatar.admin { background: #eee5f8; color: #8065a5; }
.login-account strong, .login-account small { display: block; }.login-account small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.login-form { margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); }
.login-form label { display: block; margin: 0 0 6px; font-weight: 700; }
.login-form input { width: 100%; min-height: 48px; margin-bottom: 13px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: white; outline: 0; font-size: 16px; }
.login-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,125,102,.12); }
.login-hint { margin: -1px 0 14px; color: var(--muted); font-size: 12px; }
.login-submit { width: 100%; min-height: 50px; border-radius: 11px; background: var(--green); color: white; font-size: 16px; font-weight: 700; }
.login-submit:active { transform: translateY(1px); }.login-error { min-height: 20px; margin: 10px 0 0; color: var(--red); font-size: 12px; }
.login-footer { margin: 24px 0 0; color: #9aa6a0; font-size: 11px; text-align: center; }
.phone-shell { width: min(100%, 430px); min-height: 100dvh; margin: 0 auto; background: var(--canvas); position: relative; box-shadow: 0 0 0 1px rgba(33,53,46,.07), 0 18px 70px rgba(31,50,42,.14); }
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 20px 14px; background: rgba(247,250,247,.96); position: sticky; top: 0; z-index: 5; }
.date-line, .eyebrow { margin: 0; color: #97a39d; font-size: 11px; letter-spacing: .04em; }
h1, h2, h3, p { margin-top: 0; }
.app-header h1 { margin: 5px 0 0; font-size: 21px; }
.avatar-button, .profile-avatar { display: grid; place-items: center; border-radius: 50%; background: #f4c9b9; color: #8c5547; font-weight: 800; }
.profile-entry { display: flex; align-items: center; gap: 7px; padding: 6px 11px 6px 6px; border: 1px solid var(--line); border-radius: 22px; background: white; color: var(--green); font-size: 13px; font-weight: 700; }
.profile-entry span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #f4c9b9; color: #8c5547; }
.screen { display: none; padding: 8px 18px 28px; animation: enter .2s ease-out; }
.screen.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.greeting-card, .chat-hero { display: flex; gap: 14px; align-items: center; padding: 20px; border-radius: 18px; background: #e9f4ee; border: 1px solid #d9ece1; }
.avatar-orb { width: 64px; height: 64px; display: grid; place-items: center; position: relative; flex: 0 0 64px; border-radius: 50%; background: #c3e5d2; color: var(--green); font-weight: 800; }
.avatar-orb span { position: absolute; right: 2px; bottom: 4px; width: 12px; height: 12px; border: 3px solid #e9f4ee; border-radius: 50%; background: #64b07f; }
.avatar-orb.small { width: 48px; height: 48px; flex-basis: 48px; font-size: 12px; }
.greeting-card h2, .chat-hero h2 { margin: 7px 0 5px; font-size: 19px; }
.muted { color: var(--muted); line-height: 1.65; font-size: 12px; margin-bottom: 0; }
.section-block { margin-top: 21px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.section-title h2 { font-size: 16px; margin: 0; }
.link-button, .icon-link { color: var(--green); background: transparent; font-weight: 700; }
.today-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 15px; }
.today-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #f0f3f1; }
.today-row:last-child { border-bottom: 0; }
.time-dot { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 700; }
.today-row > div:nth-child(2), .reminder-row > div:nth-child(2) { flex: 1; min-width: 0; }
.today-row strong, .today-row small, .reminder-row strong, .reminder-row small { display: block; }
.today-row small, .reminder-row small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.check-button { width: 26px; height: 26px; border: 1px solid #cfddd4; border-radius: 50%; background: white; color: transparent; }
.check-button.done { background: var(--green); border-color: var(--green); color: white; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-card { text-align: left; padding: 15px; border-radius: 14px; border: 1px solid var(--line); background: white; display: grid; gap: 5px; }
.action-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(35,63,50,.08); }
.action-card small { color: var(--muted); font-size: 11px; }
.action-card.warm { background: #fff2ec; border-color: #f3ddd3; }.action-card.green { background: #edf7f0; border-color: #d9ecdf; }.action-card.blue { background: #edf4fb; border-color: #dce8f4; }.action-card.purple { background: #f3effa; border-color: #e4dcf2; }
.action-icon, .profile-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: white; font-size: 11px; font-weight: 800; }
.safety-card, .permission-card, .notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 13px; }
.safety-card { margin-top: 19px; background: var(--yellow); border: 1px solid #f1e3bd; color: #765d32; }
.safety-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e7bd69; color: white; font-weight: 800; }
.safety-card > div:nth-child(2), .permission-card > div:nth-child(2) { flex: 1; }.safety-card p, .permission-card p { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: #967642; }
.screen-intro { margin: 9px 0 17px; }.screen-intro h2 { margin: 6px 0 5px; font-size: 22px; }.row-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.chat-hero { margin-bottom: 14px; padding: 16px; }.chat-hero h2 { font-size: 18px; }
.screen#screen-chat.active { display: flex; flex-direction: column; height: calc(100dvh - 76px); min-height: 460px; padding-bottom: 12px; }
.chat-stream { flex: 1; min-height: 160px; overflow-y: auto; padding: 5px 3px 8px; }
.bubble { max-width: 86%; padding: 11px 13px; margin: 11px 0; border-radius: 5px 15px 15px 15px; background: white; border: 1px solid var(--line); line-height: 1.65; box-shadow: 0 4px 12px rgba(33,53,46,.03); }
.bubble.user { margin-left: auto; background: #eaf4ee; border-radius: 15px 5px 15px 15px; border-color: #dcece1; }.bubble-label { display: block; color: #9ba7a1; font-size: 10px; margin-bottom: 4px; }.inline-action { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 9px; }.inline-action span { flex: 1 1 100%; color: var(--muted); font-size: 11px; line-height: 1.45; }.inline-action button { padding: 7px 9px; border-radius: 7px; background: var(--green); color: white; font-size: 11px; }.inline-action .quiet-button { color: var(--green); background: var(--green-soft); }
.chat-confirm-card { margin-top: 11px; padding: 12px; border: 1px solid #dce9e0; border-radius: 9px; background: #fbfdfb; }
.chat-confirm-heading { display: block; margin-bottom: 5px; color: var(--green); font-size: 14px; }
.chat-confirm-row { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf1ee; line-height: 1.5; }
.chat-confirm-row:last-of-type { border-bottom: 0; }
.chat-confirm-row span { color: var(--muted); }
.chat-confirm-row strong { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.quick-say { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; }.quick-say button { flex: 0 0 auto; padding: 7px 10px; border-radius: 15px; background: var(--green-soft); color: var(--green); font-size: 11px; }
.chat-composer { display: flex; align-items: center; gap: 9px; padding: 12px 0 0; border-top: 1px solid var(--line); }.chat-composer input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px; outline: 0; background: white; font-size: 15px; }.mode-toggle { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border: 1px solid #d9e8df; border-radius: 50%; background: #eaf4ee; color: var(--green); }.mode-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.text-entry { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }.voice-entry { flex: 1; }.voice-entry[hidden], .text-entry[hidden] { display: none; }.talk-button { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: center; border: 1px solid #cfe3d7; border-radius: 14px; background: #e7f3ec; color: var(--green); font-size: 17px; font-weight: 700; touch-action: none; user-select: none; -webkit-user-select: none; }.talk-button.listening { background: #d9eee2; border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,125,102,.12); }.talk-button.processing { background: #f2f6f3; color: var(--muted); }.send-button, .primary-button { padding: 12px 14px; border-radius: 11px; background: var(--green); color: white; font-weight: 700; white-space: nowrap; }.primary-button { font-size: 11px; }
.notice { background: #fff7e6; border: 1px solid #f1e3be; color: #806634; margin-bottom: 15px; }.notice span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e5bd6a; color: white; font-weight: 800; }.notice p { font-size: 11px; line-height: 1.5; margin: 2px 0 0; }
.filter-tabs { display: flex; gap: 16px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 13px; }.filter-tabs button { flex: 0 0 auto; padding: 0 0 10px; background: transparent; color: #8b9892; font-size: 12px; position: relative; }.filter-tabs button.active { color: var(--green); font-weight: 700; }.filter-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--green); }
.record-list { display: grid; gap: 10px; }.record-card, .pending-section { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 14px; }.record-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }.record-card h3 { margin: 11px 0 5px; font-size: 15px; }.record-card p { color: #6e7e76; font-size: 12px; line-height: 1.6; margin: 0; }.record-meta { display: flex; justify-content: space-between; color: #a1aba6; font-size: 10px; margin-top: 12px; }.record-tag { display: inline-block; padding: 4px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; }.record-tag.medical { color: #a2584e; background: #ffede7; }.record-tag.attention { color: #957137; background: #fff2d6; }.record-tag.routine { color: #438263; background: #e9f5ee; }.status { color: #408565; background: #e9f5ee; padding: 4px 7px; border-radius: 12px; font-size: 10px; }
.pending-section { margin-top: 14px; }.count-pill { color: #6b84a6; background: #edf3fa; padding: 4px 8px; border-radius: 12px; font-size: 11px; }.pending-row { display: flex; align-items: center; gap: 9px; padding: 12px 0; border-top: 1px solid #f0f3f1; }.pending-row > div:first-child { flex: 1; }.pending-row strong, .pending-row small { display: block; }.pending-row strong { margin-top: 6px; font-size: 12px; }.pending-row small { color: #99a49f; font-size: 10px; margin-top: 4px; line-height: 1.4; }.pending-actions { display: flex; gap: 5px; }.pending-actions button { padding: 7px 8px; border-radius: 7px; font-size: 10px; }.outline-button { padding: 7px 8px; border-radius: 7px; background: white; border: 1px solid #d5e3da; color: var(--green); }.empty-copy { color: #9aa6a0; font-size: 12px; padding: 10px 0; }
.reminder-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }.reminder-summary div { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 13px 9px; text-align: center; }.reminder-summary strong, .reminder-summary span { display: block; }.reminder-summary strong { font-size: 17px; color: var(--green); }.reminder-summary span { color: var(--muted); font-size: 10px; margin-top: 4px; }.reminder-list { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 0 14px; }.reminder-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #f0f3f1; }.reminder-row:last-child { border-bottom: 0; }.reminder-time { width: 45px; font-size: 12px; font-weight: 700; color: var(--green); }.permission-card { margin-top: 14px; background: #edf4fb; border: 1px solid #dce8f4; }.permission-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: white; color: var(--blue); font-weight: 700; }.permission-card p { color: #6b87a5; }
.profile-hero { display: flex; align-items: center; gap: 14px; padding: 14px 4px 20px; }.profile-avatar { width: 68px; height: 68px; font-size: 22px; }.profile-hero h2 { margin: 5px 0; }.profile-list { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 2px 15px; }.profile-list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 0; background: transparent; border-bottom: 1px solid #f0f3f1; text-align: left; }.profile-list button:last-child { border-bottom: 0; }.profile-list button > span:nth-child(2) { flex: 1; }.profile-list strong, .profile-list small { display: block; }.profile-list small { margin-top: 4px; color: var(--muted); font-size: 11px; }.profile-list b { color: #a3aea8; font-size: 18px; font-weight: 400; }.danger-button { width: 100%; padding: 12px; margin-top: 18px; border-radius: 10px; background: #fff0ed; border: 1px solid #f4d7d0; color: var(--red); font-weight: 700; }.logout-button { width: 100%; padding: 12px; margin-top: 10px; border: 1px solid #e1e8e3; border-radius: 10px; background: white; color: #7c8d84; font-weight: 700; }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 20; align-items: flex-end; justify-content: center; background: rgba(23,39,32,.35); }.modal-backdrop.open { display: flex; }.modal { width: min(430px, 100%); padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); background: white; border-radius: 18px 18px 0 0; }.modal h2 { margin: 7px 0; }.modal p { color: var(--muted); line-height: 1.6; font-size: 12px; }.modal-actions { display: flex; gap: 8px; margin-top: 16px; }.modal-actions button { flex: 1; }.toast { position: fixed; z-index: 30; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #234137; color: white; padding: 10px 14px; border-radius: 8px; font-size: 12px; transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.summary-status { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px solid #d9ecdf; border-radius: 13px; background: #eaf6ef; }.summary-check { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #bde0c9; color: var(--green); font-weight: 800; }.summary-status > div { flex: 1; }.summary-status p { margin: 4px 0 0; color: #6f897b; font-size: 11px; }.summary-section { margin-top: 18px; }.summary-date { color: #a0aba6; font-size: 11px; }.summary-list { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 3px 14px; }.summary-list > div { display: flex; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid #f0f3f1; }.summary-list > div:last-child { border-bottom: 0; }.summary-list p { flex: 1; margin: 0; }.summary-list strong, .summary-list small { display: block; }.summary-list small { margin-top: 3px; color: var(--muted); font-size: 11px; }.summary-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: 10px; font-weight: 700; }.summary-dot.green { background: #e8f5ed; color: #458b6d; }.summary-dot.blue { background: #edf4fb; color: var(--blue); }.summary-dot.yellow { background: #fff3d8; color: var(--orange); }.followup-card, .privacy-note { padding: 14px; border-radius: 12px; background: white; border: 1px solid var(--line); }.followup-card p, .privacy-note p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }.privacy-note { margin-top: 14px; background: #f0f5f2; border-color: #e0ebe4; }.privacy-note strong { font-size: 12px; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0f3f1; }.toggle-button { width: 42px; height: 24px; padding: 3px; border-radius: 14px; background: #cbd6d0; }.toggle-button span { display: block; width: 18px; height: 18px; border-radius: 50%; background: white; transition: .15s; }.toggle-button.on { background: var(--green); }.toggle-button.on span { margin-left: 18px; }
.reminder-label { display: block; margin: 14px 0 6px; font-weight: 700; }.reminder-title-input { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 16px; }.reminder-title-input:focus { outline: 2px solid #a7cdb7; outline-offset: 1px; }
.reminder-time { width: auto; flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 430px) { body { background: var(--canvas); }.phone-shell { box-shadow: none; }.pending-row { align-items: flex-start; flex-direction: column; }.pending-actions { width: 100%; justify-content: flex-end; }.row-intro { align-items: flex-start; }.row-intro .primary-button { margin-top: 3px; } }
