:root {
  --ink: #293734;
  --muted: #74807c;
  --paper: #f6f5ef;
  --white: #fffefb;
  --line: #e4e4db;
  --sage: #6e8e82;
  --sage-dark: #45685d;
  --sage-pale: #e6eeea;
  --coral: #db806f;
  --coral-pale: #f8e8e3;
  --gold: #d6a653;
  --gold-pale: #fbf1d9;
  --shadow: 0 18px 50px rgba(43, 60, 55, 0.08);
}

* {
  box-sizing: border-box;
}

.staging-environment-banner {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 100000;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(128, 72, 0, 0.2);
  border-radius: 999px;
  background: rgba(255, 244, 216, 0.95);
  box-shadow: 0 10px 30px rgba(46, 39, 24, 0.14);
  color: #7b4c00;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  min-height: 100vh;
  padding: 28px;
  background: #f3eee4;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(460px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-card-wide {
  width: min(660px, 100%);
}

.auth-card > img {
  width: min(310px, 100%);
  height: auto;
  margin-bottom: 0;
}

.auth-brand-tagline {
  width: min(243px, calc(100% - 67px));
  margin: -13px 0 24px min(67px, 21.6%);
  color: var(--sage-dark);
  font-family: "Segoe UI", "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.075em;
  line-height: 1.35;
  text-align: center;
  text-transform: none;
}

.auth-card h1 {
  margin-bottom: 8px;
}

.auth-card > p:not(.eyebrow, .privacy-note, .auth-brand-tagline) {
  color: var(--muted);
  font-size: 13px;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
}

.auth-error {
  padding: 10px 12px;
  border-radius: 8px;
  color: #8a3429;
  background: var(--coral-pale);
  font-size: 11px;
}

.auth-message {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 11px;
  line-height: 1.5;
}

.auth-callout {
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-color: #d8e5de;
  color: var(--sage-dark);
  background: #f4f8f5;
  font-size: 11px;
  line-height: 1.5;
}

.auth-help-link {
  margin-top: 16px;
  color: var(--sage-dark);
  display: block;
  font-size: 11px;
  text-align: center;
}

.auth-divider {
  margin: 17px 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
  flex: 1;
}

.privacy-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.setup-result {
  padding-top: 10px;
}

.setup-result a:not(.button) {
  overflow-wrap: anywhere;
  color: var(--sage-dark);
  font-size: 11px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  padding: 30px 22px 24px;
  background: #30443e;
  color: #f7f4ea;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 30px;
  color: inherit;
  text-decoration: none;
  font-family: "Newsreader", serif;
  font-size: 21px;
  font-weight: 600;
}

.brand img {
  width: 184px;
  height: auto;
  display: block;
}

.brand-mark {
  width: 27px;
  height: 30px;
  position: relative;
  display: inline-block;
}

.brand-mark span {
  position: absolute;
  border: 0;
}

.brand-mark span:nth-child(1) {
  left: 2px;
  bottom: 0;
  width: 23px;
  height: 19px;
  border: 2px solid #f7f4ea;
  border-radius: 4px 4px 2px 2px;
}

.brand-mark span:nth-child(2) {
  left: 8px;
  bottom: 5px;
  width: 11px;
  height: 10px;
  border-radius: 2px;
  background: #f1a390;
  box-shadow: 0 0 10px rgba(241, 163, 144, 0.55);
}

.brand-mark span:nth-child(3) {
  left: 9px;
  top: 0;
  width: 9px;
  height: 13px;
  border-radius: 70% 30% 60% 40%;
  background: #f1a390;
  transform: rotate(12deg);
}

.main-nav {
  display: grid;
  gap: 7px;
}

.nav-item,
.quiet-button {
  border: 0;
  background: transparent;
  color: #c8d3cf;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 13px;
  border-radius: 10px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 18px;
}

.nav-count {
  margin-left: auto;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 20px;
  color: #30443e;
  background: #f0a18d;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.recipient-nav {
  margin-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 10px 10px;
  padding-top: 17px;
}

.sidebar-family {
  margin-top: 42px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.sidebar .eyebrow {
  padding-left: 8px;
  color: #93a69f;
}

.person-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.person-card strong,
.person-card small {
  display: block;
}

.person-card strong {
  font-size: 13px;
}

.person-card small {
  margin-top: 3px;
  color: #aebdb8;
  font-size: 11px;
}

.chevron {
  margin-left: auto;
}

.avatar {
  width: 38px;
  height: 38px;
  border: 3px solid var(--white);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  position: relative;
}

.avatar.presence-active::after,
.avatar.presence-recent::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.avatar.presence-active::after,
.presence-dot.presence-active {
  background: #48a868;
}

.avatar.presence-recent::after,
.presence-dot.presence-recent {
  background: #d9a63f;
}

.avatar-small {
  width: 27px;
  height: 27px;
  border-width: 2px;
  font-size: 9px;
}

.avatar-mary {
  color: #75534c;
  background: #efc0b3;
}

.avatar-jane {
  color: #35564c;
  background: #bfdbd0;
}

.avatar-david {
  color: #4f536e;
  background: #ccd0e8;
}

.avatar-lisa {
  color: #755e31;
  background: #ead49d;
}

.family-members {
  margin-top: 26px;
}

.avatar-row {
  display: flex;
  padding-left: 8px;
}

.avatar-row > span {
  display: contents;
}

.avatar-row .avatar + .avatar {
  margin-left: -7px;
}

.avatar-add {
  cursor: pointer;
  border: 2px dashed #8ba098;
  color: #dbe3df;
  background: #30443e;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 5px;
}

.sidebar-footer a {
  text-decoration: none;
}

.sidebar-signout {
  color: #f1c5bb;
}

.sidebar-signout:hover {
  background: rgba(241, 163, 144, 0.14);
  color: #fff;
}

.settings-invitation-shortcut {
  background: rgba(240, 161, 141, 0.14);
  color: #fff;
}

.sidebar-scrim {
  display: none;
}

main {
  min-width: 0;
}

.topbar {
  min-height: 116px;
  padding: 26px clamp(28px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 245, 239, 0.94);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recipient-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recipient-switcher select {
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 32px 6px 11px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.date-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.account-type-badge {
  display: inline-flex;
  margin-top: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-type-badge[data-account-type="provider-managed"],
.account-type-badge[data-account-type="provider-member"] {
  color: #855f1d;
  background: #fff1cc;
}

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

h1,
h2,
h3 {
  font-family: "Newsreader", serif;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 600;
}

h2 {
  margin-bottom: 7px;
  font-size: 25px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 7px;
  font-size: 19px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-button,
.mobile-menu {
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
}

.icon-button i {
  display: none;
  position: absolute;
  right: 3px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.icon-button.has-alert i {
  display: block;
}

.mobile-menu {
  display: none;
  font-size: 20px;
}

.content {
  padding: 36px clamp(28px, 5vw, 72px) 70px;
  max-width: 1500px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.status-card {
  min-height: 190px;
  position: relative;
  overflow: hidden;
  padding: 32px 36px;
  border: 1px solid #dfe5df;
  border-radius: 18px;
  background: linear-gradient(105deg, #eef3ee, #f8f6ed);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-checklist {
  margin-bottom: 18px;
  padding: 24px 28px;
  border-color: #bfd4ca;
  background: var(--sage-pale);
}

.onboarding-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.onboarding-intro {
  max-width: 620px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.onboarding-role {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.onboarding-checklist.collapsed .onboarding-checklist-items {
  display: none;
}

.onboarding-checklist-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.onboarding-help-note {
  margin: 13px 0 0;
  color: var(--sage-dark);
  font-size: 10px;
  line-height: 1.55;
}

.onboarding-item {
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.onboarding-item > span {
  color: var(--gold);
  font-weight: 700;
}

.onboarding-item.done > span {
  color: var(--sage-dark);
}

.onboarding-item strong,
.onboarding-item small {
  display: block;
}

.onboarding-item strong {
  font-size: 11px;
}

.onboarding-item strong em {
  margin-left: 5px;
  color: #855f1d;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.onboarding-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.onboarding-action {
  justify-self: end;
  white-space: nowrap;
}

.onboarding-action:disabled {
  cursor: default;
  opacity: 0.55;
}

.guided-empty-state {
  padding: 25px 10px;
  text-align: center;
}

.guided-empty-state strong,
.guided-empty-state span {
  display: block;
}

.guided-empty-state span {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 10px;
}

.status-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -110px;
  border: 45px solid rgba(113, 147, 134, 0.08);
  border-radius: 50%;
}

.status-card-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 26px;
  align-items: stretch;
}

.status-section {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.latest-status-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.daily-checkin-section {
  padding-left: 26px;
  border-left: 1px solid rgba(74, 112, 101, 0.16);
  display: grid;
  align-content: start;
}

.status-section-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.status-copy {
  max-width: 660px;
  position: relative;
  z-index: 1;
}

.status-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 0;
  color: #64716d;
  font-size: 14px;
  line-height: 1.65;
}

.author-line {
  margin-top: 22px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.wellbeing {
  z-index: 1;
  min-width: 150px;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--sage-dark);
}

.wellbeing-ring {
  width: 74px;
  height: 74px;
  margin-bottom: 7px;
  border: 1px solid #a9c1b7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.52);
  font-size: 30px;
}

.wellbeing strong {
  font-family: "Newsreader", serif;
  font-size: 17px;
}

.wellbeing span {
  color: #8b9994;
  font-size: 10px;
}

.quick-actions {
  margin: 18px 0 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.quick-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: #ccd5d0;
  box-shadow: 0 10px 25px rgba(45, 62, 57, 0.07);
}

.quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 600;
}

.quick-icon.coral {
  color: #a25243;
  background: var(--coral-pale);
}

.quick-icon.sage {
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.quick-icon.gold {
  color: #986e24;
  background: var(--gold-pale);
}

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.quick-card small {
  color: var(--muted);
  font-size: 10px;
}

.arrow {
  margin-left: auto;
  color: #9ca6a2;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
  gap: 20px;
}

.left-column {
  display: grid;
  gap: 20px;
  align-content: start;
}

.right-column {
  display: grid;
  gap: 20px;
  align-content: start;
}

.layout-customize-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
}

.layout-customize-bar small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.layout-section-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px dashed #c8d9d2;
  border-radius: 12px;
  color: var(--muted);
  background: #f7fbf8;
  font-size: 12px;
}

.layout-section-controls span {
  margin-right: auto;
  font-weight: 700;
}

.layout-section-controls button {
  border: 1px solid #b7c9c2;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 6px 10px;
}

.layout-section-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.layout-editing [data-layout-section] {
  outline: 2px dashed #c8d9d2;
  outline-offset: 3px;
}

.layout-settings-list {
  display: grid;
  gap: 10px;
}

.layout-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf5;
}

.layout-settings-item > span {
  color: var(--ink);
  font-weight: 700;
}

.layout-settings-item div {
  display: flex;
  gap: 8px;
}

.layout-settings-item button {
  border: 1px solid #b7c9c2;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.layout-settings-item button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.account-type-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-type-pill[data-account-type="provider-managed"],
.account-type-pill[data-account-type="provider-member"] {
  color: #855f1d;
  background: #fff1cc;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 2px 0 rgba(34, 50, 45, 0.01);
}

.activity-panel,
.action-summary-panel,
.next-up,
.alert-history-panel {
  padding: 26px;
}

.alert-history-panel:not([open]) > .panel-heading {
  margin-bottom: 0;
}

.activity-panel:not([open]) > .panel-heading {
  margin-bottom: 0;
}

.activity-panel > summary.panel-heading,
.alert-history-panel > summary.panel-heading {
  cursor: pointer;
  list-style: none;
}

.activity-panel > summary.panel-heading::-webkit-details-marker,
.alert-history-panel > summary.panel-heading::-webkit-details-marker {
  display: none;
}

.recent-history-content > .text-button {
  justify-self: start;
}

.action-summary-panel {
  margin-bottom: 22px;
  border-color: #ead7b2;
  background: #fffaf1;
}

.action-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.action-summary-item,
.action-summary-clear {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eddfc6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.action-summary-item {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.action-summary-item:hover,
.action-summary-item:focus-visible {
  border-color: #d9b978;
  background: #fff;
  outline: 2px solid rgba(160, 117, 46, 0.18);
  outline-offset: 2px;
}

.action-summary-item > span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.action-summary-item.urgent > span {
  background: #c46c45;
}

.action-summary-item.task > span {
  background: var(--sage-dark);
}

.action-summary-item.task-soon > span {
  color: #533704;
  background: #f0c35a;
}

.action-summary-item.message > span {
  background: #a0752e;
}

.action-summary-item.schedule > span {
  background: #557d8c;
}

.action-summary-item.note > span {
  background: #6f7f78;
}

.action-summary-item.recipient > span {
  background: #557d8c;
}

.action-summary-item strong,
.action-summary-item small,
.action-summary-clear strong,
.action-summary-clear span {
  display: block;
}

.action-summary-item strong,
.action-summary-clear strong {
  color: var(--ink);
  font-size: 12px;
}

.action-summary-item small,
.action-summary-clear span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.action-summary-clear {
  grid-column: 1 / -1;
  display: block;
  border-color: #c8ddd4;
  background: var(--sage-pale);
}

.focus-pulse {
  animation: focusPulse 1.25s ease-out;
}

@keyframes focusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(196, 108, 69, 0.32);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(196, 108, 69, 0);
  }
  100% {
    box-shadow: 0 2px 0 rgba(34, 50, 45, 0.01);
  }
}

.panel-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 22px;
}

.panel-heading.compact {
  align-items: center;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--sage-dark);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.timeline-list {
  position: relative;
}

.timeline-entry {
  position: relative;
  padding: 0 0 25px 44px;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-entry:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 31px;
  bottom: 3px;
  width: 1px;
  background: var(--line);
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 1px;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 11px;
  font-weight: 700;
}

.timeline-dot.concern {
  color: #94661a;
  background: var(--gold-pale);
}

.timeline-dot.task {
  color: #9b574a;
  background: var(--coral-pale);
}

.entry-meta {
  margin-bottom: 5px;
  color: #919b97;
  font-size: 10px;
  font-weight: 600;
}

.timeline-entry h3 {
  margin-bottom: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.timeline-entry p {
  margin-bottom: 8px;
  color: #6e7975;
  font-size: 12px;
  line-height: 1.55;
}

.entry-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 20px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 9px;
  font-weight: 700;
}

.entry-tag-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.entry-tag-button:hover,
.entry-tag-button:focus-visible {
  background: #dfece6;
  outline: none;
}

.task-total {
  padding: 5px 8px;
  border-radius: 20px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 9px;
  font-weight: 700;
}

.task-list {
  display: grid;
}

.task-item {
  padding: 13px 0;
  border-top: 1px solid #edede7;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}

.task-check {
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border: 1.5px solid #b8c3bf;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.task-check:hover {
  border-color: var(--sage);
  background: var(--sage-pale);
}

.task-item strong,
.task-item small {
  display: block;
}

.task-item strong {
  font-size: 12px;
  line-height: 1.4;
}

.task-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.task-main {
  min-width: 0;
}

.task-timing-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.task-timing-row small {
  margin-top: 0;
  font-weight: 700;
}

.task-compact-detail {
  max-width: 100%;
}

.task-detail-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.task-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.task-status-assigned {
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.task-status-unassigned {
  color: #855f1d;
  background: #fff1cc;
}

.task-status-overdue {
  color: #9b574a;
  background: var(--coral-pale);
}

.task-status-due-soon {
  color: #855f1d;
  background: #fff1cc;
}

.task-status-completed {
  color: #65716d;
  background: #eeeeea;
}

.task-owner {
  width: 26px;
  height: 26px;
  border: 0;
  font-size: 9px;
}

.task-owner-label {
  flex: 0 1 auto;
  width: fit-content;
  min-width: 58px;
  max-width: min(100%, 230px);
  min-height: 26px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.task-owner-label-button {
  cursor: pointer;
  font-family: inherit;
}

.task-owner-label-button:hover,
.task-owner-label-button:focus-visible {
  color: #6e4a0f;
  background: #ffe4a3;
  outline: 2px solid rgba(151, 101, 26, 0.22);
  outline-offset: 2px;
}

.task-owner-label.presence-active,
.task-owner-label.presence-recent {
  padding-right: 22px;
  background-repeat: no-repeat;
  background-size: 8px 8px;
  background-position: calc(100% - 9px) 50%;
}

.task-owner-label.presence-active {
  background-image: radial-gradient(circle, #48a868 0 55%, transparent 60%);
}

.task-owner-label.presence-recent {
  background-image: radial-gradient(circle, #d9a63f 0 55%, transparent 60%);
}

.task-owner-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.task-owner-caption {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.task-owner-control-unassigned .task-owner-caption {
  color: #855f1d;
}

.task-owner-control .task-owner-label {
  min-width: 0;
}

.task-owner-action {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f7f3e9;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.task-owner-unassigned {
  color: #855f1d;
  background: #fff1cc;
}

.task-owner-action-primary,
.task-owner-claim,
.task-takeover-button {
  cursor: pointer;
  color: var(--sage-dark);
  background: var(--sage-pale);
  border-color: rgba(77, 113, 102, 0.2);
}

.task-owner-action-primary:hover,
.task-owner-action-primary:focus-visible,
.task-owner-claim:hover,
.task-owner-claim:focus-visible,
.task-takeover-button:hover,
.task-takeover-button:focus-visible {
  color: #6e4a0f;
  background: #ffe4a3;
  outline: 2px solid rgba(151, 101, 26, 0.22);
  outline-offset: 2px;
}

.task-release-button {
  color: var(--muted);
  background: #fff;
  border-color: var(--line);
}

.task-release-button:hover,
.task-release-button:focus-visible {
  color: var(--sage-dark);
  background: #f7f3e9;
  outline: 2px solid rgba(77, 113, 102, 0.14);
  outline-offset: 2px;
}

.task-state-overdue {
  border-left: 3px solid #d98273;
  padding-left: 10px;
}

.task-state-unassigned {
  border-left: 3px solid #e4bd62;
  padding-left: 10px;
}

.task-state-due-soon {
  border-left: 3px solid #f0c35a;
  padding-left: 10px;
}

.task-owner-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.task-management-row {
  grid-column: 2;
  min-width: 0;
  margin-top: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px 14px;
  align-items: center;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  min-width: max-content;
}

.task-actions .text-button {
  font-size: 9px;
}

.task-item .task-management-row {
  justify-self: stretch;
}

.provider-dashboard {
  display: grid;
  gap: 18px;
}

.provider-organization-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 14px 35px rgba(45, 62, 57, 0.06);
}

.provider-card-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.provider-card-heading h3 {
  margin: 0 0 6px;
  font-family: "Newsreader", serif;
  font-size: 27px;
  color: var(--ink);
}

.provider-card-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.provider-status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.provider-status-pill.suspended {
  color: #9a4121;
  background: #fff0e8;
}

.provider-summary-grid {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.provider-subsection {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.provider-subsection + .provider-subsection {
  margin-top: 20px;
}

.provider-member-list,
.provider-client-list,
.provider-recipient-list,
.provider-invitation-list {
  display: grid;
}

.provider-member-list,
.provider-client-list,
.provider-invitation-list {
  gap: 10px;
}

.provider-member-item,
.provider-recipient-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.provider-member-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf8;
}

.provider-member-item strong,
.provider-member-item small,
.provider-recipient-item strong,
.provider-recipient-item small,
.provider-client-card strong,
.provider-client-card small {
  display: block;
}

.provider-member-item strong,
.provider-recipient-item strong,
.provider-client-card strong {
  color: var(--ink);
  font-size: 12px;
}

.provider-member-item small,
.provider-recipient-item small,
.provider-client-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.provider-member-item > span:last-child {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 8px;
  font-weight: 800;
}

.provider-member-item.suspended > span:last-child {
  color: #9a4121;
  background: #fff0e8;
}

.provider-invite-form {
  margin: 12px 0;
  padding: 13px;
  border: 1px dashed #cfddd6;
  border-radius: 14px;
  background: #fbfaf5;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.75fr) auto;
  gap: 11px;
  align-items: end;
}

.provider-invitation-item {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.provider-invitation-item strong,
.provider-invitation-item small {
  display: block;
}

.provider-invitation-item strong {
  color: var(--ink);
  font-size: 12px;
}

.provider-invitation-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.provider-client-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfaf5;
}

.provider-recipient-list {
  margin-top: 12px;
  gap: 9px;
}

.provider-recipient-item {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.provider-assignment-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.provider-assignment-pill,
.provider-unassigned {
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
}

.provider-assignment-pill {
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.provider-assignment-pill button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1;
}

.provider-assignment-pill button:hover {
  color: #9a4121;
  background: #fff0e8;
}

.provider-unassigned {
  color: var(--muted);
  background: #efefe9;
}

.provider-assignment-form {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-assignment-form select {
  min-width: 190px;
}

.provider-setup-summary {
  margin-bottom: 14px;
}

.provider-setup-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.provider-setup-card.connected {
  border-color: #cfddd6;
  background: var(--sage-pale);
}

.provider-setup-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
}

.provider-setup-card strong,
.provider-setup-card span {
  display: block;
}

.provider-setup-card strong {
  color: var(--ink);
  font-size: 12px;
}

.provider-setup-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.provider-setup-form {
  display: grid;
  gap: 12px;
}

.add-inline {
  width: 100%;
  padding: 13px 0 0;
  border: 0;
  border-top: 1px solid #edede7;
  color: var(--sage-dark);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
}

.concern-panel {
  padding: 22px;
  background: #fffaf0;
  border-color: #eddfc5;
  display: flex;
  gap: 15px;
}

.schedule-panel {
  padding: 22px;
}

.schedule-panel .panel-heading {
  margin-bottom: 8px;
}

.schedule-add-button {
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-recipient-alerts {
  margin: 18px 0 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-recipient-alerts .eyebrow {
  margin: 0 0 8px;
  color: rgba(247, 244, 234, 0.7);
}

.sidebar-recipient-alert {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  background: transparent;
  color: #f7f4ea;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.sidebar-recipient-alert:hover,
.sidebar-recipient-alert:focus-visible,
.sidebar-recipient-alert.active {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-recipient-alert span {
  min-width: 0;
  flex: 1;
}

.sidebar-recipient-alert strong,
.sidebar-recipient-alert small {
  display: block;
}

.sidebar-recipient-alert strong {
  font-size: 12px;
}

.sidebar-recipient-alert small {
  margin-top: 2px;
  color: rgba(247, 244, 234, 0.72);
  font-size: 9px;
  line-height: 1.35;
}

.sidebar-recipient-alert-chips {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sidebar-recipient-alert-chips em {
  padding: 3px 6px;
  border-radius: 999px;
  color: #f7f4ea;
  background: rgba(255, 255, 255, 0.12);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-recipient-alert b {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
}

.caregiver-agenda-list {
  display: grid;
}

.caregiver-agenda-item {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
  background: transparent;
  cursor: pointer;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.caregiver-agenda-item > span:first-child {
  color: var(--sage-dark);
  font-size: 9px;
  font-weight: 800;
}

.agenda-date-time strong,
.agenda-date-time small {
  display: block;
  line-height: 1.25;
}

.agenda-date-time small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.caregiver-agenda-item strong,
.caregiver-agenda-item small {
  display: block;
}

.caregiver-agenda-item strong {
  font-size: 11px;
  line-height: 1.35;
}

.caregiver-agenda-item small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caregiver-agenda-item > span:last-child {
  color: var(--muted);
  font-size: 18px;
}

.caregiver-agenda-item:hover strong,
.caregiver-agenda-item:focus-visible strong {
  color: var(--sage-dark);
}

.caregiver-agenda-item.agenda-alert-due {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #d8b77b;
  border-radius: 14px;
  background: #fff8e9;
}

.caregiver-agenda-item.agenda-alert-due > span:first-child {
  color: #9a5d25;
}

.caregiver-agenda-item.agenda-alert-due strong {
  color: #8a4b22;
}

.agenda-alert-clear {
  width: fit-content;
  margin: -4px 0 10px 90px;
  padding: 7px 12px;
  border: 1px solid #d8b77b;
  border-radius: 999px;
  background: #fffefb;
  color: #8a4b22;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.agenda-alert-clear:hover,
.agenda-alert-clear:focus-visible {
  background: #fff6df;
  outline: 2px solid rgba(160, 117, 46, 0.18);
  outline-offset: 2px;
}

.medication-manager-panel {
  padding: 22px;
}

.medication-alert-panel {
  padding: 20px;
  border-color: #e7c5a5;
  background: #fff7ed;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
}

.support-request-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
  border: 2px solid #d5a760;
  background: #fff9eb;
}

.support-request-alert h2 {
  margin: 2px 0 6px;
}

.support-request-alert p:not(.eyebrow) {
  margin-bottom: 12px;
  color: var(--muted);
}

.dashboard-sync-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0 0 22px;
  border: 2px solid #b44a3d;
  background: #fff1ef;
}

.dashboard-sync-alert.hidden {
  display: none;
}

.dashboard-sync-alert .medication-alert-symbol {
  background: #b44a3d;
}

.dashboard-sync-alert h2 {
  margin: 2px 0 6px;
}

.dashboard-sync-alert p:not(.eyebrow) {
  margin-bottom: 12px;
  color: var(--muted);
}

.account-state-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
  border: 2px solid #d5a760;
  background: #fff9eb;
}

.account-state-alert.hidden {
  display: none;
}

.account-state-alert h2 {
  margin: 2px 0 6px;
}

.account-state-alert p:not(.eyebrow) {
  color: var(--muted);
}

.account-state-warning .medication-alert-symbol {
  background: #c4702d;
}

.account-state-blocked {
  border-color: #c56b5d;
  background: #fff1ef;
}

.account-state-blocked .medication-alert-symbol {
  background: #b44a3d;
}

.medication-alert-prominent {
  margin-bottom: 18px;
  padding: 22px 26px;
  border-width: 2px;
  box-shadow: 0 8px 24px rgba(145, 75, 38, 0.12);
  grid-template-columns: 42px 1fr;
}

.medication-alert-prominent .medication-alert-symbol {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.medication-alert-prominent h2 {
  font-size: 20px;
}

.medication-alert-prominent .medication-alert-item strong {
  font-size: 13px;
}

.medication-alert-prominent .medication-alert-item span {
  font-size: 11px;
}

.medication-alert-symbol {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: #b65c2f;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.medication-alert-panel h2 {
  margin-bottom: 8px;
  font-size: 17px;
}

.medication-alert-item {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid #ead6c3;
  color: inherit;
  background: transparent;
  cursor: pointer;
  display: grid;
  gap: 2px;
  text-align: left;
}

.medication-alert-item strong {
  font-size: 11px;
}

.medication-alert-item span {
  color: #98502d;
  font-size: 9px;
}

.alert-history-list {
  display: grid;
  gap: 12px;
}

.alert-history-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfaf5;
}

.alert-history-item.open {
  border-color: #e7c5a5;
  background: #fff7ed;
}

.alert-history-item.cleared {
  border-color: #c8ddd4;
  background: #f3faf5;
}

.alert-history-item.reported {
  border-color: #e2c98b;
  background: #fff8e8;
}

.alert-history-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #b65c2f;
  font-weight: 800;
}

.alert-history-item.cleared .alert-history-icon {
  background: var(--sage-dark);
}

.alert-history-item.reported .alert-history-icon {
  background: #a9792f;
}

.alert-history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.alert-history-title strong {
  color: var(--ink);
  font-size: 15px;
}

.alert-history-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #98502d;
  background: rgba(182, 92, 47, 0.12);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.alert-history-item.cleared .alert-history-status {
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.alert-history-item.reported .alert-history-status {
  color: #855f1d;
  background: #fff1cc;
}

.alert-history-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.medication-manager-panel .panel-heading {
  margin-bottom: 8px;
}

.caregiver-medication-list {
  display: grid;
}

.caregiver-medication-item {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
  background: transparent;
  cursor: pointer;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.caregiver-medication-item > span:first-child {
  color: var(--sage-dark);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.caregiver-medication-item strong,
.caregiver-medication-item small {
  display: block;
}

.caregiver-medication-item strong {
  font-size: 11px;
}

.caregiver-medication-item small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medication-state {
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 8px;
  font-weight: 800;
}

.caregiver-medication-item.paused {
  opacity: 0.68;
}

.caregiver-medication-item.paused .medication-state {
  color: var(--muted);
  background: var(--cream);
}

.medication-manager-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.routine-progress {
  padding: 6px 9px;
  border-radius: 20px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 10px;
  font-weight: 700;
}

.routine-family-status {
  margin-bottom: 13px;
  display: grid;
  gap: 9px;
}

.routine-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.routine-actions .button {
  padding: 10px 13px;
}

.routine-actions .text-button {
  text-decoration: none;
  white-space: nowrap;
}

.message-status-panel {
  padding: 22px;
}

.message-status-panel .panel-heading,
.recipient-notes-panel .panel-heading {
  margin-bottom: 8px;
}

.recipient-notes-panel {
  padding: 22px;
}

.recipient-notes-panel .empty-message {
  padding-top: 4px;
}

.family-message {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.family-message p {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
}

.family-message-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.family-message strong {
  color: #a0752e;
}

.family-message strong.seen {
  color: var(--sage-dark);
}

.family-message .family-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.family-message-actions button {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.message-recall-button {
  background: #fff0e8;
  color: #9a4121;
}

.message-status-remove-button {
  background: var(--cream);
  color: var(--muted);
}

.empty-message {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.routine-status-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}

.routine-status-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8d9693;
  background: #efefe9;
  font-size: 9px;
  font-weight: 700;
}

.routine-status-row.done {
  color: var(--ink);
}

.routine-status-row.done .routine-status-dot {
  color: #fff;
  background: var(--sage);
}

.routine-status-row.not-taken {
  color: #9a4121;
}

.routine-status-row.not-taken .routine-status-dot {
  color: #9a4121;
  background: #fff0e8;
}

.myday-content {
  max-width: none;
  min-height: calc(100vh - 116px);
  padding-top: 25px;
  background: #f3eee4;
}

.recipient-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 15px 0 55px;
}

.recipient-header {
  margin-bottom: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recipient-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--sage-dark);
  font-family: "Newsreader", serif;
  font-size: 18px;
  font-weight: 600;
}

.recipient-brand img {
  width: clamp(190px, 24vw, 280px);
  height: auto;
  display: block;
}

.recipient-brand .brand-mark span:nth-child(1) {
  border-color: var(--sage-dark);
}

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

.recipient-welcome {
  margin-bottom: 22px;
  padding: 30px 34px;
  border-radius: 20px;
  color: #fff;
  background: #4d7166;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 18px 45px rgba(63, 93, 84, 0.16);
}

.recipient-kicker {
  margin-bottom: 6px;
  color: #d9e8e2;
  font-size: 16px;
  font-weight: 600;
}

.recipient-welcome h2 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.weather-note {
  min-width: 130px;
  display: grid;
  grid-template-columns: 37px 1fr;
  align-items: center;
}

.weather-note > span {
  grid-row: span 2;
  color: #f5d58e;
  font-size: 30px;
}

.weather-note strong {
  font-size: 23px;
}

.weather-note small {
  color: #d9e8e2;
  font-size: 10px;
}

.recipient-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.recipient-card {
  padding: 28px;
  border: 1px solid #e2ded3;
  border-radius: 18px;
  background: var(--white);
}

.recipient-card-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.recipient-card-heading p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recipient-card-heading h3 {
  margin: 0;
  font-size: 21px;
}

.recipient-card-icon {
  width: 45px;
  height: 45px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 19px;
}

.recipient-card-icon.sage {
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.recipient-card-icon.coral {
  color: #aa5d4f;
  background: var(--coral-pale);
}

.recipient-card-icon.gold {
  color: #8b6828;
  background: #fff3d5;
}

.recipient-notes-card {
  margin-top: 20px;
}

.recipient-note-form {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recipient-note-type {
  cursor: pointer;
}

.recipient-note-type input {
  position: absolute;
  opacity: 0;
}

.recipient-note-type span {
  display: block;
  padding: 10px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.recipient-note-type input:checked + span {
  border-color: var(--sage);
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.recipient-note-entry {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.recipient-note-entry input {
  min-height: 52px;
  font-size: 16px;
}

.recipient-note-list,
.caregiver-recipient-notes {
  display: grid;
  gap: 9px;
}

.recipient-note-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: start;
}

.recipient-note-item > span {
  color: var(--sage-dark);
  font-size: 18px;
}

.recipient-note-item strong,
.recipient-note-item small {
  display: block;
}

.recipient-note-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.recipient-note-item.completed {
  opacity: 0.62;
}

.recipient-note-item.completed strong {
  text-decoration: line-through;
}

.caregiver-recipient-note {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.caregiver-recipient-note:first-child {
  border-top: 0;
}

.recipient-note-complete {
  width: 23px;
  height: 23px;
  border: 2px solid #b9c6c1;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.caregiver-recipient-note.completed .recipient-note-complete {
  border-color: var(--sage);
  background: var(--sage);
}

.caregiver-recipient-note strong,
.caregiver-recipient-note small {
  display: block;
}

.caregiver-recipient-note strong {
  font-size: 11px;
}

.caregiver-recipient-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.caregiver-recipient-note.completed strong {
  color: var(--muted);
  text-decoration: line-through;
}

.agenda-list {
  display: grid;
}

.agenda-item {
  position: relative;
  display: grid;
  grid-template-columns: 76px 16px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  padding: 4px 0 21px;
  min-height: 57px;
}

.agenda-item:last-child {
  padding-bottom: 0;
}

.agenda-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 92px;
  top: 30px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.agenda-time {
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-top: 1px;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.agenda-dot {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  margin-top: 3px;
  z-index: 1;
  width: 13px;
  height: 13px;
  border: 3px solid #dce9e4;
  border-radius: 50%;
  background: var(--sage);
}

.agenda-item strong,
.agenda-item small {
  grid-column: 3;
  display: block;
}

.agenda-item strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.agenda-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.medication-list {
  display: grid;
  gap: 11px;
}

.medication-item {
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 15px;
  transition: 160ms ease;
}

.medication-item.taken {
  border-color: #bfd2ca;
  background: #f0f6f3;
}

.medication-item strong,
.medication-item small {
  display: block;
}

.medication-item strong {
  margin-bottom: 4px;
  font-size: 15px;
}

.medication-item small {
  color: var(--muted);
  font-size: 11px;
}

.medication-button {
  min-width: 113px;
  min-height: 45px;
  padding: 9px 13px;
  border: 1px solid var(--sage);
  border-radius: 11px;
  color: var(--sage-dark);
  background: var(--white);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.medication-item.taken .medication-button {
  border-color: var(--sage);
  color: #fff;
  background: var(--sage);
}

.medication-note {
  margin: 17px 2px 0;
  color: #8a8d88;
  font-size: 9px;
  line-height: 1.5;
}

.recipient-reassurance {
  margin-top: 20px;
  padding: 18px 24px;
  border: 1px solid #dfdbcf;
  border-radius: 16px;
  background: rgba(255, 254, 251, 0.72);
  display: flex;
  align-items: center;
}

.recipient-reassurance .avatar-row {
  display: flex;
  flex: 0 0 auto;
}

.recipient-reassurance .avatar + .avatar {
  margin-left: -9px;
}

.recipient-reassurance p {
  margin: 0 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.recipient-reassurance strong {
  color: var(--ink);
}

.tablet-page {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #f3eee4;
  overscroll-behavior: none;
  touch-action: pan-y;
}

.tablet-shell {
  width: 100%;
  max-width: 1400px;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 58px);
  overflow-x: clip;
}

.tablet-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.tablet-header .recipient-brand {
  font-size: clamp(21px, 2.3vw, 30px);
}

.refresh-button {
  min-height: 64px;
  padding: 12px 25px;
  border: 2px solid var(--sage-dark);
  border-radius: 16px;
  color: #fff;
  background: var(--sage-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(55, 84, 75, 0.18);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.refresh-button span {
  font-size: 30px;
  line-height: 1;
}

.refresh-button > span:last-child {
  display: grid;
  gap: 4px;
  text-align: left;
  font-size: inherit;
}

.refresh-button strong {
  font: inherit;
}

.refresh-button small {
  color: #d6e5df;
  font-size: 10px;
  font-weight: 500;
}

.refresh-button:hover,
.refresh-button:focus-visible {
  background: #36574d;
}

.orientation-panel {
  margin-bottom: 24px;
  padding: clamp(28px, 4vw, 52px);
  border-radius: 24px;
  color: #fff;
  background: #4d7166;
  box-shadow: 0 18px 45px rgba(63, 93, 84, 0.16);
}

.orientation-date {
  margin-bottom: 17px;
  color: #fff;
  font-size: clamp(30px, 4.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.orientation-greeting {
  margin-bottom: 5px;
  color: #d9e8e2;
  font-size: clamp(19px, 2.1vw, 28px);
  font-weight: 600;
}

.orientation-panel h1 {
  margin: 0;
  font-size: clamp(28px, 3.7vw, 50px);
}

.daily-info-strip {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.daily-info-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 12px 26px rgba(28, 44, 39, 0.08);
}

.daily-info-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 13px;
}

.daily-info-heading > span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 20px;
}

.daily-info-heading p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-info-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
}

.weather-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.tablet-page #weatherCard {
  padding: 10px 14px 12px;
}

.tablet-page #weatherCard .daily-info-heading {
  margin-bottom: 7px;
}

.tablet-page #weatherCard .daily-info-heading > span {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  font-size: 16px;
}

.tablet-page #weatherCard .daily-info-heading p {
  font-size: 10px;
}

.tablet-page #weatherCard .daily-info-heading h2 {
  font-size: clamp(20px, 2.4vw, 26px);
}

.tablet-page #weatherCard .weather-days {
  justify-items: center;
  align-items: stretch;
}

.weather-day {
  min-height: 150px;
  border-radius: 14px;
  padding: 12px;
  background: var(--cream);
  display: grid;
  align-content: start;
  gap: 4px;
}

.tablet-page #weatherCard .weather-day {
  width: 100%;
  min-height: 76px;
  padding: 6px 8px 7px;
  justify-items: center;
  align-content: center;
  gap: 1px;
  text-align: center;
}

.weather-icon {
  position: relative;
  width: 78px;
  height: 60px;
  margin: -2px 0 4px;
  display: block;
  overflow: visible;
}

.weather-icon-image {
  width: 88px;
  height: 88px;
  margin: -12px 0 -8px;
  display: block;
  object-fit: contain;
}

.tablet-page #weatherCard .weather-icon-image {
  width: 48px;
  height: 48px;
  margin: -5px auto -4px;
}

.tablet-page #weatherCard .weather-icon-image-sun {
  width: 46px;
  height: 46px;
  margin-top: -3px;
}

.weather-icon-image-sun {
  width: 82px;
  height: 82px;
  margin-top: -8px;
  margin-bottom: -4px;
}

.weather-icon::before,
.weather-icon::after,
.weather-icon i,
.weather-icon em {
  content: "";
  position: absolute;
  display: block;
  pointer-events: none;
}

.weather-icon-sun::before,
.weather-icon-partly::before {
  left: 18px;
  top: 7px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff4a5 0 18%, #ffd15c 42%, #f59a2f 100%);
  box-shadow:
    0 0 0 8px rgba(255, 191, 71, 0.18),
    0 0 18px rgba(245, 154, 47, 0.38);
}

.weather-icon-sun::after {
  left: 35px;
  top: 26px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f6b43b;
  box-shadow:
    0 -27px 0 -1px #f6b43b,
    19px -19px 0 -1px #f6b43b,
    27px 0 0 -1px #f6b43b,
    19px 19px 0 -1px #f6b43b,
    0 27px 0 -1px #f6b43b,
    -19px 19px 0 -1px #f6b43b,
    -27px 0 0 -1px #f6b43b,
    -19px -19px 0 -1px #f6b43b;
  opacity: 0.78;
}

.weather-icon-sun i {
  display: none;
}

.weather-icon-cloud::before,
.weather-icon-rain::before,
.weather-icon-storm::before,
.weather-icon-snow::before,
.weather-icon-fog::before,
.weather-icon-partly i {
  left: 12px;
  bottom: 12px;
  width: 54px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dce2e7 0%, #aab5bf 100%);
  box-shadow:
    -7px 3px 0 1px #c9d1d8,
    13px -9px 0 2px #96a3af;
}

.weather-icon-partly i {
  left: 19px;
  bottom: 10px;
}

.weather-icon-rain i {
  left: 21px;
  top: 43px;
  width: 6px;
  height: 14px;
  border-radius: 999px;
  background: #2f9ed8;
  box-shadow:
    18px 0 0 #2388c4,
    36px 0 0 #2f9ed8;
  transform: rotate(18deg);
}

.weather-icon-storm i {
  left: 33px;
  top: 34px;
  width: 19px;
  height: 28px;
  background: linear-gradient(180deg, #ffe17a 0%, #f5a524 100%);
  clip-path: polygon(42% 0, 100% 0, 64% 40%, 100% 40%, 28% 100%, 47% 55%, 0 55%);
  filter: drop-shadow(0 2px 1px rgba(80, 54, 15, 0.25));
}

.weather-icon-snow i {
  left: 20px;
  top: 43px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #72c8ee;
  box-shadow:
    18px 1px 0 #9bdcf5,
    36px 0 0 #72c8ee,
    9px 13px 0 #b8e8fb,
    28px 13px 0 #9bdcf5;
}

.weather-icon-fog i,
.weather-icon-fog em {
  left: 12px;
  width: 54px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(121, 136, 150, 0.28), rgba(121, 136, 150, 0.82), rgba(121, 136, 150, 0.28));
}

.weather-icon-fog i {
  top: 43px;
}

.weather-icon-fog em {
  top: 54px;
}

.weather-icon-wind::before,
.weather-icon-wind i,
.weather-icon-wind em {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ed4d6, #3f91a3);
}

.weather-icon-wind::before {
  left: 8px;
  top: 16px;
  width: 58px;
}

.weather-icon-wind i {
  left: 20px;
  top: 30px;
  width: 49px;
}

.weather-icon-wind em {
  left: 9px;
  top: 44px;
  width: 40px;
}

.weather-icon-temp::before {
  left: 34px;
  top: 6px;
  width: 12px;
  height: 39px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffcf7a, #d85a2a);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.weather-icon-temp i {
  left: 27px;
  top: 37px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd99c, #d85a2a 72%);
}

.weather-icon-temp em {
  left: 51px;
  top: 11px;
  width: 14px;
  height: 5px;
  border-radius: 999px;
  background: #e8ad63;
  box-shadow:
    0 11px 0 #e8ad63,
    0 22px 0 #e8ad63;
}

.weather-day strong,
.lottery-game strong {
  font-size: 17px;
}

.tablet-page #weatherCard .weather-day strong {
  font-size: 13px;
  line-height: 1.05;
}

.weather-day span,
.lottery-game span,
.lottery-game small {
  color: var(--muted);
  font-size: 12px;
}

.tablet-page #weatherCard .weather-day span {
  font-size: 10px;
  line-height: 1.1;
}

.weather-day b {
  color: var(--sage-dark);
  font-size: 28px;
}

.tablet-page #weatherCard .weather-day b {
  font-size: 20px;
  line-height: 1.05;
}

.weather-day small {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.tablet-page #weatherCard .weather-day small {
  font-size: 10px;
  line-height: 1.1;
}

.lottery-games {
  display: grid;
  gap: 9px;
}

.lottery-game {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 12px;
  background: var(--cream);
}

.lottery-game b {
  color: var(--sage-dark);
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: 0.03em;
}

.lottery-game small {
  grid-column: 1 / -1;
}

.tablet-layout {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

.tablet-grid,
.tablet-layout {
  grid-template-columns: 0.9fr 1.1fr;
}

.day-messages {
  margin-bottom: 24px;
  padding: clamp(24px, 3vw, 38px);
  border: 3px solid #deb96e;
  border-radius: 22px;
  background: #fff8e8;
  box-shadow: 0 15px 35px rgba(117, 91, 39, 0.1);
}

.tablet-layout .day-messages,
.tablet-layout .recipient-notes-card {
  grid-column: 1 / -1;
}

.day-messages-heading {
  margin-bottom: 19px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.day-messages-heading > span {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #855f1d;
  background: #f7dfaa;
  font-size: 25px;
}

.day-messages-heading p {
  margin: 0 0 3px;
  color: #8e6b29;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.day-messages-heading h2 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 35px);
}

.day-message {
  padding: 21px 22px;
  border: 1px solid #ead5a7;
  border-radius: 15px;
  background: var(--white);
}

.day-message + .day-message {
  margin-top: 12px;
}

.day-message.acknowledged {
  border-color: #c8d9d2;
  background: #f1f7f4;
}

.day-message-from {
  margin-bottom: 8px;
  color: #866728;
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 700;
}

.day-message p {
  margin-bottom: 18px;
  font-family: "Newsreader", serif;
  font-size: clamp(25px, 3.3vw, 43px);
  line-height: 1.18;
}

.day-message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.day-message-actions > span {
  color: var(--muted);
  font-size: 13px;
}

.message-ack-button,
.message-dismiss-button {
  min-height: 58px;
  padding: 11px 24px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
}

.message-ack-button {
  border: 2px solid var(--sage-dark);
  color: #fff;
  background: var(--sage-dark);
}

.message-dismiss-button {
  border: 2px solid #b7c9c2;
  color: var(--sage-dark);
  background: var(--white);
}

.tablet-grid .recipient-card,
.tablet-layout .recipient-card {
  padding: clamp(25px, 3vw, 40px);
}

.tablet-grid .recipient-card-heading h2,
.tablet-layout .recipient-card-heading h2 {
  margin: 0;
  font-size: clamp(23px, 2.5vw, 34px);
}

.tablet-grid .agenda-item strong,
.tablet-grid .medication-item strong,
.tablet-layout .agenda-item strong,
.tablet-layout .medication-item strong {
  font-size: clamp(17px, 1.7vw, 23px);
}

.tablet-grid .agenda-item small,
.tablet-grid .medication-item small,
.tablet-layout .agenda-item small,
.tablet-layout .medication-item small {
  font-size: clamp(13px, 1.25vw, 17px);
}

.tablet-grid .agenda-time,
.tablet-layout .agenda-time {
  font-size: clamp(13px, 1.3vw, 17px);
}

.tablet-grid .medication-item,
.tablet-layout .medication-item {
  min-height: 94px;
  padding: 17px 18px;
}

.tablet-grid .medication-button,
.tablet-layout .medication-button {
  min-width: 155px;
  min-height: 60px;
  font-size: clamp(14px, 1.3vw, 18px);
}

.layout-unlock-button {
  display: block;
  margin: 10px auto 0;
  border: 0;
  color: #82918c;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.layout-unlock-button.holding {
  color: var(--sage-dark);
}

.tablet-layout-unlocked .layout-unlock-button {
  padding: 10px 18px;
  border: 1px solid #b7c9c2;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.tablet-layout-unlocked [data-layout-section] {
  outline: 3px dashed #c8d9d2;
  outline-offset: 4px;
}

.tablet-layout-controls {
  margin-bottom: 18px;
}

.tablet-layout-banner {
  position: sticky;
  z-index: 20;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 0;
  padding: 16px 18px;
  border: 2px solid #b7c9c2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(34, 50, 45, 0.16);
}

.tablet-layout-banner strong,
.tablet-layout-banner span {
  display: block;
}

.tablet-layout-banner strong {
  color: var(--ink);
  font-size: 18px;
}

.tablet-layout-banner span {
  color: var(--muted);
  font-size: 14px;
}

.tablet-sound-setup {
  margin: 18px 0 0;
  padding: 18px;
  border: 2px solid #e2c98b;
  border-radius: 20px;
  background: #fff8e8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 28px rgba(160, 117, 46, 0.14);
}

.tablet-sound-setup.ready {
  border-color: #c8ddd4;
  background: var(--sage-pale);
  box-shadow: none;
}

.tablet-sound-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  background: #c46c45;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
}

.tablet-sound-setup.ready .tablet-sound-icon {
  background: var(--sage-dark);
}

.tablet-sound-setup strong,
.tablet-sound-setup span {
  display: block;
}

.tablet-sound-setup strong {
  color: var(--ink);
  font-size: 18px;
}

.tablet-sound-setup span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.tablet-sound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tablet-reminder-popup {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 28px;
  width: min(880px, calc(100vw - 32px));
  transform: translateX(-50%);
}

.tablet-page .tablet-reminder-popup {
  left: 24px;
  right: 24px;
  bottom: 18px;
  width: auto;
  max-width: none;
  transform: none;
}

@supports (bottom: max(14px, env(safe-area-inset-bottom))) {
  .tablet-page .tablet-reminder-popup {
    left: max(24px, env(safe-area-inset-left));
    right: max(24px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

.tablet-reminder-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 3px solid #d3854f;
  border-radius: 24px;
  background: rgba(255, 248, 232, 0.98);
  box-shadow: 0 22px 55px rgba(72, 49, 28, 0.25);
}

.tablet-page .tablet-reminder-card {
  width: min(720px, 100%);
  margin: 0 auto;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 14px 16px;
  padding: 18px;
}

.tablet-reminder-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #c46c45;
  font-size: 32px;
  font-weight: 800;
}

.tablet-reminder-card strong,
.tablet-reminder-card p {
  display: block;
}

.tablet-reminder-card strong {
  color: var(--ink);
  font-size: clamp(22px, 2.1vw, 30px);
}

.tablet-reminder-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.35;
}

.tablet-reminder-meta {
  display: block;
  margin-top: 6px;
  color: #986e24;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 700;
  line-height: 1.35;
}

.tablet-reminder-sound-hint {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff2d2;
  color: #8c5d15;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 800;
  line-height: 1.35;
}

.tablet-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tablet-page .tablet-reminder-actions {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  justify-content: stretch;
}

.tablet-reminder-actions .button {
  white-space: nowrap;
}

.tablet-page .tablet-reminder-actions .button {
  width: 100%;
  min-width: 0;
  white-space: normal;
  flex: initial;
}

.tablet-agenda-reminder-card {
  border-color: #9cbfae;
  background: rgba(244, 250, 246, 0.98);
}

.tablet-agenda-reminder-icon {
  background: var(--sage);
}

.tablet-page .recipient-reassurance {
  font-size: 16px;
}

.tablet-page .recipient-reassurance p {
  font-size: clamp(14px, 1.4vw, 19px);
}

.concern-symbol {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #986e24;
  background: var(--gold-pale);
  font-weight: 700;
}

.concern-panel h3 {
  font-size: 17px;
}

.concern-panel p:not(.eyebrow) {
  margin-bottom: 10px;
  color: #7d7667;
  font-size: 11px;
  line-height: 1.5;
}

.page-heading {
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
}

.page-heading h2 {
  margin-bottom: 5px;
  font-size: 34px;
}

.page-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.button {
  padding: 11px 17px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.button-primary {
  border: 1px solid var(--sage-dark);
  color: #fff;
  background: var(--sage-dark);
}

.button-primary:hover {
  background: #38574e;
}

.button:disabled,
.button[disabled],
.button-primary:disabled,
.button-primary[disabled],
.button-secondary:disabled,
.button-secondary[disabled] {
  border-color: #ddd8cd;
  color: #aaa398;
  background: #f1eee7;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.78;
  filter: grayscale(0.2);
}

.button-primary:disabled:hover,
.button-primary[disabled]:hover,
.button-secondary:disabled:hover,
.button-secondary[disabled]:hover {
  border-color: #ddd8cd;
  color: #aaa398;
  background: #f1eee7;
}

.button-secondary {
  border: 1px solid var(--line);
  background: transparent;
}

.filter-row {
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
}

.filter.active {
  border-color: var(--sage);
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.full-timeline {
  padding: 30px;
}

.full-timeline .timeline-entry {
  padding-left: 52px;
}

.full-timeline .timeline-entry:not(:last-child) {
  padding-bottom: 33px;
}

.task-summary {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.summary-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.summary-card strong,
.summary-card span {
  display: block;
}

.summary-card strong {
  margin-bottom: 3px;
  font-family: "Newsreader", serif;
  font-size: 27px;
}

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

.task-board {
  padding: 6px 0;
  display: grid;
  gap: 16px;
}

.task-board-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.task-board-section-heading {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #faf8f1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.task-board-section-heading h3 {
  margin: 0 0 4px;
  font-family: "Newsreader", serif;
  font-size: 19px;
}

.task-board-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.task-board-section-heading > span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--sage-dark);
  background: var(--sage-pale);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.task-board-section-list {
  padding: 0 20px;
}

.board-task {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
}

.board-task:last-child {
  border-bottom: 0;
}

.board-task h3 {
  margin: 6px 0 4px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  line-height: 1.25;
}

.board-task p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.board-task-main {
  min-width: 0;
}

.board-task-main .task-timing-row {
  justify-content: flex-start;
}

.board-task .task-management-row {
  grid-column: 2;
}

.board-task .task-owner-control {
  justify-content: flex-start;
  max-width: min(100%, 360px);
}

.board-task .task-owner-label {
  max-width: min(100%, 230px);
}

.board-task .task-actions {
  margin-left: auto;
}

.due-pill {
  padding: 5px 9px;
  border-radius: 20px;
  color: #9b574a;
  background: var(--coral-pale);
  font-size: 9px;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 24px;
  background: rgba(24, 35, 32, 0.55);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}

.modal {
  width: min(570px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  position: relative;
  padding: 34px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  animation: modalIn 180ms ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #f1f1eb;
  cursor: pointer;
  font-size: 21px;
}

.modal h2 {
  margin-bottom: 7px;
  font-size: 30px;
}

.modal-intro {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
}

.tablet-access-list {
  margin-bottom: 20px;
  display: grid;
  gap: 10px;
}

.settings-group-label {
  margin: 28px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.settings-group-label.hidden {
  display: none;
}

.owner-tools-group.hidden {
  display: none;
}

.owner-tools-group > summary.settings-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.owner-tools-group > summary.settings-group-label::-webkit-details-marker {
  display: none;
}

.owner-tools-content {
  gap: 0;
}

.owner-tools-content > .security-settings-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.settings-group-label + .security-settings-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.section-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.security-settings-section + .security-settings-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.invitation-notice {
  border-color: rgba(194, 103, 80, 0.32);
  background: #fff7f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.invitation-notice.hidden {
  display: none;
}

.support-access-list {
  display: grid;
  gap: 12px;
}

.security-access-overview {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #bfd4ca;
  border-radius: 16px;
  background: linear-gradient(135deg, #f1faf6, #fffaf2);
}

.security-access-overview > div:first-child {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.security-access-overview strong,
.security-access-overview p {
  display: block;
}

.security-access-overview p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.security-overview-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--sage-dark);
  font-weight: 900;
}

.security-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.security-overview-stats span {
  padding: 9px 10px;
  border: 1px solid rgba(74, 112, 101, 0.18);
  border-radius: 12px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.security-overview-stats span.muted {
  color: var(--muted);
}

.security-overview-stats strong {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 16px;
}

.support-access-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e3e5de;
  border-radius: 14px;
  background: #faf9f5;
}

.support-access-item.pending {
  border-color: #e5b98d;
  background: #fffaf2;
}

.support-access-item.approved {
  border-color: #9ac4b0;
  background: #f3faf6;
}

.support-access-copy strong,
.support-access-copy span,
.support-access-copy small {
  display: block;
}

.support-access-copy p {
  margin: 7px 0;
  line-height: 1.45;
}

.support-access-copy span,
.support-access-copy small {
  color: var(--muted);
  font-size: 12px;
}

.support-access-copy .access-row-note,
.tablet-access-item .access-row-note {
  margin-top: 6px;
  color: #6d7773;
  font-size: 10px;
  line-height: 1.4;
}

.support-access-status {
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e7ebe8;
  color: #455a53 !important;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.support-access-actions {
  display: grid;
  gap: 8px;
}

.support-duration {
  min-width: 110px;
}

.security-section-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.security-section-heading > div {
  min-width: 0;
}

.settings-collapsible:not([open]) .security-section-heading {
  margin-bottom: 0;
}

.settings-collapsible > summary.security-section-heading {
  min-height: 46px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  user-select: none;
}

.settings-collapsible > summary.security-section-heading::-webkit-details-marker {
  display: none;
}

.settings-collapse-toggle {
  flex: 0 0 auto;
  min-width: 66px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #b7c9c2;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.settings-collapse-toggle::before {
  content: "Show";
}

.settings-collapsible[open] > summary > .settings-collapse-toggle::before {
  content: "Hide";
}

.settings-collapsible-content {
  display: grid;
  gap: 12px;
}

.settings-modal .settings-collapsible[open] > summary.security-section-heading {
  padding-bottom: 2px;
}

.settings-collapsible-content > .text-button {
  justify-self: start;
}

.security-section-heading h3 {
  font-size: 16px;
}

.security-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.session-access-list {
  display: grid;
  gap: 10px;
}

.system-status-list {
  display: grid;
  gap: 10px;
}

.audit-activity-list {
  max-height: 340px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.audit-activity-item {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafaf6;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
}

.audit-activity-item strong,
.audit-activity-item span {
  display: block;
}

.audit-activity-item strong {
  font-size: 11px;
}

.audit-activity-item div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.audit-activity-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--sage);
  font-size: 8px;
}

.audit-activity-icon.tablet {
  background: var(--coral);
}

.audit-activity-icon.system {
  background: #c3a249;
}

.recipient-settings-form {
  display: grid;
  gap: 14px;
}

.recipient-settings-form .form-row {
  margin: 0;
}

.recipient-list-settings {
  margin: 14px 0;
}

.recipient-settings-list {
  display: grid;
  gap: 8px;
}

.recipient-settings-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.recipient-settings-item.active {
  border-color: #9ac4b0;
  background: #f3faf6;
}

.recipient-settings-item strong,
.recipient-settings-item span {
  display: block;
}

.recipient-settings-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.add-recipient-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.add-recipient-form h4 {
  margin: 0 0 4px;
  font-family: "Newsreader", serif;
  font-size: 18px;
}

.add-recipient-form .security-section-heading {
  margin-bottom: 0;
}

.extras-settings {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf5;
}

.extras-settings legend {
  padding: 0 6px;
}

.settings-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.settings-check input {
  appearance: none;
  box-sizing: border-box;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 0;
  border: 2px solid #b9c8bd;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.settings-check span {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-check input::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
}

.settings-check input:checked {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}

.settings-check input:checked::after {
  transform: rotate(45deg) scale(1);
}

.settings-check input:focus-visible {
  outline: 3px solid rgba(74, 112, 101, 0.22);
  outline-offset: 2px;
}

.digest-includes-note {
  padding: 12px 14px;
  border: 1px solid #ead9bf;
  border-radius: 14px;
  background: #fffaf1;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.digest-includes-note strong,
.digest-includes-note span {
  display: block;
}

.digest-includes-note strong {
  margin-bottom: 4px;
  color: var(--brown);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.delete-care-circle-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e2b8ae;
  border-radius: 12px;
  background: #fff7f4;
}

.delete-care-circle-form > p {
  margin-bottom: 15px;
  color: #7e3d31;
  font-size: 10px;
  line-height: 1.55;
}

.data-policy-links {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
}

.data-policy-links a,
.privacy-note a {
  color: inherit;
}

.legal-page {
  min-height: 100vh;
  padding: 48px 20px;
  background: var(--cream);
}

.legal-document {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.legal-document > img {
  width: 190px;
  margin-bottom: 28px;
}

.legal-document h1 {
  margin-bottom: 8px;
  font-size: 36px;
}

.legal-document h2 {
  margin: 28px 0 8px;
  font-size: 20px;
}

.legal-document p,
.legal-document li {
  color: #52605c;
  font-size: 13px;
  line-height: 1.7;
}

.legal-document ul {
  padding-left: 22px;
}

.legal-draft-note {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 10px;
  color: #704d18 !important;
  background: #fff5d8;
}

.legal-back-link {
  display: inline-block;
  margin-top: 30px;
  color: var(--sage-dark);
  font-weight: 700;
}

.help-document {
  width: min(980px, 100%);
}

.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.help-header > img {
  width: min(330px, 60vw);
  height: auto;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.help-intro {
  font-size: 15px !important;
}

.help-inline-link {
  margin: 16px 0 0 !important;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf5;
  font-size: 13px !important;
}

.help-inline-link a {
  color: var(--sage-dark);
  font-weight: 800;
}

.help-toc {
  margin: 26px 0 34px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfaf5;
}

.help-toc h2 {
  margin-top: 0;
}

.help-toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding-left: 22px;
}

.help-toc li {
  break-inside: avoid;
  margin-bottom: 7px;
}

.help-toc a,
.help-section a {
  color: var(--sage-dark);
  font-weight: 700;
}

.help-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.help-section h3 {
  margin: 18px 0 6px;
  font-size: 16px;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-grid article,
.help-callout {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf5;
}

.help-grid h3 {
  margin-top: 0;
}

.help-grid p {
  margin-bottom: 0;
}

.help-steps {
  padding-left: 24px;
}

.help-steps li {
  margin-bottom: 9px;
}

.help-callout {
  margin: 16px 0;
  color: #41504c;
  border-color: #d9c58a;
  background: #fff8df;
  font-size: 13px;
  line-height: 1.65;
}

.release-toc ol {
  columns: 1;
}

.release-note {
  padding-bottom: 10px;
}

.release-note-heading {
  margin-bottom: 10px;
}

.release-note-heading h2 {
  margin-top: 0;
}

.release-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.release-list li {
  padding-left: 4px;
}

.help-footer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.help-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.system-status-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf5;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 11px;
  align-items: start;
}

.system-status-item strong,
.system-status-item span {
  display: block;
}

.system-status-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.system-status-indicator {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: #c3a249;
}

.system-status-indicator.healthy,
.system-status-indicator.succeeded,
.system-status-indicator.running {
  background: var(--sage);
}

.system-status-indicator.failed,
.system-status-indicator.stale {
  background: #c75b37;
}

.system-status-item .system-status-error {
  color: #9a4121;
}

.passkey-access-list {
  display: grid;
  gap: 10px;
}

.compact-button {
  min-height: 36px;
  padding: 8px 13px;
  flex: 0 0 auto;
}

.member-access-list {
  margin-bottom: 16px;
  display: grid;
  gap: 10px;
}

.member-access-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafaf6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.member-access-item.pending {
  border-style: dashed;
}

.member-access-item.invitation-action-item {
  border-color: rgba(194, 103, 80, 0.32);
  background: #fff7f0;
}

.member-access-item strong,
.member-access-item span {
  display: block;
}

.member-access-item strong {
  font-size: 12px;
}

.member-name-with-presence {
  display: flex;
  align-items: center;
  gap: 7px;
}

.presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c8d0cb;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
  flex: 0 0 auto;
}

.member-access-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.member-name-with-presence .presence-dot {
  display: inline-block;
  margin-top: 0;
}

.member-role-select {
  width: auto;
  min-width: 115px;
  height: 34px;
  font-size: 10px;
}

.member-role-label {
  font-weight: 700;
  text-transform: capitalize;
}

.member-invite-form {
  padding: 15px;
  border-radius: 12px;
  background: var(--sage-pale);
}

.recipient-delete-zone {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(158, 70, 56, 0.28);
  border-radius: 12px;
  background: #fff7f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.recipient-delete-zone h4 {
  margin: 0 0 4px;
  color: #8e3d32;
}

.recipient-delete-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.recipient-delete-zone .danger-text-button:disabled {
  cursor: default;
  color: #b7aaa5;
}

.danger-text-button {
  flex: 0 0 auto;
  color: #9e4638;
}

.tablet-access-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafaf6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.session-access-group {
  align-items: flex-start;
}

.session-access-main {
  min-width: 0;
  flex: 1 1 auto;
}

.session-access-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.session-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0 !important;
}

.session-badges em {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: #e7f0eb;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.session-access-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.session-detail-list {
  margin-top: 10px;
}

.session-detail-list summary {
  width: fit-content;
  cursor: pointer;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 800;
}

.session-detail-list > div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.session-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(74, 112, 101, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.session-detail-item span {
  margin-top: 0;
}

.tablet-access-item strong,
.tablet-access-item span,
.tablet-access-item small {
  display: block;
}

.tablet-access-item strong {
  font-size: 12px;
}

.tablet-access-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.tablet-pairing-result {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #bfd4ca;
  border-radius: 12px;
  background: var(--sage-pale);
}

.tablet-pairing-controls {
  margin: 12px 0 18px;
  padding: 14px 16px 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf5;
}

.tablet-pairing-result > strong {
  font-size: 12px;
}

.tablet-pairing-result p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 10px;
}

.tablet-pairing-result input {
  margin-bottom: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.tablet-pairing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tablet-pairing-actions .button {
  flex: 1 1 150px;
}

.field {
  margin-bottom: 18px;
}

.field > label,
.field > legend {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
}

fieldset.field {
  padding: 0;
  border: 0;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.setup-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.setup-type-options label {
  cursor: pointer;
}

.setup-type-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setup-type-options span {
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: block;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.setup-type-options strong,
.setup-type-options small {
  display: block;
}

.setup-type-options strong {
  font-size: 13px;
}

.setup-type-options small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.setup-type-options input:checked + span {
  border-color: var(--sage);
  background: var(--sage-pale);
  box-shadow: 0 0 0 3px rgba(110, 142, 130, 0.12);
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.weekday-picker label {
  position: relative;
  cursor: pointer;
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekday-picker label {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.weekday-picker label:has(input:checked) {
  border-color: var(--sage);
  color: var(--sage-dark);
  background: var(--sage-pale);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d9dcd6;
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(110, 142, 130, 0.12);
}

.mood-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.mood-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mood-options span {
  min-height: 69px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 19px;
}

.mood-options small {
  font-size: 9px;
  font-weight: 600;
}

.mood-options input:checked + span {
  border-color: var(--sage);
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

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

.agenda-modal-actions {
  align-items: center;
}

.modal-action-spacer {
  flex: 1;
}

.danger-button {
  color: #9a4121;
  background: #fff0e8;
}

.restore-button {
  color: var(--sage-dark);
  background: var(--sage-pale);
}

.medication-history {
  margin: 4px 0 20px;
  padding: 15px;
  border-radius: 12px;
  background: #f7f7f2;
}

.medication-notification-toggle {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f7f2;
}

.medication-history h3 {
  margin-bottom: 9px;
  font-size: 13px;
}

.medication-history-row {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}

.medication-history-row small {
  color: var(--muted);
}

.history-taken {
  color: var(--sage-dark);
}

.history-not-taken {
  color: #9a4121;
}

.message-preview {
  margin: -3px 0 18px;
  padding: 12px 14px;
  border: 1px solid #ead6a9;
  border-radius: 10px;
  background: #fff8e8;
}

.message-preview span {
  display: block;
  margin-bottom: 3px;
  color: #8b6828;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.message-preview p {
  margin: 0;
  color: #776c58;
  font-size: 10px;
}

.response-toggle {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #ead6a9;
  cursor: pointer;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 11px;
}

.response-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.response-toggle-control {
  width: 38px;
  height: 22px;
  position: relative;
  border-radius: 20px;
  background: #c8c5bc;
  transition: 150ms ease;
}

.response-toggle-control::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 150ms ease;
}

.response-toggle input:checked + .response-toggle-control {
  background: var(--sage);
}

.response-toggle input:checked + .response-toggle-control::after {
  transform: translateX(16px);
}

.response-toggle strong,
.response-toggle small {
  display: block;
}

.response-toggle strong {
  color: var(--ink);
  font-size: 11px;
}

.response-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.agenda-reminder-toggle {
  margin-top: 16px;
  border-top-color: var(--line);
}

.toast {
  position: fixed;
  z-index: 80;
  right: 25px;
  bottom: 25px;
  min-width: 280px;
  max-width: calc(100vw - 50px);
  padding: 14px 16px;
  border-radius: 12px;
  color: #fff;
  background: #30443e;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #30443e;
  background: #b9d6ca;
  font-weight: 700;
}

.toast p,
.toast strong,
.toast small {
  display: block;
  margin: 0;
}

.toast strong {
  font-size: 11px;
}

.toast small {
  margin-top: 2px;
  color: #b8c7c2;
  font-size: 9px;
}

.tablet-page .toast {
  right: 14px;
  left: 14px;
  bottom: 14px;
  width: auto;
  min-width: 0;
  max-width: none;
}

@supports (bottom: max(14px, env(safe-area-inset-bottom))) {
  .tablet-page .toast {
    right: max(14px, env(safe-area-inset-right));
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

.tablet-page .toast p {
  min-width: 0;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

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

  .right-column {
    grid-template-columns: 1fr 1fr;
  }

  .status-card-split {
    grid-template-columns: 1fr;
  }

  .daily-checkin-section {
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(74, 112, 101, 0.16);
  }

  .message-status-panel {
    grid-column: span 2;
  }

  .alert-history-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .modal-backdrop {
    padding: 14px;
    place-items: stretch center;
  }

  .settings-modal {
    width: min(640px, 100%);
    max-height: calc(100dvh - 28px);
    padding: 30px 22px 24px;
  }

  .settings-modal .settings-group-label {
    margin-top: 22px;
    padding-top: 14px;
    letter-spacing: 0.12em;
  }

  .settings-modal .security-settings-section + .security-settings-section {
    margin-top: 18px;
    padding-top: 18px;
  }

  .settings-modal .security-section-heading {
    align-items: center;
    gap: 12px;
  }

  .settings-modal .security-section-heading h3 {
    font-size: 15px;
    line-height: 1.2;
  }

  .settings-modal .security-section-heading p {
    font-size: 10px;
  }

  .settings-modal .form-row {
    grid-template-columns: 1fr;
  }

  .settings-modal .member-access-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .settings-modal .member-access-item .button,
  .settings-modal .member-access-item .text-button,
  .settings-modal .member-role-select,
  .settings-modal .tablet-access-item .text-button {
    width: 100%;
    justify-self: stretch;
  }

  .settings-modal .tablet-access-item {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-modal .session-access-actions,
  .settings-modal .session-detail-item {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-modal .security-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-modal .recipient-delete-zone,
  .settings-modal .invitation-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-modal .section-actions,
  .settings-modal .data-control-actions,
  .settings-modal .tablet-pairing-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-modal .section-actions .button,
  .settings-modal .data-control-actions .button,
  .settings-modal .tablet-pairing-actions .button,
  .settings-modal .recipient-delete-zone .text-button,
  .settings-modal .invitation-notice .button {
    width: 100%;
  }

  .help-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .help-actions {
    justify-content: flex-start;
  }

  .help-toc ol {
    columns: 1;
  }

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

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 60;
    left: 0;
    top: 0;
    width: 242px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 55;
    inset: 0;
    border: 0;
    background: rgba(20, 31, 28, 0.38);
  }

  .sidebar.open + .sidebar-scrim {
    display: block;
  }

  .mobile-menu {
    display: block;
  }

  .topbar {
    height: 95px;
    padding: 20px;
    gap: 13px;
  }

  .topbar > div:nth-child(2) {
    margin-right: auto;
  }

  h1 {
    font-size: 23px;
  }

  .content {
    padding: 24px 18px 55px;
  }

  .status-card {
    padding: 26px;
  }

  .wellbeing {
    display: none;
  }

  .right-column {
    grid-template-columns: 1fr;
  }

  .message-status-panel,
  .alert-history-panel {
    grid-column: auto;
  }

  .onboarding-checklist-items {
    grid-template-columns: 1fr;
  }

  .onboarding-item {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .onboarding-action {
    grid-column: 2;
    justify-self: start;
  }

  .recipient-note-entry {
    grid-template-columns: 1fr;
  }

  .support-access-item {
    grid-template-columns: 1fr;
  }

  .support-access-actions {
    grid-template-columns: 1fr 1fr;
  }

  .support-access-actions .support-duration {
    grid-column: 1 / -1;
  }

  .layout-customize-bar,
  .layout-settings-item,
  .tablet-layout-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .tablet-sound-setup {
    grid-template-columns: 1fr;
  }

  .tablet-sound-actions {
    justify-content: stretch;
  }

  .tablet-sound-actions .button {
    width: 100%;
  }

  .layout-customize-bar small {
    margin-left: 0;
  }

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

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

  .lottery-game {
    grid-template-columns: 1fr;
  }

  .tablet-grid,
  .tablet-layout {
    grid-template-columns: 1fr;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .board-task .task-management-row {
    grid-template-columns: 1fr;
    justify-content: flex-start;
  }

  .board-task .task-actions {
    margin-left: 0;
  }

  .task-item {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .task-management-row {
    grid-template-columns: 1fr;
  }

  .task-item .task-management-row,
  .task-item .task-owner-control,
  .task-item .task-actions {
    grid-column: 2;
    width: 100%;
    justify-self: start;
  }

  .task-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .tablet-page .tablet-reminder-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
  }

  .tablet-page .tablet-reminder-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .tablet-page .tablet-reminder-actions .button {
    flex: 1 1 160px;
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .tablet-page .tablet-reminder-actions {
    grid-template-columns: 1fr;
  }

  .tablet-page .tablet-reminder-actions .button {
    min-height: 46px;
  }
}

.tablet-page .tablet-reminder-popup {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  transform: none !important;
  overflow: visible !important;
  touch-action: pan-y !important;
}

.tablet-page .tablet-reminder-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 14px 16px !important;
  padding: clamp(18px, 2.2vw, 28px) !important;
  box-sizing: border-box !important;
  max-height: none !important;
  overflow: visible !important;
  border-radius: 24px !important;
  background:
    linear-gradient(90deg, rgba(196, 108, 69, 0.14), rgba(255, 248, 232, 0.98) 32%),
    rgba(255, 248, 232, 0.98) !important;
}

.tablet-page .tablet-reminder-actions {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.tablet-page .tablet-reminder-actions .button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  white-space: normal !important;
  flex: initial !important;
}

@supports (padding: max(14px, env(safe-area-inset-left))) {
  .tablet-page .tablet-reminder-popup {
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
  }
}

.tablet-page .tablet-reminder-inline {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  transform: none !important;
  overflow: visible !important;
}

.tablet-page .tablet-reminder-inline .tablet-reminder-card {
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
}

.tablet-reminder-kicker {
  display: block;
  margin-bottom: 5px;
  color: #a6602f;
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tablet-reminder-card:focus-within {
  outline: 4px solid rgba(77, 113, 102, 0.25);
  outline-offset: 4px;
}

@media (max-width: 470px) {
  .modal-backdrop {
    padding: 8px;
  }

  .settings-modal {
    max-height: calc(100dvh - 16px);
    padding: 28px 16px 18px;
    border-radius: 15px;
  }

  .settings-modal .modal-close {
    right: 12px;
    top: 12px;
  }

  .settings-modal .security-section-heading {
    align-items: flex-start;
    gap: 9px;
  }

  .settings-modal .security-section-heading p {
    display: none;
  }

  .settings-modal .account-type-pill {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-collapse-toggle {
    min-width: 50px;
    min-height: 40px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .settings-modal .settings-collapsible-content {
    gap: 10px;
  }

  .topbar-actions .icon-button {
    display: none;
  }

  .status-card {
    padding: 23px 21px;
  }

  .status-card h2 {
    font-size: 22px;
  }

  .activity-panel,
  .alert-history-panel,
  .next-up,
  .full-timeline {
    padding: 21px;
  }

  .panel-heading > .text-button {
    display: none;
  }

  .task-summary {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 28px 20px 22px;
  }

  .mood-options {
    grid-template-columns: 1fr;
  }

  .setup-type-options {
    grid-template-columns: 1fr;
  }

  .mood-options span {
    min-height: 48px;
    grid-template-columns: 30px 1fr;
    justify-items: start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .recipient-page {
    padding-top: 2px;
  }

  .recipient-header {
    margin-bottom: 20px;
  }

  .recipient-date {
    display: none;
  }

  .recipient-welcome {
    padding: 25px 22px;
  }

  .weather-note {
    display: none;
  }

  .recipient-card {
    padding: 22px 18px;
  }

  .medication-item {
    grid-template-columns: 1fr;
  }

  .medication-button {
    width: 100%;
  }

  .tablet-shell {
    padding: 18px;
  }

  .tablet-header {
    align-items: stretch;
    flex-direction: column;
  }

  .refresh-button {
    width: 100%;
    justify-content: center;
  }

  .routine-actions,
  .day-message-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .message-ack-button,
  .message-dismiss-button {
    width: 100%;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body,
  .legal-page {
    background: #fff !important;
  }

  .legal-page {
    padding: 0;
  }

  .legal-document {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .help-actions,
  .legal-back-link {
    display: none !important;
  }

  .help-header {
    margin-bottom: 14px;
  }

  .help-header > img {
    width: 260px;
  }

  .legal-document h1 {
    font-size: 28px;
  }

  .legal-document h2 {
    font-size: 17px;
  }

  .legal-document p,
  .legal-document li,
  .help-callout {
    color: #222 !important;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .help-toc,
  .help-grid article,
  .help-callout {
    background: #fff !important;
  }

  .help-section,
  .help-grid article,
  .help-callout {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .help-toc a,
  .help-section a {
    color: #222;
    text-decoration: none;
  }
}
