/* ============================================================
   ClickHuis — household app. CYFA look, plum accent, mobile first.
   ============================================================ */
:root {
  /* v1.66 "Coma": Butter Cream (#F5E8CC) neutrals, Galactic Purple (#55263D) for anything you press (white text 11:1),
     Coral Orange (#F34E3D) for the logo, stars and highlights; brick red stays for warnings */
  --bg: #fbf5e8;                  /* a lighter butter cream */
  --surface: #fffdf8;
  --surface-soft: #f8efdc;
  --ink: #2e1422;                 /* headings */
  --text: #3e2a33;
  --muted: #6a5560;
  --border: #ede1ca;
  --input-border: #e0d0b4;

  --brand: #f34e3d;               /* coral orange: the logo, phone status bar */
  --accent: #55263d;              /* galactic purple: buttons, ticks, today, counts */
  --accent-strong: #451e31;
  --accent-soft: rgba(243, 78, 61, .13);
  --accent-dark: #451e31;
  --accent-ink: #ffffff;          /* text on --accent */
  --accent-soft-ink: #55263d;     /* text on --accent-soft */
  --accent-text: #55263d;         /* purple text */

  --warm: #f34e3d;                /* coral: points, stars, good news */
  --warm-soft: #f5e8cc;           /* butter cream */
  --warm-ink: #9c2f1f;

  --badge-bg: #f5e8cc;
  --badge-ink: #55263d;
  --danger: #b42318;              /* brick red: overdue, remove */
  --danger-soft: #fdecea;
  --success: #3d6b4f;
  --radius-card: 18px;
  --radius-ctl: 12px;
  --shadow-bar: 0 10px 30px rgba(85, 38, 61, .05);
  --shadow-card: 0 1px 2px rgba(85, 38, 61, .05), 0 8px 24px rgba(85, 38, 61, .05);
  --font: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --tap: 44px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);       /* 0 in the browser; the clock/notch area in a phone app */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent-text); }
h1, h2, h3 { color: var(--ink); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  font: 600 14px var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-ctl);
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--surface-soft); border-color: var(--input-border); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn i { font-size: 17px; }
.btn-primary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(85, 38, 61, .25);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-block { width: 100%; }
.btn-ghost { background: none; border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #fecaca; }
.icon-btn {
  width: var(--tap); height: var(--tap); display: inline-grid; place-items: center;
  border-radius: 50%; border: 0; background: none; color: var(--text); cursor: pointer; font-size: 20px;
}
.icon-btn:hover { background: var(--surface-soft); }
.linkish { background: none; border: 0; padding: 8px 4px; font: 600 14px var(--font); color: var(--accent-text); cursor: pointer; min-height: var(--tap); }

.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  color: var(--badge-ink); background: var(--badge-bg);
  border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.badge-owner { background: var(--accent-soft); color: var(--accent-soft-ink); }
.badge-adult { background: #eff6ff; color: #1d4ed8; }
.badge-child { background: var(--warm-soft); color: var(--warm-ink); }

/* ---------------- Inputs ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { font-size: 12px; color: var(--muted); }
input, select, textarea {
  font: 400 16px var(--font);   /* 16px stops iOS zooming into fields */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-ctl);
  min-height: var(--tap);
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="color"] { padding: 4px; width: 64px; cursor: pointer; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-wrap .icon-btn { position: absolute; right: 0; top: 0; color: var(--muted); }

/* ---------------- Auth screens ---------------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px calc(20px + var(--safe-b)); }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border-radius: 22px; box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
  padding: 30px 24px 22px;
}
.auth-logo {
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px;
  background: var(--brand); color: #f5e8cc; box-shadow: 0 0 0 6px var(--accent-soft);
}
.auth-card h1 { font-size: 21px; font-weight: 700; text-align: center; }
.auth-card .lede { text-align: center; color: var(--muted); margin: 4px 0 22px; font-size: 14px; }
.auth-error { color: var(--danger); font-size: 13.5px; text-align: center; margin: 12px 0 0; }
.auth-note { color: var(--accent-soft-ink); background: var(--accent-soft); font-size: 13.5px; border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.forgot-h { font-size: 18px; font-weight: 700; text-align: center; color: var(--ink); margin: 2px 0 6px; }
.forgot-lede { text-align: center; margin: 0 0 16px; }
.forgot-sent { text-align: center; }
.forgot-sent p { margin: 0 0 10px; overflow-wrap: anywhere; }
.forgot-sent .auth-switch { margin-top: 6px; }
.fs-icon { width: 56px; height: 56px; margin: 4px auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--accent-soft); color: var(--brand); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.seg button { min-height: 40px; border: 0; border-radius: 10px; background: none; font: 600 14px var(--font); color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.08); }

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: 0 8px 0 14px;
  padding-top: var(--safe-t);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-bar);
}
.brand-icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--brand); color: #f5e8cc; font-size: 17px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hh-switch {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  min-height: var(--tap); padding: 0 10px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  font: 700 16px var(--font); color: var(--ink);
}
.hh-switch:hover { background: var(--surface-soft); }
.hh-switch .hh-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.hh-switch i { font-size: 13px; color: var(--muted); }
.nav-pills { display: none; gap: 4px; margin-left: 8px; }
.nav-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
}
.nav-pill:hover { color: var(--ink); background: var(--surface-soft); }
.nav-pill.active { color: var(--ink); background: var(--accent-soft); }
.nav-pill.active i { color: var(--accent-text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font: 700 13px var(--font); color: #fff; background: var(--accent-dark);
}
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar-btn { border: 0; background: none; padding: 5px; border-radius: 50%; cursor: pointer; min-width: var(--tap); min-height: var(--tap); display: grid; place-items: center; }
.offline-pill { font-size: 12px; font-weight: 600; color: var(--warm-ink); background: var(--warm-soft); border-radius: 999px; padding: 4px 10px; }

/* ---------------- Bottom tab bar (phones) ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.tab i { font-size: 22px; line-height: 1; width: 56px; height: 30px; display: grid; place-items: center; border-radius: 999px; transition: background .15s; }
.tab.active { color: var(--ink); }
.tab.active i { background: var(--accent-soft); color: var(--accent-text); }

/* ---------------- Page & cards ---------------- */
.page {
  padding: 14px 12px calc(var(--tabbar-h) + var(--safe-b) + 20px);
  max-width: 1100px; margin: 0 auto;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 4px 14px; }
.page-head h1 { font-size: 22px; font-weight: 700; }
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 8px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; font-weight: 700; }
.card-body { padding: 8px 16px 16px; }
.grid-2 { display: grid; gap: 14px; }

.hello { padding: 18px 16px; display: flex; align-items: center; gap: 14px; }
.hello h2 { font-size: 19px; }
.hello p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.member-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.member-chip .avatar { width: 30px; height: 30px; font-size: 12px; }

.soon-list { display: grid; gap: 10px; }
.soon {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px;
  background: var(--surface-soft); border: 1px solid var(--border); text-decoration: none; color: inherit;
}
.soon i { font-size: 22px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.soon strong { display: block; color: var(--ink); font-size: 15px; }
.soon span { font-size: 13px; color: var(--muted); }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty i { font-size: 38px; color: var(--accent); display: block; margin-bottom: 8px; }
.empty h2 { font-size: 18px; margin-bottom: 4px; }

/* settings-style list (More page) */
.menu-list { list-style: none; margin: 0; padding: 4px 0; }
.menu-list li + li { border-top: 1px solid var(--border); }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 16px;
  background: none; border: 0; font: 500 15px var(--font); color: var(--ink); text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--surface-soft); }
.menu-item > i:first-child { font-size: 20px; color: var(--accent-text); width: 24px; text-align: center; }
.menu-item .grow { flex: 1; min-width: 0; }
.menu-item .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.menu-item .chev { color: var(--muted); font-size: 14px; }
.menu-item.danger, .menu-item.danger > i:first-child { color: var(--danger); }

/* ---------------- Tables with header filters ---------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 16px 12px; }
.search { position: relative; flex: 1 1 220px; }
.search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent-soft-ink);
  font: 600 13px var(--font); cursor: pointer;
}
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; text-align: left;
  background: var(--surface-soft); padding: 0 12px; height: 44px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { font-size: 14.5px; color: var(--ink); padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.th-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
}
.th-btn i { font-size: 12px; }
.th-btn.on { color: var(--accent-text); }
.table-empty { text-align: center; color: var(--muted); padding: 24px; }
.who { display: flex; align-items: center; gap: 10px; }
.who .avatar { width: 34px; height: 34px; }
.colour-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border); }

.popover {
  position: fixed; z-index: 3500; width: 280px; max-width: calc(100vw - 16px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16); padding: 10px;
}
.popover .pop-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 2px 4px 8px; }
.popover .pop-list { max-height: 240px; overflow-y: auto; margin: 6px 0; }
.popover label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 6px; border-radius: 8px; cursor: pointer; font-size: 14.5px; }
.popover label:hover { background: var(--surface-soft); }
.popover label input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent-dark); }
.popover .pop-actions { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 8px; }
.popover .pop-actions .btn { min-height: 38px; padding: 6px 12px; font-size: 13.5px; }

/* ---------------- Sheets (bottom sheet on phone, dialog on desktop) ---------------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 3000; background: rgba(15, 23, 42, .4); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .15s; }
.sheet {
  width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(18px + var(--safe-b));
  box-shadow: 0 -12px 40px rgba(15, 23, 42, .18);
  animation: sheetUp .2s ease-out;
}
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--input-border); margin: 4px auto 12px; }
.sheet h3 { font-size: 18px; margin-bottom: 6px; }
.sheet p { color: var(--muted); margin: 0 0 16px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.sheet-actions .btn { flex: 1; }
.hh-option {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 10px;
  border: 0; border-radius: 14px; background: none; cursor: pointer; text-align: left; font: 600 15px var(--font); color: var(--ink);
}
.hh-option:hover { background: var(--surface-soft); }
.hh-option.current { background: var(--accent-soft); }
.hh-option .grow { flex: 1; min-width: 0; }
.hh-option .check { color: var(--accent-text); font-size: 20px; }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- Toasts ---------------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 4000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toasts .toast:nth-last-child(n+3) { display: none; } /* at most two at a time */
.toast { background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; padding: 12px 16px; border-radius: 14px; box-shadow: 0 12px 30px rgba(15,23,42,.2); display: flex; align-items: center; gap: 8px; animation: fadeIn .2s; }
.toast.error { background: var(--danger); }
.toast.ok i { color: var(--accent); }

.loading { display: grid; place-items: center; min-height: 100dvh; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--accent-soft); border-top-color: var(--accent-dark); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.version { text-align: center; color: var(--muted); font-size: 12.5px; padding: 6px 0 4px; }

/* ---------------- Desktop / laptop ---------------- */
@media (min-width: 900px) {
  .tabbar { display: none; }
  .nav-pills { display: flex; }
  .topbar { height: 62px; padding: 0 16px; gap: 14px; }
  .page { padding: 24px 28px 40px; }
  .hh-switch .hh-name { max-width: 260px; }
  .toasts { left: 22px; transform: none; align-items: flex-start; bottom: 28px; }
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .grid-2 > .card { margin-bottom: 0; }
  .sheet-backdrop { align-items: center; padding: 16px; }
  .sheet { border-radius: 20px; padding: 18px 22px 22px; }
  .sheet-grip { display: none; }
  .sheet-actions .btn { flex: none; }
}
@media (max-width: 380px) {
  .tab { font-size: 10.5px; }
  .tab i { width: 48px; }
}

/* ============================================================
   v1.02 — members, invite links, join page
   ============================================================ */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-row.tight { margin-top: 0; }
.btn-row.tight .btn { min-height: 40px; padding: 6px 12px; font-size: 13.5px; }
.card-foot { margin: 0; padding: 10px 16px 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-3 { grid-template-columns: 1fr 1fr 1fr; margin-bottom: 0; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-soft); }
.row-link:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.btn-danger-solid { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn-danger-solid:hover { background: #b91c1c; border-color: #b91c1c; }
.sheet-menu { border-top: 1px solid var(--border); margin-top: 14px; }
.sheet-menu .menu-item { padding-left: 4px; padding-right: 4px; }
.facts { list-style: none; margin: 0 0 12px; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.facts li span { color: var(--muted); }
.creds { display: grid; gap: 10px; background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.creds span { display: block; font-size: 12.5px; color: var(--accent-soft-ink); font-weight: 600; }
.creds strong { font-size: 19px; color: var(--ink); word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
#join-body .lede strong { color: var(--ink); }
/* while a sheet is open, show messages at the top so they don't cover it */
body:has(.sheet-backdrop) .toasts { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; }

/* ============================================================
   v1.03 — chores
   ============================================================ */
.tabs-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 2px; }
.tabs-row::-webkit-scrollbar { display: none; }
.pill-tab {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font: 600 14px var(--font); color: var(--muted); cursor: pointer;
}
.pill-tab.active { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.who-toggle { display: inline-flex; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.who-toggle button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font: 600 13.5px var(--font); color: var(--muted); cursor: pointer; }
.who-toggle button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.08); }

.chore-list { padding: 0 8px 8px; }
.chore-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px;
  background: var(--surface); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform .15s ease, background .15s;
  position: relative;
}
.chore-item + .chore-item { border-top: 1px solid var(--border); border-radius: 0; }
.chore-item.swipe-ready { background: var(--accent-soft); }
.tick {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--input-border); background: var(--surface); color: transparent; font-size: 22px;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.tick:active { transform: scale(.92); }
.chore-item:not(.locked) .tick:hover { border-color: var(--accent-strong); color: var(--accent-soft); }
.chore-item.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chore-item.locked .tick { border-style: dashed; opacity: .55; }
.ci-body { flex: 1; min-width: 0; padding: 6px 0; cursor: pointer; }
.ci-title { font-size: 15.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chore-item.done .ci-title { color: var(--muted); }   /* v1.83 no crossing out: a ticked chore leaves the list */
.ci-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ci-meta .late, h2.late { color: var(--danger); }
.ci-done { font-size: 12.5px; color: var(--accent-text); font-weight: 600; margin-top: 2px; }
.who-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text); }
.who-chip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.who-chip.anyone { color: var(--muted); font-weight: 500; }
.pts { display: inline-block; font-size: 12px; font-weight: 700; color: var(--warm-ink); background: var(--warm-soft); border-radius: 999px; padding: 1px 8px; }
.hint { text-align: center; color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }

.points-card .card-head h2 { display: flex; align-items: center; gap: 8px; }
.star { color: var(--warm); }
.points-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 16px 16px; scrollbar-width: none; }
.points-row .pt { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; padding: 10px 8px; border-radius: 14px; background: var(--surface-soft); border: 1px solid var(--border); }
.points-row .nm { font-size: 12.5px; font-weight: 600; color: var(--text); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.points-row strong { font-size: 18px; color: var(--ink); }
.all-done { color: var(--accent-text); font-weight: 600; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 90;
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-ink); font: 700 15px var(--font); cursor: pointer;
  box-shadow: 0 10px 24px rgba(102, 51, 91, .35);
}
.fab i { font-size: 22px; }
.day-picks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-picks button { min-height: 44px; border-radius: 12px; border: 1px solid var(--input-border); background: var(--surface); font: 600 13.5px var(--font); color: var(--text); cursor: pointer; }
.day-picks button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.inline-row { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.danger-link { color: var(--danger); }
.table-more { text-align: center; padding: 12px; color: var(--muted); font-size: 13px; }
@media (min-width: 900px) {
  .fab { bottom: 28px; right: 28px; }
}

/* ============================================================
   v1.04 — phone layout fixes: nothing may push the page sideways
   ============================================================ */
html, body { overflow-x: clip; max-width: 100%; }            /* safety net (does not break the sticky top bar) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* no double-tap zoom */
.grid-2 { grid-template-columns: minmax(0, 1fr); }          /* columns may shrink below their content's width */
.grid-2 > * { min-width: 0; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.card, .page { min-width: 0; }
.chore-list { overflow: hidden; }                            /* a chore being swiped stays inside its card */
.menu-item .grow, .hh-option .grow, .hello > div, .who, .facts strong { min-width: 0; overflow-wrap: anywhere; }
.facts li strong { text-align: right; }
.who-chip { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-chip { max-width: 100%; }
.member-chip > :last-child, .table td { overflow-wrap: anywhere; }
.sheet * { max-width: 100%; }   /* (not .sheet itself: that would undo the dialog's own width limit) */
.sheet p, .sheet h3 { overflow-wrap: anywhere; }
.toast { overflow-wrap: anywhere; }
.page-head { flex-wrap: wrap; }

/* ============================================================
   v1.04 — calendar
   ============================================================ */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.cal-views { margin: 0; }
.cal-nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.cal-title { font-size: 17px; font-weight: 700; min-width: 0; text-align: center; padding: 0 4px; overflow-wrap: anywhere; }
.cal-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 10px; }
.cal-filters::-webkit-scrollbar { display: none; }
.cal-search { display: block; max-width: none; margin-bottom: 12px; }
.mchip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font: 600 13.5px var(--font); color: var(--ink); cursor: pointer; max-width: 100%;
}
.mchip .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mchip.off { color: var(--muted); background: var(--surface-soft); }
.mchip.off .dot { opacity: .3; }
.mchip.on { background: var(--accent-soft); border-color: transparent; }
.who-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--ink); margin: -4px 0 8px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent-dark); }

/* month */
.month { padding: 6px; overflow: hidden; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mhead span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 6px 0; }
.mcell {
  min-width: 0; min-height: 64px; border: 0; border-radius: 10px; background: none; padding: 4px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; color: var(--ink); overflow: hidden;
}
.mcell:hover { background: var(--surface-soft); }
.mcell.other { color: #958c7e; }   /* days of the next/previous month: faded, but still readable (3.1:1) */
.mcell .dn { font-size: 13.5px; font-weight: 600; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.mcell.today .dn { background: var(--accent); color: var(--accent-ink); }
.mitems { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; width: 100%; }
.mbar { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }      /* phones: a dot per item */
.mbar .mt { display: none; }
.mbar.chore { background: none; box-shadow: inset 0 0 0 1.5px var(--c); }
.mbar.chore.done { background: var(--c); opacity: .45; }
.mbar.meal, .ev.meal { --c: #d98a2b; }   /* v1.78 meals on the calendar: amber */
.ev.meal .ev-time { color: #a8611a; font-size: 18px; }
.mcell .more { font-size: 10.5px; font-weight: 700; color: var(--muted); line-height: 7px; }

/* week + agenda + day lists */
.week-grid { display: grid; gap: 10px; }
.wday { margin: 0; }
.wday.today { box-shadow: 0 0 0 2px var(--accent), var(--shadow-card); }
.wday-head { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 12px 16px 6px; border: 0; background: none; cursor: pointer; font: inherit; text-align: left; }
.wday-head .wd { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.wday-head .wn { font-size: 20px; font-weight: 700; color: var(--ink); }
.wday-head .wrel { font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.day-empty { margin: 0; padding: 0 16px 14px; color: var(--muted); font-size: 13.5px; }
.day-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.ev {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border: 0; border-radius: 12px;
  background: none; cursor: pointer; text-align: left; font: inherit; color: var(--ink); position: relative;
}
.ev::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--c); }
.ev:hover { background: var(--surface-soft); }
.ev-time { flex: none; width: 62px; font-size: 13px; font-weight: 600; color: var(--text); padding-left: 6px; }
.ev-time small { font-weight: 500; color: var(--muted); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-dots { display: flex; gap: 3px; flex: none; }
.ev-dots .dot { width: 10px; height: 10px; border-radius: 50%; }
.ev.chore .ev-time { color: var(--c); font-size: 18px; }
.ev.chore::before { opacity: .45; }
.ev.chore.done .ev-title { text-decoration: line-through; color: var(--muted); }
.ev-head { border-left: 5px solid var(--c); padding-left: 10px; margin-bottom: 8px; }
.ev-notes { white-space: pre-wrap; color: var(--text) !important; }
.sheet .day-list { padding: 0 0 8px; }

@media (min-width: 900px) {
  .mcell { min-height: 104px; align-items: stretch; padding: 4px; }
  .mcell .dn { align-self: flex-end; }
  .mitems { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; }
  .mbar { width: auto; height: auto; border-radius: 6px; padding: 1px 6px; background: color-mix(in srgb, var(--c) 18%, white); border-left: 3px solid var(--c); }
  .mbar .mt { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbar.chore { background: none; box-shadow: none; border-left-style: dotted; }
  .mbar.chore.done { opacity: .5; } .mbar.chore.done .mt { text-decoration: line-through; }
  .mcell .more { line-height: 1.3; text-align: left; padding-left: 6px; }
  .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
  .week-grid .ev { flex-wrap: wrap; gap: 2px 8px; min-height: 0; padding: 6px 6px 6px 12px; }
  .week-grid .ev-time { width: auto; padding-left: 0; font-size: 12px; }
  .week-grid .ev-main { flex-basis: 100%; }
  .week-grid .ev-title { font-size: 13px; white-space: normal; }
  .week-grid .ev-dots { display: none; }
  .week-grid .day-list { padding: 0 4px 6px; }
}
#home-events .ev-time { width: 86px; }
@media (min-width: 900px) { .mbar.chore.done { background: none; } }

/* ============================================================
   v1.05 — calendar categories
   ============================================================ */
.cat-filters { padding-top: 0; }
.cat-row { grid-template-columns: 1fr auto; }
.cat-row .btn { min-width: 48px; padding: 0 12px; }
.cat-swatch { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; font-size: 17px; }
.menu-item .cat-swatch + .grow { margin-left: 2px; }
.cat-list .menu-item > i:first-child { display: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; position: relative; }
.sw.on { box-shadow: 0 0 0 3px var(--ink); }
.sw-custom { display: grid; place-items: center; background: conic-gradient(#d1495b, #f2a541, #4f9d69, #53b0af, #3d5a80, #8e6bbf, #d1495b); color: #fff; overflow: hidden; }
.sw-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0; }
.sw-custom i { pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.icon-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icon-picks button { height: 44px; border-radius: 12px; border: 1px solid var(--input-border); background: var(--surface); font-size: 19px; color: var(--text); cursor: pointer; }
.icon-picks button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cat-preview { border: 1px dashed var(--input-border); border-radius: 12px; margin-bottom: 12px; }
.cat-preview .ev { cursor: default; }
.ev-title i.bi, .mbar .mt i.bi { margin-right: 2px; }
.mbar .mt i.bi { font-size: 10.5px; }

/* ============================================================
   v1.05 — shopping lists
   ============================================================ */
.list-tabs .pill-tab { display: inline-flex; align-items: center; gap: 6px; }
.list-tabs .pill-tab.add { width: 44px; padding: 0; justify-content: center; }
.cnt { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.list-card { padding-bottom: 6px; }
.add-bar { display: grid; grid-template-columns: minmax(0, 1fr) 76px 52px; gap: 8px; padding: 14px 14px 4px; position: sticky; top: calc(var(--topbar-h) + var(--safe-t)); z-index: 5; background: var(--surface); border-radius: var(--radius-card) var(--radius-card) 0 0; }
.add-bar .btn { padding: 0; font-size: 20px; }
.add-hint { margin: 0; padding: 2px 16px 6px; min-height: 22px; font-size: 12.5px; color: var(--muted); }
.add-hint strong { color: var(--accent-text); }
.li-tools { padding-top: 4px; }
.li-tools .li-aislebtn { flex: 0 1 200px; min-width: 0; justify-content: flex-start; gap: 8px; font-weight: 600; }
.aisle { padding: 0 8px 4px; }
.aisle-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 8px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.aisle-head span span, h3.aisle-head span { font-weight: 600; }
.bought-head { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.bought-head .btn { min-height: 38px; padding: 4px 12px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.li-item { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 12px; }
.li-item + .li-item { border-top: 1px solid var(--border); border-radius: 0; }
.li-item.locked .tick { border-style: dashed; opacity: .55; }
.li-item.bought .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.li-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 10px 0; cursor: pointer; }
.li-name { font-size: 16px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.li-qty { font-size: 12.5px; font-weight: 700; color: var(--accent-soft-ink); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.li-note { flex-basis: 100%; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.li-item.bought .li-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent-strong); }
.li-item > .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.small-empty { padding: 26px 16px; }
.it-row { grid-template-columns: minmax(0, 1fr) 96px; }
.aisle-list { list-style: none; margin: 0 0 8px; padding: 0; }
.aisle-list li { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--border); }
.aisle-list .icon-btn:disabled { opacity: .3; cursor: default; }
.aisle-list .lo-name { flex: 1; min-width: 0; padding: 12px 8px; font-weight: 500; display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.aisle-list .lo-name > i { color: var(--accent-text); flex: none; }
.lo-tools { display: flex; justify-content: flex-end; margin: -6px 2px 8px; }
.lo-tools .linkish { background: none; border: 0; font: 600 14px var(--font); color: var(--accent-text); padding: 6px 4px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.aisle-name { flex: 1; min-width: 0; min-height: 48px; text-align: left; border: 0; background: none; font: 600 15px var(--font); color: var(--ink); cursor: pointer; padding: 0 8px; overflow-wrap: anywhere; }
.aisle-name i { color: var(--muted); font-size: 13px; margin-left: 4px; }
#home-lists .menu-item > i:first-child { color: var(--accent-text); }
#home-lists .cnt { margin-right: 4px; }
@media (min-width: 900px) { .add-bar { top: 62px; } }


/* ============================================================
   v1.06 — two clear layouts
   Phones (< 900px): touch first. Bottom tabs, bottom sheets, floating + buttons,
     swipe and press-and-hold, 44px tap targets for everything you tick or open.
   Desktop (>= 900px): mouse first, compact like CYFA. Top pill tabs, centred
     dialogs of a fixed width, buttons in the page header, hover states, smaller type.
   ============================================================ */
.desk-only, .desk-only-inline { display: none !important; }
@media (min-width: 900px) {
  .mob-only, .mob-only-inline { display: none !important; }
  .desk-only { display: inline-flex !important; }
  .desk-only-inline { display: inline !important; }
  p.desk-only { display: block !important; }
}
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- phones: tighter, calmer ---------- */
@media (max-width: 899.98px) {
  :root { --topbar-h: 52px; --tabbar-h: 58px; }
  body { font-size: 14px; }
  .page { padding: 10px 10px calc(var(--tabbar-h) + var(--safe-b) + 18px); }
  .page-head { margin: 2px 2px 10px; }
  .page-head h1 { font-size: 19px; }
  .card { margin-bottom: 10px; border-radius: 16px; }
  .card-head { padding: 12px 14px 6px; }
  .card-head h2 { font-size: 15px; }
  .card-body { padding: 6px 14px 14px; }
  .grid-2 { gap: 10px; }
  .hello { padding: 12px 14px; gap: 12px; }
  .hello h2 { font-size: 16.5px; }
  .hello p { font-size: 13px; }
  .avatar.lg { width: 40px; height: 40px; font-size: 15px; }
  .btn { font-size: 14px; padding: 8px 14px; }
  .field { margin-bottom: 12px; gap: 5px; }
  .field > span { font-size: 12.5px; }
  .menu-item { min-height: 50px; padding: 6px 14px; font-size: 14.5px; gap: 12px; }
  .menu-item > i:first-child { font-size: 18px; }
  .menu-item .sub { font-size: 12px; }
  .tab { font-size: 11px; }
  .tab i { font-size: 20px; height: 28px; width: 52px; }
  .pill-tab { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
  .mchip { min-height: 36px; font-size: 13px; padding: 0 12px 0 9px; }
  .who-toggle button { min-height: 34px; font-size: 13px; }
  .chore-item, .li-item { padding: 2px 6px; gap: 8px; }
  .ci-body, .li-body { padding: 8px 0; }
  .ci-title { font-size: 15px; }
  .li-name { font-size: 15px; }
  .ev { min-height: 50px; padding: 6px 8px; }
  .ev-title { font-size: 14.5px; }
  .table td { font-size: 13.5px; padding: 8px 10px; }
  .table th { height: 40px; padding: 0 10px; }
  .toolbar { padding: 0 14px 10px; }
  .sheet { padding: 6px 16px calc(16px + var(--safe-b)); border-radius: 20px 20px 0 0; }
  .sheet h3 { font-size: 17px; }
  .sheet p { font-size: 13.5px; margin-bottom: 12px; }
  .fab { min-height: 48px; padding: 0 18px 0 14px; font-size: 14px; }
  .auth-card { padding: 24px 18px 18px; }
  .auth-logo { width: 52px; height: 52px; font-size: 24px; }
  .mcell { min-height: 56px; }
  .points-row .pt { min-width: 64px; padding: 8px 6px; }
  .points-row strong { font-size: 16px; }
}
/* the circle you tick: a 44px touch area around a smaller circle */
.tick { width: 44px; height: 44px; border: 0; background: none; padding: 0; color: transparent; }
.tick i {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  border: 2px solid var(--input-border); background: var(--surface); color: transparent; transition: background .15s, border-color .15s, color .15s;
}
.chore-item:not(.locked) .tick:hover i, .li-item:not(.locked) .tick:hover i { border-color: var(--accent-strong); color: var(--accent-soft); }
.chore-item.done .tick, .li-item.bought .tick { background: none; }
.chore-item.done .tick i, .li-item.bought .tick i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chore-item.locked .tick, .li-item.locked .tick { opacity: 1; border: 0; }
.chore-item.locked .tick i, .li-item.locked .tick i { border-style: dashed; opacity: .55; }

/* ---------- desktop: compact, mouse first ---------- */
@media (min-width: 900px) {
  :root { --tap: 36px; }
  body { font-size: 13.8px; }
  .topbar { height: 58px; }
  .brand-icon { width: 30px; height: 30px; font-size: 14px; }
  .hh-switch { font-size: 14.5px; min-height: 38px; }
  .nav-pill { min-height: 36px; font-size: 13px; padding: 0 12px; }
  .avatar-btn { min-width: 38px; min-height: 38px; }
  .avatar { width: 30px; height: 30px; font-size: 12px; }
  .avatar.lg { width: 40px; height: 40px; font-size: 14px; }
  .page { padding: 20px 28px 40px; max-width: 1200px; }
  .page-head { margin: 0 2px 14px; }
  .page-head h1 { font-size: 20px; }
  .card { margin-bottom: 14px; }
  .card-head { padding: 14px 16px 8px; }
  .card-head h2 { font-size: 14.5px; }
  .card-body { padding: 6px 16px 14px; }
  .hello { padding: 14px 16px; }
  .hello h2 { font-size: 17px; }
  .hello p { font-size: 13px; }

  .btn { min-height: 34px; font-size: 12.8px; padding: 6px 12px; border-radius: 10px; gap: 6px; }
  .btn i { font-size: 14px; }
  .icon-btn { width: 34px; height: 34px; font-size: 16px; }
  .linkish { min-height: 0; font-size: 13px; padding: 4px; }
  .badge { font-size: 11px; padding: 3px 9px; }
  input, select, textarea { font-size: 13.5px; min-height: 36px; padding: 7px 10px; border-radius: 10px; }
  input[type="color"] { padding: 3px; width: 56px; }
  .pw-wrap input { padding-right: 40px; }
  .field { margin-bottom: 12px; gap: 5px; }
  .field > span { font-size: 12px; }
  .field small { font-size: 11.5px; }
  .seg button { min-height: 34px; font-size: 13px; }
  .auth-card { max-width: 380px; padding: 26px 26px 20px; }
  .auth-card h1 { font-size: 19px; }
  .auth-card .lede { font-size: 13px; margin-bottom: 18px; }
  .auth-logo { width: 50px; height: 50px; font-size: 22px; }

  .menu-item { min-height: 44px; padding: 6px 16px; font-size: 13.5px; gap: 12px; }
  .menu-item > i:first-child { font-size: 17px; width: 20px; }
  .menu-item .sub { font-size: 11.5px; }
  .member-chip { font-size: 13px; padding: 3px 10px 3px 3px; }
  .member-chip .avatar { width: 26px; height: 26px; font-size: 11px; }
  .soon { padding: 10px; }

  .toolbar { padding: 0 16px 10px; }
  .search input { padding-left: 34px; }
  .search i { left: 11px; font-size: 13px; }
  .tf-chip { min-height: 28px; font-size: 12px; padding: 0 10px; }
  .table th { height: 36px; font-size: 10.65px; padding: 0 10px; }
  .table td { font-size: 12.8px; padding: 8px 10px; }
  .th-btn { min-height: 34px; }
  .who .avatar { width: 28px; height: 28px; }
  .colour-dot { width: 14px; height: 14px; }
  .popover { width: 260px; padding: 8px; }
  .popover label { min-height: 30px; font-size: 13px; }
  .popover .pop-actions .btn { min-height: 30px; font-size: 12.5px; }

  /* dialogs: centred, a fixed width, never the whole page */
  .sheet { width: 100%; max-width: 480px; max-height: min(86vh, 760px); padding: 18px 20px 18px; border-radius: 18px; }
  .sheet:has(#ce-form), .sheet:has(#ee-form), .sheet:has(#cat-form) { max-width: 560px; }
  .sheet h3 { font-size: 16px; margin-bottom: 4px; }
  .sheet p { font-size: 13px; margin-bottom: 14px; }
  .sheet-actions { margin-top: 10px; }
  .sheet-actions .btn { min-width: 96px; }
  .facts li { padding: 8px 0; font-size: 13px; }
  .hh-option { min-height: 46px; font-size: 13.5px; }
  .creds strong { font-size: 17px; }

  /* rows that scroll sideways on a phone wrap on a desktop, so nothing is hidden from the mouse */
  .tabs-row, .cal-filters, .points-row { flex-wrap: wrap; overflow: visible; }
  .pill-tab { min-height: 32px; padding: 0 13px; font-size: 12.8px; }
  .mchip { min-height: 30px; font-size: 12.5px; padding: 0 11px 0 8px; gap: 6px; }
  .mchip .dot { width: 10px; height: 10px; }
  .who-toggle button { min-height: 30px; font-size: 12.5px; padding: 0 12px; }
  .fab { display: none !important; }

  /* chores and lists: denser rows, smaller circles, still easy to click */
  .tick { width: 32px; height: 32px; }
  .tick i { width: 22px; height: 22px; font-size: 13px; border-width: 1.5px; }
  .chore-item, .li-item { padding: 1px 8px; gap: 8px; }
  .chore-item:hover, .li-item:hover { background: var(--surface-soft); }
  .ci-body, .li-body { padding: 6px 0; }
  .ci-title, .li-name { font-size: 13.8px; }
  .ci-meta, .ci-done, .li-note { font-size: 11.8px; }
  .li-qty, .pts { font-size: 11px; }
  .points-row .pt { min-width: 64px; padding: 8px 6px; }
  .points-row strong { font-size: 15px; }
  .points-row .avatar { width: 28px; height: 28px; }
  .add-bar { grid-template-columns: minmax(0, 1fr) 40px; gap: 6px; padding: 12px 14px 2px; top: 58px; }
  .add-bar .btn { font-size: 16px; }
  .add-hint { font-size: 11.8px; }
  .aisle-head { font-size: 10.8px; margin: 8px 8px 2px; }
  .list-tabs .pill-tab.add { width: 32px; }
  .cnt { min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .day-picks button, .icon-picks button { min-height: 34px; height: 34px; font-size: 13px; }
  .icon-picks { grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); }
  .icon-picks button { font-size: 15px; }
  .sw { width: 30px; height: 30px; border-width: 2px; }
  .swatches { gap: 6px; }
  .check-row { min-height: 32px; font-size: 13px; }
  .check-row input { width: 16px; height: 16px; }

  /* calendar */
  .cal-title { font-size: 15px; }
  .mcell { min-height: 96px; }
  .mcell .dn { width: 24px; height: 24px; font-size: 12px; }
  .mhead span { font-size: 10.5px; }
  .ev { min-height: 40px; padding: 5px 8px; gap: 10px; }
  .ev-time { width: 54px; font-size: 12px; }
  .ev-title { font-size: 13.5px; }
  .ev-sub { font-size: 11.5px; }
  #home-events .ev-time { width: 76px; }
  .wday-head { padding: 10px 12px 4px; }
  .wday-head .wn { font-size: 17px; }
  .wday-head .wd { font-size: 11.5px; }
  .day-empty { font-size: 12.5px; padding: 0 12px 12px; }
  .hint { font-size: 11.8px; }
  .toast { font-size: 13px; padding: 10px 14px; }
}
@media (max-width: 899.98px) {
  .hh-switch { font-size: 15px; }
  .brand-icon { width: 30px; height: 30px; font-size: 15px; }
  .avatar { width: 32px; height: 32px; font-size: 12px; }
  .li-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(118px, 46%); }
  .li-tools .li-aislebtn { width: 100%; }
}

/* ============================================================
   v1.07 — calendar: month in the heading on phones, swipe to move,
   multi-day events drawn as a line from first to last day, one Filter button on phones
   ============================================================ */
.cal-head h1 { min-width: 0; overflow-wrap: anywhere; }
.desk-filters { display: none; }
@media (min-width: 900px) { .desk-filters { display: block; } .cal-nav.desk-only { display: flex !important; } }
@media (max-width: 899.98px) {
  .cal-bar { margin-bottom: 6px; }
  .cal-views .pill-tab { min-height: 34px; }
  .filter-btn { position: relative; padding: 0 12px; }
  .filter-btn.on { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
  .filter-btn .cnt { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 4px; }
}
.filter-sec { border-top: 1px solid var(--border); padding: 6px 0; }
.filter-sec-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 4px 0; }
.filter-sec-head .linkish { min-height: 32px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.frow { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.frow input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent-dark); flex: none; }
.frow .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.frow i { width: 16px; text-align: center; }

/* month grid: one row per week; days are the full-height buttons, lines and dots sit on top */
.month { --dn-h: 30px; --lane-h: 7px; --dots-h: 18px; }
.mweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 0; row-gap: 2px; position: relative; margin-bottom: 2px; }
.mweek .mcell { min-height: 0; height: 100%; padding: 2px 2px 0; justify-content: flex-start; gap: 0; border-radius: 10px; }
.mweek .mcell .dn { margin: 0 auto; }
.mweek .mitems { position: relative; z-index: 1; pointer-events: none; padding: 3px 2px 6px; align-self: start; min-height: var(--dots-h); }
.mspan { position: relative; z-index: 1; pointer-events: none; align-self: center; height: 5px; background: var(--c); margin: 0; }
.mspan.first { margin-left: 6px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.mspan.last { margin-right: 6px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.mspan .mt { display: none; }
@media (max-width: 899.98px) { .mweek { min-height: 58px; } }
@media (min-width: 900px) {
  .month { --dn-h: 28px; --lane-h: 18px; --dots-h: 24px; }
  .mweek { min-height: 100px; }
  .mweek .mcell { align-items: stretch; }
  .mweek .mcell .dn { margin: 0 0 0 auto; }
  .mweek .mitems { padding: 2px 4px 6px; }
  .mspan { height: 17px; align-self: stretch; background: color-mix(in srgb, var(--c) 20%, white); border-left: 0; }
  .mspan.first { border-left: 3px solid var(--c); margin-left: 4px; }
  .mspan.last { margin-right: 4px; }
  .mspan .mt { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); padding: 0 6px; line-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mspan:not(.first) .mt { padding-left: 4px; }
}
/* a short slide when you swipe to the next or previous month or week */
#cal-body.slide-next { animation: calNext .22s ease-out; }
#cal-body.slide-prev { animation: calPrev .22s ease-out; }
@keyframes calNext { from { transform: translateX(28px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes calPrev { from { transform: translateX(-28px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ============================================================
   v1.08 — calendar fixes
   ============================================================ */
.mbar .mt i.bi, .mspan .mt i.bi { margin-right: 5px; font-size: 11px; }   /* space between category icon and name */
.ev-title i.bi, .ev-head h3 i.bi { margin-right: 3px; }
#cal-body { touch-action: pan-y; }                                          /* sideways finger moves are ours (swipe) */
.cal-views .add-ev { margin-left: auto; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); gap: 4px; }
.cal-views .add-ev i { font-size: 15px; }
@media (max-width: 899.98px) {
  .cal-views { width: 100%; }
  /* the month stretches down to the tab bar: the card is sized in JS, the weeks share its height */
  #cal-body .month { display: flex; flex-direction: column; margin-bottom: 0; }
  #cal-body .month .mweek { flex: 1 1 0; min-height: 52px; }
  .mweek .mcell { padding-top: 4px; }
}

/* ============================================================
   v1.10 — per-member access, Helper role
   ============================================================ */
.badge-helper { background: #f3e8ff; color: #6b21a8; }
.acc-box { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px 2px; margin: 2px 0 6px; background: var(--surface-soft); }
.acc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.acc-field > span i { color: var(--accent-text); margin-right: 3px; }
.acc-note { margin: 0 0 10px; }
/* v2.12 which categories / which lists */
.acc-which { margin: -6px 0 14px; }
.seg.seg-sm { margin-bottom: 8px; background: var(--surface); }
.seg.seg-sm button { min-height: 36px; font-size: 13px; }
.acc-ticks { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 2px; }
.acc-ticks .tick-row { margin: 2px 0 8px; }
.acc-ticks p.small { margin: 2px 0 8px; }
.acc-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.acc-ic { color: var(--accent-text); flex: none; }
.tabbar .tab[hidden], .nav-pills .nav-pill[hidden] { display: none !important; }

/* ============================================================
   v1.11 — notifications
   ============================================================ */
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; min-height: 0; padding: 0; border: 0; box-shadow: none; font-size: 16px; border-radius: 999px; background: #cfd8e3; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.25); transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nt-sec h4 { margin: 14px 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.nt-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.nt-row .grow { flex: 1 1 auto; min-width: 0; font-weight: 500; }
.nt-row .sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.nt-row.nt-sub { padding-left: 14px; min-height: 44px; cursor: default; }
.nt-row.nt-sub > span:not(.grow) { color: var(--muted); font-size: 13px; }
.nt-row input[type=time], .nt-row input.tp-input, .nt-row select { width: auto; min-width: 0; flex: none; }
.nt-row input[type=time], .nt-row input.tp-input { width: 140px; }
.nt-row select { max-width: 160px; }
.nt-row .icon-btn { flex: none; color: var(--accent-text); font-size: 20px; }
#nt-body.dim { opacity: .45; }
.nt-device { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-soft); border: 1px solid var(--border); }
.nt-device > i { font-size: 22px; color: var(--muted); }
.nt-device.on > i { color: var(--accent-text); }
.nt-device .grow { flex: 1 1 auto; min-width: 0; }
.nt-device .sub { display: block; font-size: 12.5px; color: var(--muted); }
.nt-device .btn { flex: none; }
.nt-test { margin-top: 8px; }
.nt-note { padding: 12px; border-radius: 14px; background: var(--surface-soft); border: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; margin: 0; }
.nt-note.warn { background: #fff7ed; border-color: #fed7aa; }
.nt-note > i:first-child { color: var(--accent-text); margin-right: 4px; }
.nt-sec:first-of-type .nt-row { border-bottom: 0; }
#nt-form { margin-top: 10px; }
.toast.note i { color: var(--accent); }
.page-head .btn-row.tight { flex-wrap: nowrap; }
@media (min-width: 900px) {
  .switch { width: 40px; height: 24px; }
  input.switch::after { width: 18px; height: 18px; }
  input.switch:checked::after { transform: translateX(16px); }
  .nt-row { min-height: 40px; }
  .nt-row.nt-sub { min-height: 36px; }
}

/* ============================================================
   v1.14 — meal planner
   ============================================================ */
.avatar.xs { width: 20px; height: 20px; font-size: 9px; flex: none; }
.ml-tabs { margin-bottom: 10px; }
.ml-weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.ml-weeknav h2 { margin: 0; font-size: 16px; font-weight: 600; text-align: center; flex: 1; }
.ml-week { display: grid; gap: 10px; }
.ml-day { padding: 10px 12px; margin: 0; }
.ml-day.today { border: 2px solid var(--accent); }
.ml-day.past { opacity: .72; }
.ml-dayhead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.ml-dow { font-weight: 700; color: var(--ink); }
.ml-date { color: var(--muted); font-size: 13px; }
.ml-todaybadge { margin-left: auto; background: var(--accent-soft); color: var(--accent-soft-ink); }
.ml-slot { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 44px; border-top: 1px solid var(--border); padding: 4px 0; }
.ml-slotname { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ml-slotname i { color: var(--accent-text); }
.ml-items { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.ml-entry { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding: 4px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-soft); font: 500 14px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.ml-entry .ml-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-entry:hover { border-color: var(--accent); }
.ml-add { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; min-height: 36px; padding: 0 10px; border-radius: 12px; border: 1px dashed var(--input-border); background: none; color: var(--accent-text); font: 600 13px var(--font); cursor: pointer; }
.ml-add:hover { border-color: var(--accent); background: var(--accent-soft); }
.ml-none { color: var(--muted); }
.ml-pick { margin-top: 8px; max-height: 50vh; overflow-y: auto; }
.ml-pick .menu-item { width: 100%; }
.ml-new i { color: var(--accent-text); }
.ml-hint { padding: 8px 2px; }
.ml-when { margin-top: -4px; }
.ml-when i { color: var(--accent-text); }
.ml-note { background: var(--surface-soft); border-radius: 12px; padding: 8px 12px; }
.ml-ings { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px 2px; margin: 4px 0 8px; background: var(--surface-soft); }
.ml-ings-head { display: flex; align-items: center; justify-content: space-between; }
.ml-ings-head .acc-title { margin-bottom: 0; }
.ml-ings-hint { margin: 2px 0 4px; }
.ml-ing .grow { min-width: 0; overflow-wrap: anywhere; }
.ml-onlist { font-size: 12px; color: var(--accent-soft-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ml-ing input:disabled + .grow { color: var(--muted); }
.ml-tolist { margin-top: 6px; }
.ml-inglist { margin: 4px 0 8px; padding-left: 18px; }
.ml-ingsum { overflow-wrap: anywhere; }
.ml-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
#ml-body { touch-action: pan-y; }
@media (min-width: 900px) {
  .ml-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .ml-day { padding: 8px; }
  .ml-dayhead { flex-wrap: wrap; gap: 4px 6px; }
  .ml-todaybadge { margin-left: 0; }
  .ml-slot { grid-template-columns: minmax(0, 1fr); gap: 4px; min-height: 0; padding: 6px 0; align-items: start; }
  .ml-entry { min-height: 30px; font-size: 13px; padding: 4px 8px; width: 100%; }
  .ml-entry .ml-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; flex: 1; }
  .ml-add { min-height: 28px; min-width: 28px; font-size: 12px; width: 100%; }
  .ml-weeknav { justify-content: flex-start; }
  .ml-weeknav h2 { flex: none; min-width: 150px; }
}
/* six tabs on phones */
@media (max-width: 380px) { .tabbar .tab { font-size: 10.5px; } }

/* ============================================================
   v1.15 — lists as cards on phones (search and filters kept)
   ============================================================ */
.tf-filterbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 6px; }
.tf-fbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: 600 13px var(--font); color: var(--muted); text-transform: none; letter-spacing: 0; }
.tf-fbtn.on { border-color: var(--accent); color: var(--accent-soft-ink); background: var(--accent-soft); }
.tf-cards { display: flex; flex-direction: column; padding: 0 14px 4px; }
#ml-saved { padding-top: 14px; }
.tf-card { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--border); cursor: pointer; min-height: 56px; }
.tf-card:first-child { border-top: 0; }
.tf-card .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tf-card strong { font-size: 15.5px; color: var(--ink); overflow-wrap: anywhere; }
.tf-card .sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tf-card .chev { color: var(--muted); flex: none; }
.tf-cards .table-empty { padding: 24px 8px; text-align: center; color: var(--muted); }
.ml-cardicon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.ml-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ml-meta span { font-size: 11.5px; font-weight: 600; color: var(--badge-ink); background: var(--badge-bg); border-radius: 999px; padding: 2px 8px; }

/* ============================================================
   v1.17 — photos and chat on events
   ============================================================ */
.ev-extras { margin-top: 6px; }
.ex-sec { border-top: 1px solid var(--border); padding: 12px 0 4px; }
.ex-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ex-head h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.ex-head h4 i { color: var(--accent-text); }
.ex-head .cnt { font-size: 11px; background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 999px; padding: 1px 7px; }
.ex-addphoto { cursor: pointer; min-height: 40px; }
.ex-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.ex-photos .ex-empty, .ex-chat .ex-empty { grid-column: 1 / -1; margin: 2px 0 6px; }
.ex-thumb { aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-soft); cursor: zoom-in; }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-progress { font-size: 13px; color: var(--accent-text); margin-top: 6px; }
.ex-chat { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; padding: 2px 0 8px; }
.ex-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.ex-msg .avatar { width: 28px; height: 28px; font-size: 11px; flex: none; }
.ex-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.ex-bubble { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 7px 11px; min-width: 0; display: flex; flex-direction: column; }
.ex-msg.mine .ex-bubble { background: var(--accent-soft); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.ex-who { font-size: 12px; font-weight: 700; color: var(--accent-text); }
.ex-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: 14.5px; line-height: 1.4; }
.ex-time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ex-back { font-size: 11px; }
.ex-msg.gone .ex-bubble { background: none; border-style: dashed; color: var(--muted); font-size: 12.5px; }
.ex-send { display: flex; gap: 8px; align-items: flex-end; padding-top: 4px; }
.ex-send textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 120px; line-height: 1.35; }
.ex-send .btn { flex: none; min-width: 48px; }
.ex-viewer { position: fixed; inset: 0; z-index: 3800; background: rgba(6, 14, 20, .94); display: flex; flex-direction: column; }
.ex-vbar { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; color: #fff; }
.ex-vbar .grow { flex: 1; }
.ex-vbar .icon-btn { color: #fff; }
.ex-vinfo { font-size: 13px; opacity: .85; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-vimg { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 8px calc(12px + var(--safe-b)); }
.ex-vimg img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.ex-vnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 20px; cursor: pointer; }
.ex-vnav.prev { left: 10px; } .ex-vnav.next { right: 10px; }
@media (max-width: 899.98px) { .ex-vnav { display: none; } }
@media (min-width: 900px) {
  .ex-photos { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .ex-chat { max-height: 260px; }
  .ex-send textarea { min-height: 38px; }
}

/* ============================================================
   v1.18 — phone month shows names (like TimeTree); easier closing of sheets
   ============================================================ */
@media (max-width: 899.98px) {
  .month { --dn-h: 22px; --lane-h: 16px; --dots-h: 18px; }
  .mweek .mcell { padding-top: 2px; }
  .mweek .mitems { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 1px; padding: 1px 1px 3px; }
  .mbar { width: auto; height: 15px; border-radius: 3px; background: var(--c); padding: 0 3px; min-width: 0; }
  .mbar .mt { display: block; font: 600 10.5px/15px var(--font); color: var(--t, #fff); text-align: left; overflow: hidden; white-space: nowrap; text-overflow: clip; letter-spacing: -.1px; }
  .mbar .mt i.bi, .mspan .mt i.bi, .mbar .mtime { display: none; }
  .mbar.chore { background: none; box-shadow: inset 0 0 0 1px var(--c); }
  .mbar.chore .mt { color: var(--ink); font-weight: 500; }
  .mbar.chore.done { opacity: .45; background: none; }
  .mbar.chore.done .mt { text-decoration: line-through; }
  .mbar.meal { background: #f6dcb4; }
  .mbar.meal .mt { color: var(--ink); font-weight: 500; }
  .mitems .more { font-size: 10px; font-weight: 700; color: var(--muted); line-height: 13px; text-align: center; }
  .mspan { height: 15px; align-self: center; background: var(--c); border-radius: 0; margin: 0; }
  .mspan.first { margin-left: 1px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; }
  .mspan.last { margin-right: 1px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
  .mspan .mt { display: block; font: 600 10.5px/15px var(--font); color: var(--t, #fff); padding: 0 4px; overflow: hidden; white-space: nowrap; text-align: center; }
  .mweek .mcell .dn { font-size: 12.5px; }
}

/* sheets: a top bar with the grip (pull down) and a close button that stays in view */
.sheet { padding-top: 0; }
.sheet-top { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: center; height: 40px; margin: 0 -18px 4px; background: var(--surface); touch-action: none; }
.sheet-top .sheet-grip { margin: 0; width: 44px; }
.sheet-x { position: absolute; right: 8px; top: 2px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-soft); color: var(--muted); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet-x:hover { color: var(--ink); background: var(--border); }
@media (max-width: 899.98px) { .sheet-top { margin: 0 -16px 2px; } }
@media (min-width: 900px) {
  .sheet { padding-top: 18px; }
  .sheet-top { height: 0; margin: 0; background: none; }
  .sheet-top .sheet-grip { display: none; }
  .sheet-x { top: -8px; right: -10px; width: 32px; height: 32px; font-size: 13px; }
  .sheet > h3:nth-child(2), .sheet > .ev-head:nth-child(2) { padding-right: 36px; }
}

/* v1.19 — phone month: white names on every colour (the colour is deepened a little so white reads well) */
@media (max-width: 899.98px) {
  .mbar:not(.chore):not(.meal), .mspan { background: color-mix(in srgb, var(--c) 84%, #000); }
  .mbar:not(.chore):not(.meal) .mt, .mspan .mt { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .18); }
}

/* ============================================================
   v1.20 — lighter month names; photos while creating an event; tidier close button
   ============================================================ */
@media (max-width: 899.98px) {
  .month { --lane-h: 15px; }
  .mbar { height: 14px; }
  .mbar .mt, .mspan .mt { font-size: 9.75px; line-height: 14px; font-weight: 500; letter-spacing: 0; }
  .mspan { height: 14px; }
}
.ee-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ee-addph { width: 64px; height: 64px; border: 1px dashed var(--input-border); border-radius: 12px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--accent-text); font: 600 12px var(--font); cursor: pointer; }
.ee-addph i { font-size: 18px; }
.ee-addph:hover { border-color: var(--accent); background: var(--accent-soft); }
.ee-ph { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-soft); }
.ee-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ee-ph button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .6); color: #fff; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }

/* close button: a plain × in line with the title, right-aligned with the content */
.sheet-top { height: 22px; margin-bottom: 0; }
.sheet-x { top: 17px; right: 6px; width: 40px; height: 40px; background: none; color: var(--muted); font-size: 17px; }
.sheet-x:hover, .sheet-x:active { background: var(--surface-soft); color: var(--ink); }
.sheet > h3:nth-child(2), .sheet > .ev-head:nth-child(2), .sheet > .mem-head:nth-child(2) { padding-right: 40px; }
@media (max-width: 899.98px) { .sheet-top { margin: 0 -16px; } .sheet-x { right: 6px; } }
@media (min-width: 900px) {
  .sheet-top { height: 0; }
  .sheet-x { top: -6px; right: -8px; width: 30px; height: 30px; font-size: 14px; }
}
/* v1.21 — close button: its × lines up with the right edge of the text, level with the title */
.sheet-top { margin-left: 0; margin-right: 0; }
.sheet-x { top: 14px; right: -12px; }
.sheet-x:hover, .sheet-x:active { background: none; }
@media (hover: hover) { .sheet-x:hover { background: var(--surface-soft); color: var(--ink); } }
@media (min-width: 900px) { .sheet-x { top: -4px; right: -12px; } }

/* v1.24 — chores (all and history) as cards on phones, like saved meals */
.tf-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.tf-icon.done { background: #e6f2ea; color: var(--success); font-size: 20px; }
.tf-card .avatar.tf-av { width: 40px; height: 40px; font-size: 15px; flex: none; }
.tf-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tf-tags span { font-size: 11.5px; font-weight: 600; color: var(--badge-ink); background: var(--badge-bg); border-radius: 999px; padding: 2px 8px; }
#chores-body .card:has(.tf-cards), #chores-body .card:has(#history-table .tf-cards) { padding-top: 14px; }
.card:has(> #chores-table .tf-cards), .card:has(> #history-table .tf-cards) { padding-top: 14px; }

/* v1.25 — All / None in the calendar filter */
.filter-quick { display: inline-flex; gap: 4px; }
.filter-quick .linkish { min-height: 36px; padding: 0 8px; }
.filter-quick .linkish + .linkish { border-left: 1px solid var(--border); }

/* v1.26 — even gaps between Home cards; household members as tiles */
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 14px; }
@media (max-width: 899.98px) { .grid-2 { margin-bottom: 10px; } }
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 12px 4px; padding: 4px 0 2px; }
.hm { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; text-align: center; }
.hm .avatar { width: 46px; height: 46px; font-size: 16px; margin-bottom: 3px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.hm.me .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.hm-name { font-size: 13.5px; font-weight: 600; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-role { font-size: 11.5px; color: var(--muted); line-height: 1.1; }
.hm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.hm-actions .btn { justify-content: center; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
/* a heading's side link keeps its 44px tap area without making the header taller */
.card-head > .linkish, .card-head > a.linkish { margin-top: -12px; margin-bottom: -12px; }

/* v1.27 (phones: tabs replaced; v1.43 shows all lists on their own page instead) */
@media (max-width: 899.98px) { .list-tabs { display: none; } }

/* v1.28 — data saver, staples, WhatsApp */
.ds-opts { display: grid; gap: 8px; margin: 12px 0; }
.ds-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ds-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ds-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.ds-opt .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ex-hd { min-height: 34px; padding: 0 12px; font-size: 13px; background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.staples { margin: 4px 14px 10px; padding: 10px 12px 12px; border-radius: 14px; background: var(--accent-soft); }
.st-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.st-head > i { color: var(--accent-text); }
.st-head .grow { flex: 1; }
.st-head .linkish { min-height: 36px; padding: 0 6px; font-size: 13px; margin: -8px 0; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; max-width: 100%; }
.st-chip > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-chip i { color: var(--accent-text); }
.st-chip .st-f { font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.st-chip:active { background: var(--surface-soft); }
@media (hover: hover) { .st-chip:hover { border-color: var(--accent); } }
@media (max-width: 899.98px) { .staples { margin: 2px 14px 10px; } }
.btn-wa { color: #0e7a3f; border-color: rgba(37, 211, 102, .45); }
.btn-wa i { color: #25d366; font-size: 17px; }
@media (hover: hover) { .btn-wa:hover { background: rgba(37, 211, 102, .1); } }
.menu-item .wa-ic { color: #25d366; }
.ev-actions { flex-wrap: wrap; }
.ev-actions .btn-wa { margin-right: auto; }
/* v1.83 Delete sits on the right, after Edit */
.ev-actions .ev-del { color: var(--danger); border-color: rgba(220, 38, 38, .35); }
@media (hover: hover) { .ev-actions .ev-del:hover { background: rgba(220, 38, 38, .08); } }

/* v1.31 — the profile picture opens Settings; it shows a ring while you're there */
.avatar-btn .avatar { transition: box-shadow .15s; }
.avatar-btn.active .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }

/* v1.33 — broadcasts */
.bc-btn { font-size: 19px; color: var(--accent-text); }
.bc-lede { margin: 2px 0 12px; }
.bc-to { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bc-tolabel { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bc-tobtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; max-width: 100%; text-align: left; }
.bc-faces { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.bc-face { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; padding: 6px 2px; border-radius: 12px; border: 1px solid transparent;
  background: none; font: 600 12.5px var(--font); color: var(--muted); cursor: pointer; }
.bc-face .avatar { opacity: .35; filter: grayscale(.7); transition: opacity .15s, filter .15s; }
.bc-face.on { color: var(--ink); background: var(--accent-soft); }
.bc-face.on .avatar { opacity: 1; filter: none; }
.bc-presets { display: grid; gap: 8px; }
.bc-preset { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px 8px 10px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.bc-preset:active { background: var(--surface-soft); transform: scale(.99); }
@media (hover: hover) { .bc-preset:hover { border-color: var(--accent); } }
.bc-emoji { font-size: 26px; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-soft); display: grid; place-items: center; flex: none; }
.bc-ptxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bc-ptxt strong { font-size: 15.5px; }
.bc-ptxt .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-go { color: var(--accent-text); font-size: 18px; }
.bc-custom { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 8px; margin-top: 12px; }
.bc-editrow { margin: 12px 0 0; text-align: center; }
.bc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding-right: 30px; }
.bc-bigemoji { font-size: 30px; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.bc-answer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 12px; }
.bc-rbtn { padding: 8px 6px; font-size: 13.5px; white-space: normal; line-height: 1.2; }
.bc-rbtn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bc-sub { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 4px; }
.bc-people { list-style: none; margin: 0; padding: 0; }
.bc-people li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.bc-people .grow { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
.bc-state { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.bc-state.wait { color: var(--muted); background: var(--badge-bg); }
.bc-state.a-coming { color: #1e5b38; background: #e3f1e8; }
.bc-state.a-five { color: var(--warm-ink); background: var(--warm-soft); }
.bc-state.a-cant { color: var(--danger); background: var(--danger-soft); }
.bc-banner { position: fixed; left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 3900; max-width: 520px; margin: 0 auto;
  background: var(--surface); border-radius: 18px; box-shadow: 0 18px 50px rgba(30, 20, 10, .28), 0 0 0 1px var(--border); padding: 12px 12px 6px;
  transform: translateY(-130%); transition: transform .25s ease-out; }
.bc-banner.in { transform: none; }
.bc-btop { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bc-btop .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bc-btop strong { font-size: 16.5px; color: var(--ink); }
.bc-btop .sub { font-size: 12.5px; color: var(--muted); }
.bc-x { align-self: flex-start; color: var(--muted); }
.bc-home > li { display: flex; align-items: center; }
.bc-home > li > .menu-item { flex: 1; min-width: 0; }
.bc-home .bc-hide { flex: none; margin-right: 6px; color: var(--muted); }
.bc-home .bc-hemoji { font-size: 22px; width: 24px; text-align: center; flex: none; }
.bc-erows { display: grid; gap: 10px; margin: 10px 0; }
.bc-erow { display: grid; grid-template-columns: 56px minmax(0, 1fr) 40px; gap: 6px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.bc-eemoji { text-align: center; font-size: 20px; padding: 0 4px; }
.bc-eopts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.bc-eopts select { width: auto; flex: 0 1 220px; }
.bc-ekids { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); }
.bc-ekids input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .bc-banner { transition: none; } }

/* v1.34 — broadcast icons: line icons in teal, like the lists (no colourful emojis in the app) */
.bc-ic { width: 42px; height: 42px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-text); font-size: 20px; }
.bc-ic.big { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }
.bc-ic.alert { background: var(--danger-soft); color: var(--danger); }
.bc-title { display: flex; align-items: center; gap: 8px; }
.bc-title i { color: var(--accent-text); font-size: 20px; }
#home-bc .menu-item > i:first-child { color: var(--accent-text); }
#home-bc .menu-item > i.alert:first-child { color: var(--danger); }
.bc-eicon { border: 0; background: none; padding: 0; cursor: pointer; justify-self: start; }
.bc-eicons { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; padding-top: 4px; }
.bc-eicons button { height: 42px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--surface); font-size: 18px; color: var(--text); cursor: pointer; }
.bc-eicons button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bc-rbtn i { font-size: 16px; }
.bc-rbtn:not(.on) i { color: var(--accent-text); }
.bc-state i { font-size: 13px; margin-right: 2px; }
/* v1.35 — ending a broadcast */
.bc-ended { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--badge-bg); color: var(--badge-ink); font-size: 13.5px; font-weight: 600; }
.bc-endrow { margin-top: 14px; }
.bc-end { width: 100%; color: var(--danger); }
.bc-endnote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.bc-endnote .btn { margin-left: auto; }

/* v1.36 — answers that fit each message */
.bc-state.t0 { color: #1e5b38; background: #e3f1e8; }
.bc-state.t1 { color: var(--warm-ink); background: var(--warm-soft); }
.bc-state.t2 { color: var(--danger); background: var(--danger-soft); }
.bc-answer.n1 { grid-template-columns: minmax(0, 1fr); }
.bc-answer.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-eans { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--border); }
.bc-eanslabel { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bc-earow { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 6px; align-items: center; }
.bc-eaicon { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--surface); color: var(--accent-text); font-size: 17px; cursor: pointer; }
.bc-eaadd { justify-self: start; min-height: 36px; }
.bc-enone { margin: 0; }
/* a long drawer, once scrolled: a solid band behind the grip and the ×, so content slides under it cleanly */
.sheet.scrolled .sheet-top::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 62px; z-index: -1;
  background: var(--surface); border-bottom: 1px solid var(--border); }
@media (min-width: 900px) { .sheet.scrolled .sheet-top::after { top: -18px; height: 50px; } }
/* v1.37 — reorder broadcast messages */
.bc-emove { margin-left: auto; display: inline-flex; gap: 2px; }
.bc-emove .icon-btn { color: var(--accent-text); }
.bc-emove .icon-btn:disabled { color: var(--border); cursor: default; }
/* v1.38 — changing one event of a repeating series */
.ee-scope { margin: -4px 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-soft-ink); }
.ev-series { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 10px; }
.ev-series i { color: var(--accent-text); margin-top: 2px; }
/* v1.39 — phones: on Home, Coming up (calendar) comes before Today's chores, like the menu */
@media (max-width: 899.98px) { #home-events { order: -1; } }

/* v1.40 — calmer meals: one list for the week, one line per planned meal, one + per day */
.ml-week, .ml-week[id] { display: block !important; padding: 2px 0; gap: 0; max-width: 760px; }
.ml-row { padding: 10px 14px 10px 16px; border-top: 1px solid var(--border); position: relative; }
.ml-row:first-child { border-top: 0; }
.ml-row.today::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.ml-row.past { opacity: .6; }
.ml-rowhead { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.ml-rowhead .ml-dow { font-size: 15px; }
.ml-plus { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; flex: none; }
@media (hover: hover) { .ml-plus:hover { border-color: var(--accent); background: var(--accent-soft); } }
.ml-lines { display: grid; gap: 2px; margin-top: 2px; }
.ml-line { display: grid; grid-template-columns: 20px 74px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 4px 6px;
  border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.ml-line:active { background: var(--surface-soft); }
@media (hover: hover) { .ml-line:hover { background: var(--surface-soft); } }
.ml-line > i { color: var(--accent-text); font-size: 15px; }
.ml-slotword { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ml-line .ml-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-nothing { margin: 0; font-size: 13px; color: var(--muted); }
.ml-slotpick { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 4px 0 12px; }
.ml-slotpick button { font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.ml-slotpick button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(60,45,20,.1); }
.ml-slotpick button.on i { color: var(--accent-text); }
.ml-has { color: var(--accent-text); font-weight: 800; }
/* Home: today, tomorrow and the day after */
.ml-home { padding: 0 14px 10px; }
.ml-hday { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.ml-hday:first-child { border-top: 0; }
.ml-hlabel { display: flex; flex-direction: column; line-height: 1.2; }
.ml-hlabel strong { font-size: 14px; color: var(--ink); }
.ml-hlabel span { font-size: 12px; color: var(--muted); }
.ml-hday.today .ml-hlabel strong { color: var(--accent-text); }
.ml-hmeals { min-width: 0; display: grid; gap: 0; }
.ml-hmeals .ml-line { grid-template-columns: 18px minmax(0, 1fr) auto; min-height: 34px; padding: 2px 4px; }
.ml-hmeals .ml-slotword { display: none; }
.ml-hday .ml-plus { width: 32px; height: 32px; font-size: 14px; }
@media (max-width: 899.98px) { .ml-row { padding: 8px 12px 8px 14px; } .ml-line { grid-template-columns: 18px 64px minmax(0, 1fr) auto; } }
.ml-rowhead .ml-todaybadge { margin-left: 0; }

/* v1.41: Home chores show only what's left */
.ch-donecount { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; text-decoration: none; }
.ch-donecount i { color: var(--success); font-size: 16px; }
@media (hover: hover) { .ch-donecount:hover { color: var(--accent-text); } }

/* v1.42/v1.43: calmer Lists. Phones: the Lists tab shows all lists; a list opens on its own page with "‹ Lists" to go back */
.li-back, .li-title { display: none; }
.add-bar { grid-template-columns: minmax(0, 1fr) 52px; }
.li-tools.one { display: flex; }
.li-tools.one .search { flex: 1; }
.li-item .li-by { flex: none; margin-left: 6px; opacity: .8; }
.lo-list .menu-item { text-decoration: none; color: inherit; }
.lo-list .menu-item .sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lo-list .lo-new { color: var(--accent-text); }
.lo-list .lo-new i { color: var(--accent-text); }
@media (max-width: 899.98px) {
  .li-head { flex-wrap: nowrap; gap: 8px; align-items: center; margin-bottom: 2px; }
  .li-head .li-h1 { display: none; }
  .li-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 2px; margin-left: -4px;
    color: var(--accent-text); font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 10px; flex: none; }
  .li-back:active { background: var(--surface-soft); }
  .li-head .btn-row { flex: none; flex-wrap: nowrap; }
  .li-head .li-more { width: 44px; padding: 0; justify-content: center; font-size: 18px; }
  .li-title { display: flex; align-items: center; gap: 10px; margin: 0 4px 12px; min-width: 0; font-size: 22px; font-weight: 700; }
  .li-title .ls-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .li-title .ls-ic { font-size: 18px; color: var(--accent-text); width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .li-title .cnt { flex: none; }
}
@media (max-width: 360px) {
  .li-head .li-shop { padding: 0 10px; font-size: 13.5px; }
  .li-title { font-size: 20px; }
}
#li-name::-webkit-calendar-picker-indicator { display: none !important; opacity: 0; }

/* v1.44: aisle filter as a button that opens an app-styled sheet (not the phone's own dropdown) */
.li-aislebtn .grow { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-aislebtn > i:first-child { color: var(--accent-text); }
.li-aislebtn > i:last-child { color: var(--muted); font-size: 13px; }
.li-aislebtn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.ls-sheet .menu-item.current { background: var(--accent-soft); border-radius: 12px; }
.ls-sheet .menu-item.current .chev { color: var(--accent-text); }

/* v1.47: "please update" bar (an app older than the database supports) */
.update-bar { position: fixed; left: 10px; right: 10px; top: calc(8px + var(--safe-t)); z-index: 4000; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-card); font-size: 14px; }
.update-bar > i { font-size: 18px; }
.update-bar .btn { flex: none; min-height: 38px; }

/* v1.48: delete my account, privacy links */
.del-cols { display: grid; gap: 10px; margin: 6px 0 12px; }
@media (min-width: 560px) { .del-cols { grid-template-columns: 1fr 1fr; } }
.del-box { border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.del-box h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.del-box ul { margin: 0; padding-left: 18px; }
.del-box li { margin: 2px 0; }
.del-box.gone { background: var(--danger-soft); color: var(--text); }
.del-box.gone h4 { color: var(--danger); }
.del-box.stays { background: var(--surface-soft); }
.del-block { background: var(--warm-soft); color: var(--warm-ink); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.del-check { display: flex; gap: 10px; align-items: flex-start; background: var(--danger-soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; font-size: 13.5px; cursor: pointer; }
.del-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--danger); }
.auth-legal { text-align: center; margin: 14px 0 0; color: var(--muted); }
.auth-legal a, .version a { color: inherit; }

/* v1.49: consent ticks (sign-up 18+ and privacy policy; adding a child) */
.tick-row { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.tick-row input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.tick-row a { color: var(--accent-text); }
.guardian-tick { background: var(--surface-soft); border-radius: 12px; padding: 10px 12px; }
#su-childnote a { color: inherit; }
.tick-row { align-items: center; }
.tick-row > span:not(.avatar) { margin: 0; display: block; font-weight: 500; color: var(--text); }
.tick-row > .avatar { flex: none; }

/* v1.50: private lists; Home shopping card cut off like the Lists page */
.ls-lock { font-size: .78em; color: var(--muted); margin-left: 6px; vertical-align: 1px; }
.li-title .ls-lock { font-size: 15px; margin-left: 0; }
.li-private { margin: -6px 4px 12px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ls-people { margin-top: 10px; background: var(--surface-soft); border-radius: 12px; padding: 10px 12px; }
.ls-people .ls-person { margin: 6px 0; }
.ls-people .avatar { flex: none; }
#ls-vis button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#home-lists .menu-item .sub, .lo-list .menu-item .sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#home-lists .menu-item .grow { min-width: 0; }
/* v1.79 every list row the same height: room for two lines of items, even when there is one (or "Nothing needed") */
#home-lists .menu-item .sub, .lo-list .menu-item .sub { line-height: 1.4; min-height: 2.8em; max-height: 2.8em; }

/* v1.50: star of the month, a person's chores, who did it */
/* v1.60: a calmer Star of the month: one strip and small score chips */
.star-card { padding: 12px 14px; }
.star-hero { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: left; background: var(--warm-soft); color: var(--ink);
  border: 0; border-radius: 14px; padding: 10px 12px; font: inherit; }
button.star-hero { cursor: pointer; }
.sh-avs { display: flex; flex: none; }
.sh-avs .avatar { width: 40px; height: 40px; font-size: 15px; box-shadow: 0 0 0 2px var(--warm-soft); }
.sh-avs .avatar + .avatar { margin-left: -12px; }
.sh-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sh-lbl { font-size: 12.5px; font-weight: 600; color: var(--warm-ink); display: flex; align-items: center; gap: 5px; }
.sh-lbl i { color: var(--warm); }
.sh-txt strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-none { font-size: 14px; color: var(--text); }
.sh-score { flex: none; font-size: 13px; font-weight: 600; color: var(--warm-ink); background: rgba(255,255,255,.6); border-radius: 999px; padding: 4px 10px; }
.month-row { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.month-row::-webkit-scrollbar { display: none; }
.month-row .pt { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; }
.month-row .pt .avatar { width: 30px; height: 30px; font-size: 12px; }
.month-row .pt .nm { font-size: 13.5px; font-weight: 600; }
.month-row .pt strong { font-size: 13.5px; color: var(--ink); min-width: 1ch; }
.month-row .pt.lead { border-color: var(--warm); background: var(--warm-soft); }
.month-row .pt.zero .nm, .month-row .pt.zero strong { color: var(--muted); }
.month-row .pt:active { background: var(--surface-soft); }
.mc-rows { list-style: none; margin: 0; padding: 0; }
.mc-month { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 0 4px; }
.mc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mc-row > i { color: var(--success); font-size: 18px; }
.mc-row .sub { display: block; font-size: 12.5px; color: var(--muted); }
.hh-option .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

/* v1.51: weather line on Home; list sharing rows */
.hello .wx { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 14px; color: var(--text); }
.hello .wx strong { font-weight: 700; color: var(--ink); }
.wx-ic { font-size: 18px; color: var(--accent-text); flex: none; }
.wx-tip { color: var(--accent-soft-ink); font-weight: 600; }
.wx-add { font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.ls-people .ls-person { gap: 12px; }
.ls-people .ls-person .avatar.xs { width: 28px; height: 28px; font-size: 11px; }

/* v1.52: Share ClickHuis */
#share-card .card-body { display: flex; flex-direction: column; gap: 10px; }
#share-card .card-body p { margin: 0; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; font-size: 16px; color: var(--muted); background: var(--surface-soft); }
.share-row .btn { flex: none; width: 46px; padding: 0; justify-content: center; }
.share-stats { font-size: 13.5px; color: var(--muted); }
.share-stats strong { color: var(--accent-text); }

/* v1.54: landing page (signed out). Line-art suburb behind; intro, sign-in box, what it does, how to start */
.auth-wrap.landing { display: block; padding: 0; min-height: 100vh; min-height: 100dvh; position: relative; isolation: isolate; }
.landing::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--bg) url("/icons/suburb.svg?v=1") center top / cover no-repeat; opacity: .9; }
.landing::after { content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(251, 245, 232, .92) 0%, rgba(251, 245, 232, .82) 45%, rgba(251, 245, 232, .5) 100%); }
.ld { max-width: 1120px; margin: 0 auto; padding: calc(14px + var(--safe-t)) 16px calc(24px + var(--safe-b)); display: grid; gap: 18px; }
.ld-top { display: flex; align-items: center; gap: 10px; }
.ld-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #f5e8cc; display: grid; place-items: center; font-size: 19px; box-shadow: 0 0 0 5px var(--accent-soft); }
.ld-name { font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: -.01em; }
.ld-hero h1 { font-size: 34px; line-height: 1.12; letter-spacing: -.02em; color: var(--ink); margin: 6px 0 10px; }
.ld-hero h1 span { color: var(--accent-text); }
.ld-hero p { font-size: 16px; line-height: 1.55; color: var(--text); margin: 0; max-width: 34em; }
.landing .auth-card { margin: 0; max-width: none; width: 100%; box-shadow: 0 1px 2px rgba(46, 20, 34, .06), 0 18px 40px rgba(46, 20, 34, .12); }
.ld-feats h2, .ld-how h2 { font-size: 18px; color: var(--ink); margin: 6px 0 10px; }
.ld-feats ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ld-feats li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .88); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ld-feats li > i { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 18px; }
.ld-feats strong { display: block; color: var(--ink); font-size: 15px; }
.ld-feats span { display: block; color: var(--text); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.ld-how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ld-how li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); font-size: 15px;
  background: rgba(255, 255, 255, .88); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; }
.ld-how li span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 14px; }
.ld-foot { text-align: center; padding-top: 4px; }
.ld-foot .auth-legal { margin: 0; color: var(--muted); }
@media (min-width: 560px) { .ld-feats ul { grid-template-columns: 1fr 1fr; } .ld-how ol { grid-template-columns: repeat(3, 1fr); } .ld-how li { flex-direction: column; text-align: center; padding: 14px; } }
@media (min-width: 900px) {
  .ld { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 48px; row-gap: 22px; padding: 28px 32px 32px;
    grid-template-areas: "top top" "hero card" "feats card" "how card" "foot foot"; align-items: start; }
  .ld-top { grid-area: top; } .ld-hero { grid-area: hero; padding-top: 24px; } .ld-feats { grid-area: feats; } .ld-how { grid-area: how; } .ld-foot { grid-area: foot; }
  .landing .auth-card { grid-area: card; position: sticky; top: 28px; }
  .ld-hero h1 { font-size: 52px; }
  .ld-hero p { font-size: 18px; }
  .landing::after { background: linear-gradient(90deg, rgba(251, 245, 232, .92) 0%, rgba(251, 245, 232, .7) 50%, rgba(251, 245, 232, .2) 100%); }
}

/* v1.55: RSVP on an event */
.ev-rsvp { margin: 12px 0 4px; }
.ev-rsvp-on { justify-content: center; gap: 8px; border-style: dashed; }
.rsvp-card { border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; background: var(--surface-soft); }
.rsvp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); }
.rsvp-head i { color: var(--accent-text); }
.rsvp-state { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 2px 10px; }
.rsvp-state.open { color: var(--success); }
.rsvp-tally { margin: 6px 0 8px; font-size: 14px; color: var(--text); }
.rsvp-list { list-style: none; margin: 0 0 10px; padding: 0; }
.rsvp-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.rsvp-list li > i { font-size: 18px; margin-top: 1px; }
.rsvp-yes > i { color: var(--success); } .rsvp-maybe > i { color: var(--warm-ink); } .rsvp-no > i { color: var(--muted); }
.rsvp-msg { display: block; color: var(--muted); font-style: italic; }
.rsvp-ans { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.rsvp-actions { display: flex; gap: 8px; }
.rsvp-actions .btn-wa { flex: 1; justify-content: center; }
.rsvp-actions .btn:not(.btn-wa) { width: 44px; padding: 0; justify-content: center; flex: none; }

/* v1.56: invitation picture and RSVP while creating an event (v1.87: a clean card with two rows) */
.ee-invite { border: 1px solid var(--border); border-radius: 18px; padding: 14px; margin: 6px 0 16px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(46, 20, 34, .04), 0 6px 18px rgba(46, 20, 34, .05); transition: border-color .15s, box-shadow .15s; }
.ee-invite.on { border-color: color-mix(in srgb, var(--brand) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent), 0 6px 18px rgba(46, 20, 34, .05); }
.ee-inv-head { display: flex; gap: 12px; align-items: center; }
.ee-inv-badge { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 19px;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #55263d)); box-shadow: 0 4px 10px color-mix(in srgb, var(--brand) 30%, transparent); }
.ee-inv-head strong { display: block; color: var(--ink); font-size: 15.5px; line-height: 1.25; }
.ee-inv-head div > span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.ee-inv-rows { margin-top: 12px; border-radius: 14px; background: var(--surface-soft); overflow: hidden; }
.ee-inv-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; min-height: 58px; cursor: pointer; }
.ee-inv-rows > * + * .ee-inv-row, .ee-inv-rows > * + .ee-inv-row { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.ee-inv-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ee-inv-row strong { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.ee-inv-row small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.ee-inv-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface); display: grid; place-items: center; color: var(--accent-text); font-size: 16px; }
.ee-inv-pill { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
@media (hover: hover) { .ee-inv-row:hover { background: color-mix(in srgb, var(--surface) 45%, transparent); } }
.ee-inv-img { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface); margin: 10px; }
.ee-inv-img img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.ee-inv-imgacts { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.ee-inv-imgacts .btn { min-height: 40px; padding: 0 12px; font-size: 13px; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; }
.ee-inv-opts { margin-top: 12px; }
.ee-inv-opts .field { margin-bottom: 8px; }

/* v1.57: reply-by quick choices */
.rb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rb-chip { font: 600 14px var(--font); min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.rb-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }

/* v1.58: the loading screen: the logo pulses like a heartbeat, with soft rings rippling out */
.boot { align-content: center; }
.boot-mark { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.boot-mark svg { position: relative; z-index: 1; width: 96px; height: 96px; filter: drop-shadow(0 8px 18px rgba(243, 78, 61, .3)); animation: boot-beat 1.6s ease-in-out infinite; }
.boot-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--accent-soft); border: 2px solid rgba(243, 78, 61, .4); animation: boot-ripple 1.6s cubic-bezier(.2, .6, .35, 1) infinite; }
.boot-ring.r2 { animation-delay: .8s; }
@keyframes boot-beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.1); } 28% { transform: scale(.97); } 42% { transform: scale(1.06); } 60% { transform: scale(1); } }
@keyframes boot-ripple { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes boot-fade { 0%, 100% { opacity: .55; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .boot-ring { display: none; }
  .boot-mark svg { animation: boot-fade 2s ease-in-out infinite; }
}

/* v1.60: address suggestions under the Where field */
.addr-wrap { position: relative; }
.addr-list { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 30px rgba(46, 20, 34, .16); max-height: 300px; overflow-y: auto; }
.addr-list li[data-i] { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.addr-list li[data-i] > i { color: var(--accent-text); font-size: 17px; margin-top: 1px; flex: none; }
.addr-list li[data-i] span { min-width: 0; }
.addr-list li[data-i] strong { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.addr-list li[data-i] small { display: block; font-size: 13px; color: var(--muted); }
.addr-list li.on, .addr-list li[data-i]:hover { background: var(--surface-soft); }
.addr-credit { font-size: 11.5px; color: var(--muted); text-align: right; padding: 4px 10px 2px; }
.addr-busy, .addr-none { display: flex; align-items: center; gap: 8px; padding: 10px; font-size: 13.5px; color: var(--muted); }
.addr-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }

/* v1.63: birthdays coming up on Home; calendar sync */
.home-bdays { display: flex; gap: 10px; align-items: flex-start; margin: 0 16px 8px; padding: 8px 12px; border-radius: 12px; background: var(--warm-soft); color: var(--warm-ink); font-size: 14px; }
.home-bdays > i { color: var(--warm-ink); font-size: 17px; margin-top: 1px; }
.home-bdays .linkish { color: var(--ink); font-weight: 400; text-decoration: none; padding: 0; min-height: 0; font-size: 14px; }
.home-bdays strong { font-weight: 600; }
.cs-adds { display: grid; gap: 8px; margin: 12px 0 6px; }
.cs-add { justify-content: center; gap: 8px; }
.cs-tip { display: flex; gap: 6px; align-items: flex-start; }
.cs-mine { margin: 14px 0 6px; }
.cs-used { margin: 0 0 12px; }
.cs-private { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text); background: var(--surface-soft); border-radius: 12px; padding: 10px 12px; }
.cs-private > i { color: var(--accent-text); font-size: 18px; }
.cs-private .linkish { font-size: 13.5px; padding: 0; min-height: 0; }

/* ============================================================
   v1.64 — laptops and computers: a proper desktop layout for each page.
   Everything here is inside (min-width: 900px), so phones are not affected.
   ============================================================ */
@media (min-width: 900px) {
  .page { max-width: 1240px; padding: 22px 32px 48px; }
  .card { margin-bottom: 18px; }

  /* Home: a greeting, then two columns (what to do / what's coming) */
  .hd-hello { margin: 2px 0 14px; }
  .hd-hello .hello { padding: 4px 4px 8px; }
  .hd-hello .hello h2 { font-size: 24px; letter-spacing: -.01em; }
  .hd-hello .hello p { font-size: 14.5px; }
  .home-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .home-main, .home-side { min-width: 0; }
  .home-side #home-hh .hm-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }

  /* v1.78 Home: greeting + family on one line, four colourful "today" tiles, then three even columns */
  .hd-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 2px 0 18px; }
  .hd-top .hello { padding: 0; min-width: 0; }
  .hd-top .hello h2 { font-size: 26px; letter-spacing: -.01em; }
  .hd-top .hello p { font-size: 14.5px; }
  .hd-family { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 999px; padding: 8px 10px 8px 12px; box-shadow: var(--shadow-card); flex-shrink: 0; }
  .hd-avs { display: flex; text-decoration: none; }
  .hd-avs .avatar { width: 34px; height: 34px; font-size: 12.5px; border: 2px solid var(--surface); margin-left: -9px; }
  .hd-avs .avatar:first-child { margin-left: 0; }
  .hd-avmore { width: 34px; height: 34px; margin-left: -9px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); color: var(--ink); font: 600 12px var(--font); border: 2px solid var(--surface); }
  .hd-famtext { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .hd-famtext strong { color: var(--ink); font-size: 14.5px; white-space: nowrap; }
  .hd-famtext span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
  .hd-invite { min-height: 36px; border-radius: 999px; padding: 0 14px; font-size: 13.5px; }

  .hd-tiles { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
  .hd-tile { display: flex; align-items: center; gap: 14px; padding: 18px 18px; border-radius: 20px; text-decoration: none; text-align: left; border: 0; cursor: pointer;
    font: inherit; min-width: 0; box-shadow: var(--shadow-card); transition: transform .15s ease, box-shadow .15s ease; }
  .hd-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(46, 20, 34, .12); }
  .hd-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .hd-ticon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
  .hd-ttext { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
  .hd-tlabel { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
  .hd-tval { font-size: 18px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
  .hd-tsub { font-size: 13px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hd-tile.t-chores { background: var(--brand); color: #fff; }
  .hd-tile.t-chores .hd-ticon { background: rgba(255, 255, 255, .2); }
  .hd-tile.t-next { background: var(--accent); color: #fbf5e8; }
  .hd-tile.t-next .hd-ticon { background: rgba(255, 255, 255, .14); }
  .hd-tile.t-dinner { background: var(--warm-soft); color: var(--accent); }
  .hd-tile.t-dinner .hd-ticon { background: var(--surface); color: var(--brand); }
  .hd-tile.t-shop { background: var(--surface); color: var(--ink); }
  .hd-tile.t-shop .hd-ticon { background: var(--accent-soft); color: var(--brand); }
  .hd-tile.t-shop .hd-tlabel, .hd-tile.t-shop .hd-tsub { color: var(--muted); opacity: 1; }

  .hd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .hd-grid:has(> .hd-col:only-child) { grid-template-columns: minmax(0, 1fr); }
  .hd-col { min-width: 0; }
  .hd-col > .card:last-child { margin-bottom: 0; }
  .hd-more { display: flex; align-items: center; gap: 4px; justify-content: center; color: var(--accent-text); font-weight: 600; font-size: 13.5px; text-decoration: none; padding: 10px 16px 14px; }
  /* Meals card in a narrower column: the day label above the meals */
  .hd-col #home-meals .ml-hday { grid-template-columns: 74px minmax(0, 1fr) auto; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .hd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd-grid > .hd-col:nth-child(3) { grid-column: 1 / -1; }
}
@media (min-width: 900px) {

  /* Chores (Today): the list on the left, Star of the month beside it */
  #chores-body:has(> .star-card) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 20px; align-items: start; }
  #chores-body:has(> .star-card) > * { grid-column: 1; }
  #chores-body > .star-card { grid-column: 2; grid-row: 1 / span 8; position: sticky; top: 84px; margin: 0; }
  #chores-body > .star-card .star-hero { flex-wrap: wrap; }
  #chores-body > .star-card .month-row { flex-direction: column; overflow: visible; gap: 6px; padding-top: 12px; }
  #chores-body > .star-card .month-row .pt { width: 100%; border-radius: 12px; padding: 5px 12px 5px 5px; }
  #chores-body > .star-card .month-row .pt .nm { flex: 1; text-align: left; }
  #chores-body .hint { text-align: left; margin-left: 4px; }

  /* Meals: the whole week side by side, one column per day */
  .page[data-view="meals"] .ml-week { display: grid !important; grid-template-columns: repeat(7, minmax(0, 1fr)); max-width: none; padding: 0; overflow: hidden; }
  .page[data-view="meals"] .ml-row { border-top: 0; border-left: 1px solid var(--border); padding: 14px 10px 16px; min-height: 240px; display: flex; flex-direction: column; }
  .page[data-view="meals"] .ml-row:first-child { border-left: 0; }
  .page[data-view="meals"] .ml-row.today { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
  .page[data-view="meals"] .ml-row.today::before { left: 10px; right: 10px; top: 0; bottom: auto; width: auto; height: 4px; border-radius: 0 0 4px 4px; }
  .page[data-view="meals"] .ml-rowhead { flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-height: 0; padding-right: 34px; margin-bottom: 10px; position: relative; }
  .page[data-view="meals"] .ml-rowhead .ml-dow { font-size: 16px; }
  .page[data-view="meals"] .ml-rowhead .ml-todaybadge { order: 3; }
  .page[data-view="meals"] .ml-plus { position: absolute; right: 0; top: -4px; width: 30px; height: 30px; font-size: 14px; margin: 0; }
  .page[data-view="meals"] .ml-lines { gap: 6px; margin: 0; }
  .page[data-view="meals"] .ml-line { grid-template-columns: 16px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 6px; min-height: 0; padding: 7px 8px;
    background: var(--surface-soft); border: 1px solid var(--border); border-radius: 10px; align-items: start; }
  .page[data-view="meals"] .ml-line > i { grid-column: 1; grid-row: 1; font-size: 13px; }
  .page[data-view="meals"] .ml-line .ml-slotword { grid-column: 2; grid-row: 1; font-size: 11.5px; }
  .page[data-view="meals"] .ml-line .ml-name { grid-column: 1 / 3; grid-row: 2; white-space: normal; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.3; }
  .page[data-view="meals"] .ml-line .avatar { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .page[data-view="meals"] .ml-nothing { font-size: 12.5px; }

  /* Lists: the lists down the left, the open list beside them */
  .page[data-view="lists"] { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 22px; align-items: start; }
  .page[data-view="lists"] > * { grid-column: 1 / -1; min-width: 0; }
  .page[data-view="lists"] > .list-tabs { grid-column: 1; grid-row: 2 / span 4; position: sticky; top: 84px; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    gap: 4px; overflow: visible; background: var(--surface); border-radius: var(--radius-card); padding: 8px; box-shadow: var(--shadow-card); margin: 0; }
  .page[data-view="lists"] > .list-tabs .pill-tab { width: 100%; justify-content: flex-start; border: 0; border-radius: 10px; min-height: 40px; padding: 8px 12px; font-size: 14px; background: none; text-align: left; white-space: normal; line-height: 1.3; }
  .page[data-view="lists"] > .list-tabs .pill-tab.active { background: var(--accent-soft); color: var(--accent-soft-ink); }
  .page[data-view="lists"] > .list-tabs .pill-tab .cnt { margin-left: auto; }
  .page[data-view="lists"] > .list-tabs .pill-tab.add { width: 100%; justify-content: flex-start; color: var(--accent-text); border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; margin-top: 4px; }
  .page[data-view="lists"] > .list-tabs .pill-tab.add::after { content: 'New list'; font-weight: 600; margin-left: 8px; }
  .page[data-view="lists"] > .list-card, .page[data-view="lists"] > .li-private { grid-column: 2; }
  .page[data-view="lists"] > .list-card { grid-row: 2; }
  .page[data-view="lists"] > .li-private { grid-row: 3; }
  .page[data-view="lists"] > .hint { grid-column: 2; }

  /* forms in a pop-up: Save and Cancel stay in view at the bottom while scrolling */
  .sheet { max-height: min(88vh, 860px); }
  .sheet form > .sheet-actions { position: sticky; bottom: -18px; z-index: 3; width: calc(100% + 40px); max-width: none; box-sizing: border-box; background: var(--surface); margin: 14px -20px -18px; padding: 12px 20px 18px; border-top: 1px solid var(--border); }
}

/* v1.65/v1.69: the landing page's suburb drawing (icons/suburb-*.webp), seen on the right and fading out to the left behind the text.
   v1.69: sharper (the full-size drawing on computers, 1600px on phones, lightly sharpened) and the fade reaches further left. */
.landing::before { background: var(--bg) url("/icons/suburb-1600.jpg?v=2") right top / cover no-repeat; opacity: 1;   /* older browsers: the JPEG */
  background-image: image-set(url("/icons/suburb-1600.webp?v=2") type("image/webp"), url("/icons/suburb-1600.jpg?v=2") type("image/jpeg")); }
.landing::after { background: linear-gradient(270deg, rgba(251, 245, 232, .3) 0%, rgba(251, 245, 232, .62) 50%, rgba(251, 245, 232, .9) 100%); }
@media (min-width: 900px) {
  .landing::before { background-image: image-set(url("/icons/suburb-2576.webp?v=2") type("image/webp"), url("/icons/suburb-2576.jpg?v=2") type("image/jpeg")); background-position: right center; }
  .landing::after { background: linear-gradient(270deg, rgba(251, 245, 232, 0) 0%, rgba(251, 245, 232, .04) 30%, rgba(251, 245, 232, .42) 47%,
    rgba(251, 245, 232, .7) 62%, rgba(251, 245, 232, .84) 82%, rgba(251, 245, 232, .9) 100%); }
}
/* the drawing may run behind the words: a soft cream glow keeps them easy to read */
.ld-hero h1, .ld-hero p, .ld-feats h2, .ld-how h2 { text-shadow: 0 0 6px var(--bg), 0 0 12px var(--bg), 0 0 18px var(--bg); }


/* v1.66: Home asks once to allow notifications on this device */
.nt-ask { padding: 14px 16px; border: 1px solid var(--border); background: var(--surface); }
.nt-ask-in { display: flex; gap: 12px; align-items: flex-start; }
.nt-ask-in > i { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--brand); display: grid; place-items: center; font-size: 18px; }
.nt-ask-in strong { display: block; color: var(--ink); font-size: 15px; }
.nt-ask-in span { display: block; color: var(--text); font-size: 13.5px; line-height: 1.4; }
.nt-ask-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
@media (min-width: 900px) { .nt-ask:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 16px; } .nt-ask-btns { margin-top: 0; flex: none; } }

/* v1.70: computers: our own list of times (the browser's one scrolls too fast with a mouse wheel) */
.tp-input { cursor: pointer; font-variant-numeric: tabular-nums; }
.tp-list { position: fixed; z-index: 4500; list-style: none; margin: 0; padding: 4px; max-height: 240px; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 30px rgba(46, 20, 34, .18); font-variant-numeric: tabular-nums; }
.tp-list li { padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.tp-list li:hover { background: var(--surface-soft); }
.tp-list li.near { box-shadow: inset 0 0 0 1px var(--border); }
.tp-list li.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ============================================================
   v1.80 Chores, reimagined: this week's days, today's progress, one line per chore
   ============================================================ */
.ch-titlewrap { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ch-back { width: 36px; height: 36px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: var(--ink); cursor: pointer; margin-left: -8px; }
.ch-back:hover { background: var(--surface-soft); }
.ch-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0 0 12px; }
.ch-day { border: 0; background: none; border-radius: 14px; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; font: 500 11px var(--font); color: var(--muted); min-width: 0; }
.ch-day b { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.ch-day .cd-dow { white-space: nowrap; }
.ch-day.is-today .cd-dow { color: var(--brand); font-weight: 700; }
.ch-day .cd-dots { display: flex; gap: 2px; height: 5px; }
.ch-day .cd-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.ch-day:hover { background: var(--surface-soft); }
.ch-day.on { background: var(--accent); color: #f5e8cc; }
.ch-day.on b, .ch-day.on.is-today .cd-dow { color: #fff; }
.ch-day.on .cd-dots i { background: #f5e8cc; }
.ch-hero { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; }
.ch-ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-soft) 0); }
.ch-ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--ink); }
.ch-ring span i { color: var(--brand); font-size: 20px; }
.ch-htxt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-htxt strong { font-size: 16px; color: var(--ink); line-height: 1.3; }
.ch-htxt span { font-size: 12.5px; color: var(--muted); }
.ch-star { border: 0; background: var(--warm-soft); border-radius: 14px; padding: 6px 10px; display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; flex: none; max-width: 42%; font: inherit; text-align: left; }
.ch-star .cs-who { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ch-star .cs-who i { color: #e0942a; }
.ch-star .cs-sub { font-size: 11px; color: var(--warm-ink); white-space: nowrap; }
.ch-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 6px 6px; }
.ch-sec h2 { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ch-sec h2.late { color: var(--danger); }
.ch-sec span { font-size: 12px; color: var(--muted); }
.ch-card { padding: 4px 0; margin-bottom: 14px; }
.ch-card .chore-list { padding: 0 6px; }
.ch-empty { padding: 18px 12px; }
.ch-empty p { margin: 4px 0 0; }
.ch-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 8px; }
.ch-more .btn { justify-content: center; background: var(--surface); border-color: var(--border); color: var(--accent-text); font-weight: 600; }
.ch-tip { display: flex; align-items: center; gap: 6px; justify-content: center; }
.ch-tip .icon-btn { width: 32px; height: 32px; min-height: 0; font-size: 12px; color: var(--muted); }
/* v1.83 Rankings: the whole household this month, under today's progress */
.ch-rank { padding: 12px 14px 8px; margin-bottom: 14px; }
.cr-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 6px; }
.cr-head h2 { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.cr-head h2 i { color: #e0942a; font-size: 15px; }
.cr-head span { font-size: 12px; color: var(--muted); }
.cr-list { list-style: none; margin: 0; padding: 0; }
.cr-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 4px; border: 0; background: none; border-radius: 12px; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.cr-row:hover { background: var(--surface-soft); }
.cr-list li + li .cr-row { border-top: 1px solid var(--surface-soft); border-radius: 0; }
.cr-pos { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-soft); }
.cr-pos.p1 { background: #f2c14e; color: #5a3d00; }
.cr-pos.p2 { background: #d9dde3; color: #3a4049; }
.cr-pos.p3 { background: #e3b48a; color: #5a3416; }
.cr-row .avatar.xs { width: 28px; height: 28px; font-size: 11px; flex: none; }
.cr-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cr-nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-bar { height: 5px; border-radius: 3px; background: var(--surface-soft); overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); min-width: 0; }
.cr-val { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; min-width: 40px; }
.cr-val strong { font-size: 16px; }
.cr-val small { font-size: 10.5px; color: var(--muted); }
.cr-row.zero { opacity: .55; }
.ch-alldone i { color: var(--warm); }
.ch-alldone .linkish { display: inline; padding: 0; min-height: 0; }
/* the toast's Undo button */
.toast .toast-act { pointer-events: auto; margin-left: 6px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font: 700 13.5px var(--font); padding: 6px 12px; border-radius: 10px; cursor: pointer; }
.toast .toast-act:hover { background: rgba(255, 255, 255, .24); }
.toasts .toast:has(.toast-act) { pointer-events: auto; }
/* phones: room under the last thing on a page so the round + button never covers it */
@media (max-width: 899.98px) {
  .page:has(.fab) { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 84px); }
}
.star-card.in-sheet { padding: 0; box-shadow: none; background: none; margin: 4px 0 8px; }
/* one-line chore rows (everywhere chores are listed) */
.chore-item { align-items: center; min-height: 52px; }
.ci-body { padding: 8px 0; }
.ci-title { font-size: 15px; }
.ci-rep { font-size: 12px; color: var(--muted); margin-left: 2px; }
.ci-meta { gap: 2px 6px; margin-top: 0; font-size: 12px; }
.ci-meta .ci-done { font-size: 12px; margin: 0; font-weight: 600; }
.ci-sep { color: var(--border); }
.ci-end { display: flex; align-items: center; gap: 8px; flex: none; padding-right: 6px; }
.ci-end .avatar.xs { width: 26px; height: 26px; font-size: 10.5px; }
.ci-anyone { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-soft); color: var(--muted); display: grid; place-items: center; font-size: 13px; }
.chore-item.done .ci-end { opacity: .55; }

@media (min-width: 900px) {
  #chores-body.ch-today { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 22px; align-items: start; }
  #chores-body.ch-today > .ch-top { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 4px; }
  #chores-body.ch-today > .ch-top .ch-days { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 8px; margin: 0 0 14px; align-items: center; }
  #chores-body.ch-today > .ch-top .ch-hero { margin: 0 0 14px; }
  #chores-body.ch-today > .ch-main { grid-column: 1; grid-row: 2; }
  #chores-body.ch-today > .ch-board { grid-column: 2; grid-row: 2; position: sticky; top: 84px; margin: 0; }
  .ch-day { padding: 8px 0; font-size: 12px; }
  .ch-day b { font-size: 18px; }
  .ch-more { max-width: 420px; }
  .chore-item { min-height: 46px; }
  .ci-title { font-size: 14px; }
  .ci-end .avatar.xs, .ci-anyone { width: 24px; height: 24px; font-size: 10px; }
}

/* ============================================================
   v1.80 Meals, reimagined: tonight's dinner on top, the week as short rows of chips
   ============================================================ */
.ml-head .who-toggle { margin: 0; }
.ml-cnt { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.ml-tonight { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer;
  background: var(--accent); color: #fbf5e8; border-radius: 20px; padding: 14px 16px; margin: 0 0 14px; box-shadow: 0 8px 22px rgba(85, 38, 61, .25); }
.ml-tonight .mt-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-size: 20px; flex: none; color: #f5e8cc; }
.ml-tonight .mt-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ml-tonight small { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #f3b8a8; }
.ml-tonight strong { font-size: 16.5px; font-weight: 700; color: #fff; line-height: 1.3; overflow-wrap: anywhere; }
.ml-tonight .mt-txt > span { font-size: 12.5px; color: #eadbd0; }
.ml-tonight .mt-go { font-size: 16px; color: #eadbd0; flex: none; }
.ml-tonight.none { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); border: 1.5px dashed var(--input-border); }
.ml-tonight.none .mt-ic { background: var(--accent-soft); color: var(--brand); }
.ml-tonight.none small { color: var(--brand); }
.ml-tonight.none strong { color: var(--ink); }
.ml-tonight.none .mt-txt > span, .ml-tonight.none .mt-go { color: var(--muted); }
.ml-weeknav { position: relative; }
.ml-thisweek { min-height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 999px; }
.ml-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin: 2px 0 8px; }
.ml-actions .btn { justify-content: center; background: var(--surface); border-color: var(--border); color: var(--accent-text); font-weight: 600; }
.ml-actions:empty { display: none; }

@media (max-width: 899.98px) {
  .ml-weeknav { margin: 0 0 8px; }
  .ml-weeknav h2 { font-size: 15px; }
  .ml-thisweek { position: absolute; right: 44px; }
  .ml-week, .ml-week[id] { padding: 0; overflow: hidden; }
  .ml-row { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 12px 9px 14px; min-height: 52px; }
  .ml-row.today { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
  .ml-row.today::before { top: 0; bottom: 0; border-radius: 0; }
  .ml-row.past { opacity: .55; }
  .ml-rowhead { flex-direction: column; align-items: flex-start; gap: 0; min-height: 0; }
  .ml-rowhead .ml-dow { font-size: 14px; line-height: 1.2; }
  .ml-row.today .ml-dow { color: var(--brand); }
  .ml-rowhead .ml-date { font-size: 11px; line-height: 1.3; }
  .ml-todaybadge { display: none; }
  .ml-week .ml-lines { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; align-items: center; min-width: 0; }
  .ml-week .ml-line { display: inline-flex; width: auto; max-width: calc(100% - 38px); min-width: 0; min-height: 32px; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--border); }
  .ml-week .ml-line > i { color: #a8611a; font-size: 13px; }
  .ml-week .ml-line .ml-slotword { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ml-week .ml-line .ml-name { font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ml-week .ml-line > i, .ml-week .ml-line .avatar { flex: none; }
  .ml-week .ml-line .avatar.xs { width: 20px; height: 20px; font-size: 9px; }
  .ml-week .ml-plus { margin: 0; width: 32px; height: 32px; border-style: dashed; border-color: var(--input-border); border-radius: 10px; font-size: 14px; }
  .ml-week .ml-plus .ml-plustxt { display: none; }
  .ml-week .ml-plus.wide { width: auto; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 500 13px var(--font); }
  .ml-week .ml-plus.wide .ml-plustxt { display: inline; }
  .ml-nothing { font-size: 12.5px; }
}
@media (min-width: 900px) {
  .page[data-view="meals"] .ml-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-bottom: 14px; }
  .page[data-view="meals"] .ml-tonight { margin: 0; max-width: 520px; }
  .page[data-view="meals"] .ml-weeknav { margin: 0; }
  .page[data-view="meals"] .ml-lines { display: flex; flex-direction: column; gap: 6px; }
  .page[data-view="meals"] .ml-plus { position: absolute; right: 8px; top: 10px; }
  .page[data-view="meals"] .ml-plus .ml-plustxt { display: none; }
  .page[data-view="meals"] .ml-plus.wide { position: static; width: 100%; height: auto; min-height: 34px; border-radius: 10px; border-style: dashed; display: flex; align-items: center; justify-content: center; gap: 4px; font: 500 12.5px var(--font); color: var(--muted); margin: 0; }
  .page[data-view="meals"] .ml-plus.wide .ml-plustxt { display: inline; }
  .page[data-view="meals"] .ml-rowhead { padding-right: 0; }
  .page[data-view="meals"] .ml-row:not(.empty) .ml-rowhead { padding-right: 34px; }
  .ml-actions { max-width: 460px; }
}
.ch-subtabs { margin: -4px 0 12px 2px; }
.ml-week .ml-plus > i { font-size: 14px; line-height: 1; color: inherit; }
.ml-week .ml-plus.wide > i { font-size: 13px; }
.ml-ing .grow .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
/* v1.81 quiet hours on a phone: "From", the two times and "to" share the row */
.nt-row.nt-quietrow .grow { flex: none; }
.nt-row.nt-quietrow input[type=time], .nt-row.nt-quietrow input.tp-input { flex: 1 1 0; width: auto; min-width: 0; max-width: 140px; }
.ml-hmeals .ml-line .ml-name { min-width: 0; }

/* v1.83 "Put ClickHuis on your home screen" */
.inst-card { padding: 14px 16px; }
.inst-row { display: flex; align-items: center; gap: 12px; }
.inst-row .grow { display: flex; flex-direction: column; min-width: 0; }
.inst-row strong { font-size: 15px; color: var(--ink); line-height: 1.3; }
.inst-row .sub { font-size: 12.5px; color: var(--muted); }
.inst-row .icon-btn { width: 34px; height: 34px; min-height: 0; font-size: 13px; color: var(--muted); align-self: flex-start; }
.inst-logo img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.inst-go { width: 100%; justify-content: center; margin-top: 12px; }
.inst-steps { list-style: none; margin: 4px 0 14px; padding: 0; counter-reset: st; display: flex; flex-direction: column; gap: 12px; }
.inst-steps li { display: flex; align-items: flex-start; gap: 12px; }
.inst-steps .inst-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--surface-soft); display: grid; place-items: center; font-size: 18px; color: var(--accent-text); }
.inst-steps strong { display: block; font-size: 14.5px; color: var(--ink); font-weight: 600; }
.inst-steps strong b { font-weight: 700; }
.inst-steps .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* v1.85 our own icons where Bootstrap Icons has none (dog, cat, paw): drawn as a mask in the text colour, used like any bi- icon */
.bi.bi-ch-dog::before, .bi.bi-ch-cat::before, .bi.bi-ch-paw::before { content: ""; display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; background-color: currentColor;
  -webkit-mask: var(--ch-ic) center / contain no-repeat; mask: var(--ch-ic) center / contain no-repeat; }
.bi.bi-ch-dog { --ch-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 5.2C5.6 4 6.7 3.4 8 3.4s2.4.6 3 1.8'/%3E%3Cpath d='M5 5.2C3.9 3.9 1.9 4.1 1.6 5.8c-.3 1.6.4 3.6 1.6 4.1.9.4 1.6-.3 1.6-1.2'/%3E%3Cpath d='M11 5.2c1.1-1.3 3.1-1.1 3.4.6.3 1.6-.4 3.6-1.6 4.1-.9.4-1.6-.3-1.6-1.2'/%3E%3Cpath d='M4.8 7.2v3c0 2 1.4 3.4 3.2 3.4s3.2-1.4 3.2-3.4v-3'/%3E%3Cpath d='M8 11.1v.9M6.8 12.4c.5.3.9.2 1.2-.3.3.5.7.6 1.2.3'/%3E%3Ccircle cx='6.5' cy='8' r='.55' fill='%23000' stroke='none'/%3E%3Ccircle cx='9.5' cy='8' r='.55' fill='%23000' stroke='none'/%3E%3Cellipse cx='8' cy='10.3' rx='1.05' ry='.75' fill='%23000' stroke='none'/%3E%3C/svg%3E"); }
.bi.bi-ch-cat { --ch-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.4 6.3 3.6 2.4l2.9 2.1c1-.3 2-.3 3 0l2.9-2.1.2 3.9c.6.8.9 1.7.9 2.6 0 2.7-2.4 4.7-5.5 4.7S2.5 11.6 2.5 8.9c0-.9.3-1.8.9-2.6Z'/%3E%3Cpath d='M.9 9.4l2.8.4M1 11.3l2.8-.5M15.1 9.4l-2.8.4M15 11.3l-2.8-.5'/%3E%3Cpath d='M8 10.6v.6M6.9 11.8c.5.3.9.2 1.1-.3.2.5.6.6 1.1.3'/%3E%3Cellipse cx='6.2' cy='8.4' rx='.55' ry='.75' fill='%23000' stroke='none'/%3E%3Cellipse cx='9.8' cy='8.4' rx='.55' ry='.75' fill='%23000' stroke='none'/%3E%3Cpath d='M7.3 9.8h1.4L8 10.6Z' fill='%23000' stroke-width='.6'/%3E%3C/svg%3E"); }
.bi.bi-ch-paw { --ch-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3E%3Cpath d='M8 8.3c-2.3 0-4.5 2.4-4.5 4.4 0 1.2.9 1.9 2 1.9.9 0 1.6-.5 2.5-.5s1.6.5 2.5.5c1.1 0 2-.7 2-1.9 0-2-2.2-4.4-4.5-4.4Z'/%3E%3Cellipse cx='2.9' cy='7.3' rx='1.3' ry='1.75' transform='rotate(-22 2.9 7.3)'/%3E%3Cellipse cx='6' cy='4.1' rx='1.4' ry='1.9' transform='rotate(-8 6 4.1)'/%3E%3Cellipse cx='10' cy='4.1' rx='1.4' ry='1.9' transform='rotate(8 10 4.1)'/%3E%3Cellipse cx='13.1' cy='7.3' rx='1.3' ry='1.75' transform='rotate(22 13.1 7.3)'/%3E%3C/svg%3E"); }

/* v1.88 Notifications: the bell and its list */
.feed-btn { position: relative; font-size: 19px; color: var(--accent-text); text-decoration: none; }
.feed-btn.active { background: var(--accent-soft); }
.feed-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff;
  font: 700 10.5px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.fd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fd-card { padding: 4px 0; }
.fd-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 17px; background: var(--surface-soft); color: var(--accent-text); }
.fd-ic.k-ev, .fd-ic.k-ad { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.fd-ic.k-msg, .fd-ic.k-photo { background: #e6f0fb; color: #2f6db5; }
.fd-ic.k-done, .fd-ic.k-overdue { background: #e5f4ea; color: #2f8a4b; }
.fd-ic.k-item, .fd-ic.k-shop { background: var(--warm-soft); color: var(--warm-ink); }
.fd-ic.k-bc, .fd-ic.k-bce, .fd-ic.k-bcr { background: var(--accent-soft); color: var(--accent-text); }
.fd-ic.k-bday, .fd-ic.k-bdayahead, .fd-ic.k-rsvp { background: #fbe8ef; color: #b23a6a; }
.fd-when { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.fd-new { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex: none; align-self: center; }
.fd-row.unread strong { font-weight: 700; }
.tf-card.fd-row.unread, tr.fd-row.unread { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.fd-type { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fd-sub { display: block; color: var(--muted); font-size: 13px; }

/* v1.91 the screen may turn (manifest "orientation": "any").
   A phone on its side is short (about 360-430px): a slimmer top bar and menu (icon beside the word), so more of the page shows.
   Phones with a notch: keep everything clear of it (left or right, depending on which way the phone is turned). */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --topbar-h: 46px; --tabbar-h: 44px; }
  .tab { flex-direction: row; gap: 6px; font-size: 12.5px; }
  .tab i { width: 38px; height: 30px; font-size: 18px; }
  .hello { padding-top: 0; }
}
body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabbar { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.fab { margin-right: env(safe-area-inset-right, 0px); }

/* v1.92 Settings → Organisations (js/orgs.js); the console has its own css/org.css */
.og-st { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--surface-soft); color: var(--muted); white-space: nowrap; display: inline-block; }
.og-st.waiting { background: var(--warm-soft); color: var(--warm-ink); }
.og-st.approved { background: #e6f2ea; color: var(--success); }
.og-st.declined { background: var(--danger-soft); color: var(--danger); }
.og-sure { color: var(--danger) !important; border-color: var(--danger) !important; }
.tf-icon.og-dot { color: #fff; }
#og-links { margin: 6px -16px 12px; }
#og-links .toolbar { padding-top: 4px; }
.og-soon { margin-top: 12px; display: flex; gap: 8px; }
.og-code-in { font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.og-found { display: flex; gap: 12px; align-items: center; background: #e6f2ea; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.og-found > i { color: var(--success); font-size: 22px; }
.og-found .sub { display: block; font-size: 13px; color: var(--muted); }

/* v1.93 Home: "a new version is ready" banner; (Beta) labels */
.upd-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid color-mix(in srgb, var(--brand) 45%, transparent);
  background: color-mix(in srgb, var(--brand) 7%, var(--surface)); flex-wrap: wrap; }
.upd-card[hidden] { display: none; }
.upd-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 19px; flex: none; }
.upd-card .grow { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upd-card strong { color: var(--ink); font-size: 15px; }
.upd-card .sub { font-size: 13px; color: var(--muted); }
.upd-acts { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.upd-acts .icon-btn { color: var(--muted); }
.beta-tag { font-size: .8em; font-weight: 600; color: var(--warm-ink); }

/* v1.94 Settings → Other calendars (js/calimport.js); their events in the calendar are read-only */
#ci-list { margin: 6px -16px 12px; }
.tf-icon.ci-dot { color: #fff; }
.ci-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
td .ci-acts { margin-top: 0; flex-wrap: nowrap; }
.ci-err { color: var(--danger); }
.ci-name { white-space: nowrap; }
.ci-how { background: var(--surface-soft); border-radius: 12px; padding: 10px 12px; margin: -4px 0 14px; font-size: 13.5px; }
.ci-how summary { cursor: pointer; font-weight: 600; color: var(--accent-text); }
.ci-how p { margin: 8px 0 0; line-height: 1.45; }
.ci-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.ci-sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px var(--border); }
.ci-sw.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--ink); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.imp-note { display: flex; gap: 8px; margin: 10px 0 0; }
.imp-filters .mchip i { font-size: 13px; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: -3px; }

/* v1.95 Add from a letter (js/letter.js) */
.lt-spark, .lt-btn i { color: var(--brand); }
.lt-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.lt-pick .btn { justify-content: center; cursor: pointer; }
.lt-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lt-thumbs:empty { display: none; }
.lt-thumb { position: relative; width: 76px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-soft); }
.lt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lt-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; font-size: 11px; gap: 4px; text-align: center; padding: 4px; color: var(--muted); }
.lt-pdf i { font-size: 26px; color: var(--danger); }
.lt-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(46,20,34,.75); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 12px; }
.lt-privacy { display: flex; gap: 8px; margin-top: 12px; }
.lt-summary { background: var(--surface-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: flex; gap: 8px; }
.lt-tools { padding: 0; margin: 8px 0 10px; }
.lt-tools select { width: auto; flex: none; }
#lt-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.lt-ev { display: flex; gap: 10px; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.lt-ev.off { opacity: .55; }
.lt-ev.low { border-color: var(--warm); }
.lt-tick input { width: 22px; height: 22px; margin-top: 8px; accent-color: var(--accent); min-height: 0; }
.lt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lt-title { font-weight: 600; }
.lt-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lt-ev .lt-when input[type=date] { width: 158px; min-width: 0; flex: none; }
.lt-times { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.lt-ev .lt-times input[type=time] { width: 112px; min-width: 0; flex: none; }
.lt-warn { font-size: 12.5px; color: var(--warm-ink); margin: 0; }
.lt-extra { margin: 0; }
.lt-whos { display: flex; flex-wrap: wrap; gap: 6px; }
.lt-who { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 10px; font: 600 12.5px var(--font); color: var(--muted); cursor: pointer; min-height: 32px; }
.lt-who.on { background: var(--c); border-color: var(--c); color: #fff; }
.lt-cat { width: auto; max-width: 100%; }
.lt-none { text-align: center; padding: 12px; }

/* v1.95 phones: the calendar's title and its buttons stay on one line */
@media (max-width: 899.98px) {
  .page-head.cal-head { flex-wrap: nowrap; gap: 8px; }
  .cal-head h1 { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .cal-head .btn-row.tight { flex: none; gap: 6px; }
  .cal-head .btn-row.tight .btn { padding: 6px 10px; }
  .cal-head .btn-row.tight .btn:not([data-cal]) { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 379.98px) {
  .cal-head h1 { font-size: 17px; }
  .cal-head .btn-row.tight { gap: 4px; }
  .cal-head .btn-row.tight .btn:not([data-cal]) { width: 36px; }
  .cal-head .btn-row.tight [data-cal] { padding: 6px 8px; }
}

/* v1.98 Add with AI: type it (Quick add), or from a letter */
.qa-form textarea { resize: vertical; min-height: 64px; }
.qa-form .field { margin-bottom: 10px; }
.lt-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lt-or::before, .lt-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.lt-rep { margin: 0; font-size: 13px; color: var(--accent-text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lt-rep .linkish { padding: 0 4px; min-height: 0; font-size: 12.5px; }
.lt-tools[hidden] { display: none; }

/* v1.99 Add with AI: say it (microphone) */
.qa-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qa-lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.qa-lang button { border: 0; background: var(--surface); font: 700 11.5px var(--font); color: var(--muted); padding: 4px 10px; min-height: 28px; cursor: pointer; }
.qa-lang button.on { background: var(--accent); color: #fff; }
.qa-box { position: relative; }
.qa-box textarea { padding-right: 56px; }
.qa-mic { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent-text); font-size: 18px; display: grid; place-items: center; cursor: pointer; }
.qa-mic.on { background: var(--brand); color: #fff; animation: qa-pulse 1.2s ease-in-out infinite; }
@keyframes qa-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(243, 78, 61, .45); } 50% { box-shadow: 0 0 0 8px rgba(243, 78, 61, 0); } }
.qa-note { display: flex; align-items: center; gap: 6px; color: var(--brand) !important; font-weight: 600; }
.qa-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* v2.00 meals AI (js/mealai.js): Plan my week, From a recipe */
.ml-actions .ml-ai { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.pw-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pw-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--muted); font: 500 12px var(--font); cursor: pointer; min-height: 56px; min-width: 0; }
.pw-day b { font-size: 12.5px; color: var(--ink); }
.pw-day span { font-size: 15px; font-weight: 600; }
.pw-day small { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pw-day.on b { color: #fff; }
.pw-day.done { opacity: .6; cursor: not-allowed; background: var(--surface-soft); }
.pw-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.pw-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pw-new { margin: 0; }
.pw-cook { display: flex; align-items: center; gap: 8px; }
.pw-cook select { width: auto; max-width: 100%; flex: 1 1 auto; }
.pw-ok { color: var(--accent); }
.ai-aisle { font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 2px; }
.ai-aisle:first-child { margin-top: 0; }
.ai-ings .lt-tools { margin: 4px 0 8px; }
.rc-serves { margin: -4px 0 8px; }
.rc-save { margin: 12px 0 4px; }
.rc-save input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
#rc-text { resize: vertical; min-height: 56px; }
.ml-actions { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ml-actions .btn { white-space: nowrap; min-width: 0; }
@media (max-width: 899.98px) {
  /* the week's dates and "This week" side by side, not on top of each other */
  .ml-weeknav:has(.ml-thisweek) h2 { text-align: left; padding-left: 6px; }
}

/* v2.01 spacing: the calendar-sync switch row, and "Save it as a meal" */
.cs-mine { background: var(--surface-soft); border-radius: 14px; }
.cs-mine small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.cs-mine .switch { flex: none; }
.rc-save { align-items: flex-start; padding: 6px 0; }
.rc-save input { margin-top: 2px; }
.rc-save .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
#rc-body > .sheet-actions { margin-top: 14px; }
/* v2.01 lists: add many at once; the add bar's AI button */
.la-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.la-btns .btn { justify-content: center; }
.la-redo { margin: -4px 0 8px; }
.la-redo .linkish { padding: 0 4px; min-height: 0; }
.add-bar .li-many { font-size: 18px; background: var(--surface); border-color: var(--border); }
.add-bar:has(.li-many) { grid-template-columns: minmax(0, 1fr) 52px 52px; }
#ex-text { width: 100%; resize: vertical; font-size: 14px; margin: 8px 0 4px; }
@media (max-width: 899.98px) {
  .add-bar:has(.li-many) { grid-template-columns: minmax(0, 1fr) 40px 40px; }
}
@media (max-width: 379.98px) { .la-btns { grid-template-columns: 1fr; } }
.la-btns + p { margin-top: 10px; }

/* v2.03 the AI buttons stand out: a warm gradient border, a twinkling sparkle, a shine now and then, and "New" until tried */
.btn.ai-btn {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1.5px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(120deg, #f34e3d, #f2a93b 45%, #b0417a) border-box;
  color: var(--accent-text); font-weight: 600;
  box-shadow: 0 2px 10px -4px rgba(243, 78, 61, .45);
}
.btn.ai-btn i.bi-stars, .ai-item i.bi-stars { display: inline-block; color: #f34e3d; animation: ai-twinkle 2.6s ease-in-out infinite; }
.btn.ai-btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(242, 169, 59, .28) 45%, rgba(255, 255, 255, .55) 50%, rgba(242, 169, 59, .28) 55%, transparent 70%);
  transform: translateX(-120%); animation: ai-shine 6s ease-in-out infinite 1s;
}
.btn.ai-btn[data-new]::before {
  content: ''; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: #f34e3d; box-shadow: 0 0 0 2px var(--surface); animation: ai-pulse 1.8s ease-out infinite;
}
@keyframes ai-twinkle { 0%, 70%, 100% { transform: scale(1) rotate(0); } 80% { transform: scale(1.25) rotate(-12deg); } 90% { transform: scale(.95) rotate(6deg); } }
@keyframes ai-shine { 0%, 72% { transform: translateX(-120%); } 88%, 100% { transform: translateX(120%); } }
@keyframes ai-pulse { 0% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 2px rgba(243, 78, 61, .5); } 70%, 100% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 8px rgba(243, 78, 61, 0); } }
@media (hover: hover) { .btn.ai-btn:hover { box-shadow: 0 4px 14px -4px rgba(243, 78, 61, .6); } }
@media (prefers-reduced-motion: reduce) {
  .btn.ai-btn i.bi-stars, .ai-item i.bi-stars, .btn.ai-btn::after, .btn.ai-btn[data-new]::before { animation: none; }
}
@media (min-width: 900px) { .cal-head .btn.ai-btn[data-new] { padding-right: 20px; } .btn.ai-btn[data-new]::before { top: 4px; right: 4px; width: 8px; height: 8px; } }
/* v2.04 the landing page: the AI helpers first, in the AI look */
.ld-feats li.ld-ai { border: 1.5px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(120deg, #f34e3d, #f2a93b 45%, #b0417a) border-box; box-shadow: 0 4px 16px -8px rgba(243, 78, 61, .5); }
.ld-feats li.ld-ai > i { background: linear-gradient(135deg, #fde3dc, #fdecd0); color: #f34e3d; animation: ai-twinkle 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ld-feats li.ld-ai > i { animation: none; } }
.ld-feats strong .beta-tag { display: inline; margin: 0 0 0 2px; font-size: 12.5px; color: #c2410c; }

/* v2.05 Settings, nested: groups that open their own page */
.st-groups .menu-item.active { background: var(--accent-soft); }
.st-groups .menu-item.active .chev { color: var(--accent-text); }
.st-me .avatar { flex: none; }
.st-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.st-head h1 { display: flex; align-items: baseline; gap: 8px; }
.st-head h1 .beta-tag { font-size: 14px; }
.st-back { display: inline-flex !important; align-items: center; gap: 4px; font-weight: 600; color: var(--accent-text); text-decoration: none; min-height: 36px; }
.st-note { padding: 0 6px; }
.st-sec > .card + .card { margin-top: 0; }
@media (min-width: 900px) {
  .st-wrap { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
  .st-nav { position: sticky; top: 80px; }
  .st-h { font-size: 20px; margin: 4px 0 12px; display: flex; align-items: baseline; gap: 8px; }
  .st-h .beta-tag { font-size: 14px; }
}
.st-groups a.menu-item, .st-groups a.menu-item:hover, .st-groups a.menu-item .grow, .st-groups a.menu-item .sub { text-decoration: none; color: inherit; }
.st-groups a.menu-item .sub { color: var(--muted); }
.st-groups a.menu-item { color: var(--ink); }
#org-console-row a.menu-item, #org-console-row a.menu-item .sub { text-decoration: none; color: inherit; }
#org-console-row a.menu-item .sub { color: var(--muted); }

/* v2.06 the AI buttons, filled: the brightest thing on the page (white on coral-to-plum keeps text readable) */
.btn.ai-btn {
  border: 0; color: #fff;
  background: linear-gradient(120deg, #d63a27 0%, #c8402f 35%, #b0417a 100%);
  box-shadow: 0 4px 14px -4px rgba(214, 58, 39, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn.ai-btn i.bi-stars { color: #ffe08a; }
.btn.ai-btn::after { background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .18) 45%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, .18) 55%, transparent 70%); z-index: 0; }
.btn.ai-btn > * { position: relative; z-index: 1; }
.btn.ai-btn[data-new]::before { background: #ffe08a; box-shadow: 0 0 0 2px #c8402f; z-index: 2; }
@keyframes ai-pulse { 0% { box-shadow: 0 0 0 2px #c8402f, 0 0 0 2px rgba(255, 224, 138, .7); } 70%, 100% { box-shadow: 0 0 0 2px #c8402f, 0 0 0 9px rgba(255, 224, 138, 0); } }
@media (hover: hover) { .btn.ai-btn:hover { filter: brightness(1.06); box-shadow: 0 6px 18px -4px rgba(214, 58, 39, .7); } }
.add-bar .btn.ai-btn.li-many { background: linear-gradient(120deg, #d63a27, #b0417a); }

/* v2.07 ClickHuis AI on Home */
.card.ai-home { position: relative; border: 1.5px solid transparent; padding: 14px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #d63a27, #f2a93b 45%, #b0417a) border-box;
  box-shadow: 0 6px 22px -10px rgba(214, 58, 39, .55); }
.ai-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ai-hd strong { display: block; font-size: 16px; color: var(--ink); }
.ai-hd .grow > span { display: block; font-size: 13px; color: var(--muted); }
.ai-badge { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: #ffe08a;
  background: linear-gradient(135deg, #d63a27, #b0417a); box-shadow: 0 4px 12px -4px rgba(214, 58, 39, .6); }
.ai-badge i { animation: ai-twinkle 2.6s ease-in-out infinite; display: inline-block; }
.ai-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ai-input { position: relative; display: flex; align-items: center; border: 1.5px solid var(--input-border); border-radius: 14px; background: var(--surface); padding-right: 4px; min-width: 0; }
.ai-input:focus-within { border-color: #c8402f; box-shadow: 0 0 0 3px rgba(214, 58, 39, .15); }
.ai-input input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; padding: 10px 12px; min-height: 46px; outline: none; }
.ai-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--accent-text); display: grid; place-items: center; font-size: 18px; cursor: pointer; }
.ai-ic.on { background: var(--brand); color: #fff; animation: qa-pulse 1.2s ease-in-out infinite; }
.ai-send { min-width: 52px; padding: 0 14px; font-size: 18px; min-height: 49px; }
.ai-files { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-files:not(:empty) { margin-top: 8px; }
.ai-chip { position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); display: grid; place-items: center; background: var(--surface-soft); }
.ai-chip img { width: 100%; height: 100%; object-fit: cover; }
.ai-chip button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(46, 20, 34, .75); color: #fff; display: grid; place-items: center; font-size: 14px; padding: 0; cursor: pointer; }
.ai-home .qa-note { margin-top: 6px; }
.ai-you { display: flex; gap: 8px; color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.ai-thinking { display: flex; align-items: center; gap: 10px; padding: 18px 4px; color: var(--accent-text); font-weight: 600; }
.ai-reply i { color: #d63a27; }
.ai-warn { display: flex; gap: 8px; font-size: 13px; color: var(--warm-ink); background: color-mix(in srgb, var(--warm) 10%, var(--surface)); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.ai-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.ai-act { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; background: var(--surface); cursor: pointer; }
.ai-act > input { width: 22px; height: 22px; min-height: 0; margin-top: 9px; accent-color: var(--accent); flex: none; }
.ai-act:not(.on):not(.done) { opacity: .75; }
.ai-act.risky { border-color: color-mix(in srgb, var(--warm) 55%, var(--border)); }
.ai-act.risky.on { background: color-mix(in srgb, var(--warm) 7%, var(--surface)); }
.ai-act.done { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.ai-act-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 17px; }
.ai-act.risky .ai-act-ic { background: color-mix(in srgb, var(--warm) 15%, var(--surface)); color: var(--warm-ink); }
.ai-act .grow { min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.ai-act small { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.ai-act small b { color: var(--warm-ink); }
.ai-act strong { font-size: 15px; color: var(--ink); }
.ai-act .grow > span { font-size: 13px; color: var(--muted); }
.ai-act em { font-style: normal; font-size: 12.5px; color: var(--warm-ink); }
.ai-act .ai-fail { color: var(--danger); }
.ai-ok { color: var(--accent); font-size: 20px; flex: none; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .ai-badge i { animation: none; } }

/* v2.08 the shared AI input (Home, Add with AI, From a recipe, Add many) */
.ai-input { align-items: flex-end; }
.ai-input textarea, .ai-input input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; padding: 11px 12px; min-height: 46px; outline: none; resize: none; font: inherit; line-height: 1.4; }
.ai-input textarea { max-height: 168px; overflow-y: auto; }
.ai-input .ai-ic { margin-bottom: 4px; }
.ai-composer + .ai-files:not(:empty) { margin-top: 8px; }
.ai-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ai-intro p { margin: 0; }
.ai-intro .qa-lang, .ai-hd .qa-lang { flex: none; }
.ai-tip { margin: 8px 2px 0; }
.ai-wait { display: flex; align-items: center; gap: 8px; color: var(--accent-text); font-weight: 600; margin-top: 8px; }
.ai-wait[hidden] { display: none; }
#ai-body .ai-thinking { margin: 0; }
.ai-input textarea:placeholder-shown { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 46px; }
.ai-tip { margin-top: 10px !important; }
/* v2.10 the "n of 50 this month" line under the buttons: room above it, centred, quiet */
.sheet p.ai-used, p.ai-used { margin: 14px 0 2px; text-align: center; font-size: 12.5px; }
.sheet-actions + .auth-error { margin-top: 10px; }
