/* The household's next visit shares the page with their pet portrait. */
#app #content:has(> .owner-home) {container: household / inline-size}
#app .owner-contract-notice:not([hidden]) {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px;
  min-height:44px; margin-bottom:14px; padding:10px 12px; border:1px solid var(--work-line);
  border-radius:12px; background:var(--work-mint); color:var(--work-ink); text-decoration:none;
}
.owner-contract-notice strong,.owner-contract-notice small {display:block;overflow-wrap:anywhere}
.owner-contract-notice small {font-size:var(--type-meta);color:var(--muted)}
.owner-contract-notice:hover strong {text-decoration:underline}
#app .owner-home .household-feature {
  display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); align-items:stretch;
  gap:0; padding:0; position:relative; isolation:isolate; overflow:hidden;
  border:1px solid var(--work-line); border-radius:16px; background:var(--work-paper); color:var(--work-ink);
}
.household-feature > :first-child {min-width:0; align-self:center; padding:clamp(18px,3vw,34px); z-index:1}
#app .owner-home .household-feature h2 {
  margin:0; color:inherit; font-size:clamp(1.4rem,2.3vw,2rem); font-weight:700;
  line-height:1.18; letter-spacing:-.025em; text-wrap:balance; overflow-wrap:anywhere;
}
#app .household-feature .pet-state {
  display:inline-block; margin:0 0 8px; color:#125b47;
  font-size:var(--type-meta); line-height:1.3; font-weight:700;
}
.household-feature .household-visit-time {
  display:flex; align-items:center; gap:6px; margin-top:12px; font-size:var(--type-ui); font-weight:600;
}
.household-visit-time .ui-icon {--ui-icon-size:1.0625rem}
#app .household-feature :is(.pet-visit-info,p) {
  color:var(--muted); font-size:var(--type-meta); line-height:1.5; margin:6px 0 16px; overflow-wrap:anywhere;
}
#app .owner-home .household-feature .btn {
  display:inline-flex; align-items:center; gap:12px; justify-content:space-between;
  min-height:44px; padding:9px 14px; font-size:var(--type-ui); line-height:1.35;
}
.household-portrait {
  position:relative; align-self:stretch; min-width:0; overflow:hidden;
  background:var(--work-mint);
}
#app .household-portrait img {
  position:absolute; inset:0; display:block; width:100%; height:100%; max-width:none;
  object-fit:cover; object-position:50% 42%;
}
#app .household-portrait.is-art img {object-fit:contain; padding:12% 4% 9%}
#app .owner-home .client-home-actions {gap:10px}
#app .owner-home .client-home-actions .household-shortcut {
  display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px;
  min-height:58px; padding:10px 12px; background:var(--work-paper); border:1px solid var(--work-line); border-radius:12px;
}
#app .owner-home .household-shortcut i {
  display:grid; place-items:center; flex:none; width:32px; height:32px; border-radius:8px; background:var(--work-mint);
}
.household-shortcut i .ui-icon {width:20px; height:20px}
.household-shortcut b .ui-icon {display:block; width:16px; height:16px}
#app .owner-home .client-home-actions .household-shortcut:hover {border-color:#125b47;background:#f1faf4}
#app .owner-home .client-home-actions .household-shortcut b {display:none}
#app .owner-home .dash-agenda {border-color:var(--work-line);border-radius:16px}
#app .owner-home .dash-week {background:var(--work-canvas); border-radius:12px}
#app .owner-home .dash-week button[aria-pressed="true"] {background:#123e3b;color:#fff}
#app .owner-home .dash-week button[aria-pressed="true"] span {color:inherit}
@media(max-width:600px){
  #app .owner-home .household-feature {grid-template-columns:minmax(0,1.55fr) minmax(0,.8fr)}
  .household-feature > :first-child {padding:14px 12px 14px 16px}
  .household-feature .household-visit-time {margin-top:8px}
  #app .household-feature :is(.pet-visit-info,p) {margin-bottom:10px}
}

/* Keep live GPS numbers and tracker controls legible beside the map. */
#app .owner-home .client-tracking {
  background:var(--work-ink); color:var(--work-canvas); border:1px solid var(--work-ink); border-radius:16px;
}
#app .owner-home .client-track-identity .pet-portrait {
  width:clamp(60px,6vw,86px); height:auto; aspect-ratio:1; object-fit:cover;
  border:2px solid #d9f7e9; border-radius:12px;
}
#app .owner-home .client-track-identity h2 {
  font-size:clamp(1.35rem,2.1vw,1.8rem); color:var(--work-canvas); letter-spacing:-.025em;
}
#app .owner-home .client-sharing-state {color:#b7ecd4}
#app .owner-home .client-track-service {color:#e6eee5}
#app .owner-home .client-track-measures {border-color:#46706c}
#app .owner-home .client-track-measures dt {color:#cde5d8}
#app .owner-home .client-track-measures dd {color:#fffdf3}
#app .owner-home .client-tracking-overview > .btn:focus-visible {outline-color:var(--work-jade)}
@container household (min-width:45rem){
  #app .dash-home.owner-home {
    grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); align-items:start;gap:20px;
  }
  #app .owner-home .dash-lead {grid-column:1;grid-row:1}
  #app .owner-home .household-schedule {
    display:flex;flex-direction:column;align-items:stretch;gap:14px;margin:0;padding:0;min-width:0;grid-column:2;grid-row:1;
  }
  #app .owner-home .household-schedule > .dash-agenda {align-self:stretch;margin:0}
  #app .owner-home .client-tracking {grid-template-columns:minmax(0,1fr)}
  #app .owner-home .client-tracking .client-tracking-overview {padding:18px 20px;gap:12px}
  #app .owner-home .client-tracking .pet-route,
  #app .owner-home .client-tracking .pet-route moochle-walk-map[compact] .wm-stage {
    height:clamp(220px,18vw,285px);min-height:0;
  }
}

#app .owner-home .dash-agenda {align-self:start;padding:16px 18px}
@container (width < 21rem) {
  #app .owner-home .dash-agenda .home-visit {grid-template-columns:2.8rem minmax(0,1fr);align-items:start}
  #app .owner-home .dash-agenda .visit-clock {grid-row:1/span 2;align-self:start}
  #app .owner-home .dash-agenda .visit-info {display:flex;flex-direction:column;grid-column:2;grid-row:1}
  #app .owner-home .dash-agenda .visit-label {grid-column:2;grid-row:2;justify-self:start}
}
#app .owner-home .dash-agenda-actions[hidden] {display:none}
#app .owner-home .dash-agenda .dash-section-head {margin:0;border:0;min-height:0}
#app .owner-home .dash-agenda .dash-section-head h2 {
  position:absolute; width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);
}
#app .owner-home .dash-agenda {position:relative}
#app .owner-home .dash-head-links {position:absolute;top:16px;right:18px;z-index:1}
#app .owner-home .household-day-picker > summary {
  display:flex;position:relative;align-items:center;gap:8px;width:fit-content;
  max-width:calc(100% - 94px);min-height:44px;cursor:pointer;font-weight:700;
}
.household-day-picker > summary::-webkit-details-marker {display:none}
.household-day-picker > summary::after {
  content:""; width:7px;height:7px;flex:none;border:solid currentColor;border-width:0 1.5px 1.5px 0;
  transform:translateY(-2px) rotate(45deg);
}
.household-day-picker[open] > summary::after {transform:translateY(2px) rotate(225deg)}
.household-change-day {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#app .owner-home .dash-empty-day {margin:0;padding:0 0 6px;font-size:.875rem}
#app .owner-home .home-attention .household-shortcut {justify-content:flex-start;background:var(--work-paper);border-color:var(--work-line);color:var(--work-ink)}
#app .owner-home .home-attention .household-shortcut[href="#invoices"] {background:#fff3d6;border-color:#b57d22;color:#6b3f00}

/* Household links have their own stack so longer schedules cannot stretch the gaps. */
#app .owner-home .household-tools {display:flex;flex-direction:column;gap:10px;min-width:0}
#app .owner-home .household-tools > * {margin:0}
#app .owner-home .household-next-visit {
  display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;
  border-top:1px solid var(--work-divider);padding:10px 0;color:#143c39;text-decoration:none;
}
.household-next-visit :is(small,strong) {display:block;overflow-wrap:anywhere}
.household-next-visit small {color:#476256;font-size:.79rem}
.household-next-visit strong {margin-top:2px;font-size:.92rem}
.household-next-visit:hover strong {text-decoration:underline}
@container household (width < 45rem){
  #app .owner-home.dash-home {gap:14px}
}
@media(max-width:740px){
  #app .owner-home .client-tracking .client-tracking-overview {padding:14px;gap:8px 12px}
  #app .owner-home .client-track-identity .pet-portrait {width:52px}
  #app .owner-home .client-track-measures {margin:0;padding-top:5px}
  #app .owner-home .client-tracking-overview > .btn {margin:0;min-height:44px}
  #app .owner-home .dash-agenda {padding:10px 14px}
  #app .owner-home .dash-head-links {top:10px;right:14px}
}
