:root {
  color-scheme: light dark;
  --bg: #f4e9e1;
  --bg-elevated: rgba(255, 250, 246, .72);
  --bg-solid: #fffaf6;
  --bg-muted: rgba(123, 75, 58, .09);
  --glass-border: rgba(255, 255, 255, .66);
  --separator: rgba(111, 67, 53, .16);
  --label: #35211b;
  --secondary: #806a61;
  --tertiary: #a18b81;
  --blue: #b75d43;
  --blue-pressed: #974630;
  --green: #73845e;
  --yellow: #a47a32;
  --orange: #c66f42;
  --red: #b9473d;
  --purple: #8d657b;
  --pink: #bb6c71;
  --terracotta: #b75d43;
  --clay: #d89a78;
  --sand: #e8cdb8;
  --olive: #7c8b65;
  --shadow: 0 18px 46px rgba(91, 49, 36, .12);
  --small-shadow: 0 8px 24px rgba(91, 49, 36, .09);
  --radius-xl: 25px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --tap: 46px;
  --page-gutter: 16px;
  --tab-height: 76px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1210;
    --bg-elevated: rgba(55, 36, 30, .78);
    --bg-solid: #35231e;
    --bg-muted: rgba(231, 197, 179, .1);
    --glass-border: rgba(255, 234, 221, .12);
    --separator: rgba(222, 185, 164, .22);
    --label: #fff7f1;
    --secondary: #c9b8ae;
    --tertiary: #9f8a80;
    --blue: #e28b68;
    --blue-pressed: #f0a180;
    --green: #a8bb8e;
    --yellow: #e0b966;
    --orange: #ed9468;
    --red: #ff766d;
    --purple: #c99bb8;
    --pink: #e69a9e;
    --terracotta: #e28b68;
    --clay: #bb6d51;
    --sand: #795447;
    --olive: #a8bb8e;
    --shadow: 0 18px 50px rgba(0, 0, 0, .42);
    --small-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--clay) 22%, transparent) 0 13%, transparent 32%),
    radial-gradient(circle at 94% 36%, color-mix(in srgb, var(--olive) 14%, transparent) 0 11%, transparent 31%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 92%, white) 0%, var(--bg) 48%, color-mix(in srgb, var(--sand) 28%, var(--bg)) 100%);
  background-attachment: fixed;
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

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

button {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100svh;
  max-width: 760px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  isolation: isolate;
}

.top-bar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: calc(80px + env(safe-area-inset-top));
  margin-top: calc(env(safe-area-inset-top) * -1);
  padding: calc(19px + env(safe-area-inset-top)) var(--page-gutter) 12px;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(145%) blur(28px);
  backdrop-filter: saturate(145%) blur(28px);
}

.top-bar-title {
  min-width: 0;
  flex: 1;
}

.subpage-back {
  display: grid;
  width: 38px;
  height: 42px;
  margin: 0 4px -1px -8px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--blue);
}

.subpage-back[hidden] {
  display: none;
}

.subpage-back svg {
  width: 25px;
  height: 25px;
}

.top-bar.scrolled {
  border-color: var(--separator);
}

.top-bar h1 {
  margin: 1px 0 0;
  font-size: clamp(28px, 7.8vw, 34px);
  line-height: 1.03;
  letter-spacing: -.8px;
}

.eyebrow {
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.avatar-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  font-weight: 720;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), var(--small-shadow);
  overflow: hidden;
}

.member-1 { background-color: #2477f3; }
.member-2 { background-color: #8e5ad7; }
.member-3 { background-color: #e06a86; }

.member-avatar {
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--member-color, var(--blue));
}

.member-avatar img,
.avatar-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.avatar-button #profile-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.alert-rail {
  position: relative;
  z-index: 20;
  margin: 4px var(--page-gutter) 8px;
}

.alert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--orange) 12%, var(--bg-elevated));
  border: 1px solid color-mix(in srgb, var(--orange) 22%, var(--glass-border));
  border-radius: 17px;
  color: var(--orange);
  box-shadow: var(--small-shadow);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.alert-card > svg {
  flex: 0 0 auto;
}

.alert-copy {
  min-width: 0;
  flex: 1;
}

.alert-copy strong,
.alert-copy span {
  display: block;
}

.alert-copy strong {
  margin-bottom: 2px;
  font-size: 14px;
}

.alert-copy span {
  color: var(--label);
  font-size: 13px;
  line-height: 1.25;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--bg-muted);
  color: var(--blue);
}

.icon-button.small {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.icon-button.small svg {
  width: 18px;
  height: 18px;
}

.main-content {
  min-height: calc(100svh - 80px);
  padding: 3px var(--page-gutter) calc(var(--tab-height) + env(safe-area-inset-bottom) + 32px);
}

.tab-panel[hidden] {
  display: none;
}

.content-stack {
  display: grid;
  gap: 16px;
}

.glass-panel,
.card,
.section-card {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  box-shadow: var(--small-shadow);
  -webkit-backdrop-filter: saturate(145%) blur(24px);
  backdrop-filter: saturate(145%) blur(24px);
}

.card,
.section-card {
  border-radius: var(--radius-lg);
}

.hero-card {
  position: relative;
  display: grid;
  min-height: 185px;
  grid-template-columns: minmax(0, 1fr) 94px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius-xl);
}

.hero-card.state-normal { color: var(--blue); }
.hero-card.state-attention { color: var(--yellow); }
.hero-card.state-urgent { color: var(--orange); }
.hero-card.state-critical { color: var(--red); }

.hero-copy {
  min-width: 0;
}

.hero-visual {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  justify-self: center;
  place-items: center;
}

.hero-ring {
  position: absolute;
  inset: 0;
  border: 10px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 50%;
}

.hero-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 14%, var(--bg-solid));
}

.hero-icon svg {
  width: 26px;
  height: 26px;
}

.hero-kicker {
  margin: 0 0 4px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
}

.hero-time {
  margin: 15px 0 3px;
  color: var(--label);
  font-size: clamp(35px, 10.5vw, 48px);
  font-variant-numeric: tabular-nums;
  font-weight: 730;
  letter-spacing: -1.6px;
  line-height: 1;
}

.hero-detail {
  margin: 7px 0 0;
  color: var(--secondary);
  font-size: 14px;
}

.home-hero {
  min-height: 214px;
  grid-template-columns: minmax(0, 1fr) 112px;
  color: var(--terracotta);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bg-elevated) 80%, white), color-mix(in srgb, var(--clay) 18%, var(--bg-elevated)));
}

.home-hero::after {
  position: absolute;
  width: 190px;
  height: 190px;
  right: -72px;
  bottom: -90px;
  border: 1px solid color-mix(in srgb, var(--terracotta) 20%, transparent);
  border-radius: 48% 52% 58% 42%;
  content: "";
  transform: rotate(20deg);
}

.home-hero.has-overdue {
  color: var(--red);
}

.home-hero .hero-time {
  margin-top: 10px;
  font-size: clamp(37px, 10vw, 52px);
  letter-spacing: -2px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, currentColor 11%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-solid) 64%, transparent);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 630;
  white-space: nowrap;
}

.hero-metrics svg {
  width: 13px;
  height: 13px;
  color: currentColor;
  stroke-width: 2;
}

.hero-metrics b {
  color: var(--label);
  font-size: 12px;
}

.hero-art {
  position: relative;
  width: 108px;
  height: 142px;
}

.hero-art i {
  position: absolute;
  display: block;
  border-radius: 46% 54% 60% 40%;
  background: color-mix(in srgb, currentColor 16%, transparent);
  transform: rotate(-12deg);
}

.hero-art i:nth-child(1) { inset: 12px 4px 17px 9px; }
.hero-art i:nth-child(2) { inset: 32px 18px 3px 0; background: color-mix(in srgb, var(--olive) 23%, transparent); transform: rotate(18deg); }
.hero-art i:nth-child(3) { inset: 2px 0 52px 31px; background: color-mix(in srgb, var(--clay) 35%, transparent); transform: rotate(40deg); }

.hero-art span {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  inset: 42px 22px auto auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, white 55%, transparent);
  border-radius: 21px;
  background: color-mix(in srgb, var(--bg-solid) 72%, transparent);
  box-shadow: var(--small-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hero-art svg { width: 29px; height: 29px; }

.home-task-row .task-check {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: color-mix(in srgb, var(--terracotta) 10%, var(--bg-muted));
  color: var(--terracotta);
}

.home-task-row .task-check svg { width: 24px; height: 24px; }

.home-task-row.done .task-check {
  background: color-mix(in srgb, var(--green) 16%, var(--bg-muted));
  color: var(--green);
}

.home-task-row.overdue .task-check {
  background: color-mix(in srgb, var(--red) 12%, var(--bg-muted));
  color: var(--red);
}

.home-task-content {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.profile-settings-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 44px;
  gap: 10px;
}

.profile-name-field,
.profile-color-field {
  display: flex;
  min-width: 0;
  align-items: center;
}

.profile-name-field input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: var(--bg-muted);
}

.profile-color-field input { width: 42px; height: 42px; }

.row-icon.task {
  background: color-mix(in srgb, var(--terracotta) 13%, var(--bg-solid));
  color: var(--terracotta);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  color: currentColor;
  font-size: 12px;
  font-weight: 680;
}

.section-block {
  display: grid;
  gap: 9px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.25px;
}

.section-heading .count {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 560;
}

.text-button {
  min-height: 38px;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 610;
}

.text-button.danger {
  color: var(--red);
}

.list-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  box-shadow: var(--small-shadow);
  -webkit-backdrop-filter: saturate(145%) blur(24px);
  backdrop-filter: saturate(145%) blur(24px);
}

.list-row {
  position: relative;
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.list-row + .list-row::before {
  position: absolute;
  top: 0;
  right: 12px;
  left: 58px;
  height: 1px;
  background: var(--separator);
  content: "";
}

button.list-row {
  width: 100%;
  text-align: left;
  border: 0;
  color: inherit;
  background: transparent;
}

button.list-row:active {
  background: var(--bg-muted);
}

.row-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-muted);
  color: var(--blue);
  line-height: 0;
  overflow: hidden;
}

.row-icon svg {
  width: 19px;
  height: 19px;
}

.row-icon.cleaning { color: var(--purple); }
.row-icon.event { color: var(--pink); }
.row-icon.shopping { color: var(--green); }
.row-icon.missed { color: var(--red); }

.shopping-row-content {
  min-width: 0;
  align-self: stretch;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.shopping-row-content:active {
  opacity: .58;
}

.row-content {
  min-width: 0;
  flex: 1;
}

.row-title-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.row-title {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: var(--label);
  font-size: 15.5px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-title.purchased {
  color: var(--tertiary);
  text-decoration: line-through;
}

.row-time {
  flex: 0 0 auto;
  color: var(--secondary);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.row-subtitle {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 670;
}

.row-status.open { color: var(--secondary); }
.row-status.taken { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.row-status.done { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.row-status.missed { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }

.quick-add {
  display: flex;
  gap: 8px;
  padding: 9px;
  border-radius: var(--radius-lg);
}

.quick-add input {
  min-width: 0;
  height: var(--tap);
  flex: 1;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  background: var(--bg-muted);
  outline: 0;
}

.quick-add input::placeholder {
  color: var(--tertiary);
}

.shopping-add-block {
  display: grid;
  gap: 2px;
}

.shopping-detailed-add {
  justify-self: start;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 610;
}

.section-link {
  margin: -7px -4px -7px 0;
  white-space: nowrap;
}

.primary-icon {
  display: grid;
  width: var(--tap);
  height: var(--tap);
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: white;
}

.primary-icon:active,
.primary-button:active {
  background: var(--blue-pressed);
  transform: scale(.98);
}

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

.empty-state .row-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 15px;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.empty-state p {
  max-width: 290px;
  margin: 0 auto;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
}

.planning-toolbar,
.filter-bar {
  margin: 0 0 16px;
  padding: 9px;
  border-radius: var(--radius-lg);
}

.segmented {
  display: flex;
  padding: 2px;
  border-radius: 11px;
  background: var(--bg-muted);
}

.segmented button {
  min-height: 34px;
  flex: 1;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 630;
}

.segmented button.active {
  background: var(--bg-solid);
  color: var(--label);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .09);
}

.date-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-top: 6px;
}

.date-stepper button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 620;
}

.date-stepper button:first-child,
.date-stepper button:last-child {
  display: grid;
  place-items: center;
}

.day-group {
  display: grid;
  gap: 8px;
}

.day-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px;
}

.day-label strong {
  font-size: 17px;
  text-transform: capitalize;
}

.day-label span {
  color: var(--secondary);
  font-size: 13px;
}

.event-stripe {
  width: 4px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--member-color, var(--blue));
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--bg-elevated);
  box-shadow: var(--small-shadow);
}

.week-strip button {
  display: grid;
  min-width: 0;
  min-height: 62px;
  grid-template-rows: auto auto 5px;
  place-items: center;
  padding: 6px 1px 3px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--secondary);
}

.week-strip button span {
  font-size: 9px;
  font-weight: 650;
}

.week-strip button b {
  color: var(--label);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.week-strip button i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.week-strip button i.has-items {
  background: var(--tertiary);
}

.week-strip button.selected {
  background: var(--blue);
  color: rgba(255, 255, 255, .8);
}

.week-strip button.selected b {
  color: #fff;
}

.week-strip button.selected i.has-items {
  background: #fff;
}

.week-strip button.today:not(.selected) b {
  color: var(--blue);
}

.planning-day {
  display: grid;
  gap: 11px;
}

.planning-day-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 4px 0;
}

.planning-day-title > div {
  min-width: 0;
}

.planning-day-title span,
.planning-day-title strong {
  display: block;
  text-transform: capitalize;
}

.planning-day-title span {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 630;
}

.planning-day-title strong {
  margin-top: 2px;
  font-size: 19px;
}

.primary-icon.compact {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.presence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.presence-card {
  position: relative;
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 7px;
  padding: 13px 7px 11px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--bg-elevated);
  box-shadow: var(--small-shadow);
  text-align: center;
}

.presence-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 720;
}

.presence-avatar img {
  object-position: 50% 50%;
}

.presence-card > div {
  min-width: 0;
  width: 100%;
}

.presence-card > div strong,
.presence-card > div span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.presence-card div span {
  margin-top: 2px;
  color: var(--secondary);
  font-size: 10px;
}

.presence-card > i {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.presence-card > i.busy {
  background: var(--member-color, var(--blue));
}

.empty-state.compact {
  padding: 18px 16px;
}

.week-overview {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--small-shadow);
}

.week-day-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 72px;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: var(--label);
  text-align: left;
}

.week-day-card + .week-day-card::before {
  position: absolute;
  top: 0;
  right: 12px;
  left: 12px;
  height: 1px;
  background: var(--separator);
  content: "";
}

.week-day-card.today {
  background: color-mix(in srgb, var(--blue) 7%, transparent);
}

.week-day-date b,
.week-day-date small {
  display: block;
}

.week-day-date b {
  font-size: 13px;
  text-transform: capitalize;
}

.week-day-date small {
  margin-top: 3px;
  color: var(--secondary);
  font-size: 10px;
}

.week-events {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.week-event {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--secondary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-event i {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--member-color, var(--blue));
}

.week-event b {
  color: var(--label);
  font-variant-numeric: tabular-nums;
}

.week-empty {
  color: var(--tertiary);
  font-size: 11px;
}

.week-counts {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--secondary);
  font-size: 11px;
}

.week-counts span {
  display: flex;
  align-items: center;
  gap: 2px;
}

.week-counts svg {
  width: 15px;
  height: 15px;
}

.session-overview {
  display: grid;
  width: 100%;
  min-height: 82px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  color: var(--label);
  text-align: left;
}

button.session-overview {
  cursor: pointer;
}

.session-overview-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--purple) 13%, transparent);
  color: var(--purple);
}

.session-overview-icon svg {
  width: 24px;
  height: 24px;
}

.session-overview-copy,
.session-overview-copy strong,
.session-overview-copy small {
  display: block;
  min-width: 0;
}

.session-overview-copy strong {
  overflow: hidden;
  font-size: 15.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-overview-copy small {
  margin-top: 4px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.3;
}

.session-overview > svg {
  width: 18px;
  height: 18px;
  color: var(--tertiary);
}

.session-progress {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--bg-muted);
}

.session-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--purple);
  transition: width .2s ease;
}

.session-progress.large {
  height: 7px;
  margin-top: 12px;
}

.session-picker {
  display: grid;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 9px;
  padding: 1px 2px 10px;
  margin: 0 -2px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cleaning-picker-form {
  min-height: 0;
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.session-picker-room,
.cleaning-session-room {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--bg-muted);
}

.session-picker-room-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.session-room-toggle {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 8px 9px 13px;
  border: 0;
  background: transparent;
  color: var(--label);
  text-align: left;
}

.session-room-toggle span,
.session-room-toggle strong,
.session-room-toggle small {
  display: block;
}

.session-room-toggle strong {
  font-size: 16px;
}

.session-room-toggle small {
  margin-top: 2px;
  color: var(--secondary);
  font-size: 11px;
}

.session-room-toggle > svg {
  width: 18px;
  height: 18px;
  color: var(--tertiary);
  transition: transform .18s ease;
}

.session-picker-room.open .session-room-toggle > svg {
  transform: rotate(180deg);
}

.session-room-all {
  min-width: 52px;
  min-height: 38px;
  margin-right: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  background: var(--bg-solid);
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
}

.session-room-all.selected {
  background: color-mix(in srgb, var(--blue) 15%, transparent);
}

.session-picker-items {
  border-top: 1px solid var(--separator);
}

.session-picker-item {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 11px;
  padding: 7px 13px;
  cursor: pointer;
}

.session-picker-item + .session-picker-item::before {
  position: absolute;
  top: 0;
  right: 13px;
  left: 53px;
  height: 1px;
  background: var(--separator);
  content: "";
}

.session-picker-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.session-picker-check,
.session-task-check {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--tertiary) 52%, transparent);
  border-radius: 50%;
  color: transparent;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.session-picker-check svg,
.session-task-check svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.session-picker-item input:checked + .session-picker-check {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
  transform: scale(1.03);
}

.session-picker-name {
  min-width: 0;
  font-size: 14.5px;
  font-weight: 560;
}

.session-picker-footer {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 8px;
  padding: 11px 0 0;
  border-top: 1px solid var(--separator);
  background: transparent;
}

.session-picker-footer > span {
  color: var(--secondary);
  font-size: 12px;
  text-align: center;
}

.session-progress-card {
  padding: 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--purple) 10%, var(--bg-muted));
}

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

.session-progress-card > div > span {
  color: var(--secondary);
  font-size: 12px;
}

.session-progress-card strong {
  margin-top: 4px;
  font-size: 19px;
}

.cleaning-session-rooms {
  display: grid;
  gap: 11px;
}

.cleaning-session-room-title {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
}

.cleaning-session-room-title strong {
  font-size: 16px;
}

.cleaning-session-room-title span {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 620;
}

.cleaning-session-items {
  border-top: 1px solid var(--separator);
}

.cleaning-session-item {
  position: relative;
  display: grid;
  min-height: 61px;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: stretch;
}

.cleaning-session-item + .cleaning-session-item::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 12px;
  left: 53px;
  height: 1px;
  background: var(--separator);
  content: "";
}

.cleaning-session-toggle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 8px 5px 8px 12px;
  border: 0;
  background: transparent;
  color: var(--label);
  text-align: left;
}

.cleaning-session-item.done .session-task-check {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.session-task-copy,
.session-task-copy strong,
.session-task-copy small {
  display: block;
  min-width: 0;
}

.session-task-copy strong {
  font-size: 14.5px;
}

.session-task-copy small {
  margin-top: 3px;
  color: var(--secondary);
  font-size: 11px;
}

.cleaning-session-item.done .session-task-copy strong {
  color: var(--secondary);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.session-task-note {
  display: grid;
  width: 46px;
  min-height: 46px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tertiary);
}

.session-task-note svg {
  width: 19px;
  height: 19px;
}

.session-cancel {
  justify-self: center;
}

.task-home-row .quick-check {
  display: grid;
  width: 38px;
  height: 42px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--purple);
}

.task-home-row .quick-check.done {
  color: var(--green);
}

.task-home-row .row-content-button {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.row-subtitle.wrap {
  overflow: visible;
  white-space: normal;
}

.history-row {
  text-align: left;
}

.history-chevron {
  color: var(--tertiary);
}

.history-chevron svg {
  width: 17px;
  height: 17px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.filter-bar label span {
  display: block;
  margin: 0 0 4px 4px;
  color: var(--secondary);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.filter-bar select {
  width: 100%;
  height: 38px;
  padding: 0 7px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-muted);
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.stat-card {
  display: grid;
  min-width: 0;
  min-height: 70px;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 18px;
  text-align: left;
}

.stat-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  min-width: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 720;
}

.stat-identity {
  min-width: 0;
}

.stat-identity strong,
.stat-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-identity strong {
  font-size: 15px;
}

.stat-identity span {
  margin-top: 3px;
  color: var(--secondary);
  font-size: 11px;
}

.stat-counts {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  text-align: center;
}

.stat-counts span {
  color: var(--secondary);
  font-size: 10px;
}

.stat-counts b {
  display: block;
  color: var(--label);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.stats-block {
  margin-bottom: 18px;
}

.dog-insights-block {
  margin: 0 0 18px;
}

.dog-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
}

.dog-insight-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
}

.dog-insight-card:nth-child(2) {
  border-left: 1px solid var(--separator);
}

.dog-insight-card.duration {
  grid-column: 1 / -1;
  border-top: 1px solid var(--separator);
}

.dog-insight-card > span,
.dog-insight-card small {
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.35;
}

.dog-insight-card strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-segmented {
  margin-bottom: 1px;
}

.history-date {
  margin: 3px 4px -3px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 650;
  text-transform: capitalize;
}

#history-content .row-subtitle {
  overflow: visible;
  white-space: normal;
}

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

.settings-group > h2 {
  margin: 3px 4px 0;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 620;
  text-transform: uppercase;
}

.settings-form {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.settings-row {
  position: relative;
  display: grid;
  min-height: 55px;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 116px);
  align-items: center;
  gap: 14px;
  padding: 7px 13px;
}

.settings-row > * {
  min-width: 0;
}

.settings-row + .settings-row::before {
  position: absolute;
  top: 0;
  right: 12px;
  left: 13px;
  height: 1px;
  background: var(--separator);
  content: "";
}

.settings-row span {
  font-size: 14px;
  font-weight: 540;
}

.settings-row input,
.settings-row select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-muted);
  text-align: right;
}

.settings-row input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  font-variant-numeric: tabular-nums;
}

.settings-row input[type="color"] {
  width: 48px;
  height: 38px;
  justify-self: end;
  padding: 4px;
}

.color-member {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 720;
}

.settings-footer {
  padding: 9px 12px 12px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
}

.settings-save-state {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 0;
  color: var(--secondary);
  font-size: 12px;
}

.settings-save-state svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.settings-save-state.saving svg {
  color: var(--blue);
}

.settings-save-state.error,
.settings-save-state.error svg {
  color: var(--red);
}

.full-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 8px 13px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--label);
  box-shadow: var(--small-shadow);
  text-align: left;
}

.full-button svg {
  flex: 0 0 auto;
  color: var(--blue);
}

.full-button > .button-label,
.full-button > span:not(.member-avatar) {
  min-width: 0;
  flex: 1;
  font-weight: 570;
}

.full-button > .stat-avatar {
  flex: 0 0 38px;
}

.upload-button {
  cursor: pointer;
}

.full-button.danger,
.full-button.danger svg {
  color: var(--red);
}

.primary-button,
.secondary-button,
.danger-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 0;
  border-radius: 15px;
  font-weight: 660;
}

.primary-button svg,
.secondary-button svg,
.danger-button svg {
  width: 19px;
  height: 19px;
}

.primary-button {
  background: var(--blue);
  color: white;
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: default;
  opacity: .42;
}

.secondary-button {
  background: var(--bg-muted);
  color: var(--blue);
}

.danger-button {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.button-row.single {
  grid-template-columns: 1fr;
}

.button-row.three {
  grid-template-columns: repeat(3, 1fr);
}

.tab-bar {
  position: fixed;
  z-index: 40;
  right: max(var(--page-gutter), calc((100vw - 728px) / 2));
  bottom: max(9px, env(safe-area-inset-bottom));
  left: max(var(--page-gutter), calc((100vw - 728px) / 2));
  display: grid;
  height: var(--tab-height);
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
}

.tab-bar > button {
  display: flex;
  min-width: 0;
  height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--tertiary);
}

.tab-bar > button svg {
  width: 23px;
  height: 23px;
}

.tab-bar > button span:last-child {
  overflow: hidden;
  max-width: 100%;
  font-size: 9.5px;
  font-weight: 570;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-bar > button.active {
  color: var(--blue);
}

.tab-bar .add-tab {
  color: var(--blue);
}

.tab-bar.dog-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tab-bar > button[hidden] {
  display: none;
}

.add-circle {
  display: grid;
  width: 42px;
  height: 42px;
  margin-top: -15px;
  place-items: center;
  border-radius: 15px;
  background: var(--blue);
  color: white;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--blue) 28%, transparent);
}

.add-circle svg {
  width: 24px !important;
  height: 24px !important;
  stroke-width: 2.2;
}

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.modal-layer[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0, 0, 0, .25);
  animation: fade-in .18s ease-out;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.bottom-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 760px;
  max-height: min(88svh, 820px);
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 8px var(--page-gutter) calc(18px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg-solid) 91%, transparent);
  border: 1px solid var(--glass-border);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -15px 50px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: saturate(170%) blur(28px);
  backdrop-filter: saturate(170%) blur(28px);
}

.bottom-sheet.cleaning-picker-sheet {
  display: flex;
  height: min(88svh, 820px);
  flex-direction: column;
  overflow-y: hidden;
}

.cleaning-picker-sheet .sheet-grabber {
  flex: 0 0 25px;
}

.cleaning-picker-sheet #sheet-content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.cleaning-picker-sheet .sheet-header {
  flex: 0 0 auto;
}

.sheet-grabber {
  position: relative;
  width: 68px;
  height: 25px;
  margin: -4px auto 3px;
  cursor: grab;
  touch-action: none;
}

.sheet-grabber::after {
  position: absolute;
  top: 8px;
  left: 15px;
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: var(--separator);
  content: "";
}

#sheet-content {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.sheet-header h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -.45px;
}

.sheet-header .text-button {
  margin-right: -4px;
}

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

.action-tile {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  border: 0;
  border-radius: 18px;
  background: var(--bg-muted);
  text-align: left;
}

.action-tile .row-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  background: var(--bg-solid);
}

.action-tile .row-icon svg {
  width: 21px;
  height: 21px;
}

.action-tile > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--tertiary);
}

.action-tile div:not(.row-icon) {
  min-width: 0;
  flex: 1;
}

.action-tile > div strong,
.action-tile > div span {
  display: block;
}

.action-tile > div strong {
  font-size: 15.5px;
}

.action-tile > div span {
  margin-top: 3px;
  color: var(--secondary);
  font-size: 12.5px;
}

.form-stack {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 13px;
}

.field {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
}

.field > span,
.field legend {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 620;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 49px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--bg-muted);
  outline: 0;
}

.field input[type="date"],
.field input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: color-mix(in srgb, var(--blue) 40%, transparent);
  background: color-mix(in srgb, var(--bg-muted) 70%, var(--bg-solid));
}

.field-row {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.field-row > * {
  min-width: 0;
}

fieldset.field {
  min-width: 0;
  padding: 0;
  border: 0;
}

.fact-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fact-picker label {
  position: relative;
}

.fact-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fact-picker span {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--bg-muted);
  color: var(--secondary);
  font-size: 14px;
  font-weight: 620;
}

.fact-picker svg {
  width: 18px;
  height: 18px;
  opacity: 0;
}

.fact-picker input:checked + span {
  border-color: color-mix(in srgb, var(--green) 30%, transparent);
  background: color-mix(in srgb, var(--green) 13%, transparent);
  color: var(--green);
}

.fact-picker input:checked + span svg {
  opacity: 1;
}

.dog-needs-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
}

.dog-need {
  display: grid;
  min-width: 0;
  min-height: 72px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 2px 8px;
  padding: 11px 13px;
  border-radius: 15px;
  background: var(--bg-muted);
  color: var(--secondary);
}

.dog-need svg {
  width: 22px;
  height: 22px;
  grid-row: 1 / 3;
}

.dog-need b,
.dog-need small {
  display: block;
  min-width: 0;
}

.dog-need b {
  color: var(--label);
  font-size: 14px;
}

.dog-need small {
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dog-need.done {
  background: color-mix(in srgb, var(--green) 13%, transparent);
  color: var(--green);
}

.toggle-row {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--bg-muted);
}

.toggle-row span {
  font-size: 14px;
  font-weight: 550;
}

.switch {
  position: relative;
  width: 51px;
  height: 31px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tertiary) 40%, transparent);
  transition: background .16s;
}

.switch i::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  content: "";
  transition: transform .18s cubic-bezier(.25, .8, .3, 1);
}

.switch input:checked + i {
  background: var(--green);
}

.switch input:checked + i::after {
  transform: translateX(20px);
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.weekday-picker label {
  position: relative;
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
}

.weekday-picker span {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 10px;
  background: var(--bg-muted);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 650;
}

.weekday-picker input:checked + span {
  background: var(--blue);
  color: white;
}

.form-help {
  margin: -4px 2px 0;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
}

.profile-gate {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: calc(30px + env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.profile-gate[hidden] {
  display: none;
}

.profile-card {
  width: 100%;
  max-width: 390px;
  padding: 30px 22px 22px;
  border-radius: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  text-align: center;
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
}

.app-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 19px;
  background: #fbf5ed;
  box-shadow: 0 10px 25px rgba(99, 63, 28, .16);
}

.app-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h1,
.setup-card h1 {
  margin: 5px 0 9px;
  font-size: 29px;
  letter-spacing: -.7px;
}

.profile-card > p:not(.eyebrow),
.setup-card > p:not(.eyebrow) {
  margin: 0 auto 24px;
  color: var(--secondary);
  line-height: 1.45;
}

.profile-choices {
  display: grid;
  gap: 10px;
}

.profile-choice {
  display: flex;
  min-height: 61px;
  align-items: center;
  gap: 13px;
  padding: 8px 13px;
  border: 0;
  border-radius: 18px;
  background: var(--bg-muted);
  text-align: left;
}

.profile-choice b,
.profile-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  font-weight: 720;
}

.profile-choice > span:not(.profile-avatar) {
  min-width: 0;
  flex: 1;
  font-size: 17px;
  font-weight: 620;
}

.account-actions {
  margin-top: 14px;
}

.profile-choice svg {
  color: var(--tertiary);
}

.toast {
  position: fixed;
  z-index: 300;
  right: 20px;
  bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + 20px);
  left: 20px;
  max-width: 420px;
  min-height: 48px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--label) 90%, transparent);
  color: var(--bg-solid);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 570;
  text-align: center;
  animation: toast-in .22s ease-out;
}

.toast.error {
  background: color-mix(in srgb, var(--red) 92%, #000);
  color: white;
}

.update-prompt {
  position: fixed;
  z-index: 180;
  right: 12px;
  bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + 12px);
  left: 12px;
  display: grid;
  max-width: 540px;
  grid-template-columns: minmax(0, 1fr) minmax(142px, auto);
  align-items: center;
  gap: 9px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 19px;
  animation: toast-in .22s ease-out;
}

.update-prompt[hidden] {
  display: none;
}

.update-copy {
  min-width: 0;
}

.update-prompt strong,
.update-prompt span {
  display: block;
}

.update-prompt strong {
  font-size: 14px;
}

.update-prompt span {
  margin-top: 2px;
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.3;
}

.update-actions {
  display: flex;
  min-width: 142px;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.update-prompt .primary-button {
  min-height: 48px;
  padding: 10px 15px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 680;
}

.update-later {
  min-height: 24px;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  color: var(--tertiary);
  font-size: 10px;
}

.loading-cover {
  position: fixed;
  z-index: 250;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .08);
}

.loading-cover[hidden] {
  display: none;
}

.loading-cover > span:first-child {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(128, 128, 128, .25);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.skeleton {
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  animation: pulse 1.1s ease-in-out infinite alternate;
}

.hero-skeleton { height: 185px; border-radius: var(--radius-xl); }
.card-skeleton { height: 130px; }

.setup-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.setup-card {
  width: min(100%, 420px);
  padding: 30px 24px;
  border-radius: 28px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  text-align: center;
}

.setup-card .secondary {
  margin-bottom: 0 !important;
  font-size: 13px;
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  from { opacity: .45; }
  to { opacity: .82; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 370px) {
  :root {
    --page-gutter: 12px;
  }

  .top-bar h1 {
    font-size: 28px;
  }

  .hero-card {
    min-height: 170px;
    padding: 17px;
  }

  .hero-time {
    font-size: 34px;
  }

  .tab-bar > button span:last-child {
    font-size: 8.5px;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar label:last-child {
    grid-column: 1 / -1;
  }

  .button-row.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-prompt {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-actions {
    width: 100%;
    min-width: 0;
  }

  .update-later {
    align-self: flex-end;
  }
}

@media (min-width: 600px) {
  :root {
    --page-gutter: 24px;
  }

  .main-content {
    padding-top: 12px;
  }

  .content-stack {
    gap: 19px;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .top-bar {
    position: relative;
  }

  .bottom-sheet {
    max-height: 96svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
