:root {
  --navy: #1b2a4a;
  --navy-soft: #2a3d66;
  --paper: #eef0f4;
  --paper-deep: #e2e5ec;
  --pink: #e25b90;
  --pink-deep: #c43d74;
  --line: #d5dae3;
  --muted: #5a6578;
  --card: #fff;
  --shadow: 0 1px 2px rgba(27, 42, 74, 0.05);
  --shadow-lg: 0 16px 40px rgba(27, 42, 74, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
  --page: min(1180px, calc(100% - 2.5rem));
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --header-h: 3.5rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--navy);
  font: var(--text)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

body.app {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--pink-deep);
  text-underline-offset: 0.12em;
}

a:hover { color: var(--pink); }

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  min-height: 2.75rem;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  button:hover,
  .button:hover {
    background: var(--pink-deep);
    color: #fff;
  }
}

button.ghost,
.button.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}

@media (hover: hover) {
  button.ghost:hover,
  .button.ghost:hover {
    border-color: var(--navy-soft);
    background: var(--paper-deep);
    color: var(--navy);
  }
}

.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  flex: 0 0 auto;
  padding-top: env(safe-area-inset-top);
}

.site-header a { color: #fff; text-decoration: none; }

.header-inner,
.page {
  width: var(--page);
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 5px;
  background: var(--pink);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.nav-primary {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-primary::-webkit-scrollbar { display: none; }

.nav a,
.nav-more summary {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

@media (hover: hover) {
  .nav a:hover,
  .nav-more summary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
  }
}

.nav a[aria-current="page"],
.nav-more summary[aria-current="page"] {
  background: var(--pink);
  color: #fff;
}

.nav-more {
  position: relative;
  flex: 0 0 auto;
}

.nav-more summary {
  list-style: none;
  color: rgba(255, 255, 255, 0.82);
}

.nav-more summary::-webkit-details-marker { display: none; }

.nav-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 10.5rem;
  display: grid;
  gap: 0.1rem;
  padding: 0.4rem;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  z-index: 50;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

.nav-more-menu a {
  display: block;
  color: rgba(255, 255, 255, 0.9);
}

#nav-auth {
  flex: 0 0 auto;
  min-width: 4.75rem;
  text-align: center;
  opacity: 0;
}

html.auth-ready #nav-auth {
  opacity: 1;
}

.list-pick {
  margin: 0;
  font-weight: 600;
}

.colour-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.4rem;
  flex-wrap: wrap;
}

.colour-edit input[type="color"] {
  width: 2.2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
}

.colour-edit input[type="text"] {
  width: 5.5rem;
  margin: 0;
  padding: 0.25rem 0.4rem;
}

.colour-edit .rgb-fields {
  display: inline-flex;
  gap: 0.25rem;
}

.colour-edit .rgb-fields input {
  width: 3.2rem;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.logs-table th,
.logs-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.45rem 0.35rem;
  vertical-align: top;
}

.logs-table code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  word-break: break-word;
}

.page {
  flex: 1 1 auto;
  padding: var(--s-5) 0 var(--s-7);
}

.page-narrow {
  width: min(28rem, calc(100% - 2.5rem));
}

.page-narrow .page-head {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: var(--s-4);
}

.page-surface-flush .logs-table th,
.page-surface-flush .logs-table td {
  padding-left: var(--s-4);
  padding-right: var(--s-4);
}

h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
  line-height: 1.15;
  color: var(--navy);
}

h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-3);
  color: var(--navy);
}

h3 {
  font-size: var(--text);
  font-weight: 700;
  margin: var(--s-4) 0 var(--s-2);
}

.lede,
.page-sub {
  color: var(--muted);
  margin: 0;
  max-width: 42rem;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  margin: 0 0 var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.page-head-text {
  display: grid;
  gap: var(--s-2);
  min-width: 0;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
}

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  margin: 0 0 var(--s-4);
  padding: var(--s-3);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-toolbar .segment { margin-right: auto; }

.page-surface {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
}

.page-surface-flush {
  padding: 0;
  overflow: hidden;
}

.table-scroll,
#cal-body,
#week-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.9fr);
  gap: var(--s-5);
  align-items: start;
}

.page-rail {
  display: grid;
  gap: var(--s-4);
}

.page-rail .panel,
.page-rail details.panel {
  margin: 0;
}

details.panel > summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}

details.panel > summary::-webkit-details-marker { display: none; }

details.panel > summary::after {
  content: "Show";
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

details.panel[open] > summary::after { content: "Hide"; }

details.panel > summary + * { margin-top: var(--s-4); }

.empty-state {
  text-align: center;
  padding: var(--s-6) var(--s-4);
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--navy);
  font-size: var(--text-lg);
  margin-bottom: var(--s-2);
}

.status-banner {
  margin: 0 0 var(--s-4);
  min-height: 1.25rem;
}

@media (max-width: 900px) {
  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head-actions { justify-content: flex-start; }

  .page-grid { grid-template-columns: 1fr; }
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
}

.card h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }

.card p { margin: 0 0 0.85rem; color: var(--muted); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
}

.login-panel { width: min(420px, 100%); margin-bottom: 1rem; }

.login-panel h2 { margin: 0; font-size: 1.05rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-row p { margin: 0; }

.field-row label { margin-top: 0.85rem; }

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

label { display: block; font-weight: 600; margin: 0.85rem 0 0.3rem; font-size: 0.92rem; }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  color: var(--navy);
  font: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(226, 91, 144, 0.18);
}

.household-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  max-width: 24rem;
}

.household-switch label {
  margin: 0;
  flex: 0 0 auto;
}

.household-switch select { margin: 0; }

.hint { color: var(--muted); font-size: 0.88rem; margin: 0.75rem 0 0; }

.people-list {
  list-style: none;
  margin: 0 0 var(--s-4);
  padding: 0;
  max-width: none;
}

.people-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.people-list .hint { margin: 0; display: inline; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.toolbar h1 { margin: 0; margin-right: auto; }

.month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.dow,
.day {
  background: var(--card);
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.dow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.55rem 0.35rem;
  background: var(--paper-deep);
}

.day { min-height: 6.4rem; padding: 0.4rem; }

.day time {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.day.today {
  background: color-mix(in srgb, var(--pink) 10%, #fff);
  box-shadow: inset 0 0 0 2px var(--pink);
}

.day.today time { color: var(--pink-deep); }

.day.today .event { background: color-mix(in srgb, var(--event-colour, var(--pink)) 18%, #fff); color: var(--navy); }

.day.outside {
  color: var(--muted);
  background: var(--paper);
}

.event {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.15rem 0.35rem;
  border: 0;
  border-radius: 4px;
  border-left: 3px solid var(--event-colour, var(--pink));
  background: color-mix(in srgb, var(--event-colour, var(--pink)) 12%, #fff);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

@media (hover: hover) {
  .event:hover {
    background: color-mix(in srgb, var(--event-colour, var(--pink)) 20%, #fff);
  }
}

@media (pointer: coarse) {
  .event {
    min-height: 2.75rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.85rem;
    white-space: normal;
  }
}

.people-pick {
  border: 0;
  margin: 0.85rem 0 0;
  padding: 0;
}

.people-pick legend {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.people-pick label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0.75rem 0.25rem 0;
  font-weight: 500;
}

textarea { resize: vertical; }

.meal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
}

.meal .icon-btn {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.cal-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  margin: 0 0 var(--s-4);
  padding: var(--s-3);
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cal-list label { margin: 0; font-weight: 500; font-size: var(--text-sm); }

#cal-body {
  min-height: 28rem;
  padding: var(--s-3);
}

.week {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.week th,
.week td {
  border: 1px solid var(--line);
  padding: 0.45rem;
  vertical-align: top;
  text-align: left;
  font-weight: 500;
}

.week th { background: var(--navy); color: #fff; font-size: 0.85rem; }

.slot { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 700; }

.groups { display: grid; gap: var(--s-5); }

.group h2 {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s-2);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}

.list { list-style: none; margin: 0; padding: 0; }

.list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.list li:last-child { border-bottom: 0; }

.item-name { margin-right: auto; }

.scratched .item-name { text-decoration: line-through; color: var(--muted); }

.segment { display: inline-flex; flex-wrap: wrap; }

.segment button {
  border-radius: 0;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  font-weight: 600;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
}

@media (hover: hover) {
  .segment button:hover {
    background: var(--paper-deep);
    color: var(--navy);
  }
}

.segment button + button { border-left: 0; }

.segment button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

.segment button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.segment button[aria-pressed="true"] {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.segment button[aria-pressed="true"]:hover {
  background: var(--pink-deep);
  color: #fff;
}

[hidden] { display: none !important; }

.view-switch { flex-wrap: wrap; }

.cal-shared-hint {
  font-size: 0.85em;
  color: var(--muted);
  font-weight: 500;
}

.week-allday {
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px dashed var(--line);
}

.day-view .list li { flex-wrap: wrap; }

.family-plan {
  table-layout: fixed;
  min-width: 40rem;
}

.family-plan th,
.family-plan td {
  min-width: 7rem;
}

.family-plan .family-day {
  min-width: 5rem;
  font-weight: 700;
  white-space: nowrap;
  width: 4.5rem;
}

.family-plan td { min-height: 2rem; font-size: 0.8rem; }

.family-plan .event {
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.tag-pick { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; }

.tag-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0.75rem 0.25rem 0;
  font-weight: 500;
}

.tag-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.colour-dot {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.colour-pick {
  width: auto;
  max-width: 7rem;
  margin-left: 0.35rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin: 0.5rem 0 0;
}

.check-row input { width: auto; margin: 0; }

.app-password-once {
  background: #fff8fb;
  border-color: var(--pink);
  margin: 0.75rem 0;
}

.app-password-once code {
  font-family: ui-monospace, monospace;
  word-break: break-all;
}

.reading-ruler {
  position: fixed;
  left: 0;
  right: 0;
  height: 24px;
  pointer-events: none;
  z-index: 9999;
  background: rgba(226, 91, 144, 0.12);
  border-top: 2px solid var(--pink);
  border-bottom: 2px solid var(--pink);
}

@font-face {
  font-family: "OpenDyslexic";
  src: url("../fonts/OpenDyslexic-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html.pref-opendyslexic body {
  font-family: "OpenDyslexic", "Segoe UI", sans-serif;
}

html.pref-text-125 body { font-size: 125%; }

html.pref-text-150 body { font-size: 150%; }

html.pref-text-200 body { font-size: 200%; }

html.pref-letter-spacing body { letter-spacing: 0.06em; }

html.pref-left-align body,
html.pref-left-align .page {
  text-align: left;
}

html.pref-underline-links a { text-decoration: underline; }

html.pref-highlight-links a:focus {
  background: #ffe4ef;
  outline: none;
}

html.pref-strong-focus :focus-visible {
  outline: 3px solid var(--pink-deep);
  outline-offset: 2px;
}

html.pref-high-contrast {
  --navy: #000;
  --navy-soft: #111;
  --paper: #fff;
  --pink: #c00060;
  --pink-deep: #900040;
  --line: #000;
  --muted: #222;
  --card: #fff;
}

html.pref-high-contrast body {
  background: #fff;
  color: #000;
}

html.pref-high-contrast .site-header {
  background: #000;
}

html.pref-high-contrast button,
html.pref-high-contrast .button {
  background: #000;
  border: 2px solid #000;
}

html.pref-high-contrast button.ghost {
  background: #fff;
  color: #000;
  border: 2px solid #000;
}

html.pref-larger-targets button,
html.pref-larger-targets .button,
html.pref-larger-targets .nav a,
html.pref-larger-targets .nav-more summary,
html.pref-larger-targets .segment button,
html.pref-larger-targets button.person-chip,
html.pref-larger-targets .quick-links a {
  min-height: 3rem;
  padding: 0.7rem 1.05rem;
}

html.pref-larger-targets input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
}

html.pref-reduce-motion *,
html.pref-reduce-motion *::before,
html.pref-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

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

button.danger,
.button.danger {
  background: #8b1538;
  color: #fff;
}

button.danger:hover,
.button.danger:hover {
  background: #6e102c;
  color: #fff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(27, 42, 74, 0.55);
}

.modal-overlay[hidden] {
  display: none !important;
}

.weekday-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0.4rem 0;
}

.modal-panel {
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 18px 48px rgba(27, 42, 74, 0.22);
}

.danger-panel {
  border-color: #8b1538;
}

.danger-warning {
  color: #8b1538;
  font-weight: 700;
  margin: 0.35rem 0;
}

.dispose-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0.85rem 0;
  padding: 0.65rem 0.85rem;
}

.transfer-select {
  display: block;
  width: 100%;
  margin: 0.4rem 0 0.2rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

@media (max-width: 520px) {
  .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal-actions button,
  .modal-actions .button {
    width: 100%;
  }
}

.account-danger {
  margin-top: 1.5rem;
  border-color: #8b1538;
}

.misc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.misc-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.misc-date {
  color: var(--muted);
  min-width: 6.5rem;
  font-size: 0.9rem;
}

.star-chart { display: grid; gap: 0.55rem; margin: 0.75rem 0 1.25rem; }
.star-bar-row {
  display: grid;
  grid-template-columns: 6rem 1fr 2.5rem;
  gap: 0.5rem;
  align-items: center;
}
.star-bar-label { font-weight: 600; }
.star-bar-track {
  height: 0.55rem;
  background: var(--paper-deep);
  border-radius: 999px;
  overflow: hidden;
}
.star-bar-fill { height: 100%; min-width: 0.25rem; border-radius: inherit; }
.star-bar-value { text-align: right; color: var(--muted); font-size: 0.88rem; }

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.25rem 0.25rem 0;
  padding: 0.15rem 0.5rem 0.15rem 0.15rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  vertical-align: middle;
}

button.person-chip {
  cursor: pointer;
  font: inherit;
  min-height: 2.75rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
}

@media (hover: hover) {
  button.person-chip:hover {
    border-color: var(--navy-soft);
    background: var(--paper);
    color: var(--navy);
  }
}

.person-chip[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.person-chip[aria-pressed="true"] .person-face {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.person-face {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  background: var(--person-colour, #9aa3b5);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.person-chip-dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border-radius: 2px;
  background: var(--person-colour, #9aa3b5);
  border: 0;
}

.person-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.person-dots-more {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}

.person-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  align-items: center;
}

.person-filter-label {
  font-weight: 600;
  margin-right: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
}

.today-main,
.today-side {
  display: grid;
  gap: var(--s-4);
}

.today-hero {
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--navy);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.today-hero .lede,
.today-hero .hint { color: var(--muted); }

.today-kicker {
  margin: 0;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-deep);
  font-weight: 700;
}

.today-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  margin: 0 0 var(--s-5);
}

.today-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-4);
  display: grid;
  gap: var(--s-1);
}

.today-stat .stat-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.today-stat .stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.today-stat .stat-value.is-pink { color: var(--pink-deep); }

.today-stat .stat-meta {
  font-size: var(--text-sm);
  color: var(--muted);
}

.today-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
}

.today-section h2 {
  margin: 0 0 var(--s-3);
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.today-section .more-link {
  display: inline-block;
  margin-top: var(--s-3);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 700px) {
  .today-stat-row { grid-template-columns: 1fr; }
  .today-layout { grid-template-columns: 1fr; }
}

.hint-list,
.agenda-list,
.chore-board {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hint-list li,
.agenda-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.hint-list li:last-child,
.agenda-item:last-child { border-bottom: 0; }

.agenda-when {
  flex: 0 0 4.25rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.agenda-body { min-width: 0; flex: 1; }

.agenda-title {
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.agenda-title:hover { color: var(--pink-deep); }

.agenda-meal .agenda-when { color: var(--pink-deep); }
.agenda-chore .agenda-when { color: var(--navy-soft); }

.meal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.meal-strip-slot {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
}

.meal-strip-slot strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.meal-strip-slot p {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
}

.quick-links a:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
}

.day.day-clickable { cursor: pointer; }

@media (hover: hover) {
  .day.day-clickable:hover { background: color-mix(in srgb, var(--pink) 6%, #fff); }
}

.day-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10001;
  max-height: min(70vh, 34rem);
  max-height: min(70dvh, 34rem);
  overflow: auto;
  background: var(--card);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(27, 42, 74, 0.16);
  padding: 1.1rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}

.day-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(27, 42, 74, 0.45);
}

.day-sheet-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.day-sheet-head h2 { margin: 0; margin-right: auto; }

.wall-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.wall-page.wall-theme-dark {
  background: var(--navy);
  color: #fff;
}

.wall-page.wall-theme-light {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(226, 91, 144, 0.12), transparent 55%),
    linear-gradient(180deg, #f7f8fb 0%, var(--paper) 40%, #e8ebf2 100%);
  color: var(--navy);
}

.wall-page .site-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.wall-page.wall-theme-light .site-header {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(8px);
}

.wall-page.wall-theme-dark .brand,
.wall-page.wall-theme-dark .nav a,
.wall-page.wall-theme-dark .nav-more summary { color: #fff; }

.wall-page.wall-theme-light .brand,
.wall-page.wall-theme-light .nav a,
.wall-page.wall-theme-light .nav-more summary { color: var(--navy); }

.wall-page.wall-theme-light .nav a[aria-current="page"],
.wall-page.wall-theme-light .nav-more summary[aria-current="page"] {
  background: var(--pink);
  color: #fff;
}

.wall-page.wall-kiosk .site-header { display: none; }

.wall-tools-hotspot {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.75rem;
  z-index: 190;
}

html:fullscreen .wall-tools-hotspot,
html:-webkit-full-screen .wall-tools-hotspot,
.wall-page.wall-kiosk .wall-tools-hotspot {
  display: block;
}

html:fullscreen .wall-tools,
html:-webkit-full-screen .wall-tools,
.wall-page.wall-kiosk .wall-tools {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  margin: 0;
  padding: 0.65rem max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
  padding-top: max(0.65rem, env(safe-area-inset-top));
  background: rgba(27, 42, 74, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.wall-page.wall-theme-light.wall-kiosk .wall-tools,
html:fullscreen .wall-page.wall-theme-light .wall-tools {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--line);
}

html:fullscreen body.wall-tools-visible .wall-tools,
html:-webkit-full-screen body.wall-tools-visible .wall-tools,
.wall-page.wall-kiosk.wall-tools-visible .wall-tools,
html:fullscreen .wall-tools:focus-within,
html:-webkit-full-screen .wall-tools:focus-within,
.wall-page.wall-kiosk .wall-tools:focus-within {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.wall-main {
  width: min(1360px, calc(100% - 2rem));
  padding-top: 1rem;
}

@media (min-width: 1200px) {
  html:fullscreen .wall-main,
  html:-webkit-full-screen .wall-main,
  .wall-page.wall-kiosk .wall-main {
    width: min(1600px, calc(100% - 2rem));
    min-height: calc(100dvh - 1rem);
    display: flex;
    flex-direction: column;
  }

  html:fullscreen #wall-view-overview,
  html:-webkit-full-screen #wall-view-overview,
  .wall-page.wall-kiosk #wall-view-overview {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  html:fullscreen #wall-view-overview .wall-grid,
  html:-webkit-full-screen #wall-view-overview .wall-grid,
  .wall-page.wall-kiosk #wall-view-overview .wall-grid {
    flex: 1 1 auto;
    grid-template-rows: 1fr 1fr;
    min-height: 0;
    align-items: stretch;
  }

  html:fullscreen #wall-view-overview .wall-panel,
  html:-webkit-full-screen #wall-view-overview .wall-panel,
  .wall-page.wall-kiosk #wall-view-overview .wall-panel {
    min-height: 0;
    height: 100%;
    overflow: auto;
  }

  html:fullscreen .wall-day h1,
  html:-webkit-full-screen .wall-day h1,
  .wall-page.wall-kiosk .wall-day h1 {
    font-size: clamp(2.6rem, 4.5vw, 4rem);
  }

  html:fullscreen .wall-list li,
  html:-webkit-full-screen .wall-list li,
  .wall-page.wall-kiosk .wall-list li,
  html:fullscreen .wall-meal,
  html:-webkit-full-screen .wall-meal,
  .wall-page.wall-kiosk .wall-meal {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
  }
}

.wall-day { margin: 0.5rem 0 1.25rem; }

.wall-day h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin-bottom: 0.2rem;
}

.wall-theme-dark .wall-day h1 { color: #fff; }
.wall-theme-light .wall-day h1 { color: var(--navy); }

.wall-day .lede {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.wall-theme-dark .wall-day .lede { color: rgba(255, 255, 255, 0.75); }
.wall-theme-light .wall-day .lede { color: var(--muted); }

.wall-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.wall-rewards {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.wall-panel {
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  min-height: 12rem;
}

.wall-theme-dark .wall-panel {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.wall-theme-light .wall-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.wall-panel-wide { min-height: 0; overflow: auto; }

.wall-panel h2 {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wall-theme-dark .wall-panel h2 { color: rgba(255, 255, 255, 0.62); }
.wall-theme-light .wall-panel h2 { color: var(--muted); }

.wall-meal {
  margin-bottom: 0.9rem;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.25;
}

.wall-meal strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.wall-theme-dark .wall-meal strong { color: rgba(255, 255, 255, 0.55); }
.wall-theme-light .wall-meal strong { color: var(--muted); }

.wall-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wall-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  padding: 0.65rem 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.wall-theme-dark .wall-list li { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.wall-theme-light .wall-list li { border-bottom: 1px solid var(--line); }

.wall-list li:last-child { border-bottom: 0; }

.wall-theme-dark .wall-list .hint,
.wall-theme-dark .wall-panel .hint { color: rgba(255, 255, 255, 0.55); }

.wall-page .button,
.wall-page button {
  font-size: 1rem;
  padding: 0.7rem 1rem;
}

.wall-theme-dark button.ghost,
.wall-theme-dark .button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.wall-theme-dark button.ghost:hover,
.wall-theme-dark .button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.wall-theme-dark .person-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.wall-theme-dark .wall-views.segment {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.wall-theme-dark .wall-views.segment button[aria-pressed="true"] {
  background: var(--pink);
  color: #fff;
}

.wall-theme-dark .wall-views.segment button {
  color: rgba(255, 255, 255, 0.85);
}

.wall-tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.wall-tools .wall-views { margin-right: auto; }

.wall-family-wrap,
.wall-meal-week {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.wall-family-plan,
.wall-meal-plan {
  width: 100%;
  min-width: 44rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: clamp(0.85rem, 1.35vw, 1.05rem);
}

.wall-family-plan th,
.wall-family-plan td,
.wall-meal-plan th,
.wall-meal-plan td {
  vertical-align: top;
  padding: 0.65rem 0.55rem;
  text-align: left;
}

.wall-theme-dark .wall-family-plan th,
.wall-theme-dark .wall-family-plan td,
.wall-theme-dark .wall-meal-plan th,
.wall-theme-dark .wall-meal-plan td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wall-theme-light .wall-family-plan th,
.wall-theme-light .wall-family-plan td,
.wall-theme-light .wall-meal-plan th,
.wall-theme-light .wall-meal-plan td {
  border-bottom: 1px solid var(--line);
}

.wall-family-plan thead th,
.wall-meal-plan thead th {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 1;
}

.wall-theme-dark .wall-family-plan thead th,
.wall-theme-dark .wall-meal-plan thead th {
  background: rgba(27, 42, 74, 0.95);
}

.wall-theme-light .wall-family-plan thead th,
.wall-theme-light .wall-meal-plan thead th {
  background: #fff;
}

.wall-family-day {
  width: 6.5rem;
  font-weight: 700;
  white-space: nowrap;
}

.wall-family-plan tr.is-today td,
.wall-meal-plan th.is-today,
.wall-meal-plan td.is-today {
  background: rgba(226, 91, 144, 0.12);
}

.wall-event-chip {
  display: grid;
  gap: 0.1rem;
  margin: 0 0 0.4rem;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--event-colour, var(--pink));
  background: rgba(255, 255, 255, 0.08);
  line-height: 1.25;
}

.wall-theme-light .wall-event-chip {
  background: var(--paper);
}

.wall-event-chip strong {
  font-size: 0.92em;
  font-weight: 700;
}

.wall-event-chip .hint {
  font-size: 0.78em;
}

.wall-meal-plan tbody th {
  width: 6.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--muted);
}

.wall-theme-dark .wall-meal-plan tbody th { color: rgba(255, 255, 255, 0.55); }

.wall-meal-dish {
  font-weight: 700;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.25;
  margin: 0 0 0.35rem;
}

.wall-star-chart {
  gap: 0.85rem;
  margin: 0;
}

.wall-star-chart .star-bar-row {
  grid-template-columns: minmax(7rem, 9rem) 1fr 3.5rem;
  gap: 0.75rem;
}

.wall-star-chart .star-bar-track {
  height: 0.9rem;
}

.wall-theme-dark .star-bar-track {
  background: rgba(255, 255, 255, 0.12);
}

.wall-theme-dark .star-bar-value { color: rgba(255, 255, 255, 0.7); }

.wall-reward-list li {
  display: grid;
  gap: 0.35rem;
  align-items: start;
}

.wall-reward-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  width: 100%;
}

.wall-reward-cost {
  font-weight: 700;
  color: var(--pink);
  white-space: nowrap;
}

.wall-theme-dark .wall-reward-cost { color: #ff8fbb; }

.wall-reward-ready {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.busy-person { margin-top: 1rem; }
.busy-person h3 { margin: 0 0 0.35rem; font-size: 1rem; }

.chore-board .chore-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin: 0 0 0.55rem;
}

.chore-card.done {
  opacity: 0.55;
}

.chore-card .chore-title {
  font-weight: 700;
  font-size: 1rem;
}

.chore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.chore-actions button {
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
}

.chore-section-title {
  margin: 1.25rem 0 0.55rem;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reward-pin {
  display: grid;
  gap: 0.55rem;
}

.reward-pin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: center;
}

.celebrate {
  animation: celebrate-pop 0.45s ease;
}

@keyframes celebrate-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.015); box-shadow: 0 0 0 3px rgba(226, 91, 144, 0.22); }
  100% { transform: scale(1); }
}

body.store-mode .site-header,
body.store-mode .page-rail,
body.store-mode .page-head-actions #toggle-add,
body.store-mode .shop-admin {
  display: none !important;
}

body.store-mode .page-toolbar.shop-admin {
  display: flex !important;
}

body.store-mode .page-toolbar .list-pick,
body.store-mode .page-toolbar #active-list,
body.store-mode .page-toolbar #by-meal,
body.store-mode .page-toolbar #household-switch {
  display: none !important;
}

body.store-mode {
  background: #fff;
}

body.store-mode .page {
  width: min(640px, calc(100% - 1.25rem));
  padding-top: 0.75rem;
}

body.store-mode .toolbar h1 { font-size: 1.35rem; }

body.store-mode .list li {
  min-height: 3.25rem;
  padding: 0.85rem 0.2rem;
  font-size: 1.15rem;
  cursor: pointer;
}

body.store-mode .list li.scratched {
  opacity: 0.35;
}

body.store-mode.hide-scratched .list li.scratched {
  display: none;
}

body.store-mode .group {
  border: 0;
  box-shadow: none;
  padding: 0.35rem 0 0.85rem;
}

.store-mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1rem;
}

@media (max-width: 900px) {
  .today-layout { grid-template-columns: 1fr; }
  .meal-strip { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .cards { grid-template-columns: 1fr; }
  .day { min-height: 4.2rem; }
  .week { min-width: 36rem; }
  .family-plan { font-size: 0.75rem; }
  .wall-grid,
  .wall-rewards { grid-template-columns: 1fr; }

  .wall-family-day,
  .wall-meal-plan tbody th { width: 4.5rem; }
  .star-bar-row { grid-template-columns: 4.5rem 1fr 2rem; }
  .chore-card { grid-template-columns: auto 1fr; }
  .chore-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .header-inner { gap: 0.65rem; }
  .nav { gap: 0.15rem; }
}

@media (pointer: coarse) {
  .quick-links a {
    min-height: 2.75rem;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"],
  input[type="date"],
  input[type="time"],
  input[type="number"],
  input[type="url"],
  select,
  textarea {
    min-height: 2.75rem;
    font-size: 1rem;
  }
}
