.home-task-scroll {
  max-block-size: min(22rem, 48dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-block: 12px;
  padding-inline-end: 8px;
}
.management-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-block-start: 12px;
}
.karov-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
  padding: 16px clamp(16px, 4vw, 36px) 24px;
  color: #41516a;
  border-block-start: 1px solid var(--border, #d9e2ee);
}
.karov-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.karov-footer a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  color: #116663;
  text-underline-offset: 3px;
}
.karov-footer .footer-contact {
  justify-content: center;
  inline-size: 44px;
  border-radius: 50%;
  color: white;
}
.karov-footer .footer-contact:hover { filter: brightness(.88); }
.karov-footer a:focus-visible { outline: 2px solid #174d99; outline-offset: 3px; }
.footer-contact svg { inline-size: 23px; block-size: 23px; }
.karov-footer .footer-email { background: #2159a2; }
.karov-footer .footer-whatsapp { background: #087a4d; }
@media (min-width: 1024px) {
  .family-layout > .karov-footer { grid-column: 2; }
}

.home-dashboard { display: grid; gap: 14px; }
.home-dashboard > .card { margin: 0; }
.home-date { margin: 0; color: #11645c; font-weight: 700; }
.home-status { border-inline-start: 3px solid #64b6a9; }
.home-attention { display: grid; gap: 12px; }
.home-attention > h2 { margin: 0; font-size: 1.15rem; }
.attention-grid { display: grid; gap: 12px; }
.attention-card {
  min-inline-size: 0;
  padding: 14px;
  border: 1px solid #dbe5e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 4px #152f3510;
}
.attention-card > p { margin: 9px 0 0; }
.attention-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #18363a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.attention-title { flex: 1; min-inline-size: 0; }
.attention-icon, .attention-count {
  flex: none;
  display: grid;
  place-items: center;
  background: #edf5f5;
  color: #145a53;
  font-weight: 700;
}
.attention-icon { inline-size: 34px; block-size: 34px; border-radius: 9px; }
.attention-count {
  min-inline-size: 27px;
  min-block-size: 27px;
  padding-inline: 6px;
  border-radius: 99px;
  font-size: .86rem;
}
.attention-count-active { background: #fff1d5; color: #69451b; }
.home-task-card { border-color: #b8d9d4; background: #f7fcfb; }
.home-task-card > summary { cursor: pointer; min-block-size: 44px; list-style: none; }
.home-task-card > summary::-webkit-details-marker { display: none; }
.home-task-card > summary::after {
  content: "";
  flex: none;
  inline-size: 7px;
  block-size: 7px;
  border: solid #145a53;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  margin-inline: 3px;
}
.home-task-card[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.home-task-card > summary:focus-visible { outline: 2px solid #145a53; outline-offset: 4px; }
.attention-grid > .attention-notes { display: block; margin: 0; }
.attention-grid > .attention-notes > p { margin-block: 9px 0; }
.attention-action { margin-block-start: 11px; min-block-size: 44px; }
@media (min-width: 750px) {
  .attention-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-task-card[open] { grid-column: 1 / -1; }
}
.home-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px; }
.home-person {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f2f7fa;
  overflow-wrap: anywhere;
}
.home-person span { color: #41516a; font-size: .85rem; }
.benefits-plan-actions { margin-block-start: 16px; }

.karov-app-title, .karov-app-wordmark {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .35rem .55rem;
}
.topbar .karov-app-wordmark .karov-brand { margin-inline-end: 0; }
.home-overview { padding-block: 8px 0; }
.home-overview h2 {
  color: #102f2e;
  margin: .2em 0;
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  line-height: 1.1;
}
.family-layout > .parent-view { gap: 4px; }
.family-layout > .parent-view .chip { min-block-size: 40px; border-radius: 999px; }

.karov-language-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #115e59;
}
.karov-language-picker select { min-block-size: 40px; }

.family-layout .tabs-bar .mobile-more { display: none; }
.mobile-nav-panel { display: contents; }

@media (max-width: 680px) {
  .family-layout { --karov-dock-height: 58px; }
  .family-layout .topbar { padding: 5px 12px 4px; }
  .family-layout .topbar-row { flex-direction: row; align-items: center; }
  .family-layout .karov-app-title > span:not(.karov-app-wordmark) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .family-layout .user-pill { margin-block: 0 4px; font-size: .68rem; }
  .family-layout .user-pill > :first-child { display: none; }
  .family-layout .karov-language-picker { gap: 4px; }
  .family-layout .karov-language-picker select { min-block-size: 44px; }
  .family-layout > main { padding-block-start: 8px; }
  .home-dashboard { gap: 10px; }
  .home-overview { padding-block: 2px 0; }
  .home-attention { gap: 8px; }
  .attention-card { padding: 12px; }
  .family-layout > .karov-footer { padding-block-end: calc(var(--karov-dock-height) + env(safe-area-inset-bottom, 0px) + 12px); }

  .family-layout .tabs-bar {
    box-sizing: border-box;
    block-size: calc(var(--karov-dock-height) + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    padding-inline-end: 60px;
  }
  .family-layout .tabs-bar > .tab-btn { justify-content: center; line-height: 1.15; font-size: .67rem; }
  .family-layout .tabs-bar .mobile-more { display: flex; }
  .mobile-more .ico { line-height: 1; }
  .mobile-nav-panel {
    display: none;
    position: absolute;
    inset-inline: 8px;
    inset-block-end: 100%;
    margin-block-end: 6px;
    padding: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    box-shadow: 0 6px 24px #14243b29;
  }
  .mobile-nav-panel[data-open="true"] { display: grid; }
  .mobile-nav-panel .tab-btn { border-radius: 8px; background: #f3f7f8; }
  .family-layout .house-guide {
    z-index: 45;
    inset-inline: auto 7px;
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    width: max-content;
  }
  .family-layout .house-guide .guide-trigger.guide-launcher {
    inline-size: 48px;
    block-size: 48px;
    grid-template-rows: 22px auto;
    gap: 0;
  }
  .family-layout .house-guide .guide-launcher svg { width: 23px; height: 23px; }
  .family-layout .house-guide .guide-launcher-label { font-size: .54rem; }
  .family-layout .house-guide .guide-trigger.guide-launcher::before,
  .family-layout .house-guide .guide-trigger.guide-launcher::after { display: none; }
  .family-layout .house-guide .card {
    position: absolute;
    inset-inline-end: 0;
    bottom: 54px;
    width: min(360px, calc(100vw - 14px));
    box-sizing: border-box;
    max-height: min(70dvh, calc(100dvh - 120px));
  }
}

.guide-home-greeting {
  margin: 0 0 10px;
  padding-inline: 8px;
  text-align: center;
  color: #102f2e;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.25;
}
.family-layout .house-guide.guide-home {
  position: relative;
  inset: auto;
  z-index: auto;
  width: min(100%, 42rem);
  margin: 6px auto 0;
  text-align: center;
}
.family-layout .house-guide.guide-home > summary.guide-launcher {
  width: clamp(124px, 13vw, 164px);
  height: clamp(124px, 13vw, 164px);
  grid-template-rows: 1fr;
  margin-inline: auto;
}
.family-layout .house-guide.guide-home > summary .guide-mark { scale: 2.2; }
.family-layout .house-guide.guide-home .guide-launcher-label { display: none; }
.family-layout .house-guide.guide-home > .card {
  position: static;
  width: 100%;
  max-height: none;
  margin: 10px 0 0;
  box-sizing: border-box;
  overflow: visible;
  background: #f8fdfc;
  border: 1px solid #b8d9d4;
  box-shadow: none;
}
.guide-home .guide-head { text-align: start; }
.guide-home .guide-head + p { display: none; }
.guide-home[open] + .guide-home-greeting { display: none; }
.guide-home .guide-conversation { text-align: start; }
.guide-home .guide-conversation:has([data-guide-question][hidden]) { display: none; }
.guide-home > .card > .guide-conversation { max-height: 15rem; overflow: auto; }
.guide-home [data-guide-voice-status]:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .family-layout .house-guide.guide-home > summary.guide-launcher::before { display: block; animation: karov-cloud-edge 15s linear infinite; }
  .family-layout .house-guide.guide-home > summary.guide-launcher::after { display: block; animation: karov-cloud-halo 21s linear infinite; }
}

@keyframes guide-home-heartbeat {
  0%, 34%, 100% { scale: 1; }
  12% { scale: 1.045; }
  24% { scale: 1.025; }
}
@media (prefers-reduced-motion: no-preference) {
  .family-layout .house-guide > summary.guide-launcher {
    animation: guide-home-heartbeat 3.2s ease-in-out infinite;
  }
}

@media (max-width: 680px) {
  .family-layout .house-guide.guide-home > summary .guide-mark { scale: 2.58; }
}

.roster-week-scroll { overflow-x: auto; margin-top: 12px; }
.roster-week-table { width: 100%; min-width: 860px; table-layout: fixed; border-collapse: collapse; }
.roster-week-table th, .roster-week-table td { border: 1px solid #dbe6e8; padding: 6px; vertical-align: top; overflow-wrap: anywhere; }
.roster-week-table th { color: #254a46; font-size: .84rem; font-weight: 600; background: #f2f8f7; text-align: start; }
.roster-week-table th[aria-current="date"] { background: #d8eeea; color: #124d45; }
.roster-week-table .care-tile { margin-bottom: 4px; padding: 6px; font-size: .8rem; border-radius: 6px; }
.roster-week-table .care-tile p { margin: 0 0 4px; }
.roster-week-table .care-actions { gap: 4px; }
.roster-hours { margin-block: 8px; }
.roster-hours > label { display: flex; align-items: center; gap: 6px; }

@page roster-landscape { size: landscape; }

@media print {
  body.print-roster-week *:not(:has(#rosterWeek)):not(#rosterWeek):not(#rosterWeek *) { display: none !important; }
  body.print-roster-week *:has(#rosterWeek) { display: contents; }
  body.print-roster-week #rosterWeek { page: roster-landscape; width: 100%; margin: 0; border: 0; box-shadow: none; }
  body.print-roster-week .roster-week-scroll { overflow: visible; }
  body.print-roster-week .roster-week-table { min-width: 0; }
  body.print-roster-week #rosterWeek button { display: none; }
  body.print-roster-week .roster-week-table tr { break-inside: avoid; }
}
