* { box-sizing: border-box; }

:root {
  color-scheme: light;
  --bg: #eef2ef;
  --panel: rgba(252, 253, 250, .78);
  --panel-2: rgba(244, 247, 242, .74);
  --ink: #151b17;
  --muted: #5f6b62;
  --line: rgba(191, 207, 195, .72);
  --line-strong: rgba(154, 176, 162, .76);
  --primary: #245f48;
  --primary-2: #e2f0e8;
  --nav-surface: rgba(251, 252, 250, .82);
  --blue: #376589;
  --amber: #986b2f;
  --red: #a7473a;
  --shadow: 0 18px 48px rgba(21, 27, 23, .085), inset 0 1px 0 rgba(255,255,255,.58);
  --shadow-strong: 0 34px 90px rgba(21, 27, 23, .16), inset 0 1px 0 rgba(255,255,255,.42);
  --nav-height: 92px;
  --radius: 8px;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #eef2ef;
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#ambientCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 98, 71, .25);
  outline-offset: 2px;
}

.hidden { display: none !important; }

.app-shell {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--nav-height);
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.14) 38%, rgba(220,230,222,.18)),
    linear-gradient(90deg, rgba(55,101,137,.045), rgba(152,107,47,.04) 42%, rgba(36,95,72,.045));
  isolation: isolate;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255,255,255,.32) 28%, transparent 42%) 0 0 / 260% 100%,
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 112px);
  mix-blend-mode: soft-light;
  animation: cinematic-sweep 18s linear infinite;
}

.app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(21,27,23,.18) .55px, transparent .55px);
  background-size: 4px 4px;
  opacity: .08;
}

body[data-weather-scene="rain"] .app-shell::after {
  background-image:
    linear-gradient(112deg, transparent 0 46%, rgba(55,101,137,.10) 47% 48%, transparent 49%),
    radial-gradient(rgba(21,27,23,.14) .55px, transparent .55px);
  background-size: 46px 140px, 4px 4px;
  animation: rain-pane 1.7s linear infinite;
  opacity: .18;
}

body[data-weather-scene="snow"] .app-shell::after {
  background-image:
    radial-gradient(rgba(255,255,255,.8) 1px, transparent 1.4px),
    radial-gradient(rgba(21,27,23,.11) .55px, transparent .55px);
  background-size: 90px 90px, 4px 4px;
  animation: snow-drift 13s linear infinite;
  opacity: .28;
}

body[data-weather-scene="night"] .app-shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,.62), rgba(232,238,235,.10) 38%, rgba(66,88,93,.18)),
    linear-gradient(90deg, rgba(55,101,137,.07), rgba(71,63,127,.06) 42%, rgba(36,95,72,.05));
}

body[data-active-page="calendarPage"] .app-topbar::after { background: linear-gradient(90deg, var(--primary), #7b6fb0); }
body[data-active-page="weatherPage"] .app-topbar::after { background: linear-gradient(90deg, #17382d, var(--blue)); }
body[data-active-page="mealsPage"],
body[data-active-page="recipesPage"] {
  --primary-2: #edf1e5;
}
body[data-active-page="mealsPage"] .app-topbar::after,
body[data-active-page="recipesPage"] .app-topbar::after { background: linear-gradient(90deg, var(--amber), var(--primary)); }
body[data-active-page="chefPage"] .app-topbar::after { background: linear-gradient(90deg, #7b6fb0, var(--primary)); }
body[data-active-page="carePage"] .app-topbar::after { background: linear-gradient(90deg, #a7473a, var(--primary)); }

.app-main {
  min-height: 0;
  padding: calc(16px + env(safe-area-inset-top)) clamp(14px, 3vw, 34px) 14px;
  overflow: hidden;
}

.app-topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  position: relative;
}

.app-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 74px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--amber));
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.15;
}

.muted {
  color: var(--muted);
  line-height: 1.4;
}

.clock-card {
  min-width: 122px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251,252,250,.68);
  backdrop-filter: blur(22px) saturate(1.25);
  text-align: right;
  box-shadow: 0 18px 44px rgba(21,27,23,.08), inset 0 1px 0 rgba(255,255,255,.68);
}

.clock-card strong {
  display: block;
  font-size: 21px;
  line-height: 1;
}

.clock-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.page {
  display: none;
  height: calc(100dvh - var(--nav-height) - 104px - env(safe-area-inset-top));
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 20px;
}

.page.active {
  display: block;
}

.bottom-nav {
  min-height: var(--nav-height);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86px;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
  background: var(--nav-surface);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(28px) saturate(1.35);
  box-shadow: 0 -18px 46px rgba(31, 39, 32, .1), inset 0 1px 0 rgba(255,255,255,.62);
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  height: 66px;
  border-radius: 8px;
  background: transparent;
  color: #596358;
  font-weight: 820;
  transition: background .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.nav-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .78;
  transition: transform .28s cubic-bezier(.2, 1.25, .32, 1), opacity .22s ease;
}

.nav-item.active .nav-icon {
  opacity: 1;
  transform: translateY(-1px) scale(1.08);
}

.nav-item.active {
  background: linear-gradient(180deg, rgba(226,240,232,.96), rgba(205,226,215,.72));
  color: var(--primary);
  box-shadow: 0 12px 30px rgba(36,95,72,.12), inset 0 0 0 1px rgba(47, 98, 71, .18), inset 0 1px 0 rgba(255,255,255,.82);
}

.nav-item::after {
  content: "";
  position: absolute;
  inset: 10px 16px auto;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(36,95,72,.8), transparent);
  opacity: 0;
  transform: scaleX(.2);
  transition: opacity .22s ease, transform .22s ease;
}

.nav-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-item:active {
  transform: scale(.98);
}

.nav-item span {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1;
}

.section-head,
.toolbar,
.card,
.panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(251,252,250,.82)),
    linear-gradient(140deg, rgba(255,255,255,.34), rgba(255,255,255,0) 44%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.18);
}

.section-head {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
}

.section-head > div {
  min-width: 0;
}

.toolbar {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 12px;
}

.toolbar.wrap {
  flex-wrap: wrap;
}

.spacer { flex: 1; }

.grid {
  display: grid;
  gap: 12px;
}

.weather-page-grid,
.forecast-grid,
.chores-board,
.grocery-columns,
.meals-week-grid,
.recipe-results-grid,
.recipe-library-grid,
.backup-grid {
  display: grid;
  gap: 12px;
}

.weather-page-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
}

.forecast-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.forecast-day {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.58);
}

.forecast-day.today-forecast {
  border-color: rgba(36,95,72,.42);
  background: linear-gradient(180deg, rgba(226,240,232,.9), rgba(255,255,255,.72));
}

.forecast-day b {
  font-size: 22px;
}

.forecast-rain,
.day-chip {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--primary-2);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.chores-board,
.grocery-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.meals-week-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 12px;
}

.meal-day-card {
  min-height: 210px;
}

.today-meal {
  border-color: rgba(36,95,72,.38);
  box-shadow: var(--shadow-strong);
}

.search-card {
  margin-top: 12px;
}

.recipe-results-grid,
.recipe-library-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grocery-board,
.admin-card {
  min-height: 320px;
}

.lists-board {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
  gap: 12px;
}

.active-list-card {
  min-height: 460px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-grid .wide {
  grid-column: 1 / -1;
}

.card {
  padding: 15px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.card::after,
.section-head::after,
.toolbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0%, rgba(255,255,255,.32) 34%, transparent 50%);
  transform: translateX(-125%);
  opacity: 0;
}

.card:hover,
.section-head:hover,
.toolbar:hover {
  box-shadow: var(--shadow-strong);
}

.motion-ready .card:hover::after,
.motion-ready .section-head:hover::after,
.motion-ready .toolbar:hover::after {
  animation: glass-sheen 1.4s cubic-bezier(.16, 1, .3, 1);
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent, var(--primary));
  opacity: .9;
}

.today-card { --card-accent: var(--amber); }
.chores-card { --card-accent: #6fa47f; }
.meals-card { --card-accent: var(--blue); }
.groceries-card { --card-accent: #7b6fb0; }

.weather-card {
  --card-accent: var(--amber);
  background:
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.18), transparent 26%),
    linear-gradient(135deg, rgba(18,26,21,.96), rgba(36,95,72,.95) 62%, rgba(55,101,137,.88));
  color: white;
  border-color: rgba(255,255,255,.18);
  box-shadow: var(--shadow-strong);
}

.weather-card::after {
  opacity: .68;
}

.weather-card .card-title h3,
.weather-card .muted {
  color: rgba(255,255,255,.78);
}

.weather-card .pill {
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.9);
}

.weather-card .weather-temp {
  color: #fffdf7;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card-title h3 {
  font-weight: 900;
}

.list-stack {
  display: grid;
  gap: 8px;
}

.empty {
  color: var(--muted);
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-2);
}

.premium-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 12px;
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(255,255,255,.58), rgba(244,247,242,.78)),
    radial-gradient(circle at 18px 18px, rgba(36,95,72,.10), transparent 34px);
}

.premium-empty strong {
  color: var(--ink);
}

.premium-empty > span:not(.empty-mark) {
  grid-column: 2;
}

.empty-mark {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(36,95,72,.16), rgba(36,95,72,.04) 62%, transparent 64%),
    linear-gradient(135deg, rgba(36,95,72,.20), rgba(55,101,137,.12));
  box-shadow: inset 0 0 0 1px rgba(36,95,72,.12), 0 8px 20px rgba(36,95,72,.08);
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 15px;
  font-weight: 850;
}

.primary-button {
  background: linear-gradient(180deg, #2a6f55, var(--primary));
  color: white;
  box-shadow: 0 12px 26px rgba(36,95,72,.16), inset 0 1px 0 rgba(255,255,255,.22);
}

.secondary-button {
  background: linear-gradient(180deg, rgba(226,240,232,.98), rgba(210,229,218,.94));
  color: var(--primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}

.danger-button {
  background: #fae9e6;
  color: var(--red);
}

.ghost-button,
.icon-button {
  background: rgba(240,244,238,.82);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68);
}

button {
  transition: transform .22s cubic-bezier(.2, 1.25, .32, 1), filter .22s ease, box-shadow .22s ease;
}

button:hover {
  filter: saturate(1.08) brightness(1.015);
}

button:active {
  transform: scale(.975);
}

.icon-button {
  width: 44px;
  padding: 0;
  font-size: 22px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #eef3ec;
}

.segmented button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.segmented button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(31,39,32,.08);
}

.calendar-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.month-grid {
  flex: 1;
  min-height: 690px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 28px repeat(6, minmax(104px, 1fr));
  gap: 7px;
}

.weekday {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.day-cell {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(251,252,250,.72)),
    var(--panel);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.day-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(36,95,72,.34);
  box-shadow: 0 16px 36px rgba(21,27,23,.09);
}

.day-cell.outside {
  opacity: .42;
}

.day-cell.today {
  border-color: rgba(47,98,71,.55);
  box-shadow: inset 0 0 0 2px rgba(47,98,71,.10);
}

.day-cell.selected {
  background: #f1f7f2;
}

.day-number {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  flex: 0 0 auto;
}

.day-number small {
  display: none;
}

.day-cell.today .day-number {
  background: var(--primary);
  color: white;
}

.day-items {
  min-height: 0;
  display: grid;
  gap: 4px;
  overflow: hidden;
}

.cal-item {
  min-height: 22px;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 3px 6px 3px 0;
  border-radius: 6px;
  background: rgba(245,247,242,.72);
  color: var(--ink);
  font-weight: 780;
  font-size: clamp(10px, 1.3vw, 13px);
  line-height: 1.1;
}


.cal-item::before {
  content: "";
  width: 4px;
  min-height: 18px;
  height: 100%;
  border-radius: 99px;
  background: var(--item-color, var(--primary));
}

.cal-item span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cal-item.chore {
  opacity: .84;
  font-size: clamp(9px, 1.1vw, 12px);
}

.more-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.agenda-row,
.task-row,
.grocery-row,
.meal-row,
.list-row,
.recipe-row,
.backup-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}

.meal-row,
.list-row,
.recipe-row {
  width: 100%;
  text-align: left;
}

.meal-row {
  grid-template-columns: minmax(0, 1fr);
}

.meal-row .ghost-button {
  justify-self: start;
  margin-top: 6px;
}

.recipe-row {
  min-height: 92px;
  align-content: center;
}

.recipe-card {
  min-height: 132px;
  overflow: hidden;
}

.recipe-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
  margin-bottom: 4px;
}

.recipe-hero-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.backup-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.backup-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.backup-copy .muted {
  overflow-wrap: anywhere;
}

.chef-head {
  margin-bottom: 12px;
}

.chef-card {
  min-height: min(620px, calc(100dvh - var(--nav-height) - 190px));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
}

.chef-thread {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px;
  scroll-padding-block: 12px;
}

.chef-thread .premium-empty {
  margin: auto;
  width: min(100%, 460px);
}

.chef-message {
  display: grid;
  gap: 7px;
  max-width: min(82%, 620px);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 24px rgba(31, 44, 34, .06);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.chef-message strong {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chef-message span {
  white-space: normal;
}

.chef-recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chef-recipe-actions button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
}

.user-message {
  align-self: flex-end;
  background: linear-gradient(180deg, #2f7359, var(--primary));
  border-color: rgba(36,95,72,.82);
  color: white;
}

.bot-message {
  align-self: flex-start;
}

.chef-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.66);
}

.chef-compose textarea {
  min-height: 78px;
  max-height: 160px;
  resize: vertical;
}

.chef-compose .primary-button {
  min-width: 96px;
  height: auto;
}

.agenda-row {
  grid-template-columns: 5px minmax(0, 1fr);
  align-items: center;
}

.agenda-row > *:not(:first-child) {
  min-width: 0;
}

.agenda-row::before {
  content: "";
  width: 5px;
  height: 100%;
  grid-row: 1 / span 3;
  border-radius: 99px;
  background: var(--item-color, var(--primary));
}

.agenda-row > strong,
.agenda-row > span,
.agenda-row > button {
  grid-column: 2;
}

.agenda-row > button {
  width: auto;
  justify-self: end;
}

.task-row,
.grocery-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.meal-row .row-actions {
  justify-content: flex-start;
  margin-top: 6px;
}

.meal-row .row-actions .ghost-button {
  margin-top: 0;
}

.accented-row {
  grid-template-columns: 5px minmax(0, 1fr) auto;
}

.accented-row::before {
  content: "";
  width: 5px;
  height: 100%;
  min-height: 34px;
  border-radius: 999px;
  background: var(--item-color, var(--primary));
}

.done {
  opacity: .52;
}

.done > :first-child {
  text-decoration: line-through;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.repeat-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.58);
}

.repeat-editor[data-repeat="none"] .repeat-interval-field,
.repeat-editor[data-repeat="none"] .repeat-end-field,
.repeat-editor[data-repeat="none"] .repeat-weekdays,
.repeat-editor[data-repeat="none"] .repeat-monthly-field,
.repeat-editor:not([data-repeat="intervalDays"]):not([data-repeat="intervalWeeks"]):not([data-repeat="intervalMonths"]):not([data-repeat="intervalMonthWeekday"]) .repeat-interval-field,
.repeat-editor:not([data-repeat="weekly"]):not([data-repeat="intervalWeeks"]) .repeat-weekdays,
.repeat-editor:not([data-repeat="monthly"]):not([data-repeat="intervalMonths"]) .repeat-monthly-field {
  display: none;
}

.repeat-interval-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.repeat-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.repeat-weekdays label {
  min-width: 0;
}

.repeat-weekdays input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.repeat-weekdays span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.repeat-weekdays input:checked + span {
  border-color: rgba(95, 123, 37, .62);
  background: rgba(238, 245, 226, .92);
  color: var(--primary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(24, 30, 24, .36);
}

.modal {
  width: min(760px, 100%);
  max-height: 88dvh;
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(20,30,22,.26);
}

.cook-modal {
  width: min(1360px, calc(100vw - 24px));
  height: calc(100dvh - 24px);
  max-height: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 16px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.9), rgba(244,241,230,.82)),
    var(--panel);
}

.cook-modal .modal-header {
  margin-bottom: 10px;
  justify-content: flex-end;
}

.cook-modal .modal-header h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cook-modal #modalBody {
  min-height: 0;
}

.cook-display {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.cook-display header {
  grid-column: 1 / -1;
  min-width: 0;
}

.cook-display header p {
  margin: 0 0 4px;
  color: #66706f;
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 850;
}

.cook-display header h2 {
  margin: 0;
  color: #203d10;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1;
  font-weight: 940;
  overflow-wrap: anywhere;
}

.cook-panel {
  min-height: 0;
  overflow: hidden;
  padding: clamp(16px, 2vw, 28px);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.62);
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(243,239,226,.58));
  box-shadow: 0 22px 48px rgba(31,44,34,.12), inset 1px 1px 0 rgba(255,255,255,.78);
}

.cook-panel h3 {
  margin: 0 0 12px;
  color: #55751f;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 930;
}

.cook-panel ul,
.cook-panel ol {
  height: calc(100% - 44px);
  margin: 0;
  padding-left: 1.25em;
  columns: 1;
  column-gap: 28px;
  color: #172d1e;
  font-size: clamp(15px, 1.3vw, 22px);
  line-height: 1.28;
  font-weight: 760;
  overflow: hidden;
}

.cook-ingredients ul {
  font-size: clamp(16px, 1.45vw, 24px);
}

.cook-steps ol {
  columns: 2;
}

.cook-panel li {
  break-inside: avoid;
  margin: 0 0 .58em;
}

.care-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.care-hero {
  min-height: 118px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
}

.care-hero p,
.care-hero h2,
.care-hero span {
  margin: 0;
}

.care-hero p {
  color: #a7473a;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.care-hero h2 {
  margin-top: 4px;
  color: #203d10;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  font-weight: 940;
}

.care-hero span {
  display: block;
  margin-top: 8px;
  color: #66706f;
  font-size: 16px;
  font-weight: 760;
}

.care-tabs {
  min-height: 54px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 2px 8px;
  scrollbar-width: none;
}

.care-tabs::-webkit-scrollbar {
  display: none;
}

.care-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.58);
  background: rgba(255,255,255,.56);
  color: #5f6968;
  font-weight: 880;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.68);
}

.care-tabs button.active {
  color: #245f48;
  background: linear-gradient(145deg, rgba(228,234,203,.95), rgba(244,242,226,.92));
  box-shadow: 8px 10px 22px rgba(74,83,49,.12), inset 1px 1px 0 rgba(255,255,255,.88);
}

.care-content {
  min-height: 0;
  overflow: auto;
  padding: 0 2px 12px;
}

.care-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.care-panel {
  min-height: 0;
  padding: 18px;
  border-radius: 24px;
}

.care-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.care-panel-head h3 {
  margin: 0;
  color: #203d10;
  font-size: 22px;
  font-weight: 930;
}

.care-panel-head button,
.care-row button,
.care-file-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 999px;
  background: #e4ecd2;
  color: #245f48;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.care-stats-grid,
.care-trend,
.growth-grid,
.support-grid,
.assistant-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.care-trend,
.growth-grid,
.support-grid {
  margin-bottom: 14px;
}

.care-stat,
.assistant-card {
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.62);
  background: rgba(255,255,255,.62);
  box-shadow: 0 10px 26px rgba(31,44,34,.06), inset 1px 1px 0 rgba(255,255,255,.76);
}

.care-stat span,
.care-stat em {
  display: block;
  color: #66706f;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.care-stat strong {
  display: block;
  margin-top: 5px;
  color: #203d10;
  font-size: 20px;
  font-weight: 940;
  overflow-wrap: anywhere;
}

.care-list {
  display: grid;
  gap: 10px;
}

.care-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.58);
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(244,240,229,.58));
  box-shadow: 0 10px 24px rgba(69,62,43,.08), inset 1px 1px 0 rgba(255,255,255,.76);
}

.care-row time {
  color: #59791f;
  font-size: 13px;
  font-weight: 920;
}

.care-row strong {
  display: block;
  color: #17321b;
  font-size: 16px;
  font-weight: 930;
}

.care-row span,
.care-row p {
  margin: 3px 0 0;
  color: #66706f;
  font-size: 13px;
  font-weight: 740;
}

.care-row-actions {
  display: flex;
  gap: 8px;
}

.care-empty {
  min-height: 110px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #66706f;
}

.care-empty strong {
  color: #203d10;
  font-size: 18px;
}

.care-empty span {
  margin-top: 5px;
  font-weight: 760;
}

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.emergency-grid div {
  min-width: 0;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255,255,255,.62);
}

.emergency-grid dt {
  color: #a7473a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.emergency-grid dd {
  margin: 5px 0 0;
  color: #172d1e;
  font-weight: 820;
  white-space: pre-wrap;
}

.care-warning {
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(250,237,226,.62));
}

.checklist-row.done {
  opacity: .65;
}

.symptom-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.symptom-picks input,
.inline-check input {
  width: auto;
  min-height: 0;
}

.symptom-picks label,
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
  font-weight: 850;
}

.care-disclaimer {
  color: #a7473a;
  font-size: 12px;
  font-weight: 900;
}

.assistant-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assistant-card h4 {
  margin: 0 0 8px;
  color: #203d10;
  font-size: 17px;
}

.assistant-card p {
  margin: 0;
  color: #4e5d58;
  font-weight: 760;
  white-space: pre-wrap;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + 18px + env(safe-area-inset-bottom));
  z-index: 300;
  transform: translateX(-50%);
  max-width: min(480px, calc(100vw - 28px));
  padding: 12px 16px;
  border-radius: 8px;
  background: #1f2720;
  color: white;
  box-shadow: 0 12px 28px rgba(31,39,32,.18);
  font-weight: 800;
}

.completion-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  transform: translateX(-120%);
  animation: completion-flash .72s cubic-bezier(.16, 1, .3, 1) forwards;
}

.motion-ready .weather-temp {
  animation: temp-breathe 4.8s ease-in-out infinite;
}

.motion-ready .clock-card strong {
  animation: clock-glow 3.8s ease-in-out infinite;
}

.weather-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.weather-temp {
  font-size: clamp(46px, 10vw, 82px);
  font-weight: 900;
  line-height: .9;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 99px;
  background: #eef3ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.touch-ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(255,255,255,.58);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-pop .62s cubic-bezier(.16, 1, .3, 1) forwards;
  mix-blend-mode: screen;
}

.secondary-button .touch-ripple,
.ghost-button .touch-ripple,
.icon-button .touch-ripple,
.nav-item .touch-ripple {
  background: rgba(36,95,72,.22);
  mix-blend-mode: multiply;
}

.agenda-row,
.task-row,
.grocery-row,
.meal-row,
.list-row,
.recipe-row,
.backup-row,
.forecast-day,
.day-cell {
  transition: transform .28s cubic-bezier(.2, 1.25, .32, 1), border-color .28s ease, box-shadow .28s ease, background .28s ease, opacity .28s ease;
}

.agenda-row:hover,
.task-row:hover,
.grocery-row:hover,
.meal-row:hover,
.list-row:hover,
.recipe-row:hover,
.backup-row:hover,
.forecast-day:hover {
  transform: translateY(-2px);
  border-color: rgba(36,95,72,.34);
  box-shadow: 0 15px 36px rgba(21,27,23,.09), inset 0 1px 0 rgba(255,255,255,.78);
}

.modal-backdrop {
  backdrop-filter: blur(18px) saturate(1.1);
}

.modal {
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(251,252,250,.94)),
    var(--panel);
  border: 1px solid rgba(255,255,255,.54);
  box-shadow: 0 34px 100px rgba(20,30,22,.32), inset 0 1px 0 rgba(255,255,255,.72);
}

@keyframes cinematic-sweep {
  0% { background-position: -160% 0, 0 0; }
  100% { background-position: 160% 0, 112px 0; }
}

@keyframes glass-sheen {
  0% { opacity: 0; transform: translateX(-125%); }
  18% { opacity: .72; }
  100% { opacity: 0; transform: translateX(125%); }
}

@keyframes ripple-pop {
  0% { opacity: .72; transform: translate(-50%, -50%) scale(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}

@keyframes rain-pane {
  0% { background-position: 0 -140px, 0 0; }
  100% { background-position: 46px 140px, 0 0; }
}

@keyframes snow-drift {
  0% { background-position: 0 -90px, 0 0; }
  100% { background-position: 40px 90px, 0 0; }
}

@keyframes completion-flash {
  0% { opacity: 0; transform: translateX(-120%); }
  24% { opacity: .9; }
  100% { opacity: 0; transform: translateX(120%); }
}

@keyframes temp-breathe {
  0%, 100% { transform: translateY(0); text-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { transform: translateY(-1px); text-shadow: 0 0 26px rgba(255,255,255,.18); }
}

@keyframes clock-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: .88; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }

  #ambientCanvas {
    opacity: .45;
  }
}

@media (min-width: 761px) {
  .bottom-nav {
    grid-auto-columns: 96px;
  }

  .page {
    scrollbar-width: thin;
    scrollbar-color: rgba(36,95,72,.35) transparent;
  }

  .cal-item span {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (min-width: 761px) and (max-width: 1099px) {
  :root {
    --nav-height: 98px;
  }

  .app-main {
    padding: calc(18px + env(safe-area-inset-top)) 18px 14px;
  }

  .app-topbar {
    height: 82px;
  }

  .page {
    height: calc(100dvh - var(--nav-height) - 114px - env(safe-area-inset-top));
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .weather-page-grid,
  .chores-board,
  .grocery-columns,
  .lists-board {
    grid-template-columns: 1fr;
  }

  .forecast-grid,
  .meals-week-grid,
  .recipe-results-grid,
  .recipe-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card,
  .section-head {
    padding: 17px;
  }

  .month-grid {
    min-height: 760px;
    grid-template-rows: 30px repeat(6, minmax(116px, 1fr));
    gap: 8px;
  }

  .day-cell {
    padding: 9px;
  }

  .cal-item {
    font-size: 11px;
    line-height: 1.14;
  }
}

@media (min-width: 900px) and (min-height: 1200px) {
  :root {
    --nav-height: 112px;
    --shadow: 0 16px 44px rgba(21, 27, 23, .075);
  }

  .app-main {
    padding: calc(34px + env(safe-area-inset-top)) clamp(30px, 4vw, 54px) 24px;
  }

  .app-topbar {
    height: 112px;
    margin-bottom: 18px;
  }

  .eyebrow {
    font-size: 15px;
  }

  h1 {
    font-size: clamp(52px, 5.4vw, 76px);
  }

  h2 {
    font-size: clamp(31px, 3vw, 44px);
  }

  h3 {
    font-size: clamp(22px, 2vw, 30px);
  }

  .clock-card {
    min-width: 210px;
    padding: 18px 20px;
  }

  .clock-card strong {
    font-size: 38px;
  }

  .clock-card span {
    font-size: 15px;
  }

  .page {
    height: calc(100dvh - var(--nav-height) - 154px - env(safe-area-inset-top));
    padding-bottom: 28px;
  }

  .bottom-nav {
    grid-auto-flow: unset;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    grid-auto-columns: unset;
    gap: 10px;
    padding-top: 13px;
    padding-bottom: calc(13px + env(safe-area-inset-bottom));
  }

  .nav-item {
    height: 80px;
    font-size: 16px;
  }

  .nav-icon {
    width: 25px;
    height: 25px;
  }

  .nav-item span {
    font-size: 15px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .weather-page-grid,
  .forecast-grid,
  .chores-board,
  .grocery-columns,
  .meals-week-grid,
  .recipe-results-grid,
  .recipe-library-grid,
  .lists-board,
  .backup-grid {
    gap: 18px;
  }

  .meal-day-card {
    min-height: 260px;
  }

  .dashboard-grid .wide {
    grid-column: 1 / -1;
  }

  .section-head,
  .toolbar {
    margin-bottom: 16px;
  }

  .section-head,
  .card {
    padding: 22px;
  }

  .grid,
  .list-stack {
    gap: 12px;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .ghost-button,
  .icon-button {
    min-height: 54px;
    padding-inline: 20px;
    font-size: 17px;
  }

  .icon-button {
    width: 54px;
  }

  .weather-hero {
    gap: 26px;
  }

  .weather-temp {
    font-size: clamp(92px, 10vw, 146px);
  }

  .pill {
    min-height: 38px;
    padding: 0 14px;
    font-size: 15px;
  }

  .month-grid {
    min-height: calc(100dvh - var(--nav-height) - 310px);
    grid-template-rows: 34px repeat(6, minmax(160px, 1fr));
    gap: 10px;
  }

  .weekday {
    font-size: 14px;
  }

  .day-cell {
    padding: 11px;
    gap: 8px;
  }

  .day-number {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .day-items {
    gap: 6px;
  }

  .cal-item {
    min-height: 30px;
    font-size: 14px;
    line-height: 1.15;
  }

  .agenda-row,
  .task-row,
  .grocery-row,
  .meal-row,
  .list-row,
  .recipe-row,
  .backup-row {
    padding: 15px;
    font-size: 17px;
  }
}

@media (max-width: 760px) {
  :root { --nav-height: 86px; }
  .app-main { padding: calc(12px + env(safe-area-inset-top)) 10px 10px; }
  .app-topbar { height: 60px; }
  .page { height: calc(100dvh - var(--nav-height) - 82px - env(safe-area-inset-top)); }
  .backup-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .backup-row .danger-button {
    justify-self: start;
    min-height: 42px;
  }
  .bottom-nav { grid-auto-columns: 78px; gap: 6px; }
  .nav-item { height: 62px; border-radius: 8px; font-size: 13px; }
  .nav-icon { width: 19px; height: 19px; }
  .nav-item span { font-size: 11px; }
  .dashboard-grid,
  .weather-page-grid,
  .forecast-grid,
  .chores-board,
  .grocery-columns,
  .meals-week-grid,
  .recipe-results-grid,
  .recipe-library-grid,
  .lists-board,
  .care-overview-grid,
  .emergency-grid,
  .assistant-grid {
    grid-template-columns: 1fr;
  }
  .care-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .care-stats-grid,
  .care-trend,
  .growth-grid,
  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .care-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .care-row-actions {
    flex-wrap: wrap;
  }
  .row-actions {
    justify-content: flex-start;
  }
  .grocery-row .row-actions {
    grid-column: 1 / -1;
  }
  .symptom-picks {
    grid-template-columns: 1fr;
  }
  .meal-day-card,
  .grocery-board,
  .admin-card,
  .chef-card,
  .active-list-card {
    min-height: 0;
  }
  .chef-compose {
    grid-template-columns: 1fr;
  }
  .chef-card {
    min-height: 0;
    height: clamp(340px, calc(100dvh - var(--nav-height) - 285px - env(safe-area-inset-top)), 460px);
  }
  .chef-compose textarea {
    min-height: 68px;
  }
  .chef-message {
    max-width: 100%;
  }
  .month-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 8px;
  }
  .weekday,
  .day-cell.outside {
    display: none;
  }
  .day-cell {
    min-height: 74px;
    padding: 9px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
  }
  .day-number {
    width: 34px;
    height: auto;
    font-size: 13px;
    border-radius: 0;
    align-content: start;
    justify-items: center;
    background: transparent;
    color: var(--ink);
  }
  .day-number small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .day-cell.today .day-number {
    background: transparent;
    color: var(--primary);
  }
  .day-cell.today .day-number > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
  }
  .day-items {
    align-content: start;
  }
  .cal-item {
    min-height: 25px;
    gap: 7px;
    font-size: 12px;
    padding: 4px 7px 4px 0;
  }
  .cal-item span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .cal-item::before { min-height: 18px; }
  .form-grid.two { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .card:hover,
  .section-head:hover,
  .toolbar:hover,
  .agenda-row:hover,
  .task-row:hover,
  .grocery-row:hover,
  .meal-row:hover,
  .list-row:hover,
  .recipe-row:hover,
  .backup-row:hover,
  .forecast-day:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .motion-ready .card:hover::after,
  .motion-ready .section-head:hover::after,
  .motion-ready .toolbar:hover::after {
    animation: none;
  }
}

/* v161 dense native iOS landscape redesign */
:root {
  --cream: #f5f1e7;
  --cream-2: #fbf8ee;
  --moss: #243f12;
  --olive: #6f862d;
  --olive-2: #91a84d;
  --sage: #dfe8c8;
  --soft-text: #687176;
  --johnson-shadow: 18px 22px 48px rgba(63, 62, 45, .14), -10px -10px 28px rgba(255,255,255,.8);
  --johnson-inset: inset 1px 1px 0 rgba(255,255,255,.88), inset -8px -10px 22px rgba(78, 70, 45, .055);
  --nav-height: 104px;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(152, 166, 73, .18), transparent 23%),
    radial-gradient(circle at 88% 72%, rgba(226, 214, 151, .24), transparent 26%),
    linear-gradient(135deg, #f8f5ed, #ebe8dc 54%, #f9f5ea);
  color: var(--moss);
}

#ambientCanvas {
  opacity: .34;
  filter: saturate(.65) blur(.2px);
}

.app-shell {
  width: min(100vw, 1366px);
  height: min(100dvh, 1024px);
  margin: auto;
  padding: 24px 34px 22px;
  grid-template-rows: minmax(0, 1fr) 104px;
  border-radius: 38px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(244,239,226,.48)),
    radial-gradient(circle at 22% 22%, rgba(255,255,255,.95), transparent 34%),
    rgba(245, 241, 231, .88);
  box-shadow:
    0 38px 110px rgba(72, 66, 45, .16),
    inset 0 1px 0 rgba(255,255,255,.82),
    inset 0 -1px 0 rgba(126,116,82,.12);
  overflow: hidden;
}

.app-shell::before {
  opacity: .42;
  background:
    linear-gradient(108deg, transparent 0%, rgba(255,255,255,.38) 35%, transparent 47%) 0 0 / 260% 100%,
    radial-gradient(circle at 8% 12%, rgba(133,151,65,.12), transparent 14%);
  animation: cinematic-sweep 26s linear infinite;
}

.app-shell::after {
  display: none;
}

.app-main {
  padding: 0;
  overflow: hidden;
}

.app-topbar {
  display: none;
}

.page {
  height: 100%;
  overflow: auto;
  padding: 0;
  scrollbar-width: none;
}

.page::-webkit-scrollbar {
  display: none;
}

.johnson-dashboard {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 136px minmax(0, 1fr);
  gap: 18px;
  padding: 8px 30px 10px;
  overflow: hidden;
}

.leaf-cluster {
  position: absolute;
  left: -40px;
  top: -36px;
  width: 150px;
  height: 155px;
  pointer-events: none;
  z-index: 3;
}

.leaf-cluster span {
  position: absolute;
  width: 54px;
  height: 22px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #8fa448, #536c22);
  box-shadow: 0 10px 18px rgba(68,83,27,.16);
  transform-origin: 100% 50%;
}

.leaf-cluster span:nth-child(1) { left: 44px; top: 8px; rotate: 14deg; }
.leaf-cluster span:nth-child(2) { left: 26px; top: 34px; rotate: -18deg; }
.leaf-cluster span:nth-child(3) { left: 4px; top: 64px; rotate: 26deg; }
.leaf-cluster span:nth-child(4) { left: 54px; top: 58px; rotate: 48deg; }
.leaf-cluster span:nth-child(5) { left: 20px; top: 96px; rotate: -34deg; }

.johnson-hero {
  display: grid;
  grid-template-columns: 126px 1fr 88px;
  align-items: center;
  gap: 26px;
  padding-right: 8px;
}

.home-portrait,
.notify-orb,
.johnson-card,
.bottom-nav {
  border: 1px solid rgba(255,255,255,.62);
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(243,239,226,.62));
  box-shadow: var(--johnson-shadow), var(--johnson-inset);
  backdrop-filter: blur(24px) saturate(1.16);
}

.home-portrait {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
}

.home-portrait::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  border: 8px solid rgba(255,255,255,.72);
  pointer-events: none;
}

.house-art {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: block;
  background: url("assets/dashboard/home-house.png?v=172") center / cover;
  box-shadow: inset 0 -10px 18px rgba(88,108,43,.10);
}

.johnson-hero p {
  font-size: 20px;
  font-weight: 850;
  color: #2f4e1c;
}

.johnson-hero h2 {
  margin-top: 5px;
  font-size: clamp(48px, 5vw, 62px);
  line-height: 1.15;
  font-weight: 900;
  color: #203d10;
  letter-spacing: 0;
}

.johnson-hero span {
  display: block;
  margin-top: 10px;
  font-size: 19px;
  font-weight: 720;
  color: #737b80;
}

.notify-orb {
  justify-self: end;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: var(--olive);
  font-size: 40px;
  line-height: 1;
}

.notify-orb .nav-icon {
  width: 34px;
  height: 34px;
  stroke-width: 2.2;
}

.home-main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
}

.home-left,
.home-right {
  min-height: 0;
  display: grid;
  gap: 20px;
}

.home-left {
  grid-template-rows: 176px minmax(0, 1fr);
}

.home-right {
  grid-template-rows: minmax(0, 1fr);
}

.johnson-card {
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}

.weather-showcase {
  display: grid;
  grid-template-columns: 158px 1fr 1px 144px;
  align-items: center;
  padding: 18px 32px;
}

.weather-art {
  width: 128px;
  height: 104px;
  margin-left: 2px;
  border-radius: 28px;
  background: url("assets/dashboard/weather-sun-cloud.png?v=172") center / cover;
  filter: drop-shadow(0 18px 22px rgba(101, 93, 57, .16));
  animation: float-soft 6s ease-in-out infinite;
}

.weather-reading strong {
  display: block;
  padding-block: .06em;
  font-size: 54px;
  line-height: 1.08;
  color: #24420f;
}

.weather-reading span {
  display: block;
  margin-top: 9px;
  font-size: 19px;
  font-weight: 850;
  color: #798085;
}

.weather-reading small {
  display: block;
  margin-top: 7px;
  font-size: 16px;
  font-weight: 850;
  color: #526c25;
}

.weather-divider {
  width: 1px;
  height: 92px;
  background: rgba(105,102,76,.15);
}

.weather-stats {
  display: grid;
  gap: 10px;
  font-size: 15px;
  font-weight: 850;
  color: #737b80;
}

.weather-stats span {
  display: flex;
  justify-content: space-between;
  gap: 22px;
}

.weather-stats b {
  color: #334e1e;
  font-size: 20px;
}

.tasks-card,
.events-card {
  padding: 16px 26px;
}

.events-card {
  min-height: 0;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
}

.home-card-head {
  min-height: 46px;
  height: auto;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 14px;
  align-items: center;
  overflow: visible;
  margin-bottom: 8px;
}

.home-card-head h3 {
  color: #18320f;
  font-size: 20px;
  font-weight: 920;
}

.home-card-head button {
  color: #526b22;
  font-size: 15px;
  font-weight: 760;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
}

.hub-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #5f7b25;
  background: linear-gradient(145deg, #edf4d9, #c6d695);
  box-shadow: 8px 10px 18px rgba(74,91,35,.2), inset 1px 1px 0 rgba(255,255,255,.72);
}

.hub-icon.checked,
.hub-icon.leaf {
  color: white;
  background: linear-gradient(145deg, #8dab46, #506f1e);
}

.hub-icon .nav-icon {
  width: 25px;
  height: 25px;
}

.home-task-list,
.home-event-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.home-event-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(95,123,37,.42) transparent;
}

.home-event-list::-webkit-scrollbar {
  width: 6px;
}

.home-event-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(95,123,37,.38);
}

.home-task-row,
.home-event-row {
  min-height: 52px;
  display: grid;
  align-items: center;
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(244,240,229,.58));
  border: 1px solid rgba(255,255,255,.56);
  box-shadow: 8px 10px 22px rgba(70,65,45,.095), inset 1px 1px 0 rgba(255,255,255,.72);
}

.home-task-row {
  grid-template-columns: 34px 1fr 80px 46px;
  gap: 10px;
  padding: 5px 14px 5px 18px;
  border-radius: 17px;
  height: 48px;
  overflow: hidden;
}

.home-task-row > div,
.event-copy {
  min-width: 0;
}

.task-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(98,101,80,.18);
  background: linear-gradient(145deg, #fbfaf2, #e9e4d7);
  box-shadow: inset 2px 2px 4px rgba(71,65,43,.09), inset -2px -2px 4px rgba(255,255,255,.88);
}

.home-task-row strong,
.home-event-row strong {
  display: block;
  color: #19320f;
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-task-row span,
.home-event-row em {
  display: block;
  margin-top: 2px;
  color: #687176;
  font-style: normal;
  font-size: 13px;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-task-row em {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #dfe8c8;
  color: #526b22;
  font-style: normal;
  font-weight: 820;
}

.person-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #dce6bd, #7e9a45);
  box-shadow: 0 10px 16px rgba(50,45,29,.16), inset 0 2px 0 rgba(255,255,255,.42);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.photo-avatar {
  overflow: hidden;
  background: #f6f3e8;
  padding: 2px;
}

.photo-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.photo-avatar span {
  display: none;
}

.stock-avatar {
  background: #f6f3e8;
  overflow: hidden;
}

.stock-avatar span {
  display: none;
}

.avatar-preview {
  width: 58px;
  height: 58px;
}

.settings-person-row {
  grid-template-columns: 5px 44px minmax(0, 1fr) auto;
  gap: 12px;
}

.settings-person-row::before {
  grid-row: 1 / span 2;
}

.settings-person-row .person-avatar {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.settings-person-row > strong,
.settings-person-row > span {
  grid-column: 3;
}

.settings-person-row > button {
  grid-column: 4;
  grid-row: 1 / span 2;
}

.avatar-editor {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.58);
}

.avatar-editor-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.avatar-editor-head h3 {
  margin: 0;
  color: var(--ink);
}

.avatar-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.avatar-mode-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.avatar-mode-row input {
  width: auto;
  min-height: 0;
}

.avatar-stock-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-height: min(360px, 36vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(95, 123, 37, .42) transparent;
}

.avatar-stock-grid::-webkit-scrollbar {
  width: 6px;
}

.avatar-stock-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(95, 123, 37, .38);
}

.avatar-stock-option {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 92px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 18px rgba(54, 64, 46, .08);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.avatar-stock-option:has(input:checked) {
  border-color: rgba(95, 123, 37, .62);
  background: rgba(238, 245, 226, .86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 12px 22px rgba(80, 104, 35, .14);
  transform: translateY(-1px);
}

.avatar-stock-option:has(input:checked)::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 43%, white 44% 55%, transparent 56%) 45% 60% / 9px 9px no-repeat,
    var(--primary);
  box-shadow: 0 5px 12px rgba(47, 93, 36, .24);
}

.avatar-stock-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-stock-option .person-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  box-shadow: 0 12px 22px rgba(50,45,29,.12), inset 0 1px 0 rgba(255,255,255,.78);
}

.avatar-stock-option em {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.avatar-pack-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(239, 244, 234, .72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 760px) {
  .avatar-stock-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(320px, 42vh);
  }

  .avatar-stock-option {
    min-height: 86px;
    padding: 8px;
  }

  .avatar-stock-option .person-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
}

.home-event-row {
  grid-template-columns: 66px 12px 1fr 58px;
  gap: 14px;
  min-height: 66px;
  height: 68px;
  width: 100%;
  padding: 6px 16px;
  border-radius: 20px;
  text-align: left;
}

.home-event-row.no-assignee {
  grid-template-columns: 66px 12px minmax(0, 1fr);
}

.event-date {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fcfaf1, #ece7d8);
  box-shadow: 6px 8px 14px rgba(74,68,48,.12), inset 1px 1px 0 rgba(255,255,255,.8);
}

.event-date small {
  align-self: end;
  font-size: 12px;
  font-weight: 900;
  color: #586d28;
  line-height: 1;
}

.event-date b {
  align-self: start;
  font-size: 24px;
  line-height: .95;
  color: #253f12;
}

.event-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #75923d;
}

.home-event-row .hub-icon {
  justify-self: end;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(238,234,222,.76));
}

.bottom-nav {
  align-self: end;
  height: 90px;
  margin: 0 28px;
  padding: 10px 18px;
  border-radius: 36px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  overflow: visible;
}

.nav-item {
  height: 70px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  gap: 4px;
  background: transparent;
  color: #666d70;
  font-weight: 760;
  box-shadow: none;
}

.nav-item.active {
  background: linear-gradient(145deg, rgba(228,234,203,.94), rgba(244,242,226,.92));
  color: #607d26;
  box-shadow: 10px 12px 26px rgba(74,83,49,.13), inset 1px 1px 0 rgba(255,255,255,.88);
}

.nav-item .nav-icon {
  width: 31px;
  height: 31px;
}

.nav-item span {
  font-size: 13px;
}

body:not([data-active-page="dashboardPage"]) .app-topbar {
  display: flex;
  height: 82px;
  padding: 0 28px;
}

body:not([data-active-page="dashboardPage"]) .page.active {
  padding: 0 28px 20px;
}

body:not([data-active-page="dashboardPage"]) .card,
body:not([data-active-page="dashboardPage"]) .section-head,
body:not([data-active-page="dashboardPage"]) .toolbar {
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(243,239,226,.6));
  border: 1px solid rgba(255,255,255,.62);
  box-shadow: var(--johnson-shadow), var(--johnson-inset);
}

body[data-active-page="calendarPage"] .app-topbar {
  display: none;
}

body[data-active-page="calendarPage"] .page.active {
  padding: 0;
}

.native-calendar-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 0 30px 10px;
  overflow: hidden;
}

.calendar-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.22fr .95fr;
  gap: 26px;
}

.calendar-month-panel,
.calendar-agenda-panel {
  min-height: 0;
}

.calendar-month-panel {
  padding: 22px 24px 14px;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 82px;
}

.calendar-controls {
  display: grid;
  grid-template-columns: 48px 290px 48px 1fr 154px;
  align-items: center;
  gap: 18px;
}

.calendar-step,
.calendar-month-pill,
.calendar-today-pill,
.calendar-legend button,
.calendar-add-event,
.native-agenda-empty button {
  min-height: 48px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(240,237,225,.68));
  color: #537222;
  box-shadow: 8px 10px 22px rgba(73,67,46,.11), inset 1px 1px 0 rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.64);
}

.calendar-step {
  width: 48px;
  padding: 0;
  font-size: 34px;
  line-height: 1;
  font-weight: 650;
}

.calendar-month-pill,
.calendar-today-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 24px;
  font-size: 21px;
  font-weight: 900;
}

.calendar-month-pill b {
  font-size: 22px;
}

.calendar-today-pill {
  gap: 14px;
  font-size: 16px;
}

.calendar-today-pill .nav-icon,
.calendar-legend button .nav-icon {
  width: 24px;
  height: 24px;
}

.native-month-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 44px repeat(6, minmax(0, 1fr));
  padding-top: 8px;
}

.native-weekday {
  display: grid;
  place-items: center;
  color: #6c767a;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.native-day {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid rgba(111,104,78,.12);
  border-left: 1px solid rgba(111,104,78,.10);
  box-shadow: none;
  color: #16303a;
}

.native-day:nth-child(7n + 1) {
  border-left: 0;
}

.native-day.outside {
  color: rgba(104,111,114,.42);
}

.native-day-number {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 880;
}

.native-day.today .native-day-number {
  color: #4f751f;
}

.native-day.selected .native-day-number {
  background: linear-gradient(145deg, #eef2df, #e3e8d4);
  color: #50731f;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.8);
}

.native-day.selected::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #769633, #517414);
  z-index: -1;
  opacity: 0;
}

.native-day-dots {
  min-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.calendar-legend i {
  width: 8px;
  height: 8px;
  background: var(--dot, #6f862d);
}

.native-day-dots .split-marker {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--person-color, #7f8b7a) 0 49%, rgba(255,255,255,.88) 49% 51%, var(--event-color, #6f862d) 51% 100%);
  box-shadow: 0 2px 4px rgba(31,39,32,.16), inset 0 0 0 1px rgba(255,255,255,.5);
}

.native-day-dots b {
  color: #6a7478;
  font-size: 10px;
  font-weight: 900;
}

.calendar-legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 12px;
  padding: 10px 0 0;
}

.calendar-key-groups {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 8px 14px 8px 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.36), rgba(238,234,220,.28));
  border: 1px solid rgba(255,255,255,.38);
}

.calendar-key-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.calendar-key-row strong {
  flex: 0 0 54px;
  color: #47651d;
  font-size: 12px;
  font-weight: 930;
  text-transform: uppercase;
  letter-spacing: 0;
}

.calendar-key-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6b7478;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.calendar-key-row .event-key {
  border-radius: 50%;
}

.calendar-key-row .person-key {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.48);
}

.calendar-legend button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 14px;
  font-weight: 900;
}

.calendar-agenda-panel {
  padding: 24px 24px 20px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 14px;
}

.native-agenda-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.native-agenda-header h3 {
  margin: 0;
  color: #59791f;
  font-size: 18px;
  font-weight: 930;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.native-agenda-header h3 span {
  margin-left: 8px;
  color: #7a8583;
  font-size: 13px;
  font-weight: 820;
}

.native-agenda-list {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  gap: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(95,123,37,.42) transparent;
}

.native-agenda-list::-webkit-scrollbar {
  width: 6px;
}

.native-agenda-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(95,123,37,.38);
}

.native-agenda-group h3 {
  margin: 0 0 16px;
  color: #59791f;
  font-size: 17px;
  font-weight: 910;
}

.selected-agenda-day {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(238, 244, 226, .46);
  border: 1px solid rgba(255,255,255,.58);
}

.selected-agenda-day h3 {
  margin-bottom: 6px;
}

.selected-agenda-day p {
  margin: 0;
  color: #737b80;
  font-size: 14px;
  font-weight: 760;
}

.native-agenda-stack {
  display: grid;
  gap: 13px;
}

.native-agenda-event {
  --event-color: #6f862d;
  position: relative;
  min-height: 78px;
  width: 100%;
  display: grid;
  grid-template-columns: 52px 88px minmax(0, 1fr) 40px 12px;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 18px;
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(244,240,229,.64));
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: 8px 10px 24px rgba(69,62,43,.10), inset 1px 1px 0 rgba(255,255,255,.78);
}

.native-agenda-event.no-assignee {
  grid-template-columns: 52px 88px minmax(0, 1fr) 12px;
}

.native-agenda-event::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: var(--event-color);
}

.native-event-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 14%, #f9f6eb);
  box-shadow: 7px 9px 16px rgba(74,68,48,.10), inset 1px 1px 0 rgba(255,255,255,.82);
}

.native-event-icon .nav-icon {
  width: 25px;
  height: 25px;
}

.native-event-time {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding-right: 14px;
  border-right: 1px solid rgba(93,90,70,.13);
}

.native-event-time strong,
.native-event-time em,
.native-event-copy strong,
.native-event-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.native-event-time strong {
  color: var(--event-color);
  font-size: 14px;
  font-weight: 920;
}

.native-event-time em {
  color: #69747a;
  font-size: 14px;
  font-style: normal;
  font-weight: 740;
}

.native-event-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.native-event-copy strong {
  color: #17321b;
  font-size: 15px;
  font-weight: 900;
}

.native-event-copy em {
  color: #69747a;
  font-size: 13px;
  font-style: normal;
  font-weight: 760;
}

.native-event-menu {
  color: #788185;
  font-size: 22px;
  font-weight: 900;
}

.calendar-add-event,
.native-agenda-empty button {
  min-height: 48px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #55751f;
  font-size: 16px;
  font-weight: 920;
}

.native-agenda-empty {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.native-agenda-empty p {
  color: #737b80;
  font-size: 16px;
  font-weight: 760;
}

@keyframes slow-spin {
  to { transform: rotate(1turn); }
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* v161 adaptive portrait and large-touchscreen completion */
@media (min-width: 761px) and (orientation: portrait) {
  :root {
    --nav-height: 112px;
  }

  .app-shell {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 28px clamp(24px, 3vw, 42px) 22px;
    grid-template-rows: minmax(0, 1fr) var(--nav-height);
    border-radius: 0;
  }

  .app-main,
  .page {
    min-height: 0;
  }

  .page {
    height: 100%;
    overflow: auto;
    padding-bottom: 20px;
  }

  body:not([data-active-page="dashboardPage"]) .app-topbar {
    height: 100px;
    padding: 0 18px;
  }

  body:not([data-active-page="dashboardPage"]) .page.active {
    padding: 0 18px 24px;
  }

  h1 {
    font-size: clamp(46px, 5.2vw, 68px);
  }

  .clock-card {
    min-width: 188px;
    padding: 16px 18px;
  }

  .clock-card strong {
    font-size: 34px;
  }

  .clock-card span {
    font-size: 14px;
  }

  .bottom-nav {
    height: 88px;
    min-height: 88px;
    margin: 0;
    padding: 9px 12px;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    grid-auto-flow: unset;
    grid-auto-columns: unset;
    border-radius: 32px;
    gap: 7px;
  }

  .nav-item {
    min-width: 0;
    height: 68px;
    border-radius: 999px;
  }

  .nav-item .nav-icon {
    width: 28px;
    height: 28px;
  }

  .nav-item span {
    font-size: clamp(11px, 1.25vw, 14px);
  }

  .johnson-dashboard {
    height: auto;
    min-height: 100%;
    grid-template-rows: auto auto;
    gap: 22px;
    padding: 8px 18px 20px;
    overflow: visible;
  }

  .leaf-cluster {
    display: none;
  }

  .johnson-hero {
    grid-template-columns: 118px minmax(0, 1fr) 78px;
    gap: 22px;
    padding: 6px 4px 0;
  }

  .johnson-hero h2 {
    font-size: clamp(52px, 7vw, 82px);
  }

  .home-main-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home-left,
  .home-right {
    gap: 18px;
  }

  .home-left {
    grid-template-rows: auto auto;
  }

  .weather-showcase {
    grid-template-columns: 150px minmax(0, 1fr) 1px minmax(150px, .36fr);
    min-height: 178px;
    padding: 20px 28px;
  }

  .tasks-card {
    min-height: 360px;
  }

  .events-card {
    min-height: 660px;
  }

  .home-task-row {
    min-height: 58px;
    height: auto;
  }

  .home-event-row {
    min-height: 76px;
    height: auto;
  }

  body[data-active-page="calendarPage"] .page.active {
    padding: 0;
  }

  .native-calendar-shell {
    height: auto;
    min-height: 100%;
    padding: 0 18px 20px;
    overflow: visible;
  }

  .calendar-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
  }

  .calendar-month-panel {
    min-height: min(900px, calc(100dvh - var(--nav-height) - 160px));
    grid-template-rows: auto minmax(620px, 1fr) auto;
    padding: 22px 24px 18px;
  }

  .calendar-controls {
    grid-template-columns: 52px minmax(0, 1fr) 52px 150px;
    gap: 14px;
  }

  .calendar-controls > span {
    display: none;
  }

  .calendar-month-pill {
    min-width: 0;
  }

  .calendar-month-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .native-month-grid {
    grid-template-rows: 42px repeat(6, minmax(88px, 1fr));
  }

  .native-day-number {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 22px;
  }

  .calendar-legend {
    grid-template-columns: 1fr;
  }

  .calendar-key-groups {
    overflow: hidden;
  }

  .calendar-key-row {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .calendar-legend button {
    justify-self: start;
  }

  .calendar-agenda-panel {
    min-height: 560px;
  }

  .weather-page-grid,
  .chores-board,
  .grocery-columns,
  .lists-board {
    grid-template-columns: 1fr;
  }

  .forecast-grid,
  .meals-week-grid,
  .recipe-results-grid,
  .recipe-library-grid,
  .backup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weather-page-grid,
  .chores-board,
  .grocery-columns,
  .meals-week-grid,
  .recipe-results-grid,
  .recipe-library-grid,
  .lists-board,
  .backup-grid {
    gap: 18px;
  }

  .weather-card,
  .forecast-card,
  .grocery-board,
  .admin-card,
  .active-list-card {
    min-height: 0;
  }

  .forecast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meal-day-card {
    min-height: 230px;
  }

  .lists-board {
    grid-template-rows: auto minmax(520px, auto);
  }

  .list-index-card .list-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chef-card {
    height: calc(100dvh - var(--nav-height) - 186px);
    min-height: 720px;
  }

  .chef-message {
    max-width: 88%;
  }

  .care-shell {
    min-height: 100%;
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .care-hero {
    min-height: 132px;
  }

  .care-content {
    overflow: visible;
  }

  .care-overview-grid,
  .assistant-grid {
    grid-template-columns: 1fr;
  }

  .care-stats-grid,
  .care-trend,
  .growth-grid,
  .support-grid,
  .emergency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .care-row {
    grid-template-columns: 130px minmax(0, 1fr) auto;
  }

  .modal {
    width: min(860px, calc(100vw - 40px));
    max-height: 92dvh;
  }

  .cook-modal {
    width: calc(100vw - 36px);
    height: calc(100dvh - 36px);
  }

  .cook-display {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(260px, .8fr) minmax(440px, 1.2fr);
    overflow: auto;
  }

  .cook-panel ul,
  .cook-panel ol,
  .cook-steps ol {
    height: auto;
    columns: 1;
    overflow: visible;
  }
}

@media (min-width: 761px) and (orientation: landscape) {
  .app-shell {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    padding:
      max(16px, env(safe-area-inset-top))
      max(22px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(22px, env(safe-area-inset-left));
  }
}

@media (min-width: 1100px) and (max-height: 1050px) and (orientation: landscape) {
  .home-event-row {
    min-height: 62px;
    height: 64px;
  }

  .home-task-row {
    min-height: 46px;
    height: 48px;
  }

  .calendar-month-panel {
    grid-template-rows: 62px minmax(0, 1fr) minmax(70px, auto);
  }

  .native-day-number {
    width: 48px;
    height: 48px;
  }
}

/* v161 AI Chef page polish */
.chef-card {
  min-height: min(620px, calc(100dvh - var(--nav-height) - 230px - env(safe-area-inset-top)));
}

@media (max-width: 760px) {
  .bottom-nav {
    grid-auto-columns: 78px;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 8px;
    padding-inline: 10px;
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    min-width: 0;
  }

  .chef-card {
    min-height: 0;
    height: clamp(340px, calc(100dvh - var(--nav-height) - 285px - env(safe-area-inset-top)), 460px);
  }

  .chef-compose textarea {
    min-height: 68px;
  }

  .cook-modal {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    padding: 10px;
    border-radius: 18px;
  }

  .cook-display {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, .86fr) minmax(0, 1.14fr);
    gap: 10px;
  }

  .cook-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .cook-panel ul,
  .cook-panel ol,
  .cook-steps ol {
    columns: 1;
    font-size: 15px;
  }
}

@media (min-width: 761px) {
  .care-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }
}

body:not([data-active-page="dashboardPage"]) .weather-card {
  background:
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.16), transparent 28%),
    linear-gradient(135deg, rgba(18,26,21,.96), rgba(36,95,72,.95) 62%, rgba(55,101,137,.88));
  color: white;
  border-color: rgba(255,255,255,.18);
}

body:not([data-active-page="dashboardPage"]) .weather-card .card-title h3,
body:not([data-active-page="dashboardPage"]) .weather-card h3,
body:not([data-active-page="dashboardPage"]) .weather-card .muted {
  color: rgba(255,255,255,.86);
}

/* v161 Weather page rebuild */
.weather-page-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  overflow: hidden;
  border-radius: 34px;
  padding: clamp(16px, 2vw, 26px);
  background:
    radial-gradient(circle at 12% 5%, rgba(255,255,255,.88), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(206,228,212,.68), transparent 34%),
    linear-gradient(145deg, rgba(249,247,239,.92), rgba(229,239,231,.88));
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 20px 48px rgba(47,75,63,.12);
}

.weather-page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255,255,255,.34), transparent 46%),
    radial-gradient(circle at 8% 90%, rgba(55,105,81,.09), transparent 34%);
}

.weather-page-shell > * {
  position: relative;
  z-index: 1;
}

.weather-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.weather-page-head h2 {
  margin: 2px 0 4px;
  font-size: clamp(34px, 4vw, 58px);
  letter-spacing: 0;
  line-height: 1.08;
}

.weather-page-head span {
  display: block;
  color: rgba(43,58,50,.66);
  font-size: clamp(15px, 1.25vw, 19px);
}

.weather-kicker {
  margin: 0;
  color: rgba(47,105,84,.78);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.weather-refresh-button {
  min-width: 128px;
  min-height: 52px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(47,105,84,.18);
}

.weather-alert {
  border-radius: 20px;
  padding: 12px 16px;
  color: #6a4b20;
  background: rgba(255,239,202,.72);
  border: 1px solid rgba(189,128,42,.24);
  font-weight: 800;
}

.weather-layout {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr);
  gap: 18px;
  min-width: 0;
  min-height: 0;
  flex: 1;
}

.weather-side-stack {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  min-height: 0;
}

.weather-current-card,
.weather-soft-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 18px 38px rgba(47,75,63,.11);
  backdrop-filter: blur(20px);
}

.weather-current-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 460px;
  padding: clamp(22px, 2.6vw, 34px);
  color: #22372d;
}

.weather-loading-card {
  align-items: center;
  justify-content: center;
}

.weather-empty-state {
  display: grid;
  gap: 10px;
  max-width: 360px;
  text-align: center;
}

.weather-empty-state strong {
  font-size: clamp(24px, 3vw, 38px);
}

.weather-empty-state span {
  color: rgba(43,58,50,.66);
  font-size: 17px;
}

.weather-current-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: center;
}

.weather-current-main > div,
.weather-day-card > div {
  min-width: 0;
}

.weather-big-icon {
  display: grid;
  place-items: center;
  width: clamp(108px, 12vw, 172px);
  aspect-ratio: 1;
  border-radius: 34px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.96), rgba(255,255,255,.5) 42%, rgba(255,255,255,.18)),
    linear-gradient(145deg, rgba(254,232,164,.72), rgba(161,204,181,.45));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 20px 36px rgba(76,108,86,.17);
  font-size: clamp(58px, 7vw, 96px);
  line-height: 1;
}

.weather-current-temp {
  margin-top: 2px;
  padding-block: .08em;
  font-size: clamp(76px, 10vw, 142px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: 0;
}

.weather-current-card h2 {
  margin: 8px 0 4px;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.12;
}

.weather-current-card span {
  color: rgba(43,58,50,.66);
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 800;
}

.weather-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.weather-metrics-grid div {
  min-width: 0;
  border-radius: 22px;
  padding: 15px 16px;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(255,255,255,.66);
}

.weather-metrics-grid span,
.weather-day-card span,
.weather-panel-head p {
  color: rgba(43,58,50,.62);
}

.weather-metrics-grid span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.weather-metrics-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.05;
}

.weather-soft-panel {
  padding: clamp(16px, 1.8vw, 24px);
}

.weather-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.weather-panel-head h3 {
  margin: 0 0 4px;
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.05;
}

.weather-panel-head p {
  margin: 0;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 750;
}

.weather-hourly-panel {
  min-height: 214px;
}

.weather-hourly-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(92px, 8.5vw, 126px);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 3px 2px 8px;
  scrollbar-width: thin;
}

.weather-hour-card {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 136px;
  border-radius: 22px;
  padding: 14px 10px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.7);
}

.weather-hour-card time,
.weather-hour-card span,
.weather-day-card em {
  color: rgba(43,58,50,.62);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.weather-hour-card strong {
  font-size: 34px;
  line-height: 1;
}

.weather-hour-card b {
  font-size: 24px;
  line-height: 1;
}

.weather-ten-day-panel {
  min-height: 0;
}

.weather-ten-day-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 2px;
}

.weather-day-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  border-radius: 22px;
  padding: 14px;
  background: rgba(255,255,255,.56);
  border: 1px solid rgba(255,255,255,.7);
}

.weather-day-card.today-forecast {
  background: rgba(236,247,238,.76);
  border-color: rgba(83,132,104,.22);
}

.weather-day-card strong {
  display: block;
  min-width: 0;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.05;
}

.weather-day-card span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.weather-day-icon {
  font-size: 30px;
  line-height: 1;
}

.weather-day-temps {
  display: grid;
  justify-items: end;
  min-width: 52px;
}

.weather-day-temps strong {
  font-size: 22px;
}

.weather-day-temps span {
  margin: 0;
}

.weather-animation {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .92;
  overflow: hidden;
}

.weather-animation span {
  position: absolute;
  display: block;
}

.weather-current-card > :not(.weather-animation) {
  position: relative;
  z-index: 1;
}

.weather-sunny::before,
.weather-clear::before {
  content: "";
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  top: -14%;
  right: -12%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,221,125,.56), rgba(255,221,125,.18) 42%, transparent 70%);
  animation: weatherGlow 9s ease-in-out infinite alternate;
}

.weather-sunny span,
.weather-clear span {
  width: 42%;
  height: 4px;
  top: 22%;
  right: 2%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,226,145,.4), transparent);
  transform-origin: left center;
  animation: weatherRays 14s linear infinite;
}

.weather-sunny span:nth-child(2),
.weather-clear span:nth-child(2) { transform: rotate(22deg); animation-delay: -3s; }
.weather-sunny span:nth-child(3),
.weather-clear span:nth-child(3) { transform: rotate(44deg); animation-delay: -6s; }
.weather-sunny span:nth-child(n+4),
.weather-clear span:nth-child(n+4) { display: none; }

.weather-cloudy span,
.weather-fog span {
  width: 132px;
  height: 44px;
  left: -22%;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  filter: blur(.2px);
  box-shadow: 38px -14px 0 rgba(255,255,255,.28), 74px 4px 0 rgba(255,255,255,.2);
  animation: weatherClouds 24s linear infinite;
}

.weather-cloudy span:nth-child(1),
.weather-fog span:nth-child(1) { top: 15%; animation-delay: -6s; }
.weather-cloudy span:nth-child(2),
.weather-fog span:nth-child(2) { top: 31%; animation-delay: -14s; transform: scale(.82); }
.weather-cloudy span:nth-child(3),
.weather-fog span:nth-child(3) { top: 52%; animation-delay: -20s; transform: scale(1.1); }
.weather-cloudy span:nth-child(n+4),
.weather-fog span:nth-child(n+4) { display: none; }

.weather-rain span {
  width: 2px;
  height: 46px;
  top: -20%;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(86,123,142,.38));
  transform: rotate(12deg);
  animation: weatherRain 1.4s linear infinite;
}

.weather-rain span:nth-child(1) { left: 18%; animation-delay: -.2s; }
.weather-rain span:nth-child(2) { left: 34%; animation-delay: -.8s; }
.weather-rain span:nth-child(3) { left: 51%; animation-delay: -.45s; }
.weather-rain span:nth-child(4) { left: 68%; animation-delay: -1.1s; }
.weather-rain span:nth-child(5) { left: 82%; animation-delay: -.65s; }
.weather-rain span:nth-child(6) { left: 92%; animation-delay: -1.3s; }

.weather-snow span {
  width: 9px;
  height: 9px;
  top: -10%;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 0 14px rgba(255,255,255,.56);
  animation: weatherSnow 8s linear infinite;
}

.weather-snow span:nth-child(1) { left: 12%; animation-delay: -1s; }
.weather-snow span:nth-child(2) { left: 28%; animation-delay: -4s; }
.weather-snow span:nth-child(3) { left: 44%; animation-delay: -2s; }
.weather-snow span:nth-child(4) { left: 61%; animation-delay: -6s; }
.weather-snow span:nth-child(5) { left: 78%; animation-delay: -3s; }
.weather-snow span:nth-child(6) { left: 90%; animation-delay: -7s; }

.weather-thunder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,245,.46);
  opacity: 0;
  animation: weatherLightning 9s steps(1,end) infinite;
}

.weather-thunder span {
  width: 2px;
  height: 48px;
  top: -18%;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(70,93,110,.32));
  transform: rotate(12deg);
  animation: weatherRain 1.2s linear infinite;
}

.weather-thunder span:nth-child(1) { left: 22%; animation-delay: -.1s; }
.weather-thunder span:nth-child(2) { left: 42%; animation-delay: -.5s; }
.weather-thunder span:nth-child(3) { left: 64%; animation-delay: -.9s; }
.weather-thunder span:nth-child(n+4) { display: none; }

.weather-night::before {
  content: "";
  position: absolute;
  width: 150px;
  aspect-ratio: 1;
  top: 9%;
  right: 9%;
  border-radius: 999px;
  background: radial-gradient(circle at 38% 34%, rgba(255,255,235,.92), rgba(255,255,235,.3) 28%, transparent 62%);
  box-shadow: 0 0 44px rgba(255,255,220,.28);
  animation: weatherGlow 8s ease-in-out infinite alternate;
}

.weather-night span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  animation: weatherStars 4s ease-in-out infinite alternate;
}

.weather-night span:nth-child(1) { top: 18%; left: 18%; }
.weather-night span:nth-child(2) { top: 31%; left: 42%; animation-delay: -1s; }
.weather-night span:nth-child(3) { top: 47%; left: 25%; animation-delay: -2s; }
.weather-night span:nth-child(4) { top: 64%; left: 72%; animation-delay: -3s; }
.weather-night span:nth-child(5) { top: 22%; left: 78%; animation-delay: -1.6s; }
.weather-night span:nth-child(6) { top: 76%; left: 47%; animation-delay: -2.4s; }

@keyframes weatherGlow {
  from { transform: translate3d(0,0,0) scale(1); opacity: .68; }
  to { transform: translate3d(-12px,12px,0) scale(1.08); opacity: .95; }
}

@keyframes weatherRays {
  from { rotate: 0deg; opacity: .24; }
  50% { opacity: .5; }
  to { rotate: 360deg; opacity: .24; }
}

@keyframes weatherClouds {
  from { translate: 0 0; }
  to { translate: 145vw 0; }
}

@keyframes weatherRain {
  from { translate: 0 0; opacity: 0; }
  12% { opacity: .75; }
  to { translate: -26px 130%; opacity: 0; }
}

@keyframes weatherSnow {
  from { translate: 0 0; opacity: 0; }
  12% { opacity: .85; }
  to { translate: 26px 122%; opacity: 0; }
}

@keyframes weatherLightning {
  0%, 88%, 92%, 100% { opacity: 0; }
  89%, 91% { opacity: .44; }
}

@keyframes weatherStars {
  from { opacity: .24; scale: .82; }
  to { opacity: .9; scale: 1.2; }
}

@media (orientation: portrait), (max-width: 960px) {
  .weather-page-shell {
    overflow: visible;
    min-height: 0;
  }

  .weather-layout {
    grid-template-columns: 1fr;
  }

  .weather-side-stack {
    display: flex;
    flex-direction: column;
  }

  .weather-current-card {
    min-height: clamp(420px, 34dvh, 560px);
  }

  .weather-ten-day-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }
}

@media (min-width: 961px) and (orientation: landscape) {
  body[data-active-page="weatherPage"] .page.active {
    overflow: hidden;
    padding-bottom: 0;
  }

  .weather-page-shell {
    height: 100%;
    min-height: 0;
  }

  .weather-page-head {
    flex: 0 0 auto;
  }

  .weather-layout,
  .weather-side-stack,
  .weather-current-card,
  .weather-soft-panel {
    min-height: 0;
  }

  .weather-current-card {
    height: 100%;
    padding: clamp(20px, 2.1vw, 28px);
  }

  .weather-metrics-grid {
    margin-top: clamp(18px, 2vw, 26px);
  }

  .weather-ten-day-list {
    overflow: auto;
  }
}

@media (min-width: 1000px) and (orientation: portrait) {
  .weather-page-shell {
    gap: 22px;
    padding: 28px;
  }

  .weather-current-card {
    min-height: 500px;
  }

  .weather-hourly-rail {
    grid-auto-columns: 126px;
  }

  .weather-day-card {
    min-height: 92px;
    padding: 16px 18px;
  }
}

@media (max-width: 760px) {
  .weather-page-shell {
    border-radius: 24px;
    padding: 14px;
    gap: 14px;
  }

  .weather-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .weather-refresh-button {
    width: 100%;
  }

  .weather-current-card,
  .weather-soft-panel {
    border-radius: 24px;
  }

  .weather-current-card {
    min-height: 0;
    padding: 18px;
    gap: 18px;
  }

  .weather-current-main {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .weather-current-temp {
    font-size: clamp(72px, 22vw, 98px);
  }

  .weather-big-icon {
    width: 104px;
    border-radius: 28px;
    font-size: 56px;
  }

  .weather-metrics-grid {
    grid-template-columns: 1fr;
  }

  .weather-hourly-rail {
    grid-auto-columns: 94px;
  }

  .weather-day-card {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .weather-day-card em {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-animation,
  .weather-animation::before,
  .weather-animation::after,
  .weather-animation span {
    animation: none !important;
  }

  .weather-animation {
    opacity: .45;
  }
}

body:not([data-active-page="dashboardPage"]) .weather-card .weather-temp {
  color: #fffdf7;
}

body:not([data-active-page="dashboardPage"]) .weather-card .pill {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.92);
}

@media (min-width: 761px) and (orientation: portrait) {
  .care-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 0;
  }

  .care-tabs button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 10px 10px 8px;
    grid-template-rows: minmax(0, 1fr) var(--nav-height);
    border-radius: 0;
  }

  .app-main {
    min-height: 0;
    padding: 0;
  }

  .page {
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding: 0 0 12px;
  }

  body:not([data-active-page="dashboardPage"]) .app-topbar {
    height: 64px;
    padding: 0 4px;
  }

  body:not([data-active-page="dashboardPage"]) .page.active {
    padding: 0 0 12px;
  }

  h1 {
    font-size: 31px;
  }

  .clock-card {
    min-width: 112px;
    padding: 9px 11px;
  }

  .clock-card strong {
    font-size: 20px;
  }

  .clock-card span {
    font-size: 10px;
  }

  .bottom-nav {
    height: 76px;
    min-height: 76px;
    margin: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    grid-auto-columns: 76px;
    border-radius: 24px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .nav-item {
    height: 58px;
    min-width: 0;
  }

  .nav-item .nav-icon {
    width: 20px;
    height: 20px;
  }

  .nav-item span {
    font-size: 10px;
  }

  .johnson-dashboard {
    height: auto;
    min-height: 100%;
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 0 0 12px;
    overflow: visible;
  }

  .leaf-cluster {
    display: none;
  }

  .johnson-hero {
    grid-template-columns: 62px minmax(0, 1fr) 48px;
    gap: 11px;
    padding: 2px 2px 0;
  }

  .home-portrait {
    width: 58px;
    height: 58px;
  }

  .home-portrait::after {
    inset: 5px;
    border-width: 4px;
  }

  .house-art {
    width: 44px;
    height: 44px;
  }

  .johnson-hero p {
    font-size: 13px;
  }

  .johnson-hero h2 {
    margin-top: 2px;
    font-size: 30px;
    line-height: 1;
  }

  .johnson-hero span {
    margin-top: 4px;
    font-size: 13px;
  }

  .notify-orb {
    width: 46px;
    height: 46px;
  }

  .notify-orb .nav-icon {
    width: 21px;
    height: 21px;
  }

  .home-main-grid,
  .home-left,
  .home-right {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
  }

  .weather-showcase {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 12px;
    min-height: 0;
    padding: 13px;
  }

  .weather-art {
    width: 62px;
    height: 56px;
    border-radius: 18px;
  }

  .weather-reading strong {
    font-size: 38px;
  }

  .weather-reading span {
    margin-top: 4px;
    font-size: 14px;
  }

  .weather-reading small {
    margin-top: 4px;
    font-size: 12px;
  }

  .weather-divider {
    display: none;
  }

  .weather-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    font-size: 11px;
  }

  .weather-stats span {
    display: grid;
    gap: 2px;
    justify-content: start;
  }

  .weather-stats b {
    font-size: 16px;
  }

  .tasks-card,
  .events-card {
    padding: 13px;
  }

  .events-card {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .home-card-head {
    height: auto;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .hub-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .hub-icon .nav-icon {
    width: 20px;
    height: 20px;
  }

  .home-card-head h3 {
    font-size: 17px;
  }

  .home-card-head button {
    font-size: 13px;
  }

  .home-task-row {
    grid-template-columns: 28px minmax(0, 1fr) auto 34px;
    min-height: 50px;
    height: auto;
    padding: 6px 10px;
    border-radius: 16px;
  }

  .home-event-row,
  .home-event-row.no-assignee {
    grid-template-columns: 50px 9px minmax(0, 1fr);
    min-height: 60px;
    height: auto;
    gap: 9px;
    padding: 6px 10px;
    border-radius: 17px;
  }

  .home-event-row .hub-icon {
    display: none;
  }

  .event-date {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .event-date b {
    font-size: 20px;
  }

  .event-date small {
    font-size: 10px;
  }

  body[data-active-page="calendarPage"] .page.active {
    padding: 0 0 12px;
  }

  .native-calendar-shell {
    height: auto;
    min-height: 100%;
    padding: 0 0 12px;
    overflow: visible;
  }

  .calendar-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calendar-month-panel {
    min-height: 0;
    padding: 13px;
    grid-template-rows: auto auto auto;
  }

  .calendar-controls {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .calendar-controls > span {
    display: none;
  }

  .calendar-step {
    width: 42px;
    min-height: 42px;
    border-radius: 14px;
    font-size: 28px;
  }

  .calendar-month-pill {
    min-width: 0;
    min-height: 42px;
    gap: 8px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 17px;
  }

  .calendar-month-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-month-pill b {
    font-size: 18px;
  }

  .calendar-today-pill {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 14px;
  }

  .native-month-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: 28px repeat(6, 54px);
    padding-top: 8px;
  }

  .native-weekday {
    font-size: 10px;
  }

  .native-day {
    gap: 3px;
  }

  .native-day-number {
    width: 31px;
    height: 31px;
    border-radius: 10px;
    font-size: 15px;
  }

  .native-day-dots {
    min-height: 10px;
    gap: 3px;
  }

  .native-day-dots .split-marker {
    width: 8px;
    height: 8px;
    border-radius: 3px;
  }

  .calendar-legend {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .calendar-key-groups {
    padding: 9px;
  }

  .calendar-key-row {
    flex-wrap: wrap;
    gap: 6px 9px;
  }

  .calendar-key-row strong {
    flex-basis: 100%;
  }

  .calendar-agenda-panel {
    min-height: 360px;
    padding: 14px;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .native-agenda-event,
  .native-agenda-event.no-assignee {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    gap: 9px;
  }

  .native-event-time {
    display: none;
  }

  .native-event-icon {
    width: 38px;
    height: 38px;
  }

  .care-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

/* Final v161 Weather sizing overrides live after legacy responsive rules. */
body[data-active-page="weatherPage"] .page.active {
  min-height: 0;
}

/* v161 Care Hub and Calendar responsive safety layer */
body[data-active-page="carePage"] .care-shell,
body[data-active-page="calendarPage"] .native-calendar-shell {
  min-width: 0;
}

body[data-active-page="carePage"] .care-card,
body[data-active-page="carePage"] .care-panel,
body[data-active-page="carePage"] .care-row,
body[data-active-page="calendarPage"] .calendar-agenda-panel,
body[data-active-page="calendarPage"] .native-calendar-panel {
  min-width: 0;
}

body[data-active-page="calendarPage"] .native-calendar-shell {
  touch-action: manipulation;
}

body[data-active-page="calendarPage"] .native-day-cell,
body[data-active-page="calendarPage"] .native-agenda-event,
body[data-active-page="carePage"] .care-tabs button,
body[data-active-page="carePage"] .care-row button {
  touch-action: manipulation;
}

@media (min-width: 761px) and (orientation: portrait) {
  body[data-active-page="carePage"] .care-shell {
    gap: 18px;
  }

  body[data-active-page="carePage"] .care-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
  }

  body[data-active-page="carePage"] .care-tabs button {
    min-height: 54px;
    white-space: normal;
    line-height: 1.05;
  }

  body[data-active-page="carePage"] .care-row {
    grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr) auto;
  }

  body[data-active-page="calendarPage"] .calendar-stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(720px, 1fr) minmax(420px, .55fr);
    overflow: auto;
    padding-bottom: 22px;
  }

  body[data-active-page="calendarPage"] .calendar-agenda-panel {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  body[data-active-page="carePage"] .care-tabs {
    gap: 8px;
    padding-bottom: 4px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body[data-active-page="carePage"] .care-tabs button {
    min-width: 128px;
    min-height: 50px;
    flex: 0 0 128px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body[data-active-page="carePage"] .care-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body[data-active-page="calendarPage"] .calendar-stage {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
    padding: 0 10px 18px;
  }

  body[data-active-page="calendarPage"] .native-calendar-shell,
  body[data-active-page="calendarPage"] .calendar-month-panel,
  body[data-active-page="calendarPage"] .calendar-agenda-panel {
    height: auto;
    min-height: 0;
  }

  body[data-active-page="calendarPage"] .calendar-agenda-panel {
    min-height: 360px;
  }
}

/* v161 portrait calendar layout for wall-mounted touch displays */
@media (min-width: 761px) and (orientation: portrait) {
  body[data-active-page="calendarPage"] .page.active {
    height: calc(100dvh - var(--nav-height) - 28px - env(safe-area-inset-top));
    overflow: hidden;
  }

  body[data-active-page="calendarPage"] .native-calendar-shell {
    height: 100%;
    min-height: 0;
    padding: 0 30px 18px;
    overflow: hidden;
  }

  body[data-active-page="calendarPage"] .calendar-stage {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(660px, 860px) minmax(420px, 1fr);
    gap: 18px;
    overflow: hidden;
    padding-bottom: 0;
  }

  body[data-active-page="calendarPage"] .calendar-month-panel {
    height: 100%;
    min-height: 0;
    padding: 18px 22px 14px;
    grid-template-rows: 58px minmax(0, 1fr) auto;
  }

  body[data-active-page="calendarPage"] .native-month-grid {
    min-height: 0;
    grid-template-rows: 36px repeat(6, minmax(72px, 1fr));
    padding-top: 4px;
  }

  body[data-active-page="calendarPage"] .native-day {
    gap: 4px;
  }

  body[data-active-page="calendarPage"] .native-day-number {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 21px;
  }

  body[data-active-page="calendarPage"] .calendar-legend {
    padding-top: 8px;
  }

  body[data-active-page="calendarPage"] .calendar-key-groups {
    gap: 7px;
    padding: 8px 12px;
  }

  body[data-active-page="calendarPage"] .calendar-key-row {
    flex-wrap: nowrap;
    gap: 12px;
  }

  body[data-active-page="calendarPage"] .calendar-agenda-panel {
    height: 100%;
    min-height: 0;
    padding: 20px 22px 18px;
    grid-template-rows: 54px minmax(0, 1fr);
  }
}

/* v161 Home dashboard redesign */
body[data-active-page="dashboardPage"] .johnson-dashboard {
  grid-template-rows: 128px auto 108px minmax(0, 1fr);
  gap: 14px;
}

.home-alerts {
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 2px 2px;
  scrollbar-width: none;
}

.home-alerts::-webkit-scrollbar {
  display: none;
}

.home-alert-pill {
  flex: 0 0 auto;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  color: #3e581c;
  font-size: 14px;
  font-weight: 880;
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(237,242,221,.72));
  border: 1px solid rgba(255,255,255,.68);
  box-shadow: 8px 10px 22px rgba(70,65,45,.08), inset 1px 1px 0 rgba(255,255,255,.78);
}

.home-alert-pill .hub-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.72);
}

.home-alert-pill .hub-icon .nav-icon {
  width: 19px;
  height: 19px;
}

.home-today-board {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.45fr repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-stat-tile {
  min-width: 0;
  min-height: 98px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 6px 11px;
  padding: 14px;
  border-radius: 24px;
  text-align: left;
  background: linear-gradient(145deg, rgba(255,255,255,.74), rgba(243,239,226,.62));
  border: 1px solid rgba(255,255,255,.66);
  box-shadow: 10px 14px 28px rgba(70,65,45,.08), inset 1px 1px 0 rgba(255,255,255,.82);
}

.home-stat-tile.primary {
  background:
    radial-gradient(circle at 18% 18%, rgba(228,240,197,.9), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(239,244,225,.74));
}

.home-stat-tile .hub-icon {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.home-stat-tile span {
  min-width: 0;
  color: #69747a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-stat-tile strong {
  min-width: 0;
  color: #19320f;
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 930;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-main-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.home-left,
.home-right {
  min-width: 0;
}

.home-left {
  grid-template-rows: 150px auto minmax(0, 1fr);
}

.home-right {
  grid-template-rows: auto minmax(0, 1fr);
}

.home-mini-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 14px;
}

.compact-head {
  min-height: 46px;
  height: auto;
  margin-bottom: 10px;
}

.home-family-card,
.home-evening-card,
.home-household-card {
  padding: 14px 16px;
}

.home-family-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-person-card {
  min-width: 0;
  min-height: 94px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 10px;
  border-radius: 20px;
  text-align: left;
  background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(245,241,229,.46));
  border: 1px solid rgba(255,255,255,.54);
}

.home-person-card .person-avatar {
  grid-row: 1 / span 3;
  width: 46px;
  height: 46px;
}

.home-person-card strong,
.home-person-card span,
.home-person-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-person-card strong {
  color: #19320f;
  font-size: 15px;
  font-weight: 930;
}

.home-person-card span,
.home-person-card em {
  color: #687176;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.home-evening-content,
.home-household-grid {
  display: grid;
  gap: 10px;
}

.home-evening-content {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-evening-content div {
  min-width: 0;
  min-height: 92px;
  padding: 13px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.56), rgba(244,240,229,.44));
  border: 1px solid rgba(255,255,255,.52);
}

.home-evening-content span {
  display: block;
  color: #69747a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-evening-content strong,
.home-evening-content em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-evening-content strong {
  margin-top: 8px;
  color: #19320f;
  font-size: 17px;
  font-weight: 930;
}

.home-evening-content em {
  margin-top: 5px;
  color: #687176;
  font-size: 13px;
  font-style: normal;
  font-weight: 760;
}

.home-household-card {
  display: grid;
}

.home-household-grid {
  grid-template-columns: 1fr;
}

.home-household-grid .home-stat-tile {
  min-height: 58px;
  grid-template-columns: 38px minmax(0, 1fr);
  padding: 8px 12px;
  border-radius: 18px;
}

.home-household-grid .home-stat-tile .hub-icon {
  width: 36px;
  height: 36px;
}

.home-household-grid .home-stat-tile strong {
  font-size: 15px;
}

.home-more-row {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #526b22;
  font-weight: 900;
  background: rgba(231,238,209,.48);
  border: 1px dashed rgba(95,123,37,.28);
}

.tasks-card,
.events-card {
  min-height: 0;
}

.tasks-card {
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
}

.home-task-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(95,123,37,.42) transparent;
}

.home-task-list::-webkit-scrollbar {
  width: 6px;
}

.home-task-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(95,123,37,.38);
}

@media (min-width: 761px) and (orientation: portrait) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    grid-template-rows: auto auto auto auto;
    padding: 8px 18px 20px;
    overflow: visible;
  }

  .home-today-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-today-board .home-stat-tile.primary {
    grid-column: 1 / -1;
  }

  .home-main-grid,
  .home-mini-grid {
    grid-template-columns: 1fr;
  }

  .home-left,
  .home-right {
    grid-template-rows: auto;
  }

  .home-family-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-household-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .events-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    grid-template-rows: auto;
    gap: 12px;
  }

  .home-alerts {
    margin-inline: -2px;
  }

  .home-alert-pill {
    min-height: 40px;
    font-size: 12px;
  }

  .home-today-board,
  .home-main-grid,
  .home-mini-grid,
  .home-family-grid,
  .home-household-grid,
  .home-evening-content {
    grid-template-columns: 1fr;
  }

  .home-stat-tile {
    min-height: 68px;
    padding: 10px;
    border-radius: 18px;
  }

  .home-family-card,
  .home-evening-card,
  .home-household-card {
    padding: 13px;
  }

  .home-person-card {
    min-height: 72px;
  }

  .home-left,
  .home-right {
    grid-template-rows: auto;
  }
}

@media (min-width: 961px) and (orientation: landscape) {
  body[data-active-page="weatherPage"] .app-topbar {
    height: 82px;
  }

  body[data-active-page="weatherPage"] .page.active {
    height: calc(100dvh - 24px - 22px - 104px - 82px - 12px) !important;
    overflow: hidden !important;
    padding: 0 28px !important;
  }

  body[data-active-page="weatherPage"] .weather-page-shell {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 22px 26px;
  }

  body[data-active-page="weatherPage"] .weather-layout {
    min-height: 0;
    overflow: hidden;
  }

  body[data-active-page="weatherPage"] .weather-side-stack,
  body[data-active-page="weatherPage"] .weather-current-card,
  body[data-active-page="weatherPage"] .weather-soft-panel {
    min-height: 0;
  }

  body[data-active-page="weatherPage"] .weather-current-card {
    height: 100%;
  }

  body[data-active-page="weatherPage"] .weather-ten-day-list {
    overflow: auto;
  }
}

/* v161 Home dashboard simplification */
body[data-active-page="dashboardPage"] .johnson-dashboard {
  grid-template-rows: 132px minmax(0, 1fr);
  gap: 18px;
}

body[data-active-page="dashboardPage"] .home-main-grid {
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
  gap: 18px;
}

body[data-active-page="dashboardPage"] .home-left {
  grid-template-rows: 150px minmax(0, auto) auto;
  gap: 18px;
}

body[data-active-page="dashboardPage"] .home-right {
  grid-template-rows: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 18px;
}

.home-priority-card,
.home-shortcuts-card {
  min-height: 0;
}

.home-priority-card {
  display: grid;
  min-height: 278px;
  grid-template-rows: 48px minmax(0, 1fr);
}

.home-priority-list {
  min-height: 0;
  display: grid;
  gap: 8px;
}

.home-priority-row {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 21px;
  text-align: left;
  background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(244,240,228,.46));
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.66);
}

.home-priority-row .hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.home-priority-row span,
.home-priority-row small,
.home-priority-row strong,
.home-priority-row em {
  min-width: 0;
  display: block;
}

.home-priority-row small {
  color: #6e7776;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.home-priority-row strong,
.home-priority-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-priority-row strong {
  margin-top: 4px;
  color: #19320f;
  font-size: clamp(17px, 1.4vw, 22px);
  font-weight: 930;
  line-height: 1.08;
}

.home-priority-row em {
  margin-top: 4px;
  color: #687176;
  font-size: 13px;
  font-style: normal;
  font-weight: 760;
}

.home-shortcuts-card {
  padding-bottom: 16px;
}

.home-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-shortcut {
  min-width: 0;
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 10px;
  border-radius: 20px;
  color: #19320f;
  font-size: 13px;
  font-weight: 880;
  text-align: center;
  background: linear-gradient(145deg, rgba(255,255,255,.6), rgba(239,244,225,.5));
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.66);
}

.home-shortcut .hub-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
}

.home-shortcut span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-page="dashboardPage"] .events-card,
body[data-active-page="dashboardPage"] .tasks-card {
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
}

body[data-active-page="dashboardPage"] .events-card {
  min-height: 0;
}

@media (min-width: 761px) and (orientation: portrait) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    grid-template-rows: auto auto;
    gap: 18px;
    padding: 8px 18px 20px;
    overflow: visible;
  }

  body[data-active-page="dashboardPage"] .home-main-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-page="dashboardPage"] .home-left,
  body[data-active-page="dashboardPage"] .home-right {
    grid-template-rows: auto;
    gap: 16px;
  }

  .home-priority-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-shortcuts-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    grid-template-rows: auto;
    gap: 14px;
  }

  body[data-active-page="dashboardPage"] .home-main-grid,
  body[data-active-page="dashboardPage"] .home-left,
  body[data-active-page="dashboardPage"] .home-right {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 14px;
  }

  .home-priority-list,
  .home-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .home-shortcuts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-priority-row {
    min-height: 68px;
  }

  .home-shortcut {
    min-height: 68px;
  }
}

/* v161 tactile native neumorphic visual system */
:root {
  --bg: #eef2e9;
  --panel: rgba(248, 250, 244, .9);
  --panel-2: rgba(238, 244, 231, .82);
  --nav-surface: rgba(246, 249, 241, .94);
  --line: rgba(255, 255, 255, .68);
  --line-strong: rgba(174, 194, 159, .42);
  --neuro-bg: #eef2e9;
  --neuro-highlight: rgba(255, 255, 255, .96);
  --neuro-lowlight: rgba(139, 158, 124, .28);
  --neuro-shadow-sm: 7px 8px 16px rgba(139, 158, 124, .24), -6px -6px 14px rgba(255, 255, 255, .9);
  --neuro-shadow: 13px 16px 34px rgba(134, 153, 120, .25), -10px -10px 26px rgba(255, 255, 255, .92);
  --neuro-shadow-strong: 22px 28px 56px rgba(124, 145, 112, .34), -16px -16px 36px rgba(255, 255, 255, .96);
  --neuro-inset: inset 3px 3px 8px rgba(139, 158, 124, .22), inset -4px -4px 10px rgba(255, 255, 255, .86);
  --neuro-edge: inset 1px 1px 0 rgba(255, 255, 255, .92), inset -1px -1px 0 rgba(139, 158, 124, .16);
  --light-x: 18%;
  --light-y: 12%;
  --dynamic-shadow-x: 15px;
  --dynamic-shadow-y: 18px;
  --dynamic-lift-x: -10px;
  --dynamic-lift-y: -10px;
  --dynamic-shadow-color: rgba(122, 144, 109, .27);
  --dynamic-highlight-color: rgba(255, 255, 255, .9);
}

body {
  background:
    radial-gradient(circle at 14% 8%, rgba(255,255,255,.86), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(221,233,205,.66), transparent 34%),
    linear-gradient(145deg, #f5f7f0 0%, var(--neuro-bg) 48%, #e5ecdf 100%);
}

.app-shell {
  background:
    radial-gradient(circle at 8% 8%, rgba(255,255,255,.9), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(223,234,205,.72), transparent 31%),
    linear-gradient(145deg, #f5f7f0, #eef2e9 48%, #e4ebdd);
}

#ambientCanvas {
  opacity: .72;
  filter: saturate(1.08);
  mix-blend-mode: normal;
}

body[data-visual-quality="high"] #ambientCanvas {
  opacity: .82;
}

body[data-visual-quality="low"] #ambientCanvas {
  opacity: .42;
}

.app-shell::before {
  animation: none;
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), rgba(255,255,255,.34), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 42%);
}

.app-shell::after {
  opacity: .035;
}

.home-portrait,
.notify-orb,
.johnson-card,
.bottom-nav,
.card,
.section-head,
.toolbar,
.modal,
.clock-card,
.weather-soft-panel,
.weather-current-card,
.care-panel,
.settings-person-row,
.backup-row {
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(238,244,231,.78));
  border: 1px solid rgba(255,255,255,.78);
  box-shadow:
    var(--dynamic-shadow-x) var(--dynamic-shadow-y) 34px var(--dynamic-shadow-color),
    var(--dynamic-lift-x) var(--dynamic-lift-y) 26px var(--dynamic-highlight-color),
    var(--neuro-edge);
  backdrop-filter: blur(18px) saturate(1.08);
}

.johnson-card,
.card,
.weather-current-card,
.weather-soft-panel,
.care-panel,
.modal {
  border-radius: 28px;
}

.bottom-nav {
  margin: 0 max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-radius: 32px;
  border-top: 1px solid rgba(255,255,255,.8);
  box-shadow:
    var(--dynamic-shadow-x) var(--dynamic-shadow-y) 38px rgba(124,145,112,.24),
    var(--dynamic-lift-x) var(--dynamic-lift-y) 28px rgba(255,255,255,.78),
    var(--neuro-edge);
}

.nav-item,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button,
.calendar-month-pill,
.calendar-today-pill,
.calendar-legend button,
.weather-refresh-button,
.care-tabs button,
.care-panel-head button,
.care-row button,
.home-card-head button,
.home-more-row,
.native-agenda-empty button,
.settings-person-row > button {
  border: 1px solid rgba(255,255,255,.72);
  background:
    linear-gradient(145deg, rgba(255,255,255,.88), rgba(229,239,217,.82));
  box-shadow:
    calc(var(--dynamic-shadow-x) * .55) calc(var(--dynamic-shadow-y) * .55) 17px rgba(122,144,109,.22),
    calc(var(--dynamic-lift-x) * .62) calc(var(--dynamic-lift-y) * .62) 14px rgba(255,255,255,.88),
    var(--neuro-edge);
}

.nav-item {
  border-radius: 24px;
}

.nav-item.active,
.segmented button.active,
.care-tabs button.active,
.primary-button {
  color: #24410f;
  background:
    linear-gradient(145deg, rgba(221,236,190,.96), rgba(244,248,236,.9));
  box-shadow:
    calc(var(--dynamic-shadow-x) * .62) calc(var(--dynamic-shadow-y) * .62) 22px rgba(111,139,76,.28),
    calc(var(--dynamic-lift-x) * .7) calc(var(--dynamic-lift-y) * .7) 16px rgba(255,255,255,.92),
    var(--neuro-edge);
}

.nav-item:active,
.primary-button:active,
.secondary-button:active,
.danger-button:active,
.ghost-button:active,
.icon-button:active,
.calendar-month-pill:active,
.calendar-today-pill:active,
.calendar-legend button:active,
.weather-refresh-button:active,
.care-tabs button:active,
.home-priority-row:active,
.home-shortcut:active,
.home-task-row:has(.task-check:active),
.home-event-row:active,
.home-more-row:active {
  transform: translateY(1px);
  box-shadow: var(--neuro-inset);
}

input,
select,
textarea,
.chef-compose textarea,
.segmented,
.pill,
.weather-detail-pill,
.weather-hour-card,
.weather-day-row,
.symptom-picks span,
.inline-check span {
  border: 1px solid rgba(255,255,255,.72);
  background:
    linear-gradient(145deg, rgba(231,239,223,.84), rgba(249,251,246,.76));
  box-shadow: var(--neuro-inset), inset 1px 1px 0 rgba(255,255,255,.82);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(250,252,247,.9);
  box-shadow: inset 4px 4px 10px rgba(139,158,124,.2), inset -4px -4px 10px rgba(255,255,255,.92), 0 0 0 4px rgba(126,157,72,.14);
}

.hub-icon,
.task-check,
.person-avatar,
.event-date,
.home-priority-row .hub-icon,
.home-shortcut .hub-icon,
.home-stat-tile .hub-icon,
.home-alert-pill .hub-icon {
  background:
    linear-gradient(145deg, rgba(230,242,201,.98), rgba(202,222,158,.88));
  border: 1px solid rgba(255,255,255,.74);
  box-shadow:
    calc(var(--dynamic-shadow-x) * .45) calc(var(--dynamic-shadow-y) * .48) 16px rgba(111,139,76,.26),
    calc(var(--dynamic-lift-x) * .48) calc(var(--dynamic-lift-y) * .48) 12px rgba(255,255,255,.86),
    var(--neuro-edge);
}

.weather-showcase,
.home-priority-row,
.home-shortcut,
.home-task-row,
.home-event-row,
.home-person-card,
.home-evening-content div,
.home-stat-tile,
.home-alert-pill,
.native-day,
.agenda-row,
.list-row,
.grocery-row,
.recipe-card,
.meal-row,
.care-row,
.appointment-row,
.binder-row,
.support-row {
  background:
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(237,243,229,.66));
  border: 1px solid rgba(255,255,255,.74);
  box-shadow:
    calc(var(--dynamic-shadow-x) * .68) calc(var(--dynamic-shadow-y) * .68) 22px rgba(122,144,109,.2),
    calc(var(--dynamic-lift-x) * .65) calc(var(--dynamic-lift-y) * .65) 18px rgba(255,255,255,.78),
    var(--neuro-edge);
}

.home-priority-row,
.home-shortcut,
.home-task-row,
.home-event-row {
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

.home-priority-row:hover,
.home-shortcut:hover,
.home-task-row:hover,
.home-event-row:hover,
.nav-item:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  box-shadow: var(--neuro-shadow), var(--neuro-edge);
}

.task-check {
  background:
    linear-gradient(145deg, rgba(239,243,233,.88), rgba(255,255,255,.88));
  box-shadow: inset 4px 4px 8px rgba(139,158,124,.24), inset -4px -4px 8px rgba(255,255,255,.9);
}

.task-check.done,
.task-check[aria-checked="true"] {
  background:
    linear-gradient(145deg, rgba(198,224,143,.96), rgba(126,157,72,.88));
  box-shadow: 5px 6px 12px rgba(111,139,76,.24), inset 1px 1px 0 rgba(255,255,255,.48);
}

.weather-art {
  background:
    linear-gradient(145deg, rgba(255,255,255,.08), rgba(202,222,158,.12)),
    url("assets/dashboard/weather-sun-cloud.png?v=172") center / cover;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 9px 12px 24px rgba(119,145,82,.22), -7px -7px 16px rgba(255,255,255,.8), var(--neuro-edge);
}

.modal-backdrop {
  background: rgba(230,236,226,.62);
  backdrop-filter: blur(22px) saturate(1.08);
}

.modal {
  box-shadow:
    calc(var(--dynamic-shadow-x) * 1.4) calc(var(--dynamic-shadow-y) * 1.5) 56px rgba(124,145,112,.34),
    calc(var(--dynamic-lift-x) * 1.3) calc(var(--dynamic-lift-y) * 1.3) 36px rgba(255,255,255,.96),
    var(--neuro-edge);
}

body[data-visual-quality="low"] .app-shell::before,
body[data-visual-quality="low"] .app-shell::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  #ambientCanvas {
    opacity: .28;
  }
}

@media (min-width: 761px) and (orientation: landscape) {
  .bottom-nav {
    margin-inline: max(28px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-right));
  }
}

@media (max-width: 760px) {
  .bottom-nav {
    margin: 0 10px max(8px, env(safe-area-inset-bottom));
    border-radius: 26px;
  }

  .johnson-card,
  .card,
  .weather-current-card,
  .weather-soft-panel,
  .care-panel,
  .modal {
    border-radius: 24px;
  }
}

/* v161 native rounded typography refinement */
:root {
  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono-tabular: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
  font-weight: 500;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

h1,
h2,
h3,
.johnson-hero h2,
.home-card-head h3,
.care-hero h2,
.cook-display header h2,
.weather-current-temp,
.weather-reading strong {
  font-family: var(--font-display);
  font-weight: 760;
  letter-spacing: 0;
}

.johnson-hero h2 {
  font-size: clamp(46px, 4.7vw, 60px);
  font-weight: 760;
  line-height: 1.08;
}

.johnson-hero p,
.johnson-hero span,
.eyebrow,
.muted {
  font-family: var(--font-ui);
}

.johnson-hero p {
  font-size: 19px;
  font-weight: 650;
}

.johnson-hero span {
  font-size: 18px;
  font-weight: 520;
}

.eyebrow,
.home-priority-row small,
.weather-stats,
.event-date small,
.native-day-weekday,
.care-hero p,
.care-metric span,
.repeat-weekdays span,
.home-evening-content span {
  letter-spacing: .01em;
  text-transform: none;
}

.eyebrow {
  font-size: 13px;
  font-weight: 620;
}

.nav-item,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button,
.home-card-head button,
.calendar-month-pill,
.calendar-today-pill,
.weather-refresh-button,
.care-tabs button,
.care-panel-head button,
.home-more-row {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: 0;
}

.nav-item span {
  font-size: 12.5px;
  font-weight: 610;
}

.nav-item.active span {
  font-weight: 700;
}

.home-card-head h3,
.care-panel-head h3,
.native-agenda-header h3,
.native-agenda-group h3,
.selected-agenda-day h3,
.card-title h3 {
  font-weight: 720;
}

.home-card-head button {
  font-size: 14px;
  font-weight: 640;
}

.home-priority-row strong,
.home-shortcut span,
.home-task-row strong,
.home-event-row strong,
.native-event-copy strong,
.task-row strong,
.grocery-row strong,
.meal-row strong,
.list-row strong,
.recipe-card strong,
.care-row strong {
  font-family: var(--font-display);
  font-weight: 690;
}

.home-priority-row small,
.home-task-row span,
.home-event-row em,
.home-priority-row em,
.native-event-copy em,
.task-row span,
.care-row span,
.care-row p,
.weather-reading span,
.weather-reading small {
  font-weight: 520;
}

.weather-reading strong {
  font-weight: 720;
}

.weather-reading span {
  font-size: 18px;
}

.weather-reading small {
  font-size: 15px;
}

.weather-stats {
  font-family: var(--font-mono-tabular);
  font-weight: 580;
  font-variant-numeric: tabular-nums;
}

.weather-stats b,
.event-date b,
.calendar-month-pill b,
.native-day-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.home-priority-row strong {
  font-size: clamp(17px, 1.32vw, 21px);
}

.home-shortcut span {
  font-size: 13px;
}

.event-date small {
  font-size: 11px;
  font-weight: 650;
}

.event-date b {
  font-weight: 720;
}

.modal-header h2,
.cook-modal .modal-header h2 {
  font-family: var(--font-display);
  font-weight: 720;
}

@media (min-width: 761px) {
  h1 {
    font-weight: 740;
  }

  h2 {
    font-weight: 720;
  }

  h3 {
    font-weight: 700;
  }
}

@media (max-width: 760px) {
  .johnson-hero h2 {
    font-size: 29px;
    font-weight: 760;
  }

  .johnson-hero p,
  .johnson-hero span {
    font-size: 13px;
  }

  .nav-item span {
    font-size: 10.5px;
  }
}

/* v161 cool neumorphic palette inspired by native family-app mockups */
:root {
  --bg: #eef3ff;
  --panel: rgba(248, 250, 255, .9);
  --panel-2: rgba(238, 243, 254, .84);
  --ink: #22263d;
  --muted: #697187;
  --line: rgba(255, 255, 255, .78);
  --line-strong: rgba(170, 181, 211, .46);
  --primary: #6c63f4;
  --primary-2: #ebeaff;
  --blue: #5078e8;
  --amber: #f0a23a;
  --red: #e46d8f;
  --nav-surface: rgba(247, 249, 255, .94);
  --neuro-bg: #eef3ff;
  --neuro-highlight: rgba(255, 255, 255, .98);
  --neuro-lowlight: rgba(125, 139, 180, .3);
  --dynamic-shadow-color: rgba(111, 124, 168, .25);
  --dynamic-highlight-color: rgba(255, 255, 255, .94);
  --neuro-inset: inset 4px 4px 10px rgba(129, 143, 184, .2), inset -5px -5px 12px rgba(255, 255, 255, .88);
  --neuro-edge: inset 1px 1px 0 rgba(255, 255, 255, .95), inset -1px -1px 0 rgba(126, 139, 180, .13);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 6%, rgba(255,255,255,.95), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(222,228,255,.7), transparent 34%),
    linear-gradient(145deg, #f9fbff 0%, #eef3ff 48%, #e4ebfb 100%);
}

.app-shell {
  background:
    radial-gradient(circle at 10% 7%, rgba(255,255,255,.92), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(224,230,255,.76), transparent 34%),
    linear-gradient(145deg, #f9fbff, #eef3ff 50%, #e3eafa);
}

.app-shell::before {
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), rgba(255,255,255,.46), transparent 40%),
    linear-gradient(135deg, rgba(126,119,246,.06), transparent 44%);
}

.johnson-hero h2,
.home-card-head h3,
.home-priority-row strong,
.home-shortcut span,
.home-task-row strong,
.home-event-row strong,
.native-event-copy strong,
.task-row strong,
.grocery-row strong,
.meal-row strong,
.list-row strong,
.recipe-card strong,
.care-row strong,
h1,
h2,
h3 {
  color: #20243b;
}

.johnson-hero p,
.johnson-hero span,
.muted,
.home-priority-row small,
.home-priority-row em,
.home-task-row span,
.home-event-row em,
.weather-reading span,
.weather-reading small,
.care-row span,
.care-row p {
  color: #667086;
}

.home-portrait,
.notify-orb,
.johnson-card,
.bottom-nav,
.card,
.section-head,
.toolbar,
.modal,
.clock-card,
.weather-soft-panel,
.weather-current-card,
.care-panel,
.settings-person-row,
.backup-row {
  background:
    linear-gradient(145deg, rgba(255,255,255,.9), rgba(236,242,255,.78));
  border-color: rgba(255,255,255,.82);
}

.weather-showcase,
.home-priority-row,
.home-shortcut,
.home-task-row,
.home-event-row,
.home-person-card,
.home-evening-content div,
.home-stat-tile,
.home-alert-pill,
.native-day,
.agenda-row,
.list-row,
.grocery-row,
.recipe-card,
.meal-row,
.care-row,
.appointment-row,
.binder-row,
.support-row {
  background:
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(240,245,255,.66));
  border-color: rgba(255,255,255,.8);
  box-shadow:
    calc(var(--dynamic-shadow-x) * .72) calc(var(--dynamic-shadow-y) * .72) 24px rgba(111,124,168,.18),
    calc(var(--dynamic-lift-x) * .7) calc(var(--dynamic-lift-y) * .7) 19px rgba(255,255,255,.84),
    var(--neuro-edge);
}

.nav-item,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button,
.calendar-month-pill,
.calendar-today-pill,
.calendar-legend button,
.weather-refresh-button,
.care-tabs button,
.care-panel-head button,
.care-row button,
.home-card-head button,
.home-more-row,
.native-agenda-empty button,
.settings-person-row > button {
  color: #555f76;
  background:
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(234,240,255,.82));
  border-color: rgba(255,255,255,.82);
  box-shadow:
    calc(var(--dynamic-shadow-x) * .58) calc(var(--dynamic-shadow-y) * .58) 18px rgba(111,124,168,.2),
    calc(var(--dynamic-lift-x) * .62) calc(var(--dynamic-lift-y) * .62) 15px rgba(255,255,255,.92),
    var(--neuro-edge);
}

.nav-item.active,
.segmented button.active,
.care-tabs button.active,
.primary-button {
  color: #5f54dd;
  background:
    linear-gradient(145deg, rgba(245,247,255,.98), rgba(226,229,255,.9));
  box-shadow:
    calc(var(--dynamic-shadow-x) * .68) calc(var(--dynamic-shadow-y) * .68) 23px rgba(102,94,224,.24),
    calc(var(--dynamic-lift-x) * .7) calc(var(--dynamic-lift-y) * .7) 17px rgba(255,255,255,.96),
    var(--neuro-edge);
}

.hub-icon,
.task-check,
.person-avatar,
.event-date,
.home-priority-row .hub-icon,
.home-shortcut .hub-icon,
.home-stat-tile .hub-icon,
.home-alert-pill .hub-icon {
  color: #675cf0;
  background:
    linear-gradient(145deg, rgba(248,249,255,.98), rgba(222,227,255,.86));
  border-color: rgba(255,255,255,.82);
  box-shadow:
    calc(var(--dynamic-shadow-x) * .48) calc(var(--dynamic-shadow-y) * .5) 17px rgba(111,124,168,.22),
    calc(var(--dynamic-lift-x) * .5) calc(var(--dynamic-lift-y) * .5) 13px rgba(255,255,255,.92),
    var(--neuro-edge);
}

.home-priority-row:nth-child(1) .hub-icon,
.home-shortcut:nth-child(1) .hub-icon,
.nav-item[data-page="calendarPage"].active,
.nav-item[data-page="calendarPage"] .nav-icon {
  color: #5379ea;
}

.home-priority-row:nth-child(2) .hub-icon,
.home-shortcut:nth-child(2) .hub-icon,
.nav-item[data-page="mealsPage"] .nav-icon,
.nav-item[data-page="groceriesPage"] .nav-icon {
  color: #42b982;
}

.home-priority-row:nth-child(3) .hub-icon,
.home-shortcut:nth-child(4) .hub-icon,
.nav-item[data-page="choresPage"] .nav-icon,
.nav-item[data-page="chefPage"] .nav-icon {
  color: #f0a23a;
}

.home-shortcut:nth-child(3) .hub-icon,
.home-shortcut:nth-child(5) .hub-icon,
.home-shortcut:nth-child(6) .hub-icon,
.nav-item[data-page="listsPage"] .nav-icon,
.nav-item[data-page="carePage"] .nav-icon,
.nav-item[data-page="recipesPage"] .nav-icon {
  color: #7565f2;
}

.weather-reading strong,
.weather-stats b,
.event-date b,
.native-day-number {
  color: #232743;
}

.weather-stats,
.event-date small,
.home-more-row {
  color: #6a60e8;
}

.task-check {
  background:
    linear-gradient(145deg, rgba(235,240,253,.88), rgba(255,255,255,.92));
  box-shadow: inset 4px 4px 9px rgba(126,139,180,.22), inset -4px -4px 10px rgba(255,255,255,.94);
}

.task-check.done,
.task-check[aria-checked="true"] {
  background:
    linear-gradient(145deg, rgba(104,216,164,.96), rgba(62,184,126,.88));
  box-shadow: 5px 6px 12px rgba(69,166,118,.24), inset 1px 1px 0 rgba(255,255,255,.52);
}

input,
select,
textarea,
.chef-compose textarea,
.segmented,
.pill,
.weather-detail-pill,
.weather-hour-card,
.weather-day-row,
.symptom-picks span,
.inline-check span {
  background:
    linear-gradient(145deg, rgba(232,238,253,.88), rgba(250,252,255,.82));
  box-shadow: var(--neuro-inset), inset 1px 1px 0 rgba(255,255,255,.9);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(251,252,255,.94);
  box-shadow: inset 4px 4px 10px rgba(126,139,180,.18), inset -4px -4px 10px rgba(255,255,255,.96), 0 0 0 4px rgba(108,99,244,.14);
}

.weather-art {
  box-shadow: 9px 12px 24px rgba(111,124,168,.2), -7px -7px 16px rgba(255,255,255,.88), var(--neuro-edge);
}

.home-card-head button,
.mobile-card-head button,
.calendar-today-pill,
.weather-refresh-button {
  color: #6a60e8;
}

.person-avatar.photo-avatar {
  background:
    linear-gradient(145deg, rgba(248,249,255,.98), rgba(224,229,255,.86));
}

.home-task-row em {
  color: #5f54dd;
  background: rgba(228,231,255,.82);
}

.leaf-cluster span {
  background: linear-gradient(135deg, #9ca3ff, #6c63f4);
  box-shadow: 0 12px 22px rgba(108,99,244,.18);
}

.notify-orb {
  color: #7565f2;
}

.tasks-card .home-card-head .hub-icon {
  color: #f0a23a;
  background: linear-gradient(145deg, rgba(255,249,242,.98), rgba(255,230,197,.86));
}

.events-card .home-card-head .hub-icon {
  color: #6d72f6;
  background: linear-gradient(145deg, rgba(248,249,255,.98), rgba(224,229,255,.88));
}

/* v161 text-fit safety pass: let dense rows breathe instead of clipping copy. */
.home-task-row,
.home-event-row {
  height: auto;
  overflow: visible;
}

.home-task-row {
  min-height: 56px;
  grid-template-columns: 34px minmax(0, 1fr) minmax(58px, max-content) 44px;
}

.home-event-row {
  min-height: 70px;
}

.home-event-list,
.home-task-list {
  padding-bottom: 2px;
}

.home-task-row strong,
.home-event-row strong,
.home-task-row span,
.home-event-row em {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.home-task-row em {
  max-width: 104px;
  padding: 4px 10px;
  white-space: normal;
  text-align: center;
  line-height: 1.05;
}

.home-card-head h3,
.home-card-head button,
.home-stat-tile span,
.home-stat-tile strong,
.home-priority-row strong,
.home-priority-row em,
.home-shortcut span,
.nav-item span,
.primary-button,
.secondary-button,
.ghost-button,
.calendar-today-pill,
.weather-refresh-button,
.recipe-action,
.chef-action,
.modal button,
.toolbar button {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-stat-tile strong,
.home-priority-row strong,
.home-priority-row em,
.native-event-copy strong,
.native-event-copy em,
.task-row strong,
.task-row span,
.grocery-row strong,
.grocery-row span,
.meal-row strong,
.meal-row span,
.list-row strong,
.list-row span,
.recipe-card strong,
.recipe-card span,
.recipe-card p,
.care-row strong,
.care-row span,
.care-row p,
.agenda-row strong,
.agenda-row span,
.weather-day-row strong,
.weather-day-row span {
  overflow-wrap: anywhere;
}

.home-event-list {
  scroll-padding-bottom: 8px;
}

@media (max-width: 760px) {
  .home-task-row {
    grid-template-columns: 32px minmax(0, 1fr) 40px;
  }

  .home-task-row em {
    display: none;
  }

  .home-event-row,
  .home-event-row.no-assignee {
    grid-template-columns: 56px 10px minmax(0, 1fr);
  }
}

/* v161 iPhone companion app layer */
.mobile-quick-actions {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --nav-height: 82px;
  }

  .app-shell {
    background:
      radial-gradient(circle at 18% 0%, rgba(255,255,255,.72), transparent 34%),
      linear-gradient(145deg, #f3f6ff, #e4ebfb);
  }

  .page {
    padding-bottom: 178px;
    scroll-padding-bottom: 178px;
  }

  body[data-active-page="dashboardPage"] .app-topbar {
    display: none;
  }

  body[data-active-page="dashboardPage"] .page.active {
    padding: 0 0 124px;
    scroll-padding-bottom: 124px;
  }

  .mobile-companion-home {
    min-height: 100%;
    display: grid;
    gap: 12px;
    padding: 10px 0 0;
  }

  .mobile-companion-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 4px 4px 2px;
  }

  .mobile-companion-hero p,
  .mobile-companion-hero span {
    margin: 0;
    color: #667086;
    font-size: 14px;
    font-weight: 650;
  }

  .mobile-companion-hero h2 {
    margin: 4px 0 5px;
    color: #20243b;
    font-size: 28px;
    line-height: 1.02;
    font-weight: 760;
  }

  .mobile-weather-pill {
    min-width: 88px;
    min-height: 68px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 28px;
    color: #252a45;
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(229,235,255,.78));
    border: 1px solid rgba(255,255,255,.82);
    box-shadow:
      12px 14px 28px rgba(111,124,168,.22),
      -8px -8px 20px rgba(255,255,255,.9),
      var(--neuro-edge);
  }

  .mobile-weather-pill strong {
    font-size: 25px;
    line-height: 1;
  }

  .mobile-weather-pill span {
    max-width: 76px;
    text-align: center;
    font-size: 11px;
    line-height: 1.12;
  }

  .mobile-quick-panel,
  .mobile-status-grid,
  .mobile-feed-card {
    border: 1px solid rgba(255,255,255,.82);
    background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(235,241,255,.66));
    box-shadow:
      14px 18px 36px rgba(111,124,168,.18),
      -8px -8px 22px rgba(255,255,255,.82),
      var(--neuro-edge);
    backdrop-filter: blur(18px) saturate(1.1);
  }

  .mobile-quick-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
    border-radius: 30px;
  }

  .mobile-quick-panel button {
    min-height: 64px;
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 7px 4px;
    border-radius: 24px;
    color: #252a45;
    background: linear-gradient(145deg, rgba(250,252,255,.96), rgba(224,230,255,.78));
    border: 1px solid rgba(255,255,255,.8);
    box-shadow:
      8px 10px 18px rgba(111,124,168,.18),
      -5px -5px 13px rgba(255,255,255,.86),
      var(--neuro-edge);
  }

  .mobile-quick-panel .hub-icon {
    width: 34px;
    height: 34px;
    border-radius: 14px;
  }

  .mobile-quick-panel span,
  .mobile-quick-actions span {
    font-size: 11px;
    font-weight: 740;
    line-height: 1;
  }

  .mobile-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border-radius: 30px;
  }

  .mobile-status-card {
    min-height: 118px;
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 5px;
    padding: 12px;
    text-align: left;
    border-radius: 24px;
    color: #252a45;
    background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(229,235,255,.72));
    border: 1px solid rgba(255,255,255,.78);
    box-shadow:
      8px 10px 20px rgba(111,124,168,.17),
      -5px -5px 14px rgba(255,255,255,.84),
      var(--neuro-edge);
  }

  .mobile-status-card .hub-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
  }

  .mobile-status-card small {
    color: #6f7890;
    font-size: 11px;
    font-weight: 760;
    text-transform: uppercase;
    letter-spacing: 0;
  }

  .mobile-status-card strong {
    color: #20243b;
    font-size: 17px;
    line-height: 1.08;
  }

  .mobile-status-card span {
    color: #667086;
    font-size: 12px;
    font-weight: 620;
    line-height: 1.22;
  }

  .mobile-feed-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 30px;
  }

  .mobile-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-card-head h3 {
    margin: 0;
    color: #20243b;
    font-size: 20px;
  }

  .mobile-card-head button {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #6a60e8;
    font-weight: 740;
    background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(232,237,255,.74));
    box-shadow: 6px 7px 14px rgba(111,124,168,.14), -4px -4px 10px rgba(255,255,255,.82), var(--neuro-edge);
  }

  .mobile-feed-list {
    display: grid;
    gap: 9px;
  }

  .mobile-feed-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    text-align: left;
    border-radius: 22px;
    color: #252a45;
    background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(230,236,255,.68));
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: 7px 8px 16px rgba(111,124,168,.14), -4px -4px 12px rgba(255,255,255,.8), var(--neuro-edge);
  }

  .mobile-feed-row .hub-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
  }

  .mobile-feed-row span {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .mobile-feed-row strong {
    color: #20243b;
    font-size: 15px;
    line-height: 1.15;
  }

  .mobile-feed-row em {
    color: #667086;
    font-style: normal;
    font-size: 12px;
    font-weight: 620;
    line-height: 1.18;
  }

  .mobile-calendar-companion {
    min-height: 100%;
    display: grid;
    align-content: start;
    gap: 13px;
    padding: 8px 0 0;
  }

  .mobile-page-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px 0;
  }

  .mobile-page-hero p {
    margin: 0;
    color: #667086;
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-page-hero h2 {
    margin: 4px 0 0;
    color: #20243b;
    font-size: 30px;
    line-height: 1;
  }

  .mobile-page-hero .primary-button {
    min-height: 48px;
    padding-inline: 16px;
    border-radius: 20px;
  }

  .mobile-date-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 68px;
    gap: 9px;
    overflow-x: auto;
    padding: 4px 4px 12px;
    scrollbar-width: none;
  }

  .mobile-date-strip::-webkit-scrollbar {
    display: none;
  }

  .mobile-date-strip button {
    position: relative;
    min-height: 82px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 5px;
    border-radius: 24px;
    color: #252a45;
    background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(229,235,255,.72));
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: 8px 10px 18px rgba(111,124,168,.16), -5px -5px 14px rgba(255,255,255,.82), var(--neuro-edge);
  }

  .mobile-date-strip button.active {
    color: #645bf1;
    background: linear-gradient(145deg, rgba(247,248,255,.98), rgba(221,225,255,.86));
  }

  .mobile-date-strip button.today::after {
    content: "";
    position: absolute;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6c63f4;
  }

  .mobile-date-strip span {
    color: #778096;
    font-size: 11px;
    font-weight: 760;
    text-transform: uppercase;
  }

  .mobile-date-strip strong {
    font-size: 24px;
    line-height: 1;
  }

  .mobile-date-strip em {
    min-width: 22px;
    min-height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    color: #fff;
    background: #6c63f4;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-quick-actions {
    position: fixed;
    z-index: 80;
    left: max(18px, env(safe-area-inset-left));
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(92px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(229,235,255,.8));
    border: 1px solid rgba(255,255,255,.86);
    box-shadow:
      12px 16px 32px rgba(111,124,168,.24),
      -7px -7px 20px rgba(255,255,255,.82),
      var(--neuro-edge);
    backdrop-filter: blur(20px) saturate(1.12);
  }

  body[data-active-page="dashboardPage"] .mobile-quick-actions {
    display: none;
  }

  .mobile-quick-actions button {
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: 4px;
    border-radius: 20px;
    color: #252a45;
    background: linear-gradient(145deg, rgba(250,252,255,.94), rgba(224,230,255,.78));
    box-shadow: 6px 8px 15px rgba(111,124,168,.16), -4px -4px 11px rgba(255,255,255,.84), var(--neuro-edge);
  }

  .mobile-quick-actions .nav-icon {
    width: 19px;
    height: 19px;
    color: #7565f2;
  }

  .bottom-nav {
    position: fixed;
    z-index: 75;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    grid-auto-columns: 72px;
    height: 76px;
    min-height: 76px;
  }

  .nav-item {
    height: 58px;
    border-radius: 22px;
  }

  .modal {
    max-height: calc(100dvh - 22px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
  }
}

/* v161 unified responsive foundation for arbitrary browser sizes */
@media (min-width: 761px) {
  :root {
    --nav-height: clamp(82px, 10vh, 104px);
  }

  html,
  body {
    overflow: hidden;
  }

  .app-shell {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: clamp(12px, 1.35vw, 24px) clamp(14px, 2vw, 34px) clamp(12px, 1.35vw, 22px) !important;
    display: grid;
    grid-template-rows: minmax(0, 1fr) var(--nav-height) !important;
    gap: clamp(8px, 1vw, 14px);
    border-radius: 0 !important;
  }

  .app-main {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(8px, 1vw, 12px);
    padding: 0 0 clamp(10px, 1.2vh, 18px) !important;
    overflow: hidden;
  }

  body[data-active-page="dashboardPage"] .app-main {
    grid-template-rows: minmax(0, 1fr);
  }

  body[data-active-page="dashboardPage"] .app-topbar {
    display: none;
  }

  .app-topbar,
  body:not([data-active-page="dashboardPage"]) .app-topbar,
  body[data-active-page="weatherPage"] .app-topbar {
    height: clamp(62px, 8.5vh, 92px) !important;
    min-height: 0;
    margin: 0 !important;
    padding: 0 clamp(4px, 1vw, 18px) !important;
  }

  .page,
  .page.active,
  body:not([data-active-page="dashboardPage"]) .page.active,
  body[data-active-page="weatherPage"] .page.active,
  body[data-active-page="calendarPage"] .page.active {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    padding: 0 clamp(0px, .55vw, 12px) clamp(18px, 2vh, 30px) !important;
    overscroll-behavior: contain;
  }

  .bottom-nav {
    align-self: stretch;
    height: auto !important;
    min-height: 0 !important;
    max-height: var(--nav-height);
    margin: 0 !important;
    padding: clamp(7px, .75vw, 10px) clamp(8px, .9vw, 14px) !important;
    border-radius: clamp(24px, 2.6vw, 34px) !important;
    box-shadow:
      7px 9px 20px rgba(111,124,168,.16),
      -5px -5px 16px rgba(255,255,255,.78),
      var(--neuro-edge) !important;
  }

  .nav-item {
    height: auto;
    min-height: 58px;
    max-height: 78px;
  }

  .chores-board,
  .grocery-columns,
  .lists-board {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)) !important;
  }

  .meals-week-grid,
  .recipe-results-grid,
  .recipe-library-grid,
  .care-overview-grid,
  .assistant-grid,
  .growth-grid,
  .support-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
  }

  .care-overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)) !important;
  }

  .care-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 126px), 1fr)) !important;
  }

  .care-metric,
  .care-panel-head h3,
  .care-hero h2,
  .care-stat,
  .care-stat span,
  .care-stat strong,
  .care-stat em,
  .care-tabs button,
  .care-tabs button span {
    min-width: 0;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
  }

  .care-panel-head h3,
  .care-hero h2 {
    line-height: 1.08;
  }

  .form-grid.two,
  .form-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .section-head {
    flex-wrap: wrap;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .toolbar input,
  .toolbar select,
  .toolbar textarea {
    min-width: min(100%, 220px);
  }

  body[data-active-page="weatherPage"] .weather-page-shell {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-active-page="weatherPage"] .weather-layout {
    min-height: 0;
    overflow: visible !important;
  }

  .weather-day-card span,
  .weather-day-card div span,
  .weather-day-row span,
  .weather-hour-card span,
  .weather-hour-card time,
  .weather-panel-head p,
  .weather-ten-day-list span,
  .weather-ten-day-list em,
  .weather-ten-day-list strong {
    white-space: normal;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
  }

  .care-shell,
  .native-calendar-shell {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }
}

@media (min-width: 761px) and (max-width: 1099px) {
  .bottom-nav {
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(78px, 1fr) !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item span {
    font-size: 11px;
  }

  .home-shortcuts-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
  }
}

@media (min-width: 1100px) {
  .bottom-nav {
    grid-auto-flow: unset !important;
    grid-auto-columns: unset !important;
    grid-template-columns: repeat(11, minmax(0, 1fr)) !important;
    overflow: visible !important;
  }
}

@media (min-width: 761px) and (max-width: 1279px), (max-height: 760px) and (min-width: 761px) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  body[data-active-page="dashboardPage"] .home-main-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-active-page="dashboardPage"] .home-left,
  body[data-active-page="dashboardPage"] .home-right {
    grid-template-rows: auto !important;
  }

  .home-priority-list,
  .home-shortcuts-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  }

  .home-priority-row {
    height: auto;
    align-items: start;
  }

  .home-priority-row strong,
  .home-priority-row em {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
  }

  .home-priority-row {
    min-height: 88px;
  }

  .home-shortcuts-card {
    display: none !important;
  }

  .weather-layout {
    grid-template-columns: 1fr !important;
  }

  .weather-current-card,
  .weather-soft-panel {
    min-height: 0;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 4px clamp(8px, 1.4vw, 18px) 18px !important;
  }

  body[data-active-page="dashboardPage"] .johnson-hero {
    grid-template-columns: 84px minmax(0, 1fr) 64px;
    gap: 16px;
  }

  body[data-active-page="dashboardPage"] .home-portrait {
    width: 78px;
    height: 78px;
  }

  body[data-active-page="dashboardPage"] .house-art {
    width: 58px;
    height: 58px;
  }

  body[data-active-page="dashboardPage"] .notify-orb {
    width: 62px;
    height: 62px;
  }

  body[data-active-page="dashboardPage"] .johnson-hero h2 {
    font-size: clamp(36px, 4.2vw, 54px);
  }

  body[data-active-page="dashboardPage"] .johnson-hero p,
  body[data-active-page="dashboardPage"] .johnson-hero span {
    font-size: 14px;
  }

  body[data-active-page="dashboardPage"] .home-main-grid {
    grid-template-columns: minmax(360px, .86fr) minmax(460px, 1.14fr) !important;
    gap: 14px;
  }

  body[data-active-page="dashboardPage"] .home-left,
  body[data-active-page="dashboardPage"] .home-right {
    gap: 12px;
  }

  body[data-active-page="dashboardPage"] .home-left {
    grid-template-rows: 122px minmax(0, auto) !important;
  }

  body[data-active-page="dashboardPage"] .weather-showcase {
    min-height: 0;
    grid-template-columns: 112px minmax(0, 1fr) 1px 116px;
    padding: 12px 20px;
  }

  body[data-active-page="dashboardPage"] .weather-art {
    width: 90px;
    height: 74px;
    border-radius: 22px;
  }

  body[data-active-page="dashboardPage"] .weather-reading strong {
    font-size: 42px;
  }

  body[data-active-page="dashboardPage"] .weather-reading span,
  body[data-active-page="dashboardPage"] .weather-reading small {
    font-size: 13px;
    margin-top: 4px;
  }

  body[data-active-page="dashboardPage"] .home-priority-card {
    min-height: 0;
    grid-template-rows: 42px auto;
    padding: 12px;
  }

  body[data-active-page="dashboardPage"] .home-priority-list {
    gap: 6px;
  }

  body[data-active-page="dashboardPage"] .home-priority-row {
    min-height: 54px;
    padding: 6px 10px;
  }

  body[data-active-page="dashboardPage"] .home-priority-row .hub-icon {
    width: 36px;
    height: 36px;
  }

  body[data-active-page="dashboardPage"] .home-priority-row strong {
    font-size: 15px;
  }

  body[data-active-page="dashboardPage"] .home-priority-row em {
    font-size: 12px;
  }
}

@media (min-width: 1440px) and (min-height: 820px) {
  body[data-active-page="dashboardPage"] .home-main-grid {
    grid-template-columns: minmax(420px, .92fr) minmax(560px, 1.08fr);
  }
}

@media (min-width: 761px) and (max-height: 820px) {
  body[data-active-page="calendarPage"] .page.active {
    overflow: auto !important;
    padding-bottom: 18px !important;
  }

  body[data-active-page="calendarPage"] .native-calendar-shell {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
    padding-bottom: 18px !important;
  }

  body[data-active-page="calendarPage"] .calendar-stage {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
    gap: clamp(14px, 1.6vw, 22px) !important;
    padding-bottom: 18px !important;
  }

  body[data-active-page="calendarPage"] .calendar-month-panel {
    align-self: start;
    height: auto !important;
    min-height: 0 !important;
    padding: 18px 20px 12px !important;
    grid-template-rows: auto auto auto !important;
  }

  body[data-active-page="calendarPage"] .calendar-controls {
    grid-template-columns: 44px minmax(190px, 270px) 44px minmax(0, 1fr) minmax(116px, 142px) !important;
    gap: 12px !important;
  }

  body[data-active-page="calendarPage"] .calendar-step,
  body[data-active-page="calendarPage"] .calendar-month-pill,
  body[data-active-page="calendarPage"] .calendar-today-pill,
  body[data-active-page="calendarPage"] .calendar-legend button {
    min-height: 44px !important;
  }

  body[data-active-page="calendarPage"] .native-month-grid {
    grid-template-rows: 30px repeat(6, clamp(46px, 7vh, 62px)) !important;
    padding-top: 6px !important;
  }

  body[data-active-page="calendarPage"] .native-day {
    gap: 3px !important;
  }

  body[data-active-page="calendarPage"] .native-day-number {
    width: clamp(34px, 4.4vh, 44px) !important;
    height: clamp(34px, 4.4vh, 44px) !important;
    border-radius: 14px !important;
    font-size: clamp(17px, 2.5vh, 22px) !important;
  }

  body[data-active-page="calendarPage"] .native-day-dots {
    min-height: 8px !important;
  }

  body[data-active-page="calendarPage"] .calendar-legend {
    padding-top: 6px !important;
  }

  body[data-active-page="calendarPage"] .calendar-key-groups {
    gap: 6px !important;
    padding: 7px 12px !important;
  }

  body[data-active-page="calendarPage"] .calendar-agenda-panel {
    min-height: clamp(420px, 76vh, 620px) !important;
  }

  body[data-active-page="calendarPage"] .native-agenda-event {
    grid-template-columns: 52px minmax(96px, max-content) minmax(0, 1fr) 40px 12px !important;
  }

  body[data-active-page="calendarPage"] .native-agenda-event.no-assignee {
    grid-template-columns: 52px minmax(96px, max-content) minmax(0, 1fr) 12px !important;
  }

  body[data-active-page="calendarPage"] .native-event-time strong,
  body[data-active-page="calendarPage"] .native-event-time em,
  body[data-active-page="calendarPage"] .native-event-copy strong,
  body[data-active-page="calendarPage"] .native-event-copy em {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    line-height: 1.12;
  }
}

/* v161 production publish hardening */
@media (max-width: 760px) {
  .page {
    padding-bottom: 150px !important;
    scroll-padding-bottom: 150px !important;
  }

  body:is(
    [data-active-page="calendarPage"],
    [data-active-page="choresPage"],
    [data-active-page="mealsPage"],
    [data-active-page="groceriesPage"],
    [data-active-page="listsPage"]
  ) .page.active {
    padding-bottom: 150px !important;
    scroll-padding-bottom: 150px !important;
  }

  body[data-active-page="dashboardPage"] .page.active {
    padding-bottom: 124px !important;
    scroll-padding-bottom: 124px !important;
  }

  body:is(
    [data-active-page="dashboardPage"],
    [data-active-page="weatherPage"],
    [data-active-page="recipesPage"],
    [data-active-page="chefPage"],
    [data-active-page="carePage"],
    [data-active-page="adminPage"]
  ) .mobile-quick-actions {
    display: none !important;
  }

  body:is(
    [data-active-page="calendarPage"],
    [data-active-page="choresPage"],
    [data-active-page="mealsPage"],
    [data-active-page="groceriesPage"],
    [data-active-page="listsPage"]
  ) .mobile-quick-actions {
    display: none !important;
  }

  .mobile-card-head button,
  .home-card-head button,
  .home-more-row,
  .care-panel-head button,
  .care-row button,
  .weather-refresh-button,
  .calendar-today-pill,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    min-height: 44px !important;
  }

  .admin-card,
  .weather-current-card,
  .weather-soft-panel,
  .care-panel {
    scroll-margin-bottom: 170px;
  }

  body[data-active-page="adminPage"] .admin-card {
    padding: 14px !important;
  }

  body[data-active-page="adminPage"] .section-head {
    gap: 10px !important;
  }

  body[data-active-page="adminPage"] .toolbar.wrap {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body[data-active-page="adminPage"] .toolbar.wrap button {
    width: 100%;
    padding-inline: 10px !important;
  }

  body[data-active-page="adminPage"] #weatherLocationForm {
    gap: 10px !important;
  }

  body[data-active-page="adminPage"] #weatherLocationForm .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body[data-active-page="adminPage"] #weatherLocationForm input {
    min-height: 44px !important;
  }

  body[data-active-page="adminPage"] #weatherLocationForm .actions {
    margin-top: 2px !important;
  }
}

@media (min-width: 761px) {
  .home-card-head button,
  .home-more-row,
  .care-panel-head button,
  .care-row button,
  .native-agenda-empty button,
  .weather-refresh-button {
    min-height: 44px !important;
    padding-inline: 16px !important;
  }
}

@media (min-width: 860px) and (max-width: 1099px) {
  .bottom-nav {
    grid-auto-flow: unset !important;
    grid-auto-columns: unset !important;
    grid-template-columns: repeat(11, minmax(0, 1fr)) !important;
    gap: 5px !important;
    overflow: visible !important;
  }

  .nav-item span {
    font-size: 10px !important;
  }
}

@media (min-width: 761px) and (max-width: 1099px) {
  body[data-active-page="calendarPage"] .page.active {
    overflow: auto !important;
  }

  body[data-active-page="calendarPage"] .native-calendar-shell {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
  }

  body[data-active-page="calendarPage"] .calendar-stage {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(380px, auto) !important;
    overflow: visible !important;
    gap: 18px !important;
    padding-bottom: 20px !important;
  }

  body[data-active-page="calendarPage"] .calendar-month-panel {
    width: 100% !important;
    max-width: none !important;
  }

  body[data-active-page="calendarPage"] .calendar-controls {
    grid-template-columns: 44px minmax(190px, 1fr) 44px minmax(118px, auto) !important;
  }

  body[data-active-page="calendarPage"] .calendar-controls > span {
    display: none !important;
  }

  body[data-active-page="calendarPage"] .calendar-today-pill {
    min-width: 116px !important;
    white-space: nowrap !important;
  }

  body[data-active-page="calendarPage"] .calendar-key-row {
    flex-wrap: wrap !important;
    overflow: visible !important;
    gap: 6px 12px !important;
  }

  body[data-active-page="calendarPage"] .calendar-key-row span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body[data-active-page="calendarPage"] .calendar-agenda-panel {
    min-height: 420px !important;
  }
}

@media (min-width: 761px) and (max-width: 930px) {
  body[data-active-page="calendarPage"] .native-month-grid {
    grid-template-rows: 30px repeat(6, 50px) !important;
  }

  body[data-active-page="calendarPage"] .calendar-legend {
    grid-template-columns: 1fr !important;
  }
}

/* v161 account gate, onboarding, and help system */
body.auth-locked {
  min-height: 100svh;
  overflow: hidden;
}

body.auth-locked .app-shell,
body.auth-locked .bottom-nav,
body.auth-locked .mobile-quick-actions {
  display: none !important;
}

.auth-gate {
  position: fixed;
  inset: 0;
  width: 100svw;
  max-width: 100svw;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 18% 14%, rgba(255,255,255,.95), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(182,196,236,.36), transparent 34%),
    linear-gradient(145deg, #edf2fb 0%, #f5f7fc 44%, #e8eef8 100%);
  color: #20273a;
  overflow: auto;
}

.auth-gate *,
.auth-gate *::before,
.auth-gate *::after {
  min-width: 0;
}

.auth-gate::before,
.auth-gate::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
}

.auth-gate::before {
  width: min(46vw, 420px);
  aspect-ratio: 1;
  left: -120px;
  top: 8%;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(219,228,248,.28) 58%, transparent 70%);
  box-shadow: 28px 28px 70px rgba(154,166,194,.32);
}

.auth-gate::after {
  width: min(42vw, 380px);
  aspect-ratio: 1;
  right: -110px;
  bottom: 4%;
  background: radial-gradient(circle, rgba(208,218,246,.42), transparent 68%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-width: calc(100vw - 36px);
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  border-radius: clamp(28px, 5vw, 42px);
  background: linear-gradient(145deg, rgba(250,252,255,.94), rgba(229,236,249,.9));
  border: 1px solid rgba(255,255,255,.86);
  box-shadow:
    24px 24px 56px rgba(154,166,194,.36),
    -18px -18px 42px rgba(255,255,255,.94),
    inset 1px 1px 0 rgba(255,255,255,.9);
}

.auth-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.auth-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #6c6cf0;
  background: linear-gradient(145deg, #f9fbff, #dfe7f6);
  box-shadow:
    12px 12px 24px rgba(154,166,194,.34),
    -10px -10px 22px rgba(255,255,255,.96);
}

.auth-mark .nav-icon {
  width: 30px;
  height: 30px;
}

.auth-mark.brand-mark {
  overflow: hidden;
  background: linear-gradient(145deg, #f8f4eb, #e1e8f4);
}

.auth-mark.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(2px 4px 5px rgba(92, 90, 72, .22));
}

.auth-brand-lockup {
  display: grid;
  justify-items: center;
  margin: -8px auto 18px;
  color: #8b8b68;
}

.auth-brand-lockup img {
  width: clamp(190px, 48vw, 275px);
  height: auto;
  filter: drop-shadow(10px 14px 18px rgba(124, 133, 104, .18));
}

.auth-card h1 {
  max-width: 100%;
  margin: 6px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.auth-card .muted {
  max-width: 100%;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  overflow-wrap: anywhere;
}

.auth-message {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 20px;
  color: #5f372f;
  background: rgba(255,238,232,.82);
  box-shadow: inset 4px 4px 9px rgba(158,109,96,.13), inset -4px -4px 9px rgba(255,255,255,.8);
  font-weight: 800;
  overflow-wrap: anywhere;
  white-space: normal;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #515b72;
  font-size: .9rem;
  font-weight: 900;
}

.auth-form input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  padding: 0 16px;
  color: #20273a;
  background: #eef3fb;
  box-shadow:
    inset 7px 7px 14px rgba(154,166,194,.25),
    inset -7px -7px 14px rgba(255,255,255,.95);
  font: inherit;
}

.auth-form input:focus {
  outline: 3px solid rgba(108,108,240,.18);
}

.auth-submit {
  width: 100%;
  margin-top: 6px;
  min-height: 58px;
}

.auth-switch {
  width: 100%;
  margin-top: 12px;
  white-space: normal;
}

.auth-link-button {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  color: #6763df;
  background: transparent;
  box-shadow: none;
}

.secondary-button.compact {
  min-height: 42px;
  padding: 9px 14px;
}

.wide-modal {
  width: min(920px, calc(100vw - 28px));
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 18px;
}

.onboarding-grid article,
.help-sections section,
.setting-pill {
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(250,252,255,.8), rgba(230,236,246,.74));
  box-shadow:
    10px 10px 24px rgba(116,132,164,.18),
    -8px -8px 20px rgba(255,255,255,.84),
    inset 1px 1px 0 rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.72);
}

.onboarding-grid article {
  padding: 18px;
}

.onboarding-grid span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 12px;
  color: #5f63d9;
  background: #edf2fb;
  box-shadow: 7px 7px 15px rgba(116,132,164,.2), -6px -6px 14px rgba(255,255,255,.9);
  font-weight: 950;
}

.onboarding-grid h3,
.help-sections h3 {
  margin: 0 0 6px;
  letter-spacing: 0;
}

.help-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.help-sections section {
  padding: 18px;
}

.settings-grid.compact-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.brand-admin-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.brand-admin-card img {
  width: clamp(92px, 12vw, 150px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(8px 10px 14px rgba(124, 133, 104, .16));
}

.brand-admin-card h3 {
  margin: 0 0 4px;
}

.homeweave-story p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.homeweave-story p:last-child {
  margin-bottom: 0;
}

.setting-pill {
  display: grid;
  gap: 3px;
  padding: 14px;
  min-width: 0;
}

.setting-pill strong {
  color: #20273a;
  overflow-wrap: anywhere;
}

.setting-pill span {
  color: rgba(43,52,74,.68);
  font-size: .82rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .auth-gate {
    align-items: stretch;
    place-items: stretch;
  }

  .auth-card {
    align-self: center;
    width: 100%;
    max-width: 100%;
    padding: 24px;
    border-radius: 30px;
  }

  .auth-card h1 {
    font-size: 2.08rem;
  }

  .auth-brand-lockup {
    margin-top: -4px;
  }

  .brand-admin-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .auth-form .form-grid.two,
  .onboarding-grid,
  .help-sections,
  .settings-grid.compact-settings {
    grid-template-columns: 1fr;
  }
}

/* v161 maximized desktop calendar guard */
@media (min-width: 1100px) and (orientation: landscape) {
  body[data-active-page="calendarPage"] .page.active {
    height: min(900px, calc(100dvh - var(--nav-height) - 100px - env(safe-area-inset-top))) !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }

  body[data-active-page="calendarPage"] .native-calendar-shell {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding: 0 clamp(18px, 2.2vw, 30px) 12px !important;
    overflow: hidden !important;
  }

  body[data-active-page="calendarPage"] .calendar-stage {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    grid-template-columns: minmax(520px, 1.05fr) minmax(430px, .95fr) !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  body[data-active-page="calendarPage"] .calendar-month-panel {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: clamp(16px, 1.8vh, 22px) clamp(18px, 1.8vw, 24px) 12px !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }

  body[data-active-page="calendarPage"] .calendar-controls {
    grid-template-columns: 44px minmax(210px, 270px) 44px minmax(0, 1fr) minmax(120px, 148px) !important;
    gap: clamp(10px, 1.2vw, 16px) !important;
  }

  body[data-active-page="calendarPage"] .calendar-month-pill,
  body[data-active-page="calendarPage"] .calendar-today-pill,
  body[data-active-page="calendarPage"] .calendar-step,
  body[data-active-page="calendarPage"] .calendar-legend button {
    min-height: clamp(42px, 4.9vh, 48px) !important;
  }

  body[data-active-page="calendarPage"] .native-month-grid {
    grid-template-rows: clamp(28px, 3.5vh, 38px) repeat(6, minmax(0, 1fr)) !important;
    padding-top: clamp(3px, .8vh, 8px) !important;
  }

  body[data-active-page="calendarPage"] .native-day {
    gap: clamp(2px, .7vh, 6px) !important;
  }

  body[data-active-page="calendarPage"] .native-day-number {
    width: clamp(34px, 5.8vh, 52px) !important;
    height: clamp(34px, 5.8vh, 52px) !important;
    border-radius: clamp(12px, 1.8vh, 18px) !important;
    font-size: clamp(17px, 2.6vh, 23px) !important;
  }

  body[data-active-page="calendarPage"] .native-day-dots {
    min-height: clamp(8px, 1.6vh, 14px) !important;
  }

  body[data-active-page="calendarPage"] .calendar-legend {
    padding-top: clamp(4px, .9vh, 10px) !important;
  }

  body[data-active-page="calendarPage"] .calendar-key-groups {
    gap: clamp(5px, .8vh, 9px) !important;
    padding-block: clamp(6px, .9vh, 8px) !important;
  }

  body[data-active-page="calendarPage"] .calendar-agenda-panel {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
}

/* v172 Homeweave logo-matched neomorphic theme */
:root {
  --bg: #f2eadc;
  --panel: rgba(250, 242, 226, .9);
  --panel-2: rgba(236, 226, 206, .78);
  --ink: #3a382f;
  --muted: #7c765f;
  --line: rgba(255, 249, 235, .78);
  --line-strong: rgba(139, 143, 105, .38);
  --primary: #8b8f68;
  --primary-2: #ece6cf;
  --blue: #86a69a;
  --amber: #d9a650;
  --red: #d6805f;
  --sage: #8b8f68;
  --sage-deep: #6d7356;
  --coral: #d6805f;
  --gold: #d9a650;
  --soft-paper: #f4ecde;
  --cream-light: rgba(255, 250, 239, .98);
  --cream-mid: rgba(237, 226, 207, .92);
  --warm-shadow: rgba(146, 128, 94, .28);
  --cool-shadow: rgba(107, 120, 107, .18);
  --neuro-bg: #f2eadc;
  --neuro-highlight: rgba(255, 250, 239, .96);
  --neuro-lowlight: rgba(142, 126, 92, .28);
  --dynamic-shadow-color: rgba(143, 128, 95, .28);
  --dynamic-highlight-color: rgba(255, 250, 239, .95);
  --neuro-shadow-sm: 7px 8px 16px rgba(143, 128, 95, .22), -6px -6px 14px rgba(255, 250, 239, .9);
  --neuro-shadow: 14px 17px 34px rgba(143, 128, 95, .27), -11px -11px 27px rgba(255, 250, 239, .94);
  --neuro-shadow-strong: 24px 30px 62px rgba(128, 112, 82, .36), -18px -18px 42px rgba(255, 250, 239, .96);
  --neuro-inset: inset 5px 5px 12px rgba(145, 128, 94, .22), inset -6px -6px 14px rgba(255, 250, 239, .88);
  --neuro-edge: inset 1px 1px 0 rgba(255, 252, 244, .94), inset -1px -1px 0 rgba(135, 118, 83, .14);
  --shadow: 14px 18px 38px rgba(143, 128, 95, .22), -10px -10px 26px rgba(255, 250, 239, .82), var(--neuro-edge);
  --shadow-strong: 24px 30px 68px rgba(128, 112, 82, .32), -18px -18px 40px rgba(255, 250, 239, .9), var(--neuro-edge);
}

html,
body {
  background:
    radial-gradient(circle at 18% 5%, rgba(255, 253, 246, .96), transparent 28%),
    radial-gradient(circle at 76% 12%, rgba(231, 214, 178, .42), transparent 32%),
    radial-gradient(circle at 12% 88%, rgba(139, 166, 154, .18), transparent 36%),
    linear-gradient(145deg, #f9f1e4 0%, #f2eadc 48%, #e6dcc8 100%) !important;
  color: var(--ink);
}

.app-shell,
.auth-gate {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 253, 246, .96), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(228, 206, 159, .34), transparent 34%),
    radial-gradient(circle at 82% 82%, rgba(134, 166, 154, .20), transparent 38%),
    linear-gradient(145deg, #f8f0e2 0%, #f2eadc 52%, #e6dcc9 100%) !important;
}

.app-shell::before,
.auth-gate::before {
  background:
    radial-gradient(circle at var(--light-x, 18%) var(--light-y, 12%), rgba(255, 253, 246, .58), transparent 38%),
    linear-gradient(130deg, rgba(255, 255, 255, .18), transparent 46%) !important;
  mix-blend-mode: soft-light;
}

.app-shell::after {
  background-image: radial-gradient(rgba(89, 78, 55, .18) .55px, transparent .55px) !important;
  opacity: .045 !important;
}

h1,
h2,
h3,
.johnson-hero h2,
.home-card-head h3,
.home-priority-row strong,
.home-shortcut span,
.home-task-row strong,
.home-event-row strong,
.native-event-copy strong,
.task-row strong,
.grocery-row strong,
.meal-row strong,
.list-row strong,
.recipe-card strong,
.care-row strong,
.calendar-month-pill b,
.native-day-number,
.weather-reading strong,
.weather-current-temp,
.card-title h3 {
  color: #3a382f !important;
  text-shadow: 0 1px 0 rgba(255, 252, 244, .55);
}

.muted,
.eyebrow,
.johnson-hero p,
.johnson-hero span,
.home-priority-row small,
.home-priority-row em,
.home-task-row span,
.home-event-row em,
.weather-reading span,
.weather-reading small,
.care-row span,
.care-row p,
.setting-pill span {
  color: #7c765f !important;
}

.home-portrait,
.notify-orb,
.johnson-card,
.bottom-nav,
.card,
.section-head,
.toolbar,
.modal,
.clock-card,
.weather-soft-panel,
.weather-current-card,
.care-panel,
.settings-person-row,
.backup-row,
.auth-card,
.onboarding-grid article,
.help-sections section,
.setting-pill {
  background:
    linear-gradient(145deg, rgba(255, 249, 237, .92), rgba(234, 224, 204, .82)) !important;
  border: 1px solid rgba(255, 252, 244, .82) !important;
  box-shadow:
    var(--dynamic-shadow-x, 15px) var(--dynamic-shadow-y, 18px) 38px rgba(143, 128, 95, .25),
    var(--dynamic-lift-x, -10px) var(--dynamic-lift-y, -10px) 28px rgba(255, 252, 244, .9),
    var(--neuro-edge) !important;
}

.johnson-card,
.card,
.weather-current-card,
.weather-soft-panel,
.care-panel,
.modal,
.auth-card {
  border-radius: 30px;
}

.weather-showcase,
.home-priority-row,
.home-shortcut,
.home-task-row,
.home-event-row,
.home-person-card,
.home-evening-content div,
.home-stat-tile,
.home-alert-pill,
.native-day,
.agenda-row,
.list-row,
.grocery-row,
.recipe-card,
.meal-row,
.care-row,
.appointment-row,
.binder-row,
.support-row,
.weather-detail-pill,
.weather-hour-card,
.weather-day-row {
  background:
    linear-gradient(145deg, rgba(255, 249, 237, .84), rgba(234, 224, 204, .66)) !important;
  border: 1px solid rgba(255, 252, 244, .78) !important;
  box-shadow:
    calc(var(--dynamic-shadow-x, 15px) * .7) calc(var(--dynamic-shadow-y, 18px) * .7) 25px rgba(143, 128, 95, .19),
    calc(var(--dynamic-lift-x, -10px) * .68) calc(var(--dynamic-lift-y, -10px) * .68) 19px rgba(255, 252, 244, .84),
    var(--neuro-edge) !important;
}

.bottom-nav {
  background:
    linear-gradient(145deg, rgba(255, 250, 240, .96), rgba(234, 224, 204, .88)) !important;
  box-shadow:
    18px 22px 46px rgba(128, 112, 82, .26),
    -14px -14px 32px rgba(255, 252, 244, .9),
    var(--neuro-edge) !important;
}

.nav-item,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button,
.calendar-month-pill,
.calendar-today-pill,
.calendar-legend button,
.weather-refresh-button,
.care-tabs button,
.care-panel-head button,
.care-row button,
.home-card-head button,
.home-more-row,
.native-agenda-empty button,
.settings-person-row > button,
.mobile-quick-actions button {
  color: #6f7254 !important;
  background:
    linear-gradient(145deg, rgba(255, 250, 239, .94), rgba(232, 222, 202, .84)) !important;
  border: 1px solid rgba(255, 252, 244, .82) !important;
  box-shadow:
    calc(var(--dynamic-shadow-x, 15px) * .58) calc(var(--dynamic-shadow-y, 18px) * .58) 19px rgba(143, 128, 95, .23),
    calc(var(--dynamic-lift-x, -10px) * .62) calc(var(--dynamic-lift-y, -10px) * .62) 15px rgba(255, 252, 244, .92),
    var(--neuro-edge) !important;
}

.nav-item.active,
.segmented button.active,
.care-tabs button.active,
.primary-button,
.calendar-today-pill {
  color: #7b7651 !important;
  background:
    linear-gradient(145deg, rgba(250, 238, 206, .98), rgba(218, 196, 143, .78)) !important;
  box-shadow:
    10px 12px 24px rgba(162, 128, 55, .26),
    -8px -8px 19px rgba(255, 252, 244, .95),
    var(--neuro-edge) !important;
}

.danger-button {
  color: #9d543f !important;
  background:
    linear-gradient(145deg, rgba(254, 235, 225, .96), rgba(225, 183, 164, .76)) !important;
}

.hub-icon,
.task-check,
.person-avatar,
.event-date,
.auth-mark,
.home-priority-row .hub-icon,
.home-shortcut .hub-icon,
.home-stat-tile .hub-icon,
.home-alert-pill .hub-icon,
.onboarding-grid span {
  color: #7d8261 !important;
  background:
    linear-gradient(145deg, rgba(255, 247, 226, .98), rgba(218, 204, 164, .84)) !important;
  border: 1px solid rgba(255, 252, 244, .84) !important;
  box-shadow:
    8px 10px 20px rgba(143, 128, 95, .25),
    -7px -7px 16px rgba(255, 252, 244, .9),
    var(--neuro-edge) !important;
}

.nav-item[data-page="calendarPage"] .nav-icon,
.home-priority-row:nth-child(1) .hub-icon,
.home-shortcut:nth-child(1) .hub-icon {
  color: #8a8f68 !important;
}

.nav-item[data-page="mealsPage"] .nav-icon,
.nav-item[data-page="groceriesPage"] .nav-icon,
.home-priority-row:nth-child(2) .hub-icon,
.home-shortcut:nth-child(2) .hub-icon {
  color: #86a69a !important;
}

.nav-item[data-page="choresPage"] .nav-icon,
.nav-item[data-page="chefPage"] .nav-icon,
.home-priority-row:nth-child(3) .hub-icon,
.home-shortcut:nth-child(4) .hub-icon {
  color: #d9a650 !important;
}

.nav-item[data-page="listsPage"] .nav-icon,
.nav-item[data-page="carePage"] .nav-icon,
.nav-item[data-page="recipesPage"] .nav-icon,
.home-shortcut:nth-child(3) .hub-icon,
.home-shortcut:nth-child(5) .hub-icon,
.home-shortcut:nth-child(6) .hub-icon {
  color: #d6805f !important;
}

input,
select,
textarea,
.chef-compose textarea,
.segmented,
.pill,
.symptom-picks span,
.inline-check span {
  color: #3a382f !important;
  background:
    linear-gradient(145deg, rgba(232, 222, 203, .88), rgba(255, 250, 239, .82)) !important;
  border: 1px solid rgba(255, 252, 244, .78) !important;
  box-shadow:
    inset 6px 6px 13px rgba(143, 128, 95, .22),
    inset -6px -6px 14px rgba(255, 252, 244, .86) !important;
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 250, 239, .94) !important;
  outline-color: rgba(216, 128, 95, .22) !important;
  box-shadow:
    inset 5px 5px 12px rgba(143, 128, 95, .18),
    inset -5px -5px 12px rgba(255, 252, 244, .92),
    0 0 0 4px rgba(216, 128, 95, .12) !important;
}

.task-check {
  background:
    linear-gradient(145deg, rgba(232, 222, 203, .9), rgba(255, 250, 239, .92)) !important;
  box-shadow:
    inset 5px 5px 10px rgba(143, 128, 95, .25),
    inset -5px -5px 11px rgba(255, 252, 244, .92) !important;
}

.task-check.done,
.task-check[aria-checked="true"] {
  background:
    linear-gradient(145deg, rgba(153, 162, 112, .96), rgba(109, 115, 86, .88)) !important;
  box-shadow:
    5px 6px 13px rgba(109, 115, 86, .24),
    inset 1px 1px 0 rgba(255,255,255,.45) !important;
}

.app-topbar::after,
body[data-active-page="calendarPage"] .app-topbar::after,
body[data-active-page="weatherPage"] .app-topbar::after,
body[data-active-page="mealsPage"] .app-topbar::after,
body[data-active-page="recipesPage"] .app-topbar::after,
body[data-active-page="chefPage"] .app-topbar::after,
body[data-active-page="carePage"] .app-topbar::after {
  background: linear-gradient(90deg, #8b8f68, #d9a650 52%, #d6805f) !important;
}

.calendar-dot,
.native-event-dot,
.home-event-row .dot {
  background: #8b8f68 !important;
}

.weather-art {
  box-shadow:
    9px 12px 25px rgba(143, 128, 95, .22),
    -7px -7px 17px rgba(255, 252, 244, .86),
    var(--neuro-edge) !important;
}

.modal-backdrop {
  background: rgba(220, 207, 184, .58) !important;
  backdrop-filter: blur(24px) saturate(1.05);
}

.auth-gate::after {
  background: radial-gradient(circle, rgba(216, 128, 95, .20), transparent 68%) !important;
}

.auth-card {
  width: min(100%, 540px);
}

.auth-brand-lockup img {
  width: clamp(218px, 53vw, 315px);
  border-radius: 24px;
}

.auth-mark.brand-mark {
  background: linear-gradient(145deg, rgba(255, 249, 237, .96), rgba(234, 224, 204, .84)) !important;
}

.auth-form label {
  color: #706b55 !important;
}

.auth-link-button {
  color: #b96d51 !important;
}

.brand-admin-card img {
  width: clamp(116px, 14vw, 180px);
  border-radius: 20px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: rgba(216, 128, 95, .26) !important;
}

@media (max-width: 760px) {
  .auth-brand-lockup img {
    width: min(258px, 72vw);
  }

  .bottom-nav {
    box-shadow:
      12px 15px 30px rgba(128, 112, 82, .24),
      -9px -9px 22px rgba(255, 252, 244, .88),
      var(--neuro-edge) !important;
  }
}

/* v172 final accent cleanup: remove old purple/blue leftovers */
a,
.home-more-row,
.home-card-head button,
.mobile-card-head button,
.calendar-today-pill,
.weather-refresh-button,
.auth-link-button,
.nav-item.active span,
.event-date small,
.weather-stats,
.weather-stats b,
.calendar-month-pill b,
.native-day.is-today .native-day-number,
.native-day.today .native-day-number,
.mobile-quick-actions button strong,
.mobile-quick-actions button span,
.care-tabs button.active,
.calendar-legend button.active,
.segmented button.active {
  color: #8b8f68 !important;
}

.home-card-head button,
.home-more-row,
.mobile-card-head button,
.calendar-today-pill,
.weather-refresh-button {
  background:
    linear-gradient(145deg, rgba(255, 249, 237, .96), rgba(239, 225, 195, .84)) !important;
}

.priority-chip,
.person-chip,
.assignee-chip,
.home-task-row .tag,
.care-status,
.event-tag,
.selected-day-chip,
.calendar-person-chip,
.recipe-tag,
.meal-tag {
  color: #8b8f68 !important;
  background: rgba(239, 225, 195, .7) !important;
}

.nav-item.active .nav-icon,
.nav-item.active span {
  color: #7d7f5b !important;
}

.primary-button .nav-icon,
.secondary-button .nav-icon,
.ghost-button .nav-icon,
.icon-button .nav-icon {
  color: currentColor !important;
}

/* v172 image-based bottom navigation icons */
.bottom-nav .nav-item {
  gap: 2px;
}

.bottom-nav .nav-item::after {
  display: none;
}

.bottom-nav .nav-icon-img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transform: translateY(1px);
  filter: drop-shadow(0 5px 7px rgba(115, 101, 73, .18));
  transition: transform .28s cubic-bezier(.2, 1.25, .32, 1), filter .22s ease, opacity .22s ease;
}

.bottom-nav .nav-item.active .nav-icon-img {
  transform: translateY(-2px) scale(1.12);
  filter: drop-shadow(0 7px 9px rgba(115, 101, 73, .24));
}

.bottom-nav .nav-item span {
  margin-top: -1px;
}

@media (max-width: 760px) {
  .bottom-nav .nav-icon-img {
    width: 30px;
    height: 30px;
  }
}

.home-priority-row:nth-child(3) .hub-icon,
.home-shortcut:nth-child(4) .hub-icon,
.nav-item[data-page="choresPage"] .nav-icon,
.nav-item[data-page="chefPage"] .nav-icon {
  color: #d9a650 !important;
}

.home-shortcut:nth-child(3) .hub-icon,
.home-shortcut:nth-child(5) .hub-icon,
.home-shortcut:nth-child(6) .hub-icon,
.nav-item[data-page="listsPage"] .nav-icon,
.nav-item[data-page="carePage"] .nav-icon,
.nav-item[data-page="recipesPage"] .nav-icon,
.auth-link-button,
.danger-button {
  color: #c67356 !important;
}

.mobile-quick-actions {
  background:
    linear-gradient(145deg, rgba(255, 250, 240, .94), rgba(234, 224, 204, .86)) !important;
  border-color: rgba(255, 252, 244, .8) !important;
  box-shadow:
    14px 17px 34px rgba(128, 112, 82, .24),
    -10px -10px 24px rgba(255, 252, 244, .88),
    var(--neuro-edge) !important;
}

.home-portrait::before {
  filter: hue-rotate(54deg) saturate(.7) brightness(1.05);
  opacity: .72;
}

/* v172 customizable home dashboard */
body[data-active-page="dashboardPage"] .johnson-dashboard {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: clamp(106px, 12dvh, 138px) minmax(0, 1fr) !important;
  gap: clamp(14px, 1.6vw, 22px) !important;
  padding: clamp(8px, 1.5vw, 20px) clamp(12px, 2.4vw, 34px) clamp(14px, 1.8vw, 24px) !important;
  overflow: hidden !important;
}

body[data-active-page="dashboardPage"] .johnson-hero {
  grid-template-columns: clamp(76px, 8vw, 116px) minmax(0, 1fr) clamp(58px, 6vw, 82px);
  min-height: 0;
  gap: clamp(14px, 2vw, 28px);
  padding: 0;
}

body[data-active-page="dashboardPage"] .johnson-hero > div {
  min-width: 0;
}

body[data-active-page="dashboardPage"] .home-portrait {
  width: clamp(72px, 8vw, 110px);
  height: clamp(72px, 8vw, 110px);
}

body[data-active-page="dashboardPage"] .house-art {
  width: clamp(52px, 6vw, 82px);
  height: clamp(52px, 6vw, 82px);
}

body[data-active-page="dashboardPage"] .johnson-hero h2 {
  font-size: clamp(34px, 4.8vw, 62px);
  overflow-wrap: anywhere;
}

body[data-active-page="dashboardPage"] .johnson-hero p,
body[data-active-page="dashboardPage"] .johnson-hero span {
  font-size: clamp(14px, 1.45vw, 19px);
}

.home-customize-button {
  display: grid;
  place-items: center;
}

.home-block-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  grid-auto-rows: minmax(260px, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(128,113,83,.35) transparent;
}

.home-block-grid::-webkit-scrollbar {
  width: 8px;
}

.home-block-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(128,113,83,.28);
}

.home-block {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(16px, 1.5vw, 22px);
  overflow: hidden;
}

.home-block-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.home-block-head .hub-icon {
  width: 48px;
  height: 48px;
  border-radius: 17px;
}

.home-block-head span {
  display: block;
  color: #827765;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-block-head h3 {
  margin-top: 3px;
  color: #3f402f;
  font-size: clamp(19px, 1.8vw, 26px);
  font-weight: 920;
  line-height: 1.1;
}

.home-block-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.home-block-body::-webkit-scrollbar {
  display: none;
}

.home-weather-block {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(86px, 130px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 10px 18px;
  align-items: center;
}

.home-weather-block .weather-art {
  width: clamp(84px, 10vw, 128px);
  height: clamp(72px, 8vw, 104px);
  grid-row: 1 / span 2;
}

.home-weather-reading strong {
  display: block;
  color: #3f402f;
  font-size: clamp(48px, 6vw, 78px);
  line-height: .96;
}

.home-weather-reading span,
.home-weather-reading small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-weather-reading span {
  margin-top: 9px;
  color: #817565;
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 850;
}

.home-weather-reading small {
  margin-top: 6px;
  color: #8a8a65;
  font-size: 14px;
  font-weight: 780;
}

.home-weather-stats {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-weather-stats span,
.home-hourly-chip,
.home-dinner-summary,
.home-data-row {
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(238,229,207,.5));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow:
    calc(var(--dynamic-shadow-x) * .45) calc(var(--dynamic-shadow-y) * .45) 14px rgba(128,113,83,.15),
    calc(var(--dynamic-lift-x) * .5) calc(var(--dynamic-lift-y) * .5) 12px rgba(255,255,255,.82),
    var(--neuro-edge);
}

.home-weather-stats span {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  color: #827765;
  font-size: 12px;
  font-weight: 850;
}

.home-weather-stats b {
  color: #56553d;
  font-size: 18px;
}

.home-hourly-rail {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(58px, 1fr));
  gap: 8px;
  overflow: hidden;
  padding: 4px 1px 3px;
  scrollbar-width: none;
}

.home-hourly-rail::-webkit-scrollbar {
  display: none;
}

.home-hourly-chip {
  min-width: 0;
  min-height: 74px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 9px 8px;
  border-radius: 18px;
  text-align: center;
}

.home-hourly-chip span,
.home-hourly-chip em {
  color: #827765;
  font-size: 12px;
  font-weight: 850;
  font-style: normal;
}

.home-hourly-chip i {
  color: #d9a650;
  font-size: 20px;
  font-style: normal;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(128,113,83,.18));
}

.home-hourly-chip strong {
  color: #3f402f;
  font-size: 20px;
  line-height: 1;
}

.empty-hourly .home-hourly-chip {
  opacity: .76;
}

.home-data-row {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 20px;
}

.home-data-row.has-control {
  grid-template-columns: 42px minmax(0, 1fr);
}

.home-data-row time {
  color: #8a8a65;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.home-data-row div {
  min-width: 0;
}

.home-data-row strong,
.home-data-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-data-row strong {
  color: #3f402f;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 900;
}

.home-data-row span {
  margin-top: 4px;
  color: #817565;
  font-size: 13px;
  font-weight: 760;
}

.home-dinner-summary {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 22px;
}

.home-dinner-summary strong,
.home-dinner-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-dinner-summary strong {
  color: #3f402f;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 930;
}

.home-dinner-summary span,
.home-chef-note {
  color: #817565;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.45;
}

.home-block-list {
  display: grid;
  gap: 10px;
}

.dashboard-customizer {
  display: grid;
  gap: 18px;
}

.dashboard-customizer h3 {
  margin-bottom: 10px;
  color: #3f402f;
  font-size: 18px;
}

.dashboard-custom-list {
  display: grid;
  gap: 10px;
}

.dashboard-custom-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(238,229,207,.54));
  border: 1px solid rgba(255,255,255,.72);
}

.dashboard-custom-row .hub-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.dashboard-custom-row strong,
.dashboard-custom-row span {
  display: block;
}

.dashboard-custom-row strong {
  color: #3f402f;
  font-size: 16px;
}

.dashboard-custom-row span {
  margin-top: 3px;
  color: #817565;
  font-size: 13px;
  font-weight: 760;
}

.dashboard-custom-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.dashboard-custom-actions button {
  min-height: 36px;
  padding-inline: 12px;
}

@media (min-width: 1180px) {
  .home-block-grid {
    grid-template-columns: repeat(4, minmax(240px, 1fr));
  }

  .home-block-weatherToday {
    grid-column: span 2;
    grid-row: span 2;
  }

  .home-block-dinnerGroceries {
    grid-column: span 2;
  }
}

@media (min-width: 761px) and (orientation: portrait) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    height: auto;
    min-height: 100%;
    overflow: visible !important;
  }

  .home-block-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(230px, auto);
    overflow: visible;
  }
}

@media (max-width: 760px) {
  body[data-active-page="dashboardPage"] .johnson-dashboard {
    height: auto;
    min-height: 100%;
    grid-template-rows: auto auto !important;
    padding: 10px 12px 18px !important;
    overflow: visible !important;
  }

  body[data-active-page="dashboardPage"] .johnson-hero {
    position: relative;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
    padding-right: 58px;
  }

  body[data-active-page="dashboardPage"] .johnson-hero h2 {
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.05;
    white-space: normal;
  }

  body[data-active-page="dashboardPage"] .johnson-hero p,
  body[data-active-page="dashboardPage"] .johnson-hero span {
    font-size: 13px;
  }

  body[data-active-page="dashboardPage"] .home-portrait {
    width: 62px;
    height: 62px;
  }

  body[data-active-page="dashboardPage"] .house-art {
    width: 44px;
    height: 44px;
  }

  body[data-active-page="dashboardPage"] .notify-orb {
    position: absolute;
    top: 4px;
    right: 0;
    width: 54px;
    height: 54px;
  }

  .home-block-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    overflow: visible;
    padding-inline: 0;
  }

  .home-block {
    min-height: 240px;
  }

  .home-weather-block {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .home-weather-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-weather-stats span:nth-child(3) {
    grid-column: 1 / -1;
  }

  .home-weather-stats span {
    padding: 9px 8px;
  }

  .home-weather-stats b {
    font-size: 16px;
  }

  .home-hourly-rail {
    grid-template-columns: repeat(16, minmax(76px, 82px));
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: -1px;
  }

  .home-hourly-chip {
    min-height: 78px;
  }

  .home-data-row {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .home-dinner-summary strong,
  .home-dinner-summary span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .dashboard-custom-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dashboard-custom-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .dashboard-custom-actions button {
    flex: 1 1 72px;
  }
}

/* v172 richer Lists page */
body[data-active-page="listsPage"] .lists-board {
  min-height: 0;
  grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr);
  gap: clamp(14px, 1.6vw, 22px);
}

body[data-active-page="listsPage"] .list-index-card,
body[data-active-page="listsPage"] .active-list-card {
  min-height: 0;
}

body[data-active-page="listsPage"] .active-list-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.list-row {
  position: relative;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border-radius: 22px;
  text-align: left;
}

.list-row.selected {
  color: #7d7f5b;
  box-shadow: var(--neuro-inset);
}

.list-row i {
  display: block;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(198,115,86,.85) var(--progress), rgba(255,255,255,.55) var(--progress)),
    rgba(255,255,255,.48);
  box-shadow: inset 1px 1px 2px rgba(128,113,83,.16);
}

.list-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.list-detail-head strong,
.list-detail-head span {
  display: block;
}

.list-detail-head strong {
  color: #3f402f;
  font-size: 20px;
  font-weight: 920;
}

.list-detail-head span {
  margin-top: 3px;
  color: #817565;
  font-size: 14px;
  font-weight: 780;
}

.list-detail-actions,
.list-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.list-detail-actions button,
.list-item-actions button {
  min-height: 36px;
  padding-inline: 12px;
}

.list-progress-track {
  height: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  box-shadow: inset 2px 2px 5px rgba(128,113,83,.15), inset -2px -2px 5px rgba(255,255,255,.75);
}

.list-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c67356, #d9a650);
}

.list-item-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.list-item-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-row.done strong {
  color: #8f8979;
  text-decoration: line-through;
}

@media (max-width: 900px) {
  body[data-active-page="listsPage"] .lists-board {
    grid-template-columns: 1fr;
  }

  .list-detail-head,
  .list-item-row {
    grid-template-columns: 1fr;
  }

  .list-detail-actions,
  .list-item-actions {
    justify-content: stretch;
  }

  .list-detail-actions button,
  .list-item-actions button {
    flex: 1 1 86px;
  }

  .list-item-row .task-check {
    justify-self: start;
  }
}

/* v175 real-data responsive polish */
.home-hourly-rail {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
}

.home-hourly-chip {
  scroll-snap-align: start;
}

.home-task-row strong,
.home-task-row span,
.home-event-row strong,
.home-event-row em,
.home-data-row strong,
.home-data-row span,
.native-event-time strong,
.native-event-time em,
.native-event-copy strong,
.native-event-copy em,
.list-item-row strong {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

/* v177 iPhone Safari/PWA viewport repair */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    height: var(--app-viewport-height, 100dvh) !important;
    min-height: var(--app-viewport-height, 100dvh) !important;
    overflow: hidden !important;
  }

  .app-shell {
    width: 100vw !important;
    height: var(--app-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: none !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 0 !important;
    padding:
      max(10px, calc(env(safe-area-inset-top) + var(--app-viewport-top, 0px)))
      0
      0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
  }

  .app-main {
    min-height: 0 !important;
    height: 100% !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 0 10px 10px !important;
    overflow: hidden !important;
  }

  body[data-active-page="dashboardPage"] .app-main {
    grid-template-rows: minmax(0, 1fr) !important;
  }

  .app-topbar,
  body:not([data-active-page="dashboardPage"]) .app-topbar,
  body[data-active-page="weatherPage"] .app-topbar {
    height: 58px !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 0 4px !important;
  }

  .page,
  .page.active,
  body:not([data-active-page="dashboardPage"]) .page.active,
  body[data-active-page="dashboardPage"] .page.active,
  body[data-active-page="weatherPage"] .page.active,
  body[data-active-page="calendarPage"] .page.active {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    padding: 0 0 12px !important;
    scroll-padding-bottom: 12px !important;
    overscroll-behavior: contain;
  }

  .bottom-nav {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    align-self: end !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(68px + env(safe-area-inset-bottom)) !important;
    max-height: none !important;
    margin: 0 !important;
    padding:
      7px
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left)) !important;
    grid-auto-columns: 72px !important;
    gap: 6px !important;
    border-radius: 22px 22px 0 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .nav-item {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    border-radius: 18px !important;
  }

  .bottom-nav .nav-icon-img {
    width: 29px !important;
    height: 29px !important;
  }

  .mobile-quick-actions {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }

  .modal {
    max-height: calc(var(--app-viewport-height, 100dvh) - max(16px, env(safe-area-inset-top)) - 10px) !important;
  }
}

/* v178 zoom lock for phone, tablet, and installed PWA shells */
html,
body,
.app-shell,
.app-main,
.page,
.bottom-nav,
button,
a {
  touch-action: pan-x pan-y;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 760px), (pointer: coarse) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* v179 iPhone keyboard/list add polish */
.list-add-toolbar {
  flex-wrap: nowrap !important;
  align-items: stretch;
}

.list-add-toolbar #newListItemInput {
  flex: 1 1 0;
  width: 100%;
  min-width: 0 !important;
}

.list-add-toolbar [data-action="list-item-add"] {
  flex: 0 0 auto;
  min-width: 64px !important;
  min-height: 44px !important;
  padding-inline: 16px !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
}

/* v180 Lists open/view/edit workflow */
.list-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(239,244,232,.76));
  box-shadow:
    calc(var(--dynamic-shadow-x) * .45) calc(var(--dynamic-shadow-y) * .45) 15px rgba(122,144,109,.16),
    calc(var(--dynamic-lift-x) * .5) calc(var(--dynamic-lift-y) * .5) 12px rgba(255,255,255,.82),
    var(--neuro-edge);
}

.list-row-card.selected {
  background:
    linear-gradient(145deg, rgba(225,238,205,.9), rgba(250,252,246,.86));
  box-shadow: var(--neuro-inset);
}

.list-row-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.list-row-main strong,
.list-row-main span {
  min-width: 0;
}

.list-row-main strong {
  color: #3f402f;
  font-weight: 900;
}

.list-row-main i {
  display: block;
  height: 7px;
  margin-top: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(198,115,86,.85) var(--progress), rgba(255,255,255,.55) var(--progress)),
    rgba(255,255,255,.48);
  box-shadow: inset 1px 1px 2px rgba(128,113,83,.16);
}

.list-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.list-row-actions button {
  min-height: 38px;
  padding-inline: 12px;
}

.list-detail-head.editing {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(128,113,83,.12);
}

.list-detail-body.is-viewing {
  gap: 10px;
}

.list-item-row.viewing {
  grid-template-columns: 42px minmax(0, 1fr);
}

.list-item-row strong {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .list-row-card {
    grid-template-columns: 1fr;
  }

  .list-row-actions {
    justify-content: stretch;
  }

  .list-row-actions button {
    flex: 1 1 92px;
  }

  .list-item-row.viewing,
  .list-item-row.editing {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }

  .list-item-row.editing .list-item-actions {
    grid-column: 1 / -1;
  }
}
