/* =====================================================================
   Postpartum+ calm layer
   Loaded after app.css. Softer surfaces, a gentle colour wash behind the
   page, frosted bars, rounder cards, quieter borders, and slow, small
   motion that stops for anyone who asks the system for less motion.
   Each section can be removed on its own.
   ===================================================================== */

/* ---------- 1. Palette and surfaces ----------------------------------- */
:root {
  --paper: #f7f5f0;
  --paper-2: #f0ece5;
  --paper-3: #e6e0d6;
  --brand-soft: #e2efe7;
  --brand-tint: #eff6f1;
  --sage-soft: #e2efe7;
  --peach-soft: #fbe9e1;
  --lavender-soft: #ece8f7;
  --sky-soft: #e3eff4;
  --butter-soft: #faf2dc;
  --lavender: #6d5fa6;
  --line: rgba(27, 42, 38, 0.08);
  --line-strong: rgba(27, 42, 38, 0.18);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --card-bg: rgba(255, 255, 255, 0.84);
  --shadow-xs: 0 1px 2px rgba(27, 42, 38, 0.04);
  --shadow-sm: 0 1px 2px rgba(27, 42, 38, 0.04), 0 8px 22px rgba(27, 42, 38, 0.05);
  --shadow: 0 2px 6px rgba(27, 42, 38, 0.04), 0 18px 42px rgba(27, 42, 38, 0.09);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

/* A slow wash of sage, peach and lavender behind everything. It sits
   under the page, never moves, and is too soft to compete with text. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 40% at 8% 0%, rgba(196, 226, 209, 0.55), transparent 70%),
    radial-gradient(45% 35% at 100% 6%, rgba(250, 218, 203, 0.5), transparent 70%),
    radial-gradient(50% 40% at 80% 60%, rgba(224, 217, 246, 0.38), transparent 70%),
    radial-gradient(45% 35% at 0% 85%, rgba(250, 238, 208, 0.4), transparent 70%);
}

/* ---------- 2. The crisis line: still first, now soft ------------------ */
.crisis-bar {
  background: #e3efe7;
  color: var(--brand-800);
  border-bottom: 1px solid rgba(31, 77, 64, 0.08);
}
.crisis-bar a {
  background: #fff;
  color: var(--brand-800);
  box-shadow: 0 1px 2px rgba(27, 42, 38, 0.08);
}
.crisis-bar a:hover {
  background: var(--brand);
  color: #fff;
}

/* ---------- 3. Frosted header ------------------------------------------ */
.site-header {
  background: rgba(247, 245, 240, 0.66);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.site-header.scrolled {
  border-bottom-color: rgba(27, 42, 38, 0.06);
  box-shadow: 0 8px 30px rgba(27, 42, 38, 0.05);
}

/* ---------- 4. Cards: rounder, quieter, lifted by shadow not borders --- */
.card,
.circle,
.post,
.event-card,
.saved-row.card {
  border-color: rgba(27, 42, 38, 0.06);
}
.card {
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}
.card-link {
  transition: transform 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft), border-color 0.2s;
}
.card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(27, 42, 38, 0.06);
}
.card-link:active {
  transform: scale(0.985);
}
.icon-badge {
  border-radius: 16px;
  width: 50px;
  height: 50px;
}
.icon-badge.lavender {
  background: var(--lavender-soft);
}
.icon-badge.peach {
  background: var(--peach-soft);
}

/* ---------- 5. Buttons: soft pills that give a little when pressed ----- */
.btn {
  transition: transform 0.25s var(--ease-soft), background 0.2s, border-color 0.2s, box-shadow 0.25s, color 0.2s;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: linear-gradient(180deg, #2c6856, #1f4d40);
  border-color: transparent;
  box-shadow: 0 10px 22px -8px rgba(31, 77, 64, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #32705d, #235646);
  border-color: transparent;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(31, 77, 64, 0.14);
}
.btn-secondary:hover {
  background: #fff;
  border-color: rgba(31, 77, 64, 0.34);
}

/* ---------- 6. Chips and tabs ------------------------------------------ */
.chip {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(27, 42, 38, 0.08);
}
.chip.active,
.chip[aria-pressed="true"],
.chip[aria-selected="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.tabs {
  background: rgba(27, 42, 38, 0.05);
}

/* ---------- 7. Page tops let the wash show through --------------------- */
.page-hero.tinted {
  background: linear-gradient(180deg, rgba(226, 239, 231, 0.7), transparent);
}
.page-hero.warm {
  background: linear-gradient(180deg, rgba(251, 233, 225, 0.7), transparent);
}
.page-hero.gold {
  background: linear-gradient(180deg, rgba(250, 242, 220, 0.8), transparent);
}
.hero-media .photo {
  border-radius: var(--radius-lg);
}
.hero-note {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ---------- 8. Slow, small motion -------------------------------------- */
.page.active {
  animation: calm-rise 0.45s var(--ease-soft);
}
@keyframes calm-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 9. Home: "where to start" as a bento of soft tiles --------- */
#homeStarts {
  grid-template-columns: 1.25fr 1fr;
  grid-auto-rows: minmax(0, auto);
}
#homeStarts > .card {
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
#homeStarts > .card:nth-child(1) {
  grid-row: span 2;
  background: linear-gradient(160deg, #dcece3, #eef6f1 70%);
}
#homeStarts > .card:nth-child(2) {
  background: linear-gradient(160deg, #fbe4d9, #fdf2ec 70%);
}
#homeStarts > .card:nth-child(3) {
  background: linear-gradient(160deg, #e6e1f6, #f3f0fb 70%);
}
#homeStarts > .card .icon-badge {
  background: rgba(255, 255, 255, 0.7);
}
#homeStarts > .card .link-btn {
  margin-top: auto;
}
#homeStarts > .card:nth-child(1) h3 {
  font-size: 1.45rem;
}
.family-grid .family-card:nth-child(1) {
  background: linear-gradient(170deg, #f1f7f3, rgba(255, 255, 255, 0.9) 60%);
}
.family-grid .family-card:nth-child(2) {
  background: linear-gradient(170deg, #fdf5e6, rgba(255, 255, 255, 0.9) 60%);
}
.family-grid .family-card:nth-child(3) {
  background: linear-gradient(170deg, #fcf0ea, rgba(255, 255, 255, 0.9) 60%);
}

/* ---------- 10. Circles: soft covers; swipe through them on a phone ---- */
.circle {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding-top: 76px;
}
.circle::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 64px;
  background: linear-gradient(120deg, #dcece3, #e6e1f6);
}
.circle:nth-child(3n + 2)::before {
  background: linear-gradient(120deg, #fbe4d9, #faf2dc);
}
.circle:nth-child(3n + 3)::before {
  background: linear-gradient(120deg, #e3eff4, #e6e1f6);
}
.circle .circle-top {
  position: absolute;
  top: 36px;
  left: 18px;
  right: 18px;
}
.circle .circle-top .icon-badge {
  background: #fff;
  box-shadow: 0 6px 16px rgba(27, 42, 38, 0.1);
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
}
.circle .circle-top .tag {
  margin-top: 22px;
}
.circle.joined {
  box-shadow: var(--shadow-sm), inset 0 0 0 2px rgba(31, 77, 64, 0.5);
}
.circle > .fine {
  margin-top: 10px;
}

/* ---------- 11. Phones: a floating, frosted tab bar -------------------- */
@media (max-width: 700px) {
  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    /* Opaque enough that the labels keep 4.5:1 over a dark card behind. */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    box-shadow: 0 12px 34px rgba(27, 42, 38, 0.14), 0 2px 6px rgba(27, 42, 38, 0.06);
  }
  .bottom-nav a,
  .bottom-nav button {
    min-width: 0;
    padding-inline: 0;
    border-radius: 20px;
    /* Five tabs: the labels shrink a touch on the smallest phones. */
    font-size: clamp(0.6rem, 2.85vw, 0.68rem);
    letter-spacing: 0;
    white-space: nowrap;
    transition: background 0.3s var(--ease-soft), color 0.2s;
  }
  .bottom-nav .active {
    color: var(--brand-800);
    background: var(--sage-soft);
  }
  #homeStarts {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  #homeStarts > .card:nth-child(1) {
    grid-row: auto;
    grid-column: 1 / -1;
  }
  #homeStarts > .card:nth-child(n + 2) {
    padding: 16px;
  }
  #homeStarts > .card:nth-child(n + 2) h3 {
    font-size: 1.05rem;
  }
  #homeStarts > .card:nth-child(n + 2) p {
    font-size: 0.86rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Circles swipe sideways, one and a bit at a time. */
  .circle-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 14px;
    gap: 12px;
    scrollbar-width: none;
  }
  .circle-grid::-webkit-scrollbar {
    display: none;
  }
  .circle-grid > .circle {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page.active,
  .card-link,
  .btn {
    animation: none;
    transition: none;
  }
}

/* ---------- 12. Drag and drop ----------------------------------------- */
.dnd-ghost {
  position: fixed !important;
  z-index: 300;
  margin: 0 !important;
  pointer-events: none;
  box-shadow: 0 24px 60px rgba(27, 42, 38, 0.22), 0 4px 12px rgba(27, 42, 38, 0.1) !important;
  transform-origin: 30% 30%;
  will-change: transform;
}
.dnd-source {
  opacity: 0.35;
  filter: saturate(0.6);
}
.dnd-over {
  outline: 2px dashed rgba(31, 77, 64, 0.55);
  outline-offset: 3px;
  background: var(--sage-soft) !important;
}
html.dnd-active,
html.dnd-active * {
  cursor: grabbing !important;
  user-select: none;
  -webkit-user-select: none;
}
[data-kind="plan"].cal-block,
.dash-tile,
.job-card {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- 13. Calendar ---------------------------------------------- */
.cal {
  display: grid;
  gap: 14px;
}
.cal-top {
  padding: 20px 18px 16px;
  background: linear-gradient(160deg, rgba(236, 232, 247, 0.9), rgba(226, 239, 231, 0.85) 60%, rgba(255, 255, 255, 0.9));
  border: 0;
}
.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.cal-title {
  font-size: 1.45rem;
  margin: 2px 0 2px;
}
.cal-sum {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}
.cal-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 16px;
}
.cal-pebble {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--ink-2);
  transition: background 0.3s var(--ease-soft), transform 0.3s var(--ease-soft), box-shadow 0.3s;
  min-height: 78px;
}
.cal-pebble small {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal-pebble b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--ink);
}
.cal-pebble:hover {
  transform: translateY(-2px);
}
.cal-pebble.today {
  box-shadow: 0 0 0 2px rgba(195, 102, 76, 0.55);
}
.cal-pebble.sel {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 10px 22px -8px rgba(31, 77, 64, 0.6);
}
.cal-pebble.sel small,
.cal-pebble.sel b {
  color: #fff;
}
.cal-pebble.dnd-over,
.cal-mday.dnd-over {
  transform: scale(1.08);
}
.cal-dots {
  display: flex;
  gap: 3px;
  min-height: 7px;
  justify-content: center;
}
.cal-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fb8a4;
}
.cal-dots i.t-appointment {
  background: #6ba3bd;
}
.cal-dots i.t-personal {
  background: #e3a084;
}
.cal-dots i.t-reminder {
  background: #9d8fd0;
}
.cal-dots i.t-event {
  background: #6fa588;
}
.cal-pebble.sel .cal-dots i {
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}
.cal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cal-daycard,
.cal-month,
.cal-list {
  padding: 20px 18px;
}
.cal-day-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cal-day-head h3 {
  margin: 0;
  font-size: 1.2rem;
}
.cal-blocks {
  display: grid;
  gap: 10px;
}
.cal-block {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 18px;
  background: var(--sage-soft);
  overflow: hidden;
  transition: transform 0.3s var(--ease-soft), box-shadow 0.3s;
}
.cal-block::before {
  content: "";
  width: 5px;
  flex: none;
  background: #6fa588;
}
.cal-block.t-appointment {
  background: var(--sky-soft);
}
.cal-block.t-appointment::before {
  background: #6ba3bd;
}
.cal-block.t-personal {
  background: var(--peach-soft);
}
.cal-block.t-personal::before {
  background: #e3a084;
}
.cal-block.t-reminder {
  background: var(--lavender-soft);
}
.cal-block.t-reminder::before {
  background: #9d8fd0;
}
.cal-block-main {
  flex: 1;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 8px 14px 14px;
  text-align: left;
  color: inherit;
  min-width: 0;
}
.cal-time {
  flex: none;
  width: 64px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.cal-body {
  display: grid;
  min-width: 0;
}
.cal-body b {
  font-weight: 650;
  line-height: 1.3;
}
.cal-body small {
  color: var(--ink-2);
  font-size: 0.82rem;
  line-height: 1.4;
}
.cal-grip {
  display: grid;
  place-items: center;
  width: 36px;
  flex: none;
  color: rgba(27, 42, 38, 0.35);
  letter-spacing: -2px;
  font-weight: 800;
  cursor: grab;
}
.cal-block[data-kind="plan"] {
  cursor: grab;
}
.cal-block:hover {
  box-shadow: 0 8px 20px rgba(27, 42, 38, 0.07);
}
.cal-hint {
  margin: 10px 2px 0;
}
.cal-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cal-quiet {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 18px 10px 8px;
  gap: 4px;
}
.cal-quiet p {
  margin: 0;
}
.cal-breath {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 10px;
  background: radial-gradient(circle at 35% 35%, #fff, #cfe3d7 45%, #b9d3c4);
  box-shadow: 0 0 0 10px rgba(207, 227, 215, 0.35), 0 0 0 22px rgba(207, 227, 215, 0.18);
  animation: cal-breathe 10s ease-in-out infinite;
}
@keyframes cal-breathe {
  0%,
  100% {
    transform: scale(0.82);
  }
  50% {
    transform: scale(1.04);
  }
}
.cal-mgrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 2px;
}
.cal-mday {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  aspect-ratio: 1;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
  transition: background 0.25s, transform 0.25s var(--ease-soft);
}
.cal-mday.has {
  background: rgba(226, 239, 231, 0.7);
}
.cal-mday.today {
  box-shadow: inset 0 0 0 2px rgba(195, 102, 76, 0.55);
}
.cal-mday.sel {
  background: var(--brand);
  color: #fff;
}
.cal-mday:not(.pad):hover {
  background: var(--sage-soft);
}
.cal-mday.sel:hover {
  background: var(--brand-600);
}
.cal-list {
  display: grid;
  gap: 10px;
}
.cal-list-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
}
.cal-list-date {
  display: grid;
  justify-items: center;
  line-height: 1.1;
}
.cal-list-date b {
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.cal-list-date small {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 420px) {
  .cal-week {
    gap: 4px;
  }
  .cal-pebble b {
    font-size: 1.1rem;
  }
  .cal-time {
    width: 56px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cal-breath {
    animation: none;
  }
}

/* Calendar refinements: the header on one line, stacked times, and quick
   adds in a single row that scrolls sideways on a phone. */
.cal-head {
  align-items: center;
}
.cal-head .eyebrow {
  margin: 0;
}
.cal-nav .btn-icon {
  width: 38px;
  height: 38px;
  min-height: 38px;
}
.cal-nav .btn-sm {
  min-height: 38px;
}
.cal-time {
  display: grid;
  line-height: 1.15;
  width: 52px;
}
.cal-time b {
  font-size: 1rem;
  color: var(--ink);
}
.cal-time small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}
@media (max-width: 700px) {
  .cal-quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -18px;
    padding: 2px 18px 6px;
    scroll-snap-type: x proximity;
  }
  .cal-quick::-webkit-scrollbar {
    display: none;
  }
  .cal-quick .chip {
    scroll-snap-align: start;
    flex: none;
  }
}

/* ---------- 14. A light, quiet footer ---------------------------------- */
.site-footer {
  background: linear-gradient(180deg, #eaf2ed, #dde9e2);
  color: var(--ink-2);
}
.site-footer .brand .mark {
  background: var(--brand);
  color: #fff;
}
.site-footer .brand .wordmark,
.site-footer h2 {
  color: var(--brand-800);
}
.site-footer a,
.site-footer button {
  color: var(--ink-2);
}
.site-footer a:hover,
.site-footer button:hover {
  color: var(--brand);
}
.site-footer .newsletter .btn-light {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.site-footer .newsletter .btn-light:hover {
  background: var(--brand-600);
  color: #fff;
}
.footer-note {
  border-top-color: rgba(27, 42, 38, 0.1);
  color: var(--muted);
}
.newsletter label b {
  color: var(--brand-800);
}
.newsletter label span {
  color: var(--muted);
}
.newsletter-row input[type="email"] {
  border-color: rgba(31, 77, 64, 0.18);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}
.newsletter-row input[type="email"]::placeholder {
  color: var(--muted);
}
.cal {
  grid-template-columns: minmax(0, 1fr);
}
.cal > *,
.cal-daycard,
#accountBody {
  min-width: 0;
}

/* ---------- 15. Account home: tiles you can arrange ------------------- */
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 8px;
}
.dash-head .eyebrow {
  margin: 0;
}
.dash {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.dash-tile {
  grid-column: 1 / -1;
  min-width: 0;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease-soft), box-shadow 0.3s;
}
.dash-tile.half {
  grid-column: span 1;
}
.dash-tile.is-hidden {
  display: none;
}
.dash-body > [data-tile] {
  margin: 0 !important;
}
.dash-body > [data-tile="stats"] {
  margin: 0;
}
.dash-bar {
  display: none;
}
/* Arranging: every tile folds to a slim bar with a grip, so they are easy
   to drag on a phone; hidden tiles show, faded, with "Show". */
.dash.arranging {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.dash.arranging .dash-tile {
  grid-column: 1 / -1;
  display: block;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(27, 42, 38, 0.06);
  cursor: grab;
  animation: dash-settle 0.4s var(--ease-soft);
}
.dash.arranging .dash-tile.is-hidden {
  opacity: 0.5;
}
.dash.arranging .dash-body {
  display: none;
}
.dash.arranging .dash-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 14px;
  min-height: 60px;
}
.dash-bar b {
  flex: 1;
  font-weight: 650;
}
.dash-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--sage-soft);
  font-size: 1.1rem;
}
.dash-bar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.dash-bar-actions .btn-icon {
  width: 34px;
  height: 34px;
  min-height: 34px;
}
.dash-grip {
  width: 30px;
  text-align: center;
  color: rgba(27, 42, 38, 0.35);
  font-weight: 800;
  letter-spacing: -2px;
}
@keyframes dash-settle {
  from {
    transform: scale(0.98);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (max-width: 700px) {
  .dash {
    grid-template-columns: minmax(0, 1fr);
  }
  .dash-tile.half {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dash.arranging .dash-tile {
    animation: none;
  }
}

/* ---------- 16. Small things: account tabs, toasts, arrange bars ------ */
.account-nav button.active {
  background: var(--sage-soft);
  color: var(--brand-800);
  border-color: rgba(31, 77, 64, 0.22);
}
.toast {
  background: rgba(23, 59, 49, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 12px 20px;
}
.toast-success {
  background: rgba(31, 77, 64, 0.95);
}
@media (max-width: 700px) {
  .toast {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
  /* Clear of the floating tab bar, not resting on its edge. */
  .checkin-prompt {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
  .dash-bar {
    gap: 10px;
  }
  .dash-bar b {
    font-size: 0.95rem;
    line-height: 1.25;
  }
  .dash-bar-actions .btn-sm {
    padding-inline: 8px;
  }
  .dash-bar-actions .btn-icon {
    width: 30px;
  }
  .dash-icon {
    width: 34px;
    height: 34px;
  }
}

/* ---------- 17. Family plan: who does what ---------------------------- */
.plan-board .num {
  font-size: 1.3rem;
}
.board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.board-col {
  border-radius: 18px;
  padding: 12px;
  background: var(--paper-2);
  min-height: 96px;
  transition: background 0.25s, transform 0.25s var(--ease-soft), outline-color 0.2s;
}
.board-open {
  grid-column: 1 / -1;
  background: rgba(27, 42, 38, 0.04);
  border: 1.5px dashed rgba(27, 42, 38, 0.14);
}
.board-parent {
  background: var(--peach-soft);
}
.board-partner {
  background: var(--sky-soft);
}
.board-helpers {
  background: var(--lavender-soft);
  grid-column: 1 / -1;
}
.board-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.board-col-head b {
  font-size: 0.92rem;
}
.board-count {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-2);
}
.board-jobs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.board-empty {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 6px 2px;
}
.job-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 42, 38, 0.06), 0 4px 10px rgba(27, 42, 38, 0.05);
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--ink);
  cursor: grab;
  transition: transform 0.25s var(--ease-soft), box-shadow 0.25s;
}
.job-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 42, 38, 0.1);
}
.job-card.just-moved {
  animation: job-pop 0.5s var(--ease-soft);
}
@keyframes job-pop {
  0% {
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.05);
  }
  100% {
    transform: none;
  }
}
.job-menu {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}
.job-menu .fine {
  flex-basis: 100%;
  margin: 0 0 2px;
}
.job-menu .chip {
  min-height: 34px;
}
@media (prefers-reduced-motion: reduce) {
  .job-card.just-moved {
    animation: none;
  }
}
.job-card {
  text-align: left;
  line-height: 1.25;
}
body:not(.signed-in) .account-btn {
  background: linear-gradient(180deg, #2c6856, #1f4d40);
  border-color: transparent;
  box-shadow: 0 8px 18px -8px rgba(31, 77, 64, 0.55);
}
body:not(.signed-in) .account-btn:hover {
  background: linear-gradient(180deg, #32705d, #235646);
}
.circle {
  padding-top: 108px;
}
.circle .circle-top {
  top: 34px;
}
.circle .circle-top .tag {
  position: absolute;
  right: 0;
  top: -22px;
  margin: 0;
  background: rgba(255, 255, 255, 0.88);
}
.circle > .fine {
  margin-top: 0;
}
@media (max-width: 700px) {
  .circle-grid > .circle:only-child {
    flex-basis: 100%;
  }
}

.dnd-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.95rem;
  white-space: nowrap;
}
.dnd-chip small {
  color: var(--muted);
  font-weight: 600;
}
.dnd-ghost.dash-tile {
  background: #fff;
  border-radius: var(--radius);
}
.dnd-ghost.dash-tile .dash-body {
  display: none;
}
.dnd-ghost.dash-tile .dash-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 14px;
  min-height: 60px;
}

/* ---------- 18. Calendar: village help and checkups ------------------ */
.cal-block.t-village {
  background: var(--butter-soft);
}
.cal-block.t-village::before {
  background: #d9b45f;
}
.cal-dots i.t-village {
  background: #d9b45f;
}
.cal-checkups {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
}
.cal-checkups .icon-badge {
  flex: none;
  margin: 0;
}
.cal-checkups h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.cal-checkups p {
  margin: 0 0 10px;
}
.cal-list.mini {
  padding: 0;
  gap: 8px;
  display: grid;
  margin-top: 8px;
}
.cal-list.mini .cal-block-main {
  padding: 10px 6px 10px 12px;
  gap: 10px;
}
.cal-list.mini .cal-time {
  width: 46px;
}

/* ---------- 19. Who else is here ------------------------------------ */
.awake {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 8px 16px 8px 12px;
  border-radius: 22px;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-xs);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.awake-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6fa588;
  box-shadow: 0 0 0 0 rgba(111, 165, 136, 0.5);
  animation: awake-pulse 3s ease-out infinite;
}
@keyframes awake-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 165, 136, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(111, 165, 136, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 165, 136, 0);
  }
}
.circle-head .awake {
  margin-top: 10px;
}

/* ---------- 20. Home screen card and menu settings ------------------- */
.install-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(160deg, #fbe4d9, rgba(255, 255, 255, 0.9) 65%);
  border: 0;
}
.install-card .icon-badge {
  flex: none;
  margin: 0;
  background: rgba(255, 255, 255, 0.8);
}
.install-card h3 {
  margin: 2px 0 4px;
}
.install-card p {
  margin: 0 0 10px;
}
.install-steps {
  margin: 0 0 12px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
.drawer nav .drawer-setting b {
  margin-left: auto;
  font-weight: 650;
  color: var(--brand);
}

/* ---------- 21. Sheets on a phone: a grab handle, a real slide ------- */
@media (max-width: 700px) {
  .modal {
    transform: translateY(100%);
    transition: opacity 0.2s, transform 0.36s var(--ease-soft);
    padding-top: 28px;
  }
  .modal.show {
    transform: none;
  }
  .modal-head {
    position: relative;
    touch-action: none;
  }
  .modal-head::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 50%;
    width: 42px;
    height: 5px;
    margin-left: -21px;
    border-radius: 999px;
    background: rgba(27, 42, 38, 0.18);
  }
}
@media (prefers-reduced-motion: reduce) {
  .awake-dot {
    animation: none;
  }
}

/* ---------- 22. Moment cards: name and time on one line -------------- */
.moment-head {
  flex-wrap: wrap;
}
.moment-head .who {
  flex: 1 1 auto;
  min-width: 0;
}
.moment-head .who small {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .moment-head > .cluster {
    margin-left: 0 !important;
    flex-basis: 100%;
    flex-wrap: wrap;
  }
}

/* =====================================================================
   23. Night mode: warm and dim, for 3 a.m. Everything reads from the
   same tokens, so most of the site follows by itself; the rest is below.
   ===================================================================== */
html[data-night] {
  color-scheme: dark;
  --paper: #161411;
  --paper-2: #1f1c18;
  --paper-3: #2a2621;
  --surface: #221f1b;
  --ink: #ede5da;
  --ink-2: #d2c8bb;
  --muted: #a89d90;
  --brand: #9ccfb7;
  --brand-600: #b1dac6;
  --brand-700: #c3e3d3;
  --brand-800: #d6ece1;
  --brand-soft: rgba(156, 207, 183, 0.14);
  --brand-tint: rgba(156, 207, 183, 0.08);
  --sage-soft: rgba(156, 207, 183, 0.14);
  --peach-soft: rgba(227, 160, 132, 0.16);
  --lavender-soft: rgba(165, 150, 220, 0.18);
  --sky-soft: rgba(110, 168, 196, 0.18);
  --butter-soft: rgba(217, 180, 95, 0.16);
  --gold-soft: rgba(217, 180, 95, 0.16);
  --accent: #e8a488;
  --accent-600: #efb59c;
  --accent-soft: rgba(232, 164, 136, 0.16);
  --danger: #f2a093;
  --danger-soft: rgba(242, 160, 147, 0.14);
  --success: #9ccfb7;
  --success-soft: rgba(156, 207, 183, 0.14);
  --warn-soft: rgba(217, 180, 95, 0.14);
  --line: rgba(237, 229, 218, 0.09);
  --line-strong: rgba(237, 229, 218, 0.2);
  --card-bg: rgba(35, 32, 28, 0.94);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px rgba(0, 0, 0, 0.25);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 42px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);
}
html[data-night] body::before {
  background:
    radial-gradient(55% 40% at 8% 0%, rgba(96, 140, 116, 0.16), transparent 70%),
    radial-gradient(45% 35% at 100% 6%, rgba(150, 100, 80, 0.12), transparent 70%),
    radial-gradient(50% 40% at 80% 60%, rgba(110, 95, 170, 0.12), transparent 70%);
}
html[data-night] img {
  filter: brightness(0.86);
}
html[data-night] .crisis-bar {
  background: #1d2823;
  color: #d6ece1;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
html[data-night] .crisis-bar a {
  background: rgba(255, 255, 255, 0.08);
  color: #eef7f2;
  box-shadow: none;
}
html[data-night] .site-header {
  background: rgba(22, 20, 17, 0.72);
}
html[data-night] .site-header.scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
html[data-night] .brand .mark,
html[data-night] .site-footer .brand .mark {
  background: #2f6453;
  color: #fff;
}
html[data-night] .btn-primary,
html[data-night] body:not(.signed-in) .account-btn {
  background: linear-gradient(180deg, #3a7864, #2d5f4f);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.7);
}
html[data-night] .btn-secondary,
html[data-night] .chip,
html[data-night] .account-btn,
html[data-night] .notif-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(237, 229, 218, 0.16);
  color: var(--ink);
}
html[data-night] .btn-secondary:hover,
html[data-night] .chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(237, 229, 218, 0.3);
}
html[data-night] .btn-ghost {
  color: var(--brand);
}
html[data-night] .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--brand-700);
}
html[data-night] .chip.active,
html[data-night] .chip[aria-pressed="true"],
html[data-night] .chip[aria-selected="true"],
html[data-night] .cal-pebble.sel,
html[data-night] .cal-mday.sel {
  background: #2f6453;
  border-color: #2f6453;
  color: #fff;
}
html[data-night] .tabs {
  background: rgba(255, 255, 255, 0.05);
}
html[data-night] .tab.active,
html[data-night] .tab[aria-selected="true"] {
  background: #2e2a25;
  color: var(--ink);
}
html[data-night] .page-hero.tinted,
html[data-night] .page-hero.warm,
html[data-night] .page-hero.gold {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
html[data-night] .hero-note,
html[data-night] .awake,
html[data-night] .job-menu {
  background: rgba(35, 32, 28, 0.9);
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-night] #homeStarts > .card:nth-child(1) {
  background: linear-gradient(160deg, rgba(96, 150, 122, 0.24), rgba(35, 32, 28, 0.9) 70%);
}
html[data-night] #homeStarts > .card:nth-child(2) {
  background: linear-gradient(160deg, rgba(190, 120, 92, 0.22), rgba(35, 32, 28, 0.9) 70%);
}
html[data-night] #homeStarts > .card:nth-child(3) {
  background: linear-gradient(160deg, rgba(130, 112, 200, 0.22), rgba(35, 32, 28, 0.9) 70%);
}
html[data-night] #homeStarts > .card .icon-badge,
html[data-night] .install-card .icon-badge,
html[data-night] .circle .circle-top .icon-badge {
  background: rgba(255, 255, 255, 0.08);
}
html[data-night] .family-grid .family-card,
html[data-night] .install-card {
  background: var(--card-bg);
}
html[data-night] .circle::before {
  opacity: 0.22;
}
html[data-night] .circle .circle-top .tag {
  background: rgba(35, 32, 28, 0.9);
}
html[data-night] .cal-top {
  background: linear-gradient(160deg, rgba(120, 105, 190, 0.18), rgba(96, 150, 122, 0.14) 60%, rgba(35, 32, 28, 0.94));
}
html[data-night] .cal-pebble {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-night] .cal-breath {
  background: radial-gradient(circle at 35% 35%, #4d6e5d, #2f4a3d 55%, #243a30);
  box-shadow: 0 0 0 10px rgba(96, 150, 122, 0.12), 0 0 0 22px rgba(96, 150, 122, 0.06);
}
html[data-night] .job-card,
html[data-night] .dnd-chip,
html[data-night] .dnd-ghost.dash-tile,
html[data-night] .dash.arranging .dash-tile,
html[data-night] .board-count {
  background: #2a2621;
  color: var(--ink);
}
html[data-night] .board-open {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-night] .bottom-nav {
  background: rgba(30, 27, 24, 0.82);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
html[data-night] .bottom-nav .active {
  background: rgba(156, 207, 183, 0.14);
  color: var(--brand-800);
}
html[data-night] .site-footer {
  background: linear-gradient(180deg, #1b1916, #131110);
}
html[data-night] .site-footer .newsletter .btn-light {
  background: #2f6453;
  border-color: #2f6453;
}
html[data-night] .newsletter-row input[type="email"] {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}
html[data-night] .modal-backdrop {
  background: rgba(0, 0, 0, 0.6);
}
html[data-night] .modal-head::before {
  background: rgba(255, 255, 255, 0.2);
}
html[data-night] input,
html[data-night] select,
html[data-night] textarea {
  background-color: #1d1a17;
  color: var(--ink);
  border-color: rgba(237, 229, 218, 0.16);
}
html[data-night] .toast {
  background: rgba(47, 100, 83, 0.96);
}
html[data-night] .demo-banner {
  background: #2a2519;
  color: #e9dcb8;
}

/* ---------- 24. This week, your jobs --------------------------------- */
.week-card {
  background: linear-gradient(165deg, rgba(226, 239, 231, 0.95), rgba(255, 255, 255, 0.92) 55%);
  border: 0;
}
.week-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.week-head .eyebrow {
  margin: 0;
}
.week-title {
  font-size: 1.3rem;
  margin: 4px 0 8px;
}
.week-tabs {
  margin: 4px 0 12px;
}
.week-label {
  margin: 10px 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.week-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--ink-2);
}
.week-list.helps li::marker {
  content: "✓  ";
  color: var(--brand);
}
.week-call {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.week-bday {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.week-bday label {
  font-weight: 600;
  font-size: 0.92rem;
}
.week-bday-row {
  display: flex;
  gap: 8px;
}
.week-bday-row input {
  flex: 1;
  min-width: 0;
}
.week-all {
  display: grid;
  gap: 10px;
}
.week-item {
  padding: 0;
  overflow: hidden;
}
.week-item summary {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.week-item summary::-webkit-details-marker {
  display: none;
}
.week-item summary b {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}
.week-when {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
.week-item.now {
  box-shadow: var(--shadow-sm), inset 0 0 0 2px rgba(31, 77, 64, 0.35);
}
.week-item-body {
  padding: 0 18px 18px;
}
.week-item-body .week-title {
  display: none;
}
.jobs-card {
  background: linear-gradient(165deg, rgba(250, 242, 220, 0.95), rgba(255, 255, 255, 0.92) 55%);
  border: 0;
}
.jobs-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.jobs-list .check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 550;
}
.jobs-list li.done .check {
  opacity: 0.55;
  text-decoration: line-through;
}
.board-send {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
html[data-night] .week-card,
html[data-night] .jobs-card {
  background: var(--card-bg);
}
html[data-night] .week-call,
html[data-night] .jobs-list .check {
  background: rgba(255, 255, 255, 0.05);
}
html[data-night] .week-item.now {
  box-shadow: var(--shadow-sm), inset 0 0 0 2px rgba(156, 207, 183, 0.4);
}

/* ---------- 25. Village order ---------------------------------------- */
.slot-grip {
  display: inline-grid;
  place-items: center;
  width: 30px;
  min-height: 36px;
  color: rgba(27, 42, 38, 0.35);
  font-weight: 800;
  letter-spacing: -2px;
  cursor: grab;
  touch-action: none;
}
/* The simpler builder: a row is one tap target that opens its sheet. */
.slot-main {
  flex: 1;
  min-width: 0;
  display: block;
  text-align: left;
  background: none;
  border: 0;
  padding: 4px 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 12px;
}
.slot-main:hover .t {
  color: var(--brand);
}
.slot-main:focus-visible {
  outline: 3px solid var(--brand-soft);
  outline-offset: 4px;
}
/* A list kept on the device before there's an account: rows to read, not tap. */
.slot-main.static {
  cursor: default;
}
.slot-main.static:hover .t {
  color: inherit;
}
.village-top-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.village-top-head h2 {
  font-size: 1.35rem;
  margin: 2px 0 0;
}
.village-list-head {
  align-items: flex-end;
  margin: 22px 0 10px;
}
.village-group {
  margin-bottom: 12px;
}
.village-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.village-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
/* One line of details in the list; the whole note is in the item's sheet. */
.slot-main > small:not(.claimed) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.village-group-more {
  margin-top: 10px;
}
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.start-pick {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), background 0.2s var(--ease-soft);
}
.start-pick input {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.start-pick > span {
  font-size: 1.4rem;
}
.start-pick b {
  font-size: 0.98rem;
}
.start-pick small {
  color: var(--muted);
  line-height: 1.35;
}
.start-pick:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.start-pick:has(input:focus-visible) {
  outline: 3px solid var(--brand-soft);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .start-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.sheet-h {
  font-size: 1.02rem;
  margin: 18px 0 8px;
}
#sheetBody > .sheet-h:first-child {
  margin-top: 0;
}
#villageSlots .slot.dnd-source {
  opacity: 0.35;
}
.dnd-ghost.slot {
  background: var(--surface);
  border-radius: 16px;
  padding: 10px 12px;
}
html[data-night] .slot-grip {
  color: rgba(237, 229, 218, 0.35);
}

/* =====================================================================
   26. The newer, app-like layer
   ===================================================================== */
/* Signed in, home is a personal Today screen; the visitor hero steps aside. */
body.has-today #page-home > .hero,
body.has-today #page-home .for-visitors {
  display: none;
}
.today {
  padding: clamp(20px, 4vw, 40px) 0 8px;
}
.today-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.today-title {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.05;
  margin: 6px 0 6px;
  letter-spacing: -0.02em;
}
.today-sub {
  margin: 0;
  color: var(--ink-2);
}
.qa-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 22px calc(-1 * var(--gutter)) 0;
  padding: 4px var(--gutter) 10px;
  scroll-snap-type: x proximity;
}
.qa-row::-webkit-scrollbar {
  display: none;
}
.qa {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 70px;
  scroll-snap-align: start;
  color: var(--ink-2);
}
.qa-icon {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(27, 42, 38, 0.05), 0 8px 18px rgba(27, 42, 38, 0.07);
  transition: transform 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}
.qa:nth-child(4n + 1) .qa-icon {
  background: linear-gradient(150deg, #e2efe7, #fff);
}
.qa:nth-child(4n + 2) .qa-icon {
  background: linear-gradient(150deg, #fbe9e1, #fff);
}
.qa:nth-child(4n + 3) .qa-icon {
  background: linear-gradient(150deg, #ece8f7, #fff);
}
.qa:nth-child(4n + 4) .qa-icon {
  background: linear-gradient(150deg, #faf2dc, #fff);
}
.qa:hover .qa-icon {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.qa:active .qa-icon {
  transform: scale(0.94);
}
.qa-label {
  font-size: 0.78rem;
  font-weight: 650;
}
.today-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.today-card {
  display: grid;
  gap: 4px;
  align-content: start;
  text-align: left;
  padding: 18px;
  border-radius: 24px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
  min-height: 118px;
}
.today-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.today-card:active {
  transform: scale(0.985);
}
.today-card .eyebrow {
  margin: 0;
}
.today-card b {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}
.today-card small {
  color: var(--ink-2);
  font-size: 0.86rem;
}
.today-card.next {
  background: linear-gradient(155deg, #e3eff4, rgba(255, 255, 255, 0.95) 70%);
}
.today-card.week {
  background: linear-gradient(155deg, #e2efe7, rgba(255, 255, 255, 0.95) 70%);
}
.today-card.village {
  background: linear-gradient(155deg, #faf2dc, rgba(255, 255, 255, 0.95) 70%);
}
@media (max-width: 700px) {
  .today-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .today-card {
    min-height: 0;
  }
}

/* Your circles, like stories. */
.circle-bubbles {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)) 18px;
  padding: 2px var(--gutter) 8px;
}
.circle-bubbles::-webkit-scrollbar {
  display: none;
}
.cbubble {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 76px;
  color: var(--ink-2);
}
.cbubble-ring {
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #8fc6a9, #e3a084, #a597dc, #8fc6a9);
}
.cbubble.more .cbubble-ring {
  background: rgba(27, 42, 38, 0.1);
}
.cbubble-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--paper);
  border: 3px solid var(--paper);
}
.cbubble-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cbubble:active .cbubble-ring {
  transform: scale(0.95);
}

/* A little burst when something good happens. */
.celebrate {
  position: fixed;
  left: 50%;
  top: 58%;
  z-index: 400;
  pointer-events: none;
}
.celebrate span {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  animation: celebrate 1.6s var(--d, 0s) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes celebrate {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1.1);
  }
}

/* Loading: a slow shimmer instead of grey blocks. */
.skeleton span {
  background: linear-gradient(90deg, rgba(27, 42, 38, 0.06), rgba(27, 42, 38, 0.11), rgba(27, 42, 38, 0.06)) 0 0 / 200% 100%;
  animation: calm-shimmer 1.6s ease-in-out infinite;
}
@keyframes calm-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

html[data-night] .qa-icon,
html[data-night] .qa:nth-child(n) .qa-icon {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
html[data-night] .today-card.next,
html[data-night] .today-card.week,
html[data-night] .today-card.village,
html[data-night] .cbubble-icon {
  background: var(--paper);
  border-color: var(--paper);
}
html[data-night] .skeleton span {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)) 0 0 / 200% 100%;
}
@media (prefers-reduced-motion: reduce) {
  .skeleton span {
    animation: none;
  }
}

/* Night mode: surfaces that were dark green (or ink) by day stay dark at
   night, instead of flipping to a light token under white text. */
html[data-night] .skip-link,
html[data-night] .chip:has(input:checked),
html[data-night] .plus-badge,
html[data-night] .compare-table thead th:last-child,
html[data-night] .topic-list button.active {
  background: #2f6453;
  color: #fff;
}
html[data-night] .card.dark,
html[data-night] .drawer-account,
html[data-night] .welcome-strip,
html[data-night] .entry.feature,
html[data-night] .mission,
html[data-night] .urgent {
  background: #1d3129;
  color: #e7f3ec;
}
html[data-night] .ck-tip {
  background: #2a2621;
  color: var(--ink);
}
html[data-night] .btn-light {
  background: #e7f3ec;
  border-color: #e7f3ec;
  color: #1f4d40;
}
html[data-night] .notice-warn,
html[data-night] .notice-warn b,
html[data-night] .event-date,
html[data-night] .event-date b,
html[data-night] .event-date small {
  color: #ecd9a6;
}
html[data-night] .tag.accent {
  color: #f0b39c;
}
html[data-night] .tag.gold {
  color: #ecd9a6;
}
html[data-night] .btn-danger {
  background: #b0473a;
  border-color: #b0473a;
  color: #fff;
}
html[data-night] .urgent-grid article {
  background: #2a2621;
  color: var(--ink);
}
.qa-row,
.circle-bubbles,
.cal-quick {
  scroll-padding-inline: var(--gutter);
}

/* ---------- 29. Linked calendars (Google, Apple, Outlook) ------------- */
.cal-block.t-linked {
  background: var(--paper-2);
}
.cal-block.t-linked::before {
  background: var(--feed, #6d5fa6);
}
.cal-dots i.t-linked {
  background: #7d8a86;
}
.cal-linked {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  margin-bottom: 12px;
}
.cal-linked h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}
.cal-feed-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
.linked-warn {
  color: var(--danger);
}
.steps-list {
  margin: 0 0 14px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  line-height: 1.5;
}
.file-btn {
  cursor: pointer;
}
.file-btn:focus-within {
  outline: 3px solid var(--brand-soft);
  outline-offset: 2px;
}

/* ---------- 28. The plan, folded: one part open at a time ------------- */
.plan-section {
  position: relative;
}
.plan-section:not(.open) .plan-section-head {
  margin-bottom: 0;
}
.plan-head-text {
  flex: 1;
  min-width: 0;
}
.plan-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
/* The whole head is the tap target, not only the words. */
.plan-toggle::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 96px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.plan-section.open .plan-toggle::after {
  height: 84px;
}
.plan-toggle:focus-visible {
  outline: 3px solid var(--brand-soft);
  outline-offset: 4px;
  border-radius: 8px;
}
.plan-status {
  flex: none;
  align-self: center;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  white-space: nowrap;
}
.plan-status.part {
  background: var(--butter-soft);
  color: #7a5a14;
}
.plan-status.done {
  background: var(--brand-soft);
  color: var(--brand-700);
}
.plan-next {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
html[data-night] .plan-status.part {
  color: #ecd9a6;
}
html[data-night] .plan-status.done {
  color: #c3e3d3;
}
@media (max-width: 700px) {
  .plan-section-head .plan-section-title {
    font-size: 1.15rem;
  }
  .plan-toggle::after {
    height: 110px;
  }
}

/* =====================================================================
   27. On paper: the page you are on, in day colours, without the
   screen's glass, glow and floating buttons. night.js lifts night mode
   while the print dialog is open; the tokens below are the fallback.
   ===================================================================== */
@media print {
  html[data-night] {
    color-scheme: light;
    --paper: #f7f5f0;
    --paper-2: #f0ece5;
    --paper-3: #e6e0d6;
    --surface: #ffffff;
    --ink: #1b2a26;
    --ink-2: #3d4c47;
    --muted: #5a655f;
    --brand: #1f4d40;
    --brand-600: #2a6353;
    --brand-700: #173b31;
    --brand-800: #112b24;
    --brand-soft: #e2efe7;
    --brand-tint: #eff6f1;
    --accent: #c3664c;
    --accent-600: #ab5540;
    --danger: #a4372c;
    --success: #2b6b53;
    --line: rgba(27, 42, 38, 0.08);
    --line-strong: rgba(27, 42, 38, 0.18);
    --card-bg: #ffffff;
  }
  html,
  body {
    background: #fff !important;
  }
  body::before,
  .celebrate,
  .awake,
  .checkin-prompt,
  .notif-panel,
  .skip-link {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
    min-height: 0;
  }
  .card,
  .kit,
  .plan-summary {
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  h1,
  h2,
  h3,
  .eyebrow {
    break-after: avoid;
  }
  .plan-summary-section,
  .kit-row,
  .kit section {
    break-inside: avoid;
  }
  /* Print one card on its own (the help rota): everything else waits. */
  body.print-sheet > :not(#printSheet) {
    display: none !important;
  }
  #printSheet {
    display: block !important;
  }
}
#printSheet {
  display: none;
}

/* ---------- 30. Phone notifications sheet ----------------------------- */
#pushForm {
  gap: 10px;
}
.push-kinds {
  display: grid;
  margin-bottom: 6px;
}
#pushForm + .fine {
  margin-top: 16px;
}

/* ---------- 31. A quieter account menu -------------------------------- */
/* Five everyday places, the rest folded under More, and the settings in a
   small row at the bottom. Text only: no row of coloured icons. */
.account-menu {
  width: 252px;
  padding: 6px;
}
.account-menu button,
.am-more summary {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-2);
}
.account-menu-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 4px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.account-menu-identity .am-id {
  flex: 1;
  min-width: 0;
  display: grid;
}
.account-menu-identity b {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-identity small {
  font-size: 0.78rem;
  color: var(--muted);
}
.am-chev {
  color: var(--muted);
  font-size: 1.2rem;
}
.am-list,
.am-more {
  display: grid;
}
.am-list .tab-count {
  margin-left: auto;
}
.am-more {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.am-more summary {
  display: flex;
  align-items: center;
  list-style: none;
  color: var(--muted);
  cursor: pointer;
}
.am-more summary::-webkit-details-marker {
  display: none;
}
.am-more summary::after {
  content: "›";
  margin-left: auto;
  font-size: 1.1rem;
  transform: rotate(90deg);
  transition: transform 0.15s;
}
.am-more[open] summary::after {
  transform: rotate(-90deg);
}
.am-more summary:hover {
  background: var(--paper-2);
}
.am-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.am-foot button {
  width: auto;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.am-foot [data-action="night-cycle"] b {
  margin-left: 3px;
  font-weight: 600;
}
.am-foot .danger {
  margin-left: auto;
  color: var(--danger);
}
@media (max-width: 700px) {
  .account-menu {
    width: min(260px, calc(100vw - var(--gutter) * 2));
  }
}

/* ---------- 32. Less on the page once you're a member ----------------- */
/* Signed in, the pages that sell Postpartum+ to a visitor say less: home is
   Today plus two conversations and two events, the long introductions on
   Community and Events step aside, and the footer is one line of links. */
body.has-today #page-home .section-head p,
body.signed-in #page-community .page-hero .lead,
body.signed-in #page-events .page-hero .lead {
  display: none;
}
body.has-today #homeCommunity > :nth-child(n + 3),
body.has-today #homeEvents > :nth-child(n + 3) {
  display: none;
}
body.signed-in .site-footer {
  padding-block: 22px;
}
body.signed-in .site-footer .newsletter,
body.signed-in .site-footer .footer-grid > div:first-child > p:first-of-type,
body.signed-in .site-footer .footer-grid > div:nth-child(2),
body.signed-in .site-footer .footer-grid > div:nth-child(3),
body.signed-in .site-footer .footer-grid h2 {
  display: none;
}
body.signed-in .site-footer .footer-grid {
  display: grid;
  gap: 10px;
}
body.signed-in .site-footer .footer-grid > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
body.signed-in .site-footer .footer-grid > div:first-child p {
  margin: 0 !important;
}
body.signed-in .site-footer .footer-grid ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  font-size: 0.85rem;
}
body.signed-in .site-footer .footer-note {
  margin-top: 10px;
  padding-top: 10px;
}

/* Your tools as small tiles, and the invite folded until it's wanted. */
.tools-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
}
.tool-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}
.tool-tile {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.tool-tile span {
  font-size: 1.35rem;
}
.tool-tile:hover {
  border-color: var(--brand);
}
.invite-compact h3 {
  margin: 2px 0 4px;
}
.invite-fold > summary {
  list-style: none;
  width: fit-content;
  cursor: pointer;
}
.invite-fold > summary::-webkit-details-marker {
  display: none;
}
.invite-fold[open] > summary {
  margin-bottom: 12px;
}

/* ---------- 33. A shorter menu: About and Settings are pages ---------- */
.settings-group {
  margin-top: 24px;
}
.settings-group h2 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.settings-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.settings-list > .settings-row:last-child {
  border-bottom: 0;
}
.settings-row[hidden] {
  display: none;
}
.settings-row > span:not(.icon):not(.settings-chev) {
  flex: 1;
  display: grid;
  gap: 2px;
  font-weight: 600;
}
.settings-row small {
  font-weight: 400;
  font-size: 0.84rem;
  color: var(--muted);
}
.settings-row .icon {
  width: 26px;
  text-align: center;
}
.settings-row b {
  color: var(--brand);
}
.settings-chev {
  color: var(--muted);
  font-size: 1.2rem;
}
.settings-row.danger {
  color: var(--danger);
}
.settings-row:hover {
  background: var(--paper-2);
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.about-links a:hover {
  border-color: var(--brand);
}

/* The profile line keeps each part whole ("Baby 6–12 months" never splits),
   and "Edit about me" sits under it instead of squeezing it. */
.account-head .meta-bit {
  white-space: nowrap;
}
.account-head .account-edit {
  display: inline-block;
  margin: 4px 0 0;
  font-size: 0.88rem;
}

/* ---------- 34. Discussions: sorted by what you need ------------------ */
.community-layout.two {
  grid-template-columns: minmax(0, 1fr) 300px;
}
@media (max-width: 1080px) {
  .community-layout.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .community-layout.two > aside {
    display: none;
  }
}
.kind-chips {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.kind-chips::-webkit-scrollbar {
  display: none;
}
.kind-chips .chip {
  flex: none;
}
.feed-toolbar .tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
}
.tag.kind {
  background: var(--paper-2);
  color: var(--ink);
  border-color: transparent;
}
.tag.kind-question {
  background: #e6effa;
  color: #234a78;
}
.tag.kind-support {
  background: #f6e9ee;
  color: #7a3550;
}
.tag.kind-win {
  background: #fbf1d9;
  color: #6f5211;
}
.tag.kind-tip {
  background: #e6f2ec;
  color: #1f5a45;
}
.tag.needs {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}
html[data-night] .tag.kind-question,
html[data-night] .tag.kind-support,
html[data-night] .tag.kind-win,
html[data-night] .tag.kind-tip {
  background: var(--paper-2);
  color: var(--ink);
}
.kind-pick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.kind-pick legend {
  margin-bottom: 8px;
  font-weight: 650;
}
.kind-pick label {
  position: relative;
  cursor: pointer;
}
.kind-pick input {
  position: absolute;
  opacity: 0;
}
.kind-pick label > span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.kind-pick .kp-icon {
  font-size: 1.3rem;
}
.kind-pick small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}
.kind-pick input:checked + span {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset;
  background: var(--brand-soft);
}
.kind-pick input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.kinds-card ul {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.kinds-card li small {
  display: block;
  color: var(--muted);
}
.reply-hint {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------- 35. Staying current: the update bar and pull to refresh --- */
.update-bar {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--surface, #fff);
  box-shadow: var(--shadow-lg);
  font-size: 0.93rem;
  font-weight: 500;
}
@media (max-width: 760px) {
  .update-bar {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
.ptr {
  position: fixed;
  z-index: 140;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 4px);
  transform: translate(-50%, -48px);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  color: var(--brand);
  opacity: 0;
  pointer-events: none;
}
.ptr-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.ptr.armed {
  background: var(--brand);
  color: #fff;
}
.ptr.loading .ptr-icon {
  animation: ptr-spin 0.8s linear infinite;
}
@keyframes ptr-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ptr.loading .ptr-icon {
    animation: none;
  }
}

/* ---------- 36. One menu, under your picture --------------------------- */
/* The ☰ drawer is gone. The profile picture (a person outline when signed
   out) opens this: your own places, a quiet Explore list, About and
   Settings. Everything the drawer held is here or one tap from it. */
.account-menu {
  width: 300px;
  max-height: calc(100dvh - var(--header-h) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 760px) {
  .account-menu {
    width: min(320px, calc(100vw - var(--gutter) * 2));
    max-height: calc(100dvh - var(--header-h) - 84px - env(safe-area-inset-bottom));
  }
}
body.signed-in .account-menu [data-signed-out],
body:not(.signed-in) .account-menu [data-signed-in] {
  display: none;
}
.am-welcome {
  display: grid;
  gap: 4px;
  padding: 12px 12px 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.am-welcome b {
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
}
.am-welcome small {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}
.am-auth {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.account-menu .am-auth .btn {
  flex: 1;
  width: auto;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  font-weight: 600;
}
.account-menu .am-auth .btn-primary {
  color: #fff;
}
.am-explore {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.am-label {
  display: block;
  padding: 8px 12px 4px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.am-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2px;
}
.account-menu .am-grid button {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.88rem;
}
.am-foot [data-go="settings"] {
  margin-right: auto;
}
body:not(.signed-in) .account-btn {
  padding: 4px 12px 4px 4px;
}
.avatar-guest {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
body:not(.signed-in) .account-btn .chev {
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- 37. Your photo: move, zoom, turn -------------------------- */
.crop {
  display: grid;
  gap: 14px;
  justify-items: center;
  min-width: 0;
}
.crop-stage {
  position: relative;
  /* Small enough on a short phone that the buttons stay in view. */
  width: min(300px, 100%, calc(100dvh - 400px));
  min-width: 180px;
  aspect-ratio: 1;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.crop-stage:active {
  cursor: grabbing;
}
.crop-stage:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
/* Out of the flow, so its pixel size never widens the sheet. */
.crop-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.crop-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(20, 30, 27, 0.5);
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: -2px;
  pointer-events: none;
}
.crop-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(300px, 100%);
}
.crop-tools input[type="range"] {
  flex: 1;
  accent-color: var(--brand);
}
.crop-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
}
.crop-btn:hover {
  background: var(--paper-2);
}
.crop-hint {
  margin: -4px 0 0;
  text-align: center;
}
.crop .actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.avatar-edit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.avatar-edit-actions {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.avatar-edit-label {
  font-weight: 600;
  font-size: 0.92rem;
}
.avatar-edit .btn-row {
  align-items: center;
  margin: 0;
}
.avatar-edit label.btn {
  cursor: pointer;
}
.avatar-edit input.sr-only:focus-visible + .link-btn,
.avatar-edit .btn-row:focus-within label.btn {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* The real file input stays focusable for the keyboard but takes no room
   (the form's inputs are full width, which would push the page sideways). */
.avatar-edit input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- 38. One question at a time ------------------------------- */
/* Check-ins and quizzes as cards: a progress bar, the question big, the
   answers as large buttons; Next moves on. */
.step-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 20px;
}
.step-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
}
.step-bar {
  flex: 1;
  display: flex;
  gap: 4px;
}
.step-bar i {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--paper-3);
  transition: background 0.25s;
}
.step-bar i.on {
  background: var(--brand);
}
.step-count {
  min-width: 3.4em;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stepper [data-step] {
  min-height: 200px;
  margin: 0;
  padding: 0;
  border: 0;
}
.stepper [data-step] > legend,
.stepper [data-step] > label,
.stepper [data-step] > h3 {
  display: block;
  margin: 0 0 20px;
  padding: 0;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.35rem, 5.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  outline: none;
  text-wrap: balance;
}
.step-in {
  animation: step-in 0.3s var(--ease-soft, ease-out) both;
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}
.stepper .scale-options {
  gap: 8px;
}
.stepper .scale-options span {
  gap: 6px;
  min-height: 92px;
  padding: 12px 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.scale-face {
  font-style: normal;
  font-size: 1.9rem;
  line-height: 1;
}
.stepper .scale-options input:checked + span {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--ink);
  transform: scale(1.06);
}
.stepper [data-step] > legend .eyebrow {
  display: block;
  margin-bottom: 6px;
  font-family: inherit;
}
.stepper [data-step] select {
  width: 100%;
}
/* One-choice questions: big stacked answers, no little radio circle. */
.stepper [data-choice] .chip-group {
  display: grid;
  gap: 10px;
}
.stepper [data-choice] .chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.stepper [data-choice] .chip {
  position: relative;
  justify-content: center;
  min-height: 60px;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 1.02rem;
  font-weight: 600;
}
.stepper textarea {
  min-height: 140px;
}
.step-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.step-foot .btn {
  min-width: 120px;
  justify-content: center;
}
.step-fine {
  margin: 14px 0 0;
  text-align: center;
}
@media (max-width: 700px) {
  .step-foot .btn-primary {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .step-in {
    animation: none;
  }
  .stepper .scale-options input:checked + span {
    transform: none;
  }
}


/* ---------- 39. Finding the right person ------------------------------ */
.friend-link-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 0 0 16px;
  background: var(--brand-tint);
  border-color: transparent;
}
.friend-link-card > div:first-child {
  flex: 1 1 260px;
  display: grid;
  gap: 4px;
}
.friend-link-card small {
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.45;
}
.friend-link-card .btn-row {
  margin: 0;
}
.friend-link-card.compact {
  margin-top: 12px;
}
.person-shared {
  margin: 8px 0 0;
  color: var(--brand-800, var(--brand));
  font-weight: 600;
}
.same-name-tip {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}
.friend-link-hello {
  margin: 0 0 16px;
}
#personPage {
  scroll-margin-top: 84px;
}
.copy-field {
  width: 100%;
  margin-top: 8px;
  font-size: 0.9rem;
}

/* ---------- 40. Delete your account ----------------------------------- */
.delete-account {
  display: grid;
  gap: 10px;
}
.delete-account p,
.delete-account ul {
  margin: 0;
}
.delete-account ul {
  display: grid;
  gap: 4px;
  padding-left: 1.2em;
}
.delete-account .form {
  margin-top: 6px;
}
.delete-account #deleteConfirm {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- 41. Getting started: set-up cards, checklist, home card --- */
.setup .choices {
  display: grid;
  gap: 10px;
}
.setup .choices.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.choice {
  position: relative;
  display: block;
  cursor: pointer;
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface, #fff);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.choice-box b {
  display: block;
  font-size: 1rem;
}
.choice-box small {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.85rem;
  line-height: 1.35;
}
.choice-icon {
  flex: none;
  font-size: 1.5rem;
  line-height: 1;
}
.choice input:checked + .choice-box {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.choice input:focus-visible + .choice-box {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.setup .fine {
  margin: 12px 0 0;
}
.setup-photo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.setup-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-icons label {
  position: relative;
  cursor: pointer;
}
.setup-icons input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.setup-icons span[aria-hidden] {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1.35rem;
}
.setup-icons input:checked + span {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.setup-icons input:focus-visible + span {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.setup-done {
  display: grid;
  gap: 10px;
  text-align: center;
  justify-items: center;
}
.setup-done h3,
.setup-done p,
.setup-done ul {
  margin: 0;
}
.setup-done ul {
  display: grid;
  gap: 4px;
  padding: 0;
  list-style: none;
}
.setup-done-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.6rem;
  font-weight: 700;
}
/* The checklist */
.start-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 6px;
  font-variant-numeric: tabular-nums;
}
.start-progress .start-bar {
  flex: 1;
}
.start-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.start-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.4s;
}
.start-group {
  margin-top: 26px;
}
.start-group h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.start-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.start-item details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface, #fff);
}
.start-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.start-item summary::-webkit-details-marker {
  display: none;
}
.start-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-tint, var(--brand-soft));
  font-size: 1.1rem;
}
.start-item.done .start-check {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.start-item.done .start-text b {
  color: var(--ink-2);
}
.start-text {
  flex: 1;
  min-width: 0;
}
.start-text b,
.start-text small {
  display: block;
}
.start-text small {
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.35;
}
.start-chev {
  color: var(--ink-2);
  transition: transform 0.2s;
}
.start-item details[open] .start-chev {
  transform: rotate(90deg);
}
.start-lesson {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 0 16px 16px 64px;
}
.start-lesson ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.93rem;
}
@media (max-width: 520px) {
  .start-lesson {
    padding-left: 16px;
  }
}
/* On the home screen */
.start-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface, #fff);
}
.start-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.start-card-head b {
  display: block;
  font-size: 1.05rem;
}
.start-next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.start-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.start-chip:hover {
  border-color: var(--brand);
}
@media (prefers-reduced-motion: reduce) {
  .start-bar i,
  .start-chev,
  .choice-box {
    transition: none;
  }
}

/* ---------- 42. Event photos on the cards ----------------------------- */
.event-card.has-photo .event-photo {
  grid-column: 1 / -1;
  display: block;
  margin: -20px -20px 4px;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  cursor: pointer;
}
.event-card.has-photo .event-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 700px) {
  .event-card.has-photo .event-photo {
    margin: -16px -16px 2px;
  }
}

/* ---------- 43. A photo on the sign-up form --------------------------- */
.signup-photo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 12px;
}
.signup-photo .field-hint {
  display: block;
  margin-top: 6px;
}

/* Any hidden file input takes no room: input[type="file"] is full width
   and outranks .sr-only, which let the sign-up sheet scroll sideways. */
input[type="file"].sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  opacity: 0;
}
.signup-photo div:focus-within label.btn {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- 44. 911 beside 988 ------------------------------------------ */
/* Emergencies get their own button, set apart from the crisis line by a
   hairline and a warm tint, so nobody has to read a sentence to find it. */
.crisis-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
}
.crisis-bar a.sos {
  position: relative;
  margin-left: 17px;
  background: #fbe4dc;
  color: #93361f;
  box-shadow: 0 0 0 1px rgba(147, 54, 31, 0.16);
}
.crisis-bar a.sos::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: rgba(31, 77, 64, 0.2);
}
.crisis-bar a.sos:hover,
.crisis-bar a.sos:focus-visible {
  background: #b5482e;
  color: #fff;
}
html[data-night] .crisis-bar a.sos {
  background: rgba(232, 120, 96, 0.2);
  color: #ffd9cc;
  box-shadow: none;
}
html[data-night] .crisis-bar a.sos::before {
  background: rgba(255, 255, 255, 0.14);
}
@media (max-width: 560px) {
  .crisis-bar .sos-word {
    display: none;
  }
  .crisis-bar a {
    padding: 4px 9px;
    margin-left: 4px;
  }
  .crisis-bar a.sos {
    margin-left: 13px;
  }
  .crisis-bar a.sos::before {
    left: -8px;
  }
}

/* ---------- 45. One Village: tabs, this week, who's helping -------------- */
/* Village is one place with three tabs: This week (by day, and by person),
   the Help list, and the Plan at home. */
.village-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 16px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.village-tabs::-webkit-scrollbar {
  display: none;
}
.vtab {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.vtab:hover {
  color: var(--ink);
  background: var(--brand-tint);
}
.vtab.on {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.vtab-n {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-600);
}
.h-eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.village-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0 12px;
}
.village-stats > div {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
}
.village-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.village-stats small {
  color: var(--muted);
  font-size: 0.8rem;
}
.village-week,
.village-roster,
.village-nav-card {
  margin-top: 14px;
}
.wk-day + .wk-day {
  margin-top: 12px;
}
.wk-date {
  margin: 12px 0 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.wk-date small {
  margin-left: 4px;
  font-weight: 500;
  color: var(--muted);
}
.wk-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 6px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  cursor: pointer;
}
.wk-item.taken {
  border-left-color: var(--brand);
  background: var(--brand-tint);
}
.wk-item:hover {
  border-color: var(--line-strong);
}
.wk-time {
  min-width: 62px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.wk-main {
  min-width: 0;
}
.wk-main b {
  display: block;
  font-size: 0.98rem;
}
.wk-main small {
  display: block;
  color: var(--muted);
}
.wk-item.taken .wk-main small {
  color: var(--brand);
  font-weight: 600;
}
.wk-badge,
.slot-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: 1px;
}
.wk-badge.open,
.slot-badge.open {
  background: var(--accent-soft);
  color: var(--accent-600);
}
.wk-badge.taken,
.slot-badge.taken {
  background: var(--brand-soft);
  color: var(--brand);
}
.slot-badge {
  margin-left: 6px;
  font-size: 0.7rem;
}
.roster {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.roster-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.roster-row:first-child {
  border-top: 0;
}
.roster-initial {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 1.05rem;
}
.roster-main {
  min-width: 0;
}
.roster-main b {
  display: block;
}
.roster-main small {
  display: block;
  color: var(--muted);
}
.roster-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.village-filter {
  margin: 4px 0 12px;
}
.village-filter .chip.on {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
html[data-night] .village-filter .chip.on {
  background: #2f6453;
  border-color: #2f6453;
  color: #fff;
}
.chip-n {
  font-weight: 700;
  opacity: 0.75;
}
.village-filtered .slot-grip {
  display: none;
}
.village-nav-card {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.village-nav-card h3 {
  margin: 0 0 4px;
}
.village-nav-card p {
  margin: 0;
}
@media (max-width: 560px) {
  .roster-row {
    grid-template-columns: auto 1fr;
  }
  .roster-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
  .wk-item {
    gap: 10px;
    padding: 10px;
  }
  .wk-time {
    min-width: 52px;
    font-size: 0.8rem;
  }
  .vtab {
    flex: 1 1 auto;
    padding: 8px 8px;
    font-size: 0.9rem;
  }
}
/* A family with a page already knows what Village is: the heading will do. */
body.signed-in #page-village .page-hero .lead {
  display: none;
}
.village-list-head > div:first-child {
  flex: 1 1 14rem;
}

/* ---------- 46. Helper badges and reasons to reply ----------------------- */
.badge-slot:empty {
  display: none;
}
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: 1px;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.badge-row .badge-chip {
  margin-left: 0;
  font-size: 0.8rem;
  padding: 4px 10px;
}
.helpers-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--gold-soft), var(--surface));
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.helpers-strip:hover {
  border-color: var(--line-strong);
}
.helpers-label {
  font-weight: 700;
  white-space: nowrap;
}
.helpers-faces {
  display: inline-flex;
}
.helpers-faces .avatar {
  margin-left: -8px;
  box-shadow: 0 0 0 2px var(--surface);
}
.helpers-faces .avatar:first-child {
  margin-left: 0;
}
.helpers-faces .sr-only {
  display: none;
}
.helpers-names {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.helper-list,
.badge-key {
  list-style: none;
  margin: 0;
  padding: 0;
}
.helper-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.helper-row:first-child {
  border-top: 0;
}
.helper-row small,
.badge-key small {
  display: block;
  color: var(--muted);
}
.badge-key li {
  padding: 6px 0;
}
.post-actions .first-reply {
  color: var(--accent-600);
  font-weight: 700;
}
.waiting-nudge {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.waiting-nudge b {
  display: block;
}
.waiting-nudge small {
  display: block;
  color: var(--ink-2);
}
.waiting-go {
  font-size: 1.2rem;
  color: var(--accent-600);
}
@media (max-width: 560px) {
  .helpers-names {
    display: none;
  }
  .helpers-strip {
    justify-content: space-between;
  }
}

/* ---------- 47. The Navigator: three things first ----------------------- */
/* A plan opens on what to do this week, each step with its own next move
   and a round number to tick once it's done. The page's introduction
   steps aside while a plan or the crisis card is showing; it stays for
   screen readers as the page's heading. */
#page-navigator.nav-quiet .page-hero {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.nav-three {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
/* The number and the title on one line; what to do, full width below. */
.nav-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  margin: 0;
}
.nav-step-body {
  grid-column: 1 / -1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.nav-step h3 {
  font-size: 1.14rem;
  line-height: 1.3;
  margin: 0;
}
.nav-step-body > p {
  flex: 1;
  margin: 0 0 12px;
  font-size: 0.93rem;
  color: var(--ink-2);
}
.nav-step-actions {
  margin: 0;
}
.nav-step-actions + .link-btn {
  margin-top: 6px;
}
.nav-step.done h3,
.nav-step.done .nav-step-body > b {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
}
.nav-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: var(--surface);
  color: var(--brand);
  font: 700 1rem/1 var(--font-body);
  cursor: pointer;
  transition: background 0.2s var(--ease-soft), color 0.2s var(--ease-soft);
}
.nav-tick:hover {
  background: var(--brand-tint);
}
.nav-tick[aria-pressed="true"] {
  background: var(--brand);
  color: var(--surface);
}
.nav-tick:disabled {
  opacity: 0.45;
  cursor: default;
}
.nav-tick-ok {
  display: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-tick[aria-pressed="true"] .nav-tick-n {
  display: none;
}
.nav-tick[aria-pressed="true"] .nav-tick-ok {
  display: block;
}
/* The same steps in "Where you left off": a list, not three cards. */
.nav-three.compact {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 12px;
}
.nav-three.compact .nav-step {
  grid-template-rows: none;
  align-items: start;
}
.nav-three.compact .nav-step-body {
  grid-column: 2;
}
.nav-three.compact .nav-tick {
  width: 36px;
  height: 36px;
}
.nav-three.compact .nav-step-body > b {
  margin-top: 7px;
  line-height: 1.35;
}
.nav-three-note {
  margin: 8px 0 14px;
}
.nav-send,
.nav-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.nav-send-label {
  font-weight: 600;
  margin-right: 2px;
}
.nav-jumps {
  margin-bottom: 18px;
}
.nav-jumps-label {
  font-size: 0.88rem;
  color: var(--muted);
  width: 100%;
}
.nav-jumps .chip {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 0.86rem;
}
#navigatorArea .card[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}
@media (max-width: 960px) {
  .nav-three:not(.compact) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media print {
  .nav-jumps {
    display: none !important;
  }
  .nav-three {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav-step {
    break-inside: avoid;
  }
}

/* Find Care, arrived at from a plan: where they came from, and a way to
   tick the step off. On a phone the tick sits just above the tab bar,
   where a thumb is after a call; on a computer it stays in the line. */
.find-from {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
}
.find-from-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.find-done {
  display: flex;
  align-items: center;
  gap: 10px;
}
.find-done-q {
  font-size: 0.9rem;
  line-height: 1.25;
  color: var(--ink-2);
}
.find-done-btn {
  flex: none;
  white-space: nowrap;
  background: var(--surface);
  border: 1.5px solid var(--brand);
  color: var(--brand);
}
.find-done-btn[aria-pressed="true"] {
  background: var(--brand);
  color: var(--surface);
}
@media (max-width: 700px) {
  .find-done {
    position: fixed;
    z-index: 54;
    left: 12px;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    justify-content: space-between;
    padding: 7px 7px 7px 16px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 10px 28px rgba(27, 42, 38, 0.14);
    transition: translate 0.42s var(--ease-soft);
  }
  body.nav-tucked .find-done {
    translate: 0 74px;
  }
  html[data-night] .find-done {
    background: rgba(30, 27, 24, 0.96);
  }
  body[data-page="find"]:has(#findDone) {
    padding-bottom: calc(150px + env(safe-area-inset-bottom));
  }
  body[data-page="find"]:has(#findDone) .toast {
    bottom: calc(150px + env(safe-area-inset-bottom));
  }
}
@media print {
  .find-done {
    display: none !important;
  }
}
