:root {
  color-scheme: light dark;
  /* v0.27.0 (R-140): the page and text colours as tokens. Classic (no Look) keeps the system colours exactly as
     before; a Look (static/looks.css, only for a person who picked one) sets its own. */
  --surface: Canvas;
  --ink: CanvasText;
  --accent: #6a2c9e;   /* Plum Crazy (v0.10.9); 8.5:1 with white text */
  --link: var(--accent);
  --border: color-mix(in srgb, var(--ink) 20%, var(--surface));
  --muted: color-mix(in srgb, var(--ink) 65%, var(--surface));
  /* The sticky top bar's fixed height, used by the bar, the week strip's sticky offset
     and scroll-padding, so they always agree. */
  --topbar-height: 3.5rem;
  --weekstrip-height: 8.75rem;
  /* Safe areas (v0.10.9, viewport-fit=cover): the notch / status bar and rounded corners
     of an installed app. 0 in a normal browser tab. The two heights above stay the unit
     sizes; the top inset is added on top of them wherever they are used. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* Event color palette (v0.10.4). THE same values as app/colors/palette.py (a test keeps
     them equal); each has >= 3:1 contrast on #ffffff and on #121212. */
  --c-red: #d93636; --c-orange: #d0661a; --c-amber: #b58100; --c-olive: #7f8a12;
  --c-green: #2f9446; --c-teal: #0f8f84; --c-cyan: #1787b8; --c-blue: #3d74e0;
  --c-indigo: #6a62d9; --c-pink: #d1427f; --c-brown: #9a6a48;
  /* Reserved display colors: never pickable. */
  --c-gold: #c99a0e; --c-silver: #8f949b; --c-white: #ffffff;
  --dot-outline: color-mix(in srgb, var(--ink) 70%, var(--surface));
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  background: var(--surface);
  color: var(--ink);
}
a { color: var(--link); }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: var(--safe-top) max(16px, var(--safe-right)) 0 max(16px, var(--safe-left));
  border-bottom: 1px solid var(--border);
  /* Pinned, fixed height, opaque, above page content (and the sticky week strip),
     below the open phone Menu which lives inside it.
     Safe area: the bar is --topbar-height tall BELOW the notch padding (--safe-top);
     its opaque background fills the notch area too. The week strip uses the same sum. */
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(var(--topbar-height) + var(--safe-top));
  background: var(--surface);
}
html { scroll-padding-top: calc(var(--topbar-height) + var(--safe-top) + 0.5rem); }
.brand { font-weight: 600; text-decoration: none; color: inherit; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v0.22.4 (R-042): the house logo (the app icon's H under its roof) before the name, in the person's color. */
.brand { display: inline-flex; align-items: center; gap: 0.4rem; }
.brand-logo { flex: none; width: 1.75rem; height: 1.75rem; color: var(--link); }
.brand-long { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-row a.active, .bar-calendar.active { font-weight: 700; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.bar-calendar, .bell.bar-updates { display: none; }   /* v0.22.3: .bell.bar-updates beats the later .bell rule */
.bar-updates.active { font-weight: 700; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.brand-short { display: none; }
/* v0.11.10: "HFE" whenever the phone bar is in use: see the 960px Menu block below. */
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4em; height: 1.4em;
  padding: 0 0.3em; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 700;
  text-decoration: none; }
.nav-row .who { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header > nav a, .site-header > nav .who { white-space: nowrap; }
.site-header > nav { display: flex; align-items: center; gap: 0.75rem; }
.who { color: var(--muted); }
main { max-width: 40rem; margin: 0 auto;
  padding: 0 max(16px, var(--safe-right)) calc(3rem + var(--safe-bottom)) max(16px, var(--safe-left)); }
.hero { text-align: center; margin-top: 18vh; }
h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.card { margin-top: 3rem; }
/* v0.27.30 (R-254): the install steps name the site's address in one long word; on a narrow phone (360 px, with the
   Nature sky's side margins and a Look's card padding) it ran 3 px past the screen: it may break when it can't fit */
.card.install { overflow-wrap: break-word; }
form label { display: block; margin-top: 1rem; font-weight: 500; }
form input[type="text"], form input[type="password"], form input[type="email"] {
  width: 100%;
  padding: 0.6rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
button {
  margin-top: 1.25rem;
  padding: 0.6rem 1.2rem;
  font: inherit;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
form.inline { display: inline; margin: 0; }
button.link {
  margin: 0;
  padding: 0;
  background: none;
  color: var(--link);
  text-decoration: underline;
}
.flash {
  margin-top: 1.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-left: 4px solid #b4532a;
  border-radius: 6px;
}

/* Forms and lists added with invites/admin */
textarea, form input[type="tel"] {
  width: 100%;
  padding: 0.6rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
label.check { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; }
.error { color: #b4532a; margin: 0.25rem 0 0; }
.help { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0; }
.readonly { margin: 0.25rem 0; padding: 0.6rem; border: 1px dashed var(--border); border-radius: 6px; }
/* Honeypot: off-screen for people, still a field for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
a.button, button.small { display: inline-block; }
a.button {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  margin-right: 0.5rem;
}
button.small { margin: 0; padding: 0.3rem 0.7rem; font-size: 0.9rem; }
.danger, a.button.danger { background: #a33a2a; }
.subnav { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.item { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.item p { margin: 0.25rem 0; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.95rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
td.actions { white-space: nowrap; }
.switch { margin-top: 1rem; }
.switch label { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500; }

button:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* Dark mode (v0.10.9): lighter purples. #6a2c9e is only 2.2:1 on #121212.
   --link #b48ce0: >= 6.1:1 on common dark Canvas colors (#121212, #1c1b22, #1e1e1e, #000),
     also used for focus rings and outlines.
   --accent #8d50c8 (buttons, toggle/RSVP "on", today circle, Updates badge): >= 3.2:1
     against those backgrounds, and white text on it is 5.1:1. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --link: #b48ce0; --accent: #8d50c8; }
}
/* v0.17.1: Light / Dark chosen on My profile (theme-init.js sets data-theme before drawing).
   color-scheme flips the system colours (Canvas, CanvasText, form controls) everywhere. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; --link: #b48ce0; --accent: #8d50c8; }
/* v0.22.4 (R-040): the interface color follows the person's own color (My color): <html data-accent="key">.
   Three tuned shades per color (app/colors/accents.py, written by tools/make_accents.py; a test keeps them
   equal): light >= 7:1 on white; dark links >= 6:1 on #121212; dark buttons 4.5:1 with white text and >= 3:1 on
   #121212. Signed out: Plum Crazy (above). Status colors (problems, the red count, warnings, dots) never follow. */
/* accents:begin */
:root[data-accent="red"] { --accent: #9e0615; --link: #9e0615; }
@media (prefers-color-scheme: dark) { :root[data-accent="red"]:not([data-theme="light"]) { --link: #fd6e65; --accent: #ce2a2d; } }
:root[data-accent="red"][data-theme="dark"] { --link: #fd6e65; --accent: #ce2a2d; }
:root[data-accent="orange"] { --accent: #7f3a04; --link: #7f3a04; }
@media (prefers-color-scheme: dark) { :root[data-accent="orange"]:not([data-theme="light"]) { --link: #eb7e3a; --accent: #af5104; } }
:root[data-accent="orange"][data-theme="dark"] { --link: #eb7e3a; --accent: #af5104; }
:root[data-accent="amber"] { --accent: #674803; --link: #674803; }
@media (prefers-color-scheme: dark) { :root[data-accent="amber"]:not([data-theme="light"]) { --link: #c79226; --accent: #8e6502; } }
:root[data-accent="amber"][data-theme="dark"] { --link: #c79226; --accent: #8e6502; }
:root[data-accent="olive"] { --accent: #4b5201; --link: #4b5201; }
@media (prefers-color-scheme: dark) { :root[data-accent="olive"]:not([data-theme="light"]) { --link: #97a336; --accent: #697207; } }
:root[data-accent="olive"][data-theme="dark"] { --link: #97a336; --accent: #697207; }
:root[data-accent="green"] { --accent: #015a1f; --link: #015a1f; }
@media (prefers-color-scheme: dark) { :root[data-accent="green"]:not([data-theme="light"]) { --link: #4daf5f; --accent: #0a7d30; } }
:root[data-accent="green"][data-theme="dark"] { --link: #4daf5f; --accent: #0a7d30; }
:root[data-accent="teal"] { --accent: #025850; --link: #025850; }
@media (prefers-color-scheme: dark) { :root[data-accent="teal"]:not([data-theme="light"]) { --link: #3daca0; --accent: #0c7970; } }
:root[data-accent="teal"][data-theme="dark"] { --link: #3daca0; --accent: #0c7970; }
:root[data-accent="cyan"] { --accent: #025374; --link: #025374; }
@media (prefers-color-scheme: dark) { :root[data-accent="cyan"]:not([data-theme="light"]) { --link: #41a5d8; --accent: #0c749f; } }
:root[data-accent="cyan"][data-theme="dark"] { --link: #41a5d8; --accent: #0c749f; }
:root[data-accent="blue"] { --accent: #1246ae; --link: #1246ae; }
@media (prefers-color-scheme: dark) { :root[data-accent="blue"]:not([data-theme="light"]) { --link: #659aff; --accent: #3167d2; } }
:root[data-accent="blue"][data-theme="dark"] { --link: #659aff; --accent: #3167d2; }
:root[data-accent="indigo"] { --accent: #493aae; --link: #493aae; }
@media (prefers-color-scheme: dark) { :root[data-accent="indigo"]:not([data-theme="light"]) { --link: #9190fc; --accent: #655cd2; } }
:root[data-accent="indigo"][data-theme="dark"] { --link: #9190fc; --accent: #655cd2; }
:root[data-accent="pink"] { --accent: #9a0153; --link: #9a0153; }
@media (prefers-color-scheme: dark) { :root[data-accent="pink"]:not([data-theme="light"]) { --link: #fa68a2; --accent: #c23372; } }
:root[data-accent="pink"][data-theme="dark"] { --link: #fa68a2; --accent: #c23372; }
:root[data-accent="brown"] { --accent: #6f4321; --link: #6f4321; }
@media (prefers-color-scheme: dark) { :root[data-accent="brown"]:not([data-theme="light"]) { --link: #c3916e; --accent: #916140; } }
:root[data-accent="brown"][data-theme="dark"] { --link: #c3916e; --accent: #916140; }
/* accents:end */

/* Menu: hidden on wide screens, replaces the nav row at <= 960px (with Calendar and Updates
   the signed-in row needs about 850px; below that it would wrap the fixed-height bar).
   The calendar's own phone layout (week strip) still switches at 640px. */
.nav-menu { display: none; }
@media (max-width: 960px) {
  .site-header { gap: 0.5rem; }
  .site-header > nav { display: none; }
  /* v0.11.10: "HFE" with the phone bar (wide phones, Plus / Pro Max at 428-440px, no longer show
     a cut-off full name), and it never shrinks (no "H…" next to a two-digit Updates count). */
  .brand { flex: none; overflow: visible; }
  .brand-long { display: none; }
  .brand-short { display: inline; }
  .nav-menu { display: block; flex: none; }
  .bar-calendar, .bell.bar-updates { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 44px;
    padding: 0 0.4rem; flex: none; white-space: nowrap; }
  .bar-calendar { margin-left: auto; }
  .nav-menu > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--link);
    cursor: pointer;
    list-style: none;
    user-select: none;
  }
  .nav-menu > summary::-webkit-details-marker { display: none; }
  .nav-menu > summary::after { content: "\25BE"; margin-left: 0.4rem; }
  .nav-menu[open] > summary::after { content: "\25B4"; }
  .nav-menu > summary:focus-visible,
  .menu-panel a:focus-visible,
  .menu-panel button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
  .menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 0 max(16px, var(--safe-right)) 0 max(16px, var(--safe-left));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .menu-panel > a,
  .menu-panel > .who,
  .menu-panel > form button.link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    white-space: nowrap;
    border-top: 1px solid var(--border);
    text-decoration: none;
  }
  .menu-panel > form.inline { display: block; }
  .menu-panel > form button.link {
    margin: 0;
    padding: 0;
    text-align: left;
    border-radius: 0;
    text-decoration: none;
  }
}

/* People and family (v0.8). Additive only. */
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--border); }
.avatar-large { width: 128px; height: 128px; }
.people { list-style: none; padding: 0; margin: 1rem 0; }
.person { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.person-stack { flex-direction: column; align-items: stretch; }
.person-row { display: flex; align-items: center; gap: 0.75rem; }
.person-name { flex: 1 1 auto; overflow-wrap: anywhere; }
.person-label { color: var(--muted); }
/* v0.27.11 (R-220): "Receives family invites" to the right of the label; it wraps below on narrow screens. */
.family-invites-row { flex-wrap: wrap; }
.family-invites { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.family-invites label.check { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }   /* 44 px */
.person-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.search label { flex-basis: 100%; }
.search input[type="search"] {
  flex: 1 1 12rem; padding: 0.6rem; font: inherit;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink);
}
.search button { margin-top: 0; }
select { width: 100%; padding: 0.6rem; font: inherit; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); }
.note { padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-left: 4px solid var(--link); border-radius: 6px; }
.inline-edit > summary { cursor: pointer; color: var(--link); min-height: 44px; display: flex; align-items: center; }

/* Events and calendar (v0.9). Additive only. */
main.wide { max-width: 64rem; }
.greeting { margin: 1rem 0 0; font-weight: 600; }
.viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.viewbar .button { margin-right: 0; }
.toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.toggle-btn { margin: 0; border-radius: 0; background: var(--surface); color: var(--link); min-height: 44px; padding: 0 1rem; }
.toggle-btn.on { background: var(--accent); color: #fff; }
.quicklinks { margin: 0.5rem 0 0; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 1rem 0 0.5rem; }
.cal-nav h1 { font-size: 1.4rem; margin: 0; text-align: center; }
.cal-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 0.25rem; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.grid-head { padding: 0.25rem; font-size: 0.85rem; color: var(--muted); text-align: center; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cell { min-height: 6.5rem; min-width: 0; padding: 0.25rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.cell.other { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.cell.other .daynum { color: var(--muted); }
.cell.today .daynum { background: var(--accent); color: #fff; border-radius: 50%; }
.cell.chosen { box-shadow: inset 0 0 0 2px var(--link); }
.daynum { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9rem; min-height: 1.9rem; text-decoration: none; font-weight: 600; }
.cell-events { list-style: none; margin: 0.15rem 0 0; padding: 0; font-size: 0.8rem; }
.cell-events li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v0.22.4 (R-044): long titles, the person's choice (<html data-titles>; static/titles.js): cut off, wrap, or scroll
   on hover (the usual). R-251 (v0.27.27): the dots, a cover, the caregiver mark and a label's mark stay put; only the
   title part (.cell-title) moves, in ONE direction, looping: the title slides left and a copy (hidden from screen
   readers) follows it in from the right. Reduced motion: nothing moves (the whole title is in the hover tip). */
:root[data-titles="wrap"] .cell-events li { white-space: normal; overflow-wrap: anywhere; }
/* gate round 2: inline-flex (no wider than its content), so a tap beside a short title still picks the day */
.cell-events a.cell-event, .cell-events .system-entry { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; vertical-align: top; }
.cell-events .cell-event > :not(.cell-title) { flex: none; }
/* gate round 3: the row clips anything outside the link, so its focus ring is drawn inside it */
.cell-events a.cell-event:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.cell-events .cell-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cell-events .title-copy { display: none; }
.cell-events li.title-scroll .cell-title { text-overflow: clip; }
.cell-events li.title-scroll .title-copy { display: inline-block; }
.cell-events li.title-scroll .title-run { display: inline-block; padding-right: 2em; animation: title-scroll var(--title-time, 3s) linear 0.4s infinite; }
@keyframes title-scroll { from { transform: translateX(0); } to { transform: translateX(var(--title-shift, 0)); } }
@media (prefers-reduced-motion: reduce) { .cell-events li.title-scroll .title-run { animation: none; } }
/* "wrap": the whole title on more lines, under the dots across the cell, as before R-251 (no flex row) */
:root[data-titles="wrap"] .cell-events a.cell-event { display: inline; }
:root[data-titles="wrap"] .cell-events .system-entry { display: inline-flex; }
:root[data-titles="wrap"] .cell-events .cell-title { display: inline; overflow: visible; }
.cell-events a { text-decoration: none; }
/* gate round 4: in "wrap" a ring inside each line would cut the letters: a thick underline marks the focus instead */
:root[data-titles="wrap"] .cell-events a.cell-event:focus-visible { outline: none; text-decoration: underline 2px; text-underline-offset: 2px; }
.event-time { color: var(--muted); }
.weekstrip { display: none; }
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.strip-day a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; text-decoration: none; border-radius: 6px; color: var(--ink); }
.strip-day .dow { font-size: 0.75rem; color: var(--muted); }
.strip-day .num { font-weight: 600; }
.strip-day .marks { min-height: 1rem; font-size: 0.75rem; color: var(--link); }
.strip-day.today .num { color: var(--link); text-decoration: underline; }
.strip-day.chosen a { box-shadow: inset 0 0 0 2px var(--link); }
.events { list-style: none; padding: 0; margin: 0.5rem 0; }
.event-item { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.event-item a { display: flex; flex-wrap: wrap; gap: 0 0.6rem; min-height: 44px; align-items: center; text-decoration: none; }
.event-item .event-title { font-weight: 500; overflow-wrap: anywhere; }
.event-item .event-time { min-width: 5.5rem; }
.daylist { list-style: none; padding: 0; margin: 0; }
.listday { border-bottom: 1px solid var(--border); padding: 0.25rem 0; }
.listday h3 { font-size: 1rem; margin: 0.75rem 0 0.25rem; }      /* v0.27.54: h3 under the List view's "Upcoming" */
.listday.today h3 { color: var(--link); }
.event-heading { overflow-wrap: anywhere; }
.event-when { font-weight: 500; }
.event-note, .address { white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.pager a { min-height: 44px; display: inline-flex; align-items: center; }
input[type="date"], input[type="time"] {
  width: 100%; padding: 0.6rem; font: inherit; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--ink);
}
@media (max-width: 640px) {
  .month { display: none; }
  /* Pinned directly under the sticky top bar: same variable, so no gap and no overlap. */
  .weekstrip { display: block; position: sticky; top: calc(var(--topbar-height) + var(--safe-top)); z-index: 5; background: var(--surface);
               border-bottom: 1px solid var(--border); padding-bottom: 0.25rem;
               height: var(--weekstrip-height); overflow: hidden; }
  /* Jumping to #day or tabbing to a field never hides it under the bar + strip. */
  html:has(main:not(.picker) .weekstrip) { scroll-padding-top: calc(var(--topbar-height) + var(--safe-top) + var(--weekstrip-height) + 0.5rem); }
  .cal-nav { margin-top: 0.5rem; }
}
/* v0.27.32 (the owner, Nov 11): the list view's week strip, at every width, pinned under the top bar as on the phone's
   calendar; a day's jump lands below the bar and the strip */
.weekstrip.list-strip { display: block; position: sticky; top: calc(var(--topbar-height) + var(--safe-top)); z-index: 5;
  background: var(--surface); border-bottom: 1px solid var(--border); padding-bottom: 0.25rem;
  height: var(--weekstrip-height); overflow: hidden; }      /* (the phone's height at every width: the jump's padding) */
.weekstrip.list-strip .cal-nav { margin-top: 0.5rem; }
html:has(main .list-strip) { scroll-padding-top: calc(var(--topbar-height) + var(--safe-top) + var(--weekstrip-height) + 0.5rem); }
/* (gate round 2) a short window (a landscape phone, a small laptop, a page zoomed in) keeps the list in view: the strip
   scrolls away with the page there, and a jump lands under the top bar only */
@media (max-height: 34rem) {
  .weekstrip.list-strip { position: static; }
  html:has(main:not(.picker) .list-strip) { scroll-padding-top: calc(var(--topbar-height) + var(--safe-top) + 0.5rem); }
}   /* (round 3: as specific as the phone calendar's rule, which also matches this page up to 640 px wide) */


/* Calendar day picking (v0.9.1). Additive only: targets the new markup. */
.cell { position: relative; }
.cell-link { position: absolute; inset: 0; z-index: 1; display: block; padding: 0.25rem; text-decoration: none; color: inherit; border-radius: 2px; }
.cell-link:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }
.cell-link ~ .cell-events { position: relative; z-index: 2; margin-top: 1.9rem; pointer-events: none; }
.cell-link ~ .cell-events a { pointer-events: auto; }
.cell-count { display: none; position: relative; z-index: 2; pointer-events: none; color: var(--link); font-weight: 600; font-size: 0.85rem; margin-top: 1.9rem; text-align: center; }
.cell:hover { background: color-mix(in srgb, var(--link) 8%, var(--surface)); }
.cell.chosen { background: color-mix(in srgb, var(--link) 16%, var(--surface)); box-shadow: inset 0 0 0 3px var(--link); }
.cell.chosen .daynum { text-decoration: underline; text-underline-offset: 3px; }
.full-month, .back-to-week { display: none; }
@media (max-width: 640px) {
  .full-month { display: block; margin: 0.75rem 0 0; }
  .full-month .button { display: flex; justify-content: center; align-items: center; min-height: 44px; margin: 0; }
  main.picker .full-month, main.picker .weekstrip, main.picker .day-events, main.picker .upcoming { display: none; }
  main.picker .month { display: block; }
  main.picker .back-to-week { display: block; margin: 0.75rem 0 0; }
  main.picker .back-to-week a { display: inline-flex; align-items: center; min-height: 44px; }
  main.picker .cell { min-height: 3.75rem; }
  main.picker .cell-events { display: none; }
  main.picker .cell-count { display: block; }
  main.picker .grid-head { font-size: 0.75rem; }
}

/* RSVP (v0.10). Additive only. */
.rsvp { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 0.5rem; }
.rsvp h3 { font-size: 1rem; margin: 1rem 0 0.25rem; }
.rsvp-counts { font-weight: 600; }
.rsvp-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rsvp-btn { margin: 0; min-height: 44px; background: var(--surface); color: var(--link); border: 1px solid var(--link); }
.rsvp-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.attendees { list-style: none; padding: 0; margin: 0; }
.attendees li { display: flex; align-items: center; gap: 0.5rem; min-height: 32px; overflow-wrap: anywhere; }
.avatar-small { width: 24px; height: 24px; }
.tag { display: inline-block; margin-left: 0.4rem; padding: 0 0.45rem; font-size: 0.8rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); }

/* Test data badge (v0.10.1). Text, not color alone; inherits the text color so it
   reads in light and dark mode. Additive only. */
.test-badge { display: inline-block; margin: 0 0.35rem; padding: 0 0.3rem; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; line-height: 1.35; border: 1px dashed currentColor; border-radius: 4px; vertical-align: middle; }
.cell-events .test-badge { margin: 0 0.2rem 0 0; font-size: 0.6rem; padding: 0 0.15rem; }
.strip-test { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.04em; border: 1px dashed currentColor; border-radius: 3px; padding: 0 0.1rem; line-height: 1.2; }

/* Event types and search (v0.10.2). Additive only. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { vertical-align: -0.15em; flex: none; }
.type-label { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.event-labels .type-label { margin-left: 0; }
.search-bar { margin-top: 0.75rem; }
.search-bar input[type="search"] { flex: 1 1 10rem; }
.search-filters label { flex-basis: auto; margin-top: 0.5rem; }
.search-filters input[type="search"], .search-filters select { flex: 1 1 100%; }
.search-count { font-weight: 600; }
.private-tag { border-style: dashed; }
.types { list-style: none; padding: 0; margin: 1rem 0; }
.type-row { border-bottom: 1px solid var(--border); padding: 0.5rem 0; }
.type-row.retired .type-head { opacity: 0.7; }
.type-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.type-head .type-label { margin-left: 0; font-size: 1rem; color: var(--ink); }
.type-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.35rem; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.inline-form input[type="text"], .inline-form select { width: auto; max-width: 12rem; }
.inline-form button, .type-actions button { margin: 0; }
.icon-preview { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); }
.term { display: inline-flex; align-items: center; gap: 0.15rem; margin: 0.15rem 0.35rem 0.15rem 0; padding: 0.1rem 0.5rem; border: 1px solid var(--border); border-radius: 999px; }
.term button.link { min-height: 0; padding: 0 0.2rem; }

/* Address controls and greeting avatar (v0.10.2.1). Additive only. */
.address-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0.75rem; }
.address-actions .copy-address { margin: 0; min-height: 44px; }
.maps-link { display: inline-flex; align-items: center; min-height: 44px; }
.maps-alt { font-size: 0.9rem; }
.copy-status { font-size: 0.9rem; color: var(--muted); }
.copy-fallback { flex-basis: 100%; padding: 0.6rem; font: inherit; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); }
.greeting-row { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0 0; }
.greeting-row .greeting { margin: 0; }
.me-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; flex: none; text-decoration: none; }
.me-link:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.me-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.me-initial { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 1.1rem; line-height: 1; }

/* Audiences, invitees, groups, labels, Invitations box (v0.10.3). Additive only. */
fieldset.audience { border: 1px solid var(--border); border-radius: 6px; margin: 1rem 0; padding: 0.5rem 0.75rem; min-width: 0; }
fieldset.audience legend { font-weight: 600; padding: 0 0.25rem; }
fieldset.audience label.check, .pick-list label.check { min-height: 44px; }
/* v0.12.0: one plain line under each audience choice, lined up with its text. */
.audience-help { margin: -0.4rem 0 0.4rem 1.6rem; }
.choose-who > summary, .household-pick > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.pick-head { font-weight: 600; margin: 0.75rem 0 0.25rem; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 0 1rem; }
.pick-list label.check { overflow-wrap: anywhere; }
.audience-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.co-badge { display: inline-block; padding: 0 0.4rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; color: var(--muted); }
.manage-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.manage-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.35rem 0; border-bottom: 1px solid var(--border); min-height: 44px; overflow-wrap: anywhere; }
.manage-list form.inline { margin: 0; }
.label-form select { width: auto; max-width: 12rem; }
.label-form button { margin: 0; }
.invitations { margin-top: 1rem; }
.invitation-list { list-style: none; padding: 0; margin: 0; }
.invitation { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.invitation .event-title { font-weight: 600; overflow-wrap: anywhere; }
.invitation .rsvp-buttons { margin: 0.25rem 0 0; }

/* Event dots (v0.10.4). Shape AND color AND an aria-label, never color alone:
   organizer = gold filled diamond, co-organizers = silver ring, others coming = white
   outlined square, Choose-who events = filled circle in the event color, birthday =
   rainbow circle with a cake. */
.dots { display: inline-flex; align-items: center; gap: 2px; margin-right: 0.3rem; vertical-align: middle; flex: none; }
.dot { display: inline-block; width: 0.65rem; height: 0.65rem; flex: none; }
.dot-color { border-radius: 50%; border: 1px solid var(--dot-outline); }
.dot-organizer { background: var(--c-gold); border: 1.5px solid #6b5200; transform: rotate(45deg) scale(0.85); }
.dot-sub { border-radius: 50%; border: 3px solid var(--c-silver); background: transparent; }
.dot-guest { background: var(--c-white); border: 1.5px solid var(--dot-outline); border-radius: 1px; width: 0.55rem; height: 0.55rem; }
.dot-rainbow { border-radius: 50%; border: 1px solid var(--dot-outline);
  background: conic-gradient(#e53935, #fb8c00, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935); }
.dot-cake .icon { width: 0.8rem; height: 0.8rem; vertical-align: middle; }
.dot-c-red { background: var(--c-red); } .dot-c-orange { background: var(--c-orange); }
.dot-c-amber { background: var(--c-amber); } .dot-c-olive { background: var(--c-olive); }
.dot-c-green { background: var(--c-green); } .dot-c-teal { background: var(--c-teal); }
.dot-c-cyan { background: var(--c-cyan); } .dot-c-blue { background: var(--c-blue); }
.dot-c-indigo { background: var(--c-indigo); }
.dot-c-pink { background: var(--c-pink); } .dot-c-brown { background: var(--c-brown); }
.cell-events .dots { margin-right: 0.2rem; }
.strip-day .marks { display: inline-flex; align-items: center; gap: 1px; }
.strip-day .marks .dots { margin: 0; }
.strip-day .marks .dot { width: 0.5rem; height: 0.5rem; }
.strip-day .marks .dot-cake { display: none; }
.strip-day .marks .more { font-size: 0.7rem; }
fieldset.color-pick { border: 0; padding: 0; margin: 0.5rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
.color-pick label.check { min-height: 44px; }
.color-pick .dot { width: 1rem; height: 1rem; }

/* Updates page (v0.10.4). */
.notices { list-style: none; padding: 0; margin: 0.5rem 0; }
.notice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; padding: 0.5rem 0;
  border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.notice.unread .notice-text { font-weight: 600; }
.new-badge { font-size: 0.75rem; font-weight: 700; padding: 0 0.35rem; border-radius: 999px; border: 1px solid var(--link); color: var(--link); }

/* Two-step sign-in (v0.10.5). */
.twofa-banner { margin: 0.75rem 0 0; padding: 0.6rem 0.75rem; border: 1px solid var(--link); border-radius: 6px;
  background: color-mix(in srgb, var(--link) 10%, var(--surface)); overflow-wrap: anywhere; }
.steps { padding-left: 1.25rem; }
.steps li { margin: 0.5rem 0; }
.setup-key code, .recovery-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem; letter-spacing: 0.04em; overflow-wrap: anywhere; word-break: break-all; }
.setup-key { padding: 0.5rem; border: 1px dashed var(--border); border-radius: 6px; }
.otpauth { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.recovery-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.35rem 1rem; }
#code, #recovery_code { font-size: 1.25rem; letter-spacing: 0.15em; max-width: 14rem; }
.button.secondary, button.secondary { background: var(--surface); color: var(--link); border: 1px solid var(--link); }

/* 2FA setup QR (v0.10.6.2): its own white background and quiet zone, even in dark mode. */
.qr { display: block; width: max-content; max-width: 100%; margin: 0.5rem 0; padding: 0; background: #fff;
  border: 1px solid var(--border); border-radius: 4px; line-height: 0; }
.qr svg { display: block; }

/* Dish list and event chat (v0.10.8). */
.dishes, .chat { margin-top: 1.5rem; }
.dish-list li { align-items: flex-start; }
.dish-name { overflow-wrap: anywhere; }
.dish-note { overflow-wrap: anywhere; }
.dish-actions { display: inline-flex; gap: 0.75rem; align-items: center; }
.dish-form, .food-form, .chat-form { margin-top: 0.75rem; }   /* v0.18.0: food-form = the dish-flow forms */
.chat-notify { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.25rem 0 0.75rem; }
.chat-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.chat-msg { padding: 0.5rem 0.75rem; margin: 0.4rem 0; border: 1px solid var(--border); border-radius: 8px; }
.chat-msg.mine { background: color-mix(in srgb, var(--link) 7%, var(--surface)); }
.chat-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.chat-meta form.inline { margin-left: auto; }
.chat-body { margin: 0.25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Installable app (v0.10.9): icon picker, install help, offline page. */
fieldset.icon-pick { border: 0; padding: 0; margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
fieldset.icon-pick legend { font-weight: 500; padding: 0; }
.icon-pick label.check { min-height: 44px; }
.icon-choice { border-radius: 22%; flex: none; }
.offline { text-align: center; margin-top: 15vh; }
.offline-icon { border-radius: 22%; }

/* Event page cards (v0.11.0): Who's coming, Dish list, Chat as separate bordered boxes,
   the same style as the chat message boxes. */
.event-card { margin-top: 1.5rem; padding: 0.25rem 1rem 1rem; border: 1px solid var(--border); border-radius: 8px;
  min-width: 0; overflow-wrap: anywhere; }
.rsvp.event-card { border-top: 1px solid var(--border); padding-top: 0.25rem; }
.event-card > h2 { font-size: 1.25rem; margin: 0.75rem 0 0.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; }
.card-count { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.dish-summary { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.95rem; }
.dishes h3 { font-size: 1rem; margin: 0.75rem 0 0; }
.add-dish, .add-guest { margin-top: 0.75rem; }
.add-dish > summary, .add-guest > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 6px;
  background: var(--accent); color: #fff; cursor: pointer; list-style: none; user-select: none; }
.add-dish > summary::-webkit-details-marker, .add-guest > summary::-webkit-details-marker { display: none; }
.add-dish > summary:focus-visible, .add-guest > summary:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.add-dish[open] > summary, .add-guest[open] > summary { background: var(--surface); color: var(--link); border: 1px solid var(--link); }
.add-calendar { margin: 0.25rem 0 0.75rem; }
.add-calendar .button { display: inline-flex; align-items: center; min-height: 44px; margin: 0; }
.forgot { margin-top: 1rem; }
.event-answer .rsvp-buttons { margin: 0.75rem 0; }
.saved-answer { font-size: 1.05rem; }

/* Sign-in security rows (v0.11.2): actions wrap under the name on phones. */
.manage-list .row-actions { display: inline-flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.manage-list .row-actions a { display: inline-flex; align-items: center; min-height: 44px; }

/* v0.11.5: event form times, hidden by static/event-form.js while "All day" is ticked. */
.time-field[hidden] { display: none; }

/* v0.11.6: the calendar link is long; let it wrap on phones. */
.feed-url code { overflow-wrap: anywhere; word-break: break-all; }
.feed-steps li { margin-bottom: 0.5rem; }

/* v0.11.7: THE avatar (templates/_avatar.html): photo or initials circle, plus the suffix
   badge (Jr, Sr, III ...). v0.22.4 (R-041): the badge follows the interface color (white text on --accent,
   >= 4.5:1 in every color, light and dark); a darker edge and a ring in the page color keep it distinct on white
   and dark pages and on any photo. */
:root { --badge-bg: var(--accent); --badge-edge: color-mix(in srgb, var(--accent) 55%, #000); }
.av { position: relative; display: inline-flex; flex: none; vertical-align: middle; border-radius: 50%; }
.av .av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av-initials { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; line-height: 1; letter-spacing: 0.02em;
  user-select: none; }
.av-24 { width: 24px; height: 24px; } .av-24 .av-initials { font-size: 0.6rem; }
.av-28 { width: 28px; height: 28px; } .av-28 .av-initials { font-size: 0.7rem; }
.av-32 { width: 32px; height: 32px; } .av-32 .av-initials { font-size: 0.8rem; }
.av-40 { width: 40px; height: 40px; } .av-40 .av-initials { font-size: 1rem; }
.av-48 { width: 48px; height: 48px; } .av-48 .av-initials { font-size: 1.15rem; }
.av-128 { width: 128px; height: 128px; } .av-128 .av-initials { font-size: 2.75rem; }
.av-badge { position: absolute; right: -6px; bottom: -4px; min-width: 1.6em; padding: 0 0.3em; border-radius: 999px;
  background: var(--badge-bg); color: #fff; border: 1px solid var(--badge-edge); box-shadow: 0 0 0 1.5px var(--surface);
  font-size: 10px; font-weight: 800; line-height: 1.35; text-align: center; white-space: nowrap; letter-spacing: 0.01em; }
/* Small avatars (Who's coming, top bar): the badge is relatively bigger so it stays legible. */
.av-24 .av-badge { font-size: 10px; right: -11px; bottom: -6px; }
.av-28 .av-badge, .av-32 .av-badge { right: -9px; bottom: -5px; }
.av-40 .av-badge, .av-48 .av-badge { font-size: 11px; }
.av-128 .av-badge { font-size: 18px; right: 0; bottom: 2px; padding: 0.05em 0.45em; box-shadow: 0 0 0 2px var(--surface); }
/* Room for a badge that sticks out to the right, so it never covers the name next to it. */
.av.has-badge { margin-right: 0.45rem; }
.attendees .av { margin-right: 0.15rem; }
.attendees .av.has-badge { margin-right: 0.75rem; }
/* Top bar: avatar + first name -> My profile (wide screens and the Menu); 32px avatar in the
   phone bar between Updates and Menu. */
a.who { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); text-decoration: none; }
a.who:hover .who-name { text-decoration: underline; }
/* v0.27.10 (R-219): on My profile the name and photo are the current item (as the menu's own links are): the name
   bold and a straight 3 px bar under the link (a text underline would be cut off by the name's ellipsis box, and an
   inset shadow follows the round photo link). */
a.who.active .who-name { font-weight: 700; }
a.who.active, .bar-me.active { position: relative; }
a.who.active::after, .bar-me.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 3px; border-radius: 2px; background: currentColor; }
.nav-row a.who { max-width: 12rem; overflow: visible; }   /* the badge may stick out; the name keeps its ellipsis */
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-me { display: none; }
@media (max-width: 960px) {
  .bar-me { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
    flex: none; text-decoration: none; border-radius: 50%; }
  .bar-me:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
  .menu-panel > a.who { gap: 0.6rem; color: var(--muted); }
}
@media (max-width: 420px) {
  .site-header { gap: 0.25rem; }
  .bar-calendar, .bar-updates { padding: 0 0.25rem; }
  .nav-menu > summary { padding: 0 0.5rem; }
}
.page-title { margin-top: 1rem; }

/* v0.11.8: "Notifications on this device" install steps. */
.push-steps li { margin-bottom: 0.35rem; }
.push-status:empty { display: none; }

/* v0.11.9: care reminders. The one very big button (Got it / Call). */
.care-big { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 6rem; font-size: 2rem; font-weight: 800; border-radius: 12px; text-decoration: none; background: var(--accent); color: #fff; border: 0; }
a.care-big { color: #fff; }
.care-list { list-style: none; padding: 0; }
.care-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.4rem 0; border-top: 1px solid var(--border); }
.care-when { font-size: 1.2rem; }

/* v0.11.10: the caregiver calendar (read-only) */
.care-badge { display: inline-block; margin: 0; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid var(--accent); color: var(--link); font-weight: 700; font-size: 0.9rem; }
.care-day { font-size: 1.05rem; margin: 1.25rem 0 0.25rem; }

/* v0.11.10: the narrowest phones (360px) with a two-digit Updates count: a little less
   spacing so HFE, Calendar, Updates, the avatar and Menu keep the 16px edge. */
@media (max-width: 380px) {
  .site-header { gap: 0.15rem; }
  .bar-calendar, .bar-updates { padding: 0 0.2rem; gap: 0.2rem; }
  .bar-updates .count { font-size: 0.75rem; padding: 0 0.25em; }
  .nav-menu > summary { padding: 0 0.4rem; }
  .nav-menu > summary::after { margin-left: 0.2rem; }
  .bar-me { min-width: 40px; }
}

/* v0.11.10: the collapsible search (static/search-toggle.js) */
.search-wrap { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0; min-width: 0; }
.search-wrap .search-bar { flex: 1 1 auto; min-width: 0; margin: 0; }
.search-wrap .search-bar[hidden] { display: none; }
.search-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; flex: none; border-radius: 50%; }
.search-toggle[hidden] { display: none; }
.search-toggle svg { display: block; }

/* v0.12.0: Manage person. Admin family-link controls are for the computer layout only. */
.phone-only { display: none; }
@media (max-width: 960px) {
  .pc-only, form.pc-only { display: none; }    /* (form.pc-only: stronger than form.inline) */
  .phone-only { display: block; }
}
.label-preview { margin: 0.75rem 0; padding: 0.6rem 0.75rem; border: 1px solid var(--link); border-radius: 6px;
  background: color-mix(in srgb, var(--link) 7%, var(--surface)); overflow-wrap: anywhere; }
.preview-list { margin: 0.25rem 0 0.75rem; padding-left: 1.25rem; }
.admin-link-form { margin-top: 1rem; max-width: 32rem; }
.people-admin > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.label-choice label.check { min-height: 44px; }

/* v0.12.0: the one-line "Set up Face ID" offer (static/passkey.js shows it where passkeys work). */
.passkey-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.75rem 0 0;
  padding: 0.5rem 0.75rem; border: 1px solid var(--link); border-radius: 6px;
  background: color-mix(in srgb, var(--link) 10%, var(--surface)); overflow-wrap: anywhere; }
.passkey-offer[hidden] { display: none; }
.passkey-offer form { margin: 0; }
.passkey-offer button { margin: 0; }
.passkey-offer .passkey-offer-text { flex: 1 1 12rem; }

/* v0.12.2: Face ID first on the second step and "Confirm it's you"; the code waits behind a fold. */
.passkey-btn.big { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px;
  font-size: 1.15rem; font-weight: 700; margin: 0.5rem 0; }
.code-fold { margin: 1rem 0 0.5rem; }
.code-fold > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--link);
  text-decoration: underline; }

/* v0.16.0: food slots (event form and food card), guest page */
.food-slots { margin: 1rem 0; }
.food-slot-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
.food-slot-table th, .food-slot-table td { text-align: left; padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--border, #ddd); }
.food-slot-table td:first-child { width: 3rem; }
.food-slot-table input[type=number] { width: 5.5rem; }
.food-slot-table input[type=text] { width: 100%; }
.food-slot-table[hidden], .food-slot-table .food-qty[hidden] { display: none; }   /* tables are display: block site-wide */
.food-slot-head { margin-top: 1rem; }
.food-requests { margin: 0.5rem 0 1rem; }
.food-ask { display: block; margin: 0.25rem 0 0.75rem; }
.guest-page .guest-list { list-style: none; padding: 0; }
.guest-invites .guest-email { word-break: break-all; }
.guest-x { font-size: 1.5rem; line-height: 1; min-width: 44px; min-height: 44px; text-decoration: none; }   /* v0.16.1 */

/* v0.16.1 phone menu: an explicit opaque panel colour (iOS Safari and the Home Screen app can
   paint the system colour Canvas see-through, so the page showed through the open menu), and a
   dim layer over the page while it is open. The layer is the Menu button's own ::before, so a
   tap on it IS a tap on the button: it closes the menu with no JavaScript. Light and dark. */
:root { --menu-surface: #ffffff; --menu-dim: rgba(0, 0, 0, 0.45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --menu-surface: #121212; --menu-dim: rgba(0, 0, 0, 0.6); } }
:root[data-theme="dark"] { --menu-surface: #121212; --menu-dim: rgba(0, 0, 0, 0.6); }
@media (max-width: 960px) {
  .menu-panel { background: var(--menu-surface); z-index: 31; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
  .nav-menu[open] > summary::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: calc(var(--topbar-height) + var(--safe-top));
    background: var(--menu-dim);
    z-index: 30;
    cursor: default;
  }
}

/* v0.17.0 birthdays: system entries (no link), the balloon, the birthday fields */
.system-entry { display: inline-flex; align-items: center; gap: 0.3rem; }
.balloon { color: var(--c-pink); flex: none; }
.birthday-fields .inline-fields { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; }
.kid-birthday { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 0.5rem; }

/* v0.26.0 calendar extras: a label (holiday, the moon) is a mark AND words, never colour alone; muted text, no box.
   In a month cell the note ("observed", "expected") is kept for screen readers only (the day view shows it). */
.extra-mark { flex: none; color: var(--muted, currentColor); }
.system-item .extra-note { font-size: 0.9em; }
.cell-events .extra-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.calendar-extras .extras-religious { border: 1px solid var(--border); border-radius: 6px; margin: 0.5rem 0; padding: 0.25rem 0.75rem; }
.calendar-extras .help { margin: 0 0 0.5rem 1.6rem; }

/* ---- v0.17.1: what went wrong with a save (app/formerrors.py, static/forms.js) ----------------
   Never colour alone: the big asterisk, the "!" mark, a thick outline and the words carry it.
   --danger has >= 4.5:1 on the light and the dark background. */
:root { --danger: #b3261e; --danger-bg: color-mix(in srgb, #b3261e 10%, var(--surface)); }
:root { --ok: #1b6e35; }                     /* R-298: "taken / done" green (the error colour's partner) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --danger: #ff8a80; --danger-bg: color-mix(in srgb, #ff8a80 14%, var(--surface)); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ok: #7fd99a; } }
:root[data-theme="dark"] { --danger: #ff8a80; --danger-bg: color-mix(in srgb, #ff8a80 14%, var(--surface)); }
:root[data-theme="dark"] { --ok: #7fd99a; }
/* R-298 (b)(c) (Karl's Thanksgiving sheet): Possible people in gold, a picked person's dishes and supplies in bold
   orange. Colour is never the only sign: the "Possible" heading and the "X is bringing" line say it in words. */
:root { --possible: #8a6200; --bring: #a84300; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --possible: #e9c46a; --bring: #ffa45c; } }
:root[data-theme="dark"] { --possible: #e9c46a; --bring: #ffa45c; }
.rsvp-possible-head, .attendees-possible .possible, .rsvp-possible-n { color: var(--possible); }
.attendees-possible .possible-why { color: inherit; }        /* (full gold: >= 4.8:1 on light) */
.bringing-hi, .bringing-hi .dish-name, .bringing-hi .supply-amount { color: var(--bring); font-weight: 700; }
li.bringing-hi, .manage-list li.bringing-hi, .supply-claims li.bringing-hi {   /* (gate rounds 1-2: not colour alone; */
  box-shadow: inset 4px 0 0 var(--bring); padding-left: 0.6rem;                  /*  room for the bar on every list)    */
}
.bringing-lines { margin: 0.5rem 0 0; }
.bringing-lines li { overflow-wrap: anywhere; }                 /* (gate round 4: a long dish name wraps at 390px) */
/* v0.22.4.1 (R-194): "HFE is reading this recipe": the message box with a stripe in the person's color */
.flash.reading-started { border-left: 6px solid var(--accent); font-weight: 600; }
.flash-error { border: 2px solid var(--danger); background: var(--danger-bg); color: var(--ink); border-radius: 6px;
  padding: 0.5rem 0.75rem; }
.flash-mark { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem;
  margin-right: 0.5rem; border-radius: 50%; background: var(--danger); color: var(--surface); font-weight: 700; }
.form-errors { margin: 0 0 0.75rem; }
.form-errors .flash-error { margin: 0 0 0.5rem; }
.req-star { color: var(--danger); font-size: 1.6rem; font-weight: 800; line-height: 1; margin-left: 0.25rem;
  vertical-align: -0.15em; }
.field-missing, .field-invalid { outline: 3px solid var(--danger); outline-offset: 2px; background: var(--danger-bg);
  border-radius: 4px; }
fieldset.field-missing, fieldset.field-invalid { padding: 0.5rem; }
.field-error-text, form .error { color: var(--danger); font-weight: 600; margin: 0.25rem 0 0.5rem; }
.field-error-text::before { content: "! "; }
.required-bar { position: fixed; left: calc(var(--safe-left) + 0.5rem); right: calc(var(--safe-right) + 0.5rem);
  bottom: calc(var(--safe-bottom) + 0.5rem); z-index: 40; display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.5rem 0.5rem 0.5rem 1rem; border: 2px solid var(--danger); border-radius: 8px;
  background: var(--surface); color: var(--ink); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); font-weight: 600; }
.required-bar[hidden] { display: none; }
.required-bar p { margin: 0; }
.required-bar-close { min-width: 44px; min-height: 44px; font-size: 1.5rem; line-height: 1; background: none;
  border: 1px solid var(--border); border-radius: 6px; color: var(--ink); cursor: pointer; }
/* Room below the page while the banner shows, so it never covers the last Save button. */
body.has-required-bar { padding-bottom: calc(var(--safe-bottom) + 6rem); }   /* v0.27.32: the bar's own ~93 px */
body.has-required-bar :is(input, select, textarea, button, fieldset) { scroll-margin-bottom: 6rem; }

/* ---- v0.17.1: the running version, signed-in pages ---------------------------------------- */
.site-footer { max-width: 60rem; margin: 2rem auto 0; padding: 1rem calc(var(--safe-right) + 1rem)
  calc(var(--safe-bottom) + 1rem) calc(var(--safe-left) + 1rem); border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.85rem; text-align: center; }
/* v0.27.32 (the owner, Nov 11): on a short page the footer sits on the window's bottom edge, not halfway up. The page
   is at least the window's height and the footer takes the space left over above it; a long page is as before. The
   header, main and footer are the body's only children in the flow (the sky and the bars are fixed); each keeps its
   own width (a column's auto side margins would shrink it to its content). */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > .site-header, body > main, body > .site-footer { flex-shrink: 0; }
body > main, body > .site-footer { width: 100%; }
body > main { margin-bottom: 2rem; }
body > .site-footer { margin-top: auto; }
.site-footer p { margin: 0; }
/* v0.22.5 (R-047): Report a problem / Suggest a feature */
.site-footer .footer-feedback { margin-top: 0.5rem; }
.feedback-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.feedback-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.feedback-filters label { margin: 0; }
.theme-choice { border: 0; padding: 0; margin: 0 0 0.5rem; }

/* ---- v0.17.1: "Show Birthdays" popup (birthdays/_quicklink.html, static/birthdays.js) ------- */
.birthdays-dialog { width: min(32rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); }
.birthdays-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.birthdays-panel { padding: 1rem; }
.birthdays-head { display: flex; align-items: center; gap: 0.5rem; }
.birthdays-head h2 { flex: 1; margin: 0; font-size: 1.25rem; text-align: center; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--link);
  font-size: 1.5rem; line-height: 1; cursor: pointer; text-decoration: none; }
.icon-button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.birthdays-close { color: var(--ink); }
.birthdays-year { text-align: center; margin: 0.25rem 0 0.75rem; }
.birthdays-list { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.birthdays-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.birthdays-empty { margin: 0.5rem 0 1rem; }
.bday-leap { border: 0; padding: 0; margin: 0.5rem 0 0; }
.bday-leap[hidden] { display: none; }

/* ---- P-81 (R-267, D-121): how wide the pages are on a computer (My profile > Look and logo; <html data-width>). Only a
   COMPUTER-sized window (a fine pointer that can hover, at least 70rem wide): phones and tablets stay as they are, and
   printing is never touched (screen only). Standard = no attribute: each page's own width (40rem, 64rem). Wide: about
   90rem; Full window: the whole window (the usual side gutter stays). The footer follows the page. The Nature sky is
   unchanged (nature.css keeps its own main / footer box; its widths follow below). ---- */
@media screen and (min-width: 70rem) and (hover: hover) and (pointer: fine) {
  :root[data-width="wide"] main, :root[data-width="wide"] main.wide, :root[data-width="wide"] .site-footer { max-width: 90rem; }
  :root[data-width="full"] main, :root[data-width="full"] main.wide, :root[data-width="full"] .site-footer { max-width: none; }
  :root[data-width="wide"][data-nature="on"] :is(main, main.wide, .site-footer) { max-width: min(90rem, calc(100% - 1rem)); }
  :root[data-width="full"][data-nature="on"] :is(main, main.wide, .site-footer) { max-width: calc(100% - 1rem); }
}

/* ---- v0.18.0: "New version" note (static/app-update.js) ---------------------------------------
   Below the top bar, never over it or the Menu; the words carry the meaning (not colour). */
.update-bar { position: fixed; top: calc(var(--topbar-height) + var(--safe-top) + 0.25rem);
  left: calc(var(--safe-left) + 0.5rem); right: calc(var(--safe-right) + 0.5rem); z-index: 29;
  display: flex; gap: 0.5rem; align-items: stretch; max-width: 40rem; margin: 0 auto;
  border: 2px solid var(--link); border-radius: 8px; background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.update-bar[hidden] { display: none; }
.update-bar-reload { flex: 1; min-height: 44px; padding: 0.5rem 0.75rem; border: 0; background: none; color: var(--link);
  font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.update-bar-close { min-width: 44px; min-height: 44px; border: 0; border-left: 1px solid var(--border); background: none;
  color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.update-bar button:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }

/* ---- v0.18.0: the dish flow ------------------------------------------------------------------- */
.food-missing { margin: 0.75rem 0; padding: 0.5rem 0.75rem; border: 2px solid var(--danger); border-radius: 6px;
  background: var(--danger-bg); color: var(--ink); }
.food-missing p { margin: 0.25rem 0; }
.food-missing strong { color: var(--danger); }
.food-missing-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem;
  margin-right: 0.5rem; border-radius: 50%; background: var(--danger); color: var(--surface); font-weight: 800; }
.food-offer { margin: 0.75rem 0; padding: 0.5rem 0.75rem; border: 2px solid var(--link); border-radius: 6px; }
.dish-held .dish-name { font-style: italic; }
.dish-changing .dish-name { text-decoration: underline dotted; }
.dish-change { margin-top: 0.5rem; padding: 0.5rem; border: 1px dashed var(--border); border-radius: 6px; }

/* v0.18.1 B2: Admin > Food list drag to reorder (the arrows stay for phones) */
.food-categories.can-drag li[data-id] { cursor: grab; }
.food-categories li.dragging { opacity: 0.5; outline: 2px dashed var(--border); }
.food-categories .drag-handle { display: inline-block; padding: 0 0.35rem; cursor: grab; color: var(--muted, inherit);
  letter-spacing: -0.2em; touch-action: none; user-select: none; }

/* v0.18.1 Part C: the admin pages dropdown (the phone's own picker), under the top bar */
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.25rem; }
.admin-nav-label { font-weight: 600; margin: 0; }
.admin-nav select { flex: 1 1 12rem; max-width: 22rem; min-height: 44px; font-size: 1rem; }

/* v0.18.1 Part G: the two audits (wide tables scroll inside their box; the page never scrolls sideways) */
.table-scroll { overflow-x: auto; max-width: 100%; }
.audit-detail { overflow-wrap: anywhere; max-width: 28rem; }
.audit-pick, .audit-retention { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1rem 0; }
.audit-pick select { flex: 1 1 14rem; max-width: 100%; min-height: 44px; }
.audit-retention .help { flex-basis: 100%; }
.activity-list li { display: block; }
.activity-when { margin-right: 0.35rem; }
.admin-nav-go[hidden] { display: none; }      /* the no-script "Go" (button.small would show it) */

/* v0.18.2: recipes */
.dish-recipe { margin-top: 0.25rem; }
.recipe-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.recipe-form fieldset { border: 0; padding: 0; margin: 0.75rem 0; }
.recipe-form fieldset label { display: block; }
.recipe a, .recipes a { overflow-wrap: anywhere; }

/* v0.18.3 Part 5: the admin pages WHEEL (like a date picker). Five rows show; the middle band marks
   the page in the centre; each row is a 48px touch target. Colours come from Canvas / CanvasText,
   so light and dark both work. Without the script it stays hidden and the dropdown shows. */
.admin-wheel { margin-top: 1.25rem; max-width: 22rem; }
.admin-wheel[hidden], .admin-nav[hidden] { display: none; }
.wheel-frame { position: relative; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.wheel-frame::before { content: ""; position: absolute; left: 0.5rem; right: 0.5rem; top: calc(50% - 24px); height: 48px;
  border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); border-radius: 6px;
  pointer-events: none; z-index: 1; }
.wheel { list-style: none; margin: 0; padding: 96px 0; height: 240px; box-sizing: border-box; overflow-y: auto;
  scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel-item { scroll-snap-align: center; height: 48px; }
.wheel-item a { display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 1rem;
  color: var(--ink); text-decoration: none; font-size: 1.05rem; border-radius: 6px; }
.wheel-item a.wheel-centered { font-size: 1.15rem; }
.wheel-item a[aria-current="page"] { font-weight: 700; color: var(--link); }
.wheel-item a:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }

/* v0.18.3 Part 2: the audit filters; Part 3: security alerts */
.audit-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; border: 1px solid var(--border);
  border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0; flex-basis: 100%; min-width: 0; }
.audit-filters select { flex: 1 1 12rem; max-width: 100%; min-height: 44px; }
.audit-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.audit-dates input { min-height: 44px; max-width: 100%; }
.audit-flag { white-space: nowrap; font-size: 0.9em; }
.alert-level { display: inline-block; margin-left: 0.35rem; font-size: 0.85em; color: var(--muted); }
.alert-critical .alert-level, .alert-status.alert-critical strong { color: var(--danger); }
.alert-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0; }
.alert-detail { overflow-wrap: anywhere; }
.alerts-table td { vertical-align: top; }
.thresholds input { max-width: 8rem; min-height: 44px; }
ul.plain { list-style: none; padding-left: 0; }

/* v0.18.4: the ingredient review (side by side; stacked on a phone), tags, the Recipe Box */
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 760px) { .review-grid { grid-template-columns: minmax(0, 1fr); } }
.review-source .recipe-text { max-height: 70vh; overflow: auto; }
/* R-234: on a computer BOTH columns scroll by themselves inside the page height (a phone: stacked, the page scrolls) */
@media (min-width: 761px) {
  .review-grid { column-gap: 3rem; }                 /* R-236: room for the red lines between the columns */
  .review-source, .review-lines { max-height: calc(100vh - 6rem); overflow-y: auto; overscroll-behavior: contain; }
  .review-source .recipe-text { max-height: none; overflow: visible; }
}
.review-text .src-row { display: block; }
/* a flagged line found in the text: red AND a bar on the left (never colour alone); the one being checked: stronger */
.review-text .src-flag { color: inherit; text-decoration: none; background: var(--danger-bg); border-left: 4px solid var(--danger);
  padding: 0.6rem 0.5rem; margin: 0.15rem 0; min-height: 44px; box-sizing: border-box; border-radius: 4px; }
.review-text .src-flag:hover, .review-text .src-flag:focus-visible { text-decoration: underline; }
.review-text .src-flag.src-current { border-left-width: 8px; outline: 2px solid var(--danger); outline-offset: 1px;
  font-weight: 600; }
.review-line.flagged { border-left-width: 6px; }
.review-show { display: inline-flex; align-items: center; min-height: 44px; }
/* R-236: the red lines from each marked recipe line to its card (a computer only; drawn by review-lines.js; never
   catches a click; hidden from screen readers) */
.review-links { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; overflow: visible; pointer-events: none;
  z-index: 5; }
.review-links .review-link { fill: none; stroke: var(--danger); stroke-width: 1.5; stroke-linecap: round; }
.review-links .review-link.chosen { stroke-width: 3.5; }
@media (max-width: 760px) { .review-links { display: none; } }
.review-line { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0.5rem 0; min-width: 0; }
.review-line.flagged { border-color: var(--danger); background: var(--danger-bg); }
.review-line input[type=text], .review-line input:not([type]) { width: 100%; max-width: 100%; box-sizing: border-box; }
.tag { display: inline-block; padding: 0.1rem 0.5rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.9em; }
.recipe-tags fieldset, .box-search fieldset { border: 0; padding: 0; margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.box-list { list-style: none; padding: 0; }
.box-recipe p { margin: 0.25rem 0; }
.recipe-reading-note { display: block; }

/* v0.19.0: event photos */
.photo-grid { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.photo-cell { position: relative; margin: 0; }
.photo-cell img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--border); }
.photo-cell.pending img { opacity: 0.7; }
.photo-meta { display: block; font-size: 0.85em; color: var(--muted, inherit); }
.photo-full { padding: 0.5rem; }
.photo-big { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 6px; }
.photo-caption { font-size: 1.05em; margin: 0.5rem 0; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.heart-btn { min-height: 44px; min-width: 64px; font-size: 1.1em; }
.heart-btn.on { background: var(--accent); color: #fff; }
.photo-comment { border-top: 1px solid var(--border); padding: 0.25rem 0; }
.photo-review { list-style: none; padding: 0; }
.photo-review-item { display: flex; gap: 0.75rem; align-items: flex-start; margin: 0.75rem 0; flex-wrap: wrap; }
.photo-review-item img { border-radius: 6px; object-fit: cover; max-width: 40vw; height: auto; }
/* v0.22.4 (R-043): the camera-heart sits AFTER search and matches the search button exactly (44 x 44, a circle in
   the interface color with a white icon). */
.favorites-heart { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  padding: 0; line-height: 1; text-decoration: none; background: var(--accent); color: #fff; border-radius: 50%; }
.favorites-heart svg { display: block; }
.search-wrap > .search-toggle, .search-wrap > .favorites-heart { margin: 0; }   /* one line: no button margin */
.search-wrap { display: flex; align-items: center; flex-wrap: wrap; }
.photo-strip { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.photo-strip img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
@media (max-width: 760px) { .favorites-strip { display: none; } }
.event-cover { border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 0.35rem; }
.cell-cover { border-radius: 3px; margin-right: 0.2rem; }
/* v0.19.0.1: photos from deleted events (admins) */
.held-actions, .held-release { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.25rem 0; }
.held-release select { max-width: 100%; min-height: 44px; }
.held-thumbs { list-style: none; padding: 0; margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 6px; }
.held-thumbs img { display: block; border-radius: 6px; object-fit: cover; }

/* v0.19.0.3: the leaving page's two buttons, the text centered (a.button's inline-block used to beat .care-big's flex:
   "Go back" sat top-left in a 6rem box); at least 48 px high, full width on phones. */
.leaving-actions { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0 0; }
a.button.leaving-btn { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px;
  margin: 0; padding: 0.5rem 1rem; font-size: 1.15rem; font-weight: 700; border-radius: 10px; box-sizing: border-box; }
a.button.secondary.leaving-btn { font-weight: 600; }
a.button.care-big { display: flex; padding: 0.5rem 1rem; margin-right: 0; }   /* the same centering bug elsewhere */
.held-keep input[type=range] { width: 100%; min-height: 44px; }
.held-scale { display: flex; justify-content: space-between; margin: 0; }
.recipe-photo { display: block; max-width: 100%; height: auto; border-radius: 6px; }
/* v0.19.0.3: "+ Add the recipe" inside the "Add a dish" form */
.dish-recipe-add { margin: 0.5rem 0; }
.dish-recipe-open { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--link); font-weight: 600; }
.dish-recipe-choices { display: grid; gap: 0.35rem; border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0; min-width: 0; }
.dish-recipe-choices textarea, .dish-recipe-choices input[type=url], .dish-recipe-choices select, .dish-recipe-choices input[type=file] { width: 100%; max-width: 100%; box-sizing: border-box; }
.dish-recipe-how { display: flex; align-items: center; gap: 0.4rem; min-height: 44px; }

/* v0.19.1: "?" help bubbles (help-bubbles.js; with no scripts the text just shows) and fold rows */
.help-q { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-width: 28px;
  margin: 0 0 0 0.4rem; padding: 0; border-radius: 50%; border: 1.5px solid var(--link); background: transparent;
  color: var(--link); font-size: 0.95rem; font-weight: 700; line-height: 1; vertical-align: middle; cursor: pointer;
  position: relative; }
.help-q::after { content: ""; position: absolute; inset: -8px; }          /* a 44 px tap target */
.help-q[aria-expanded="true"] { background: var(--link); color: var(--surface); }
.js-help .help-pop { display: none; }
.js-help .help-pop.help-open { display: block; position: fixed; z-index: 60; margin: 0; padding: 0.6rem 0.75rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); font-size: 0.95rem; box-sizing: border-box; max-height: 60vh; overflow: auto; }
details.fold { border: 1px solid var(--border); border-radius: 10px; margin: 0.75rem 0; padding: 0 0.75rem; }
details.fold > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600;
  list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "\25B8"; margin-left: auto; transition: transform 0.15s; }
details.fold[open] > summary::after { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { details.fold > summary::after { transition: none; } }   /* v0.22.3 */
details.fold[open] { padding-bottom: 0.5rem; }
details.fold > summary h2, details.fold > summary h3 { margin: 0; font-size: inherit; }
/* v0.22.4 (R-046): a page section folded by its own heading (the event page's Dish list, Photos ...): no box of its
   own (the section is the card), the heading keeps its size; Expand all / Collapse all (static/folds.js). */
details.fold.section-fold { border: 0; padding: 0; margin: 0; }
details.fold.section-fold > summary h2 { font-size: 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
details.fold.section-fold[open] { padding-bottom: 0; }
.fold-all { display: flex; gap: 1rem; margin: 0.25rem 0 0.75rem; }
.fold-all button.link { min-height: 44px; }
.help-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0 0.25rem; }
.help-head > h1, .help-head > h2, .help-head > h3, .help-head > h4, .help-head > label { margin-right: 0.15rem; }
.event-card > .help-head > h2 { font-size: 1.25rem; margin: 0.75rem 0 0.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; }
details.fold > .help-q, details > summary + .help-q { margin: 0.25rem 0 0.25rem 0; }

/* ---- v0.20.3: the bell (was "Updates"): a red count only when something is unread -------------------------------- */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px;
  min-height: 44px; text-decoration: none; }
.bell-icon { font-size: 1.25rem; line-height: 1; }
.bell .count { position: absolute; top: 2px; right: -4px; background: #c62828; color: #fff; min-width: 1.35em;
  height: 1.35em; font-size: 0.75rem; box-shadow: 0 0 0 2px var(--surface); }
.bell.active .bell-icon { filter: drop-shadow(0 2px 0 currentColor); }

/* ---- v0.20.3: past events grayed out (month grid, week strip, day list, list view, Upcoming): about half strength,
   colour muted, still a link. The text keeps >= 4.5:1 in light and dark; high-contrast mode keeps full colours. ---- */
/* P-81 (R-280, the owner, Nov 14): past events in DARK PURPLE: the title, time and place line, and every dot (each keeps
   its shape: the organizer's diamond, the co-organizer's ring), plain, full strength, no glow and never black. Light:
   #45206a (9.6:1 or more on every Look's page, card, panel and the chosen day; clearly darker than the plum links);
   dark: #b3a0d2, a soft lavender (5.5:1 or more, Crystal's blue panel included; greyer than the bright links). The
   caregiver mark (black dot, purple glow, its tag) keeps the GREY it had (--past-gray), so the two never look alike.
   Care pages (neither a Look nor Classic's marker) keep their grey rows. Photos, type icons and tags stay greyed. */
:root { --past-gray: color-mix(in srgb, var(--ink) 60%, var(--surface)); --past-text: var(--past-gray);
  --past-purple: #45206a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --past-purple: #b3a0d2; } }
:root[data-theme="dark"] { --past-purple: #b3a0d2; }
:root[data-classic] { --past-text: var(--past-purple); }           /* (a Look: the same in looks.css) */
:where(#care, #care-reminder, .care-leaving) { --past-text: var(--past-gray); }
/* Event rows only (li.past) and the strip's marks: the Past events page (section.past) is not grayed as a whole. */
li.past, li.past a, li.past .event-time, li.past .event-title, li.past .help { color: var(--past-text); }
li.past img, li.past .dot, li.past .type-icon, .marks .past, li.past .tag, li.past .extra-mark { filter: grayscale(1); opacity: 0.55; }
:root[data-classic] .marks .past { filter: none; opacity: 1; color: var(--past-text); }
:root[data-classic] :is(li.past:not(section.past li, .caring-item, :where(#care, #care-reminder, .care-leaving) li), .marks .past) .dot {
  filter: none; opacity: 1; background: var(--past-text); background-image: none; border-color: var(--past-text); }
:root[data-classic] :is(li.past:not(section.past li, .caring-item, :where(#care, #care-reminder, .care-leaving) li), .marks .past) .dot.dot-sub {
  background: transparent; }   /* (round 1: as heavy as the rule above, so the ring stays a ring) */
/* (Nov 12) a past row's place line (.help) and a past holiday's or moon day's mark gray too: "everything in the past" */
li.past .event-title { font-weight: inherit; }
section.past li.past, section.past li.past a, section.past li.past .event-title { color: inherit; }
section.past li.past img, section.past li.past .dot, section.past li.past .type-icon, section.past li.past .extra-mark { filter: none; opacity: 1; }
section.past li.past .help { color: var(--muted); }
section.past li.past .event-time { color: var(--past-gray); }   /* (P-81 round 1: the Past events page as before: grey times) */
/* P-81 round 1: the caregiver's Today screen keeps its grey past rows (the purple is for the calendar) */
li.caring-item.past { --past-text: var(--past-gray); }
@media (forced-colors: active) {
  li.past, li.past a { color: var(--ink); }
  li.past img, li.past .dot, .marks .past, li.past .extra-mark { filter: none; opacity: 1; }
  li.past .event-title { text-decoration: line-through; }
  section.past li.past .event-title { text-decoration: none; }
}
.upcoming .day-head { font-size: 1.35rem; margin: 1.1rem 0 0.4rem; }
.upcoming .day-head:first-of-type { margin-top: 0.4rem; }
/* v0.27.29: Upcoming is a fold (closed at first); open, its days scroll inside their own box, never the whole page */
details.upcoming-fold > summary h2 { font-size: 1.5rem; }
details.upcoming-fold > summary { gap: .25rem .75rem; flex-wrap: wrap; align-items: baseline; }
.upcoming-scroll { max-height: min(60vh, 34rem); overflow-y: auto; overscroll-behavior: contain; margin-top: .5rem;
  padding: 0 .5rem 0 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.upcoming-scroll:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
/* (gate round 1) on a phone the top bar and the week strip stay pinned: the box fits under them, in the SMALL viewport
   (with the browser's own bars showing; a browser that does not know svh keeps the 60vh rule above: gate round 2);
   printed while open, the whole list */
@supports (height: 1svh) {
  @media (max-width: 640px) {
    .upcoming-scroll { max-height: min(60svh, calc(100svh - var(--topbar-height) - var(--safe-top) - var(--weekstrip-height) - 2rem), 34rem); }
  }
}
@media print { .upcoming-scroll { max-height: none; overflow: visible; } }

/* ---- v0.20.3: the current choice in a section's header row ("On", "2 hours", a color bubble, the icon) --------- */
.current-value { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.5rem; padding: 0.05rem 0.55rem;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 25%, var(--surface)); font-size: 0.85rem;
  font-weight: 600; vertical-align: middle; color: var(--ink); }
.current-value:empty { display: none; }
.current-value .dot { width: 0.9rem; height: 0.9rem; }
.current-value .icon-current { border-radius: 6px; }
details.fold > summary:not(:has(h2, h3)) { font-weight: 600; }


/* ---- v0.20.3: the Photos page (album cards) ----------------------------------------------------------------------- */
/* v0.20.3: the Photos page (albums). Merged into style.css by the release. */
.albums-tools { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin: .5rem 0 1rem; }
.albums-search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.albums-search label { width: 100%; }
.albums-search input[type=search] { min-width: 0; flex: 1 1 12rem; }
/* v0.27.28 (R-253): the Photos page's timeline: one remembered fold per year (oldest first, the current year open);
   "New": a red dot WITH the word (never colour alone; the dot stays in forced colours); Delete under a past album */
details.albums-year { margin-top: .5rem; }
details.albums-year > summary { gap: .25rem .75rem; flex-wrap: wrap; align-items: baseline; }
details.albums-year > summary h2 { font-size: 1.2rem; margin: 0; }
details.albums-year > .album-grid { margin: .5rem 0 1rem; }
.album-item { display: flex; flex-direction: column; gap: .35rem; }
.album-item .album-card { flex: 1 1 auto; }
.album-item a.button.past-delete { align-self: flex-start; }
.new-mark { display: inline-flex; align-items: center; gap: .35em; color: var(--danger); font-weight: 700; }
.new-dot { flex: none; width: .7em; height: .7em; border-radius: 50%; background: var(--danger); }
.album-new { padding: 0 .5rem .5rem; }
@media (forced-colors: active) { .new-dot { forced-color-adjust: none; } }   /* (its red kept: a forced background
   would hide it; the word "New" beside it takes the forced text colour) */
.album-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); }
.album-card { display: flex; flex-direction: column; gap: .25rem; text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: .5rem; overflow: hidden; min-height: 44px; }
.album-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.album-card:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
/* P-102: the Photos page shows only the most recent albums at first (12 on a PC, 5 on a phone; the server marks the
   older ones and their years); "Show more albums" shows every one. A search is never capped. */
.album-item.album-older, details.albums-year.albums-year-older, .albums-more.albums-more-phone, .albums-of-phone,
.albums-more-note-phone { display: none; }
.albums-more { margin: 1rem 0 0; }
@media (max-width: 640px) {
  .album-item.album-older-phone, details.albums-year.albums-year-older-phone { display: none; }
  .albums-more.albums-more-phone { display: block; }
  .albums-of-phone, .albums-more-note-phone { display: inline; }
  .albums-of-pc { display: none; }
}
/* P-101: the Favorite Family Photos Spotlight (static/spotlight.js swaps the photo: no transition of any kind) */
.spotlight { margin: 0 0 1.25rem; }
.spotlight h2 { margin: 0 0 .25rem; }
.spotlight-photos { list-style: none; margin: .5rem 0 0; padding: 0; }
.spotlight-item[hidden] { display: none; }
.spotlight-link { display: block; width: fit-content; max-width: 100%; margin: 0 auto; border-radius: .5rem;
  overflow: hidden; }
.spotlight-link:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.spotlight-link img { display: block; width: auto; max-width: 100%; height: auto; max-height: 70vh; margin: 0 auto;
  object-fit: contain; }
.spotlight-caption { margin: .4rem 0 0; text-align: center; overflow-wrap: anywhere; }
.spotlight-controls { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center;
  margin: .5rem 0 0; }
.spotlight-controls[hidden] { display: none; }
.spotlight-controls button { min-height: 44px; min-width: 44px; }
.album-title { font-weight: 600; padding: .25rem .5rem 0; overflow-wrap: anywhere; }
.album-meta { font-size: .9em; padding: 0 .5rem .5rem; opacity: .85; }


/* ---- v0.20.3: Birthdays I follow ---------------------------------------------------------------------------------- */
/* v0.20.3 "Birthdays I follow" (the parent merges this into style.css) */
.fold-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.fold-head h3 { margin: 0; }
.fold-current { color: var(--muted, #555); font-size: .95em; }
.birthdays-follow-table { width: 100%; border-collapse: collapse; margin: .5rem 0; }
.birthdays-follow-table th, .birthdays-follow-table td { padding: .45rem .3rem; border-bottom: 1px solid var(--border, #ddd); text-align: left; }
.birthdays-follow-table td { text-align: center; width: 5.5rem; }
.birthdays-follow-table input[type=checkbox] { width: 1.4rem; height: 1.4rem; }
.birthdays-list li { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.birthday-hide button.small { font-size: .85em; }


/* ---- v0.22.0: My Rolodex (recipes/index.html), the card (view.html), the picker, the share dialog ---------------- */
.rolodex-page .card { margin-top: 1.5rem; }
.rolodex-head h1 { margin-top: 0.5rem; }
.rolodex-add-form input[type=url], .rolodex-add-form input[type=file], .recipe-form input[type=url],
.recipe-form input[type=file] { width: 100%; max-width: 100%; box-sizing: border-box; }
.rolodex-search { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: end; }
.rolodex-search label { width: 100%; margin-top: 0.5rem; }
.rolodex-search label.check { width: auto; min-height: 44px; margin-top: 0; }
.rolodex-search input[type=search] { flex: 1 1 14rem; min-width: 0; padding: 0.55rem; font: inherit; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--ink); }
.rolodex-search select { min-height: 44px; max-width: 100%; }
.rolodex-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 0; }
.rolodex-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.8rem; border: 1px solid var(--border);
  border-radius: 999px; text-decoration: none; }
.rolodex-tabs a[aria-current="page"] { background: var(--link); border-color: var(--link); color: var(--surface); font-weight: 600; }
.rolodex-areas { display: grid; gap: 0 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .rolodex-areas { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  /* the Shared area stays in view beside a long Not shared list, so a card can always be dropped on it */
  .rolodex-area-shared { position: sticky; top: calc(var(--topbar-height) + var(--safe-top) + 0.5rem);
    max-height: calc(100vh - var(--topbar-height) - var(--safe-top) - 1rem); overflow-y: auto; }
}
.rolodex-area { border: 2px dashed transparent; border-radius: 12px; padding: 0 0.5rem 0.5rem; min-width: 0; }
.rolodex-area h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; font-size: 1.25rem; }
.rolodex-area-shared { background: color-mix(in srgb, var(--link) 6%, var(--surface)); }
.rolodex-drop-over { border-color: var(--link); background: color-mix(in srgb, var(--link) 14%, var(--surface)); }
.rolodex-drag-hint { display: none; }
@media (hover: hover) and (pointer: fine) { .rolodex-drag-hint { display: block; } }
.rolodex-section h3 { margin: 1rem 0 0.25rem; }
.letter-tabs { display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0.25rem 0 0.5rem; font-size: 0.85rem; }
.letter-tabs a, .letter-tabs span { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9rem;
  min-height: 1.9rem; border-radius: 6px; }
.letter-tabs a { font-weight: 700; text-decoration: none; border: 1px solid var(--border); }
.letter-tabs span { color: var(--muted); opacity: 0.6; }
.letter-head { margin: 0.5rem 0 0.25rem; font-size: 0.9rem; color: var(--muted); }
.rolodex-cards, .picker-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.rolodex-card { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding: 0.45rem 0.6rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-width: 0; }
@media (hover: hover) and (pointer: fine) { .rolodex-card { cursor: grab; } }
.rolodex-card-title { flex: 1 1 10rem; min-width: 0; font-weight: 600; overflow-wrap: anywhere; display: inline-flex;
  align-items: center; min-height: 44px; }
.rolodex-card-meta { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.rolodex-card-meta .tag { margin-left: 0; }
.rolodex-card .rolodex-share-button { min-height: 44px; }
.rolodex-suggested { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.stars { color: var(--c-amber); letter-spacing: 0.05em; }
.tag-event { white-space: normal; overflow-wrap: anywhere; }
.rolodex-dragging { opacity: 0.4; }
.rolodex-ghost { position: fixed; z-index: 70; pointer-events: none; margin: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  list-style: none; cursor: grabbing; }
.rolodex-drag-on, .rolodex-drag-on * { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.share-dialog { width: min(28rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--ink); }
.share-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.share-dialog-panel { padding: 1rem 1.25rem; }
.share-dialog-panel h2 { margin: 0 0 0.5rem; font-size: 1.2rem; overflow-wrap: anywhere; }
.share-dialog-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.share-dialog-buttons button, .share-dialog-buttons .button { margin: 0.5rem 0 0; min-height: 44px; }
.recipe-private-label { color: var(--ink); font-weight: 600; }
.card-facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.5rem 0; }
.card-facts div { display: flex; gap: 0.35rem; }
.card-facts dt { color: var(--muted); }
.card-facts dd { margin: 0; font-weight: 600; }
.card-sections .tag { margin: 0 0.25rem 0.25rem 0; }
.card-suggested { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.card-rating select { min-height: 44px; }
.check-list { border: 0; padding: 0; margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.check-list label.check { min-height: 44px; }
.card-photo { max-height: 22rem; object-fit: cover; }
.make-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.make-form label:not(.visually-hidden) { width: 100%; }
.make-form input[type=range] { flex: 1 1 12rem; min-height: 44px; min-width: 0; }
.make-form input[type=number] { width: 5.5rem; min-height: 44px; padding: 0.4rem; font: inherit; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--ink); }
.make-wrap { overflow-x: auto; max-width: 100%; }
.make-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.make-table th, .make-table td { text-align: left; padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--border);
  vertical-align: top; overflow-wrap: anywhere; }
/* v0.27.3 (R-194, R-209): group headings (display only) and the NOT ADJUSTED tag (words and a border, never colour alone) */
.make-table tr.make-group th { padding-top: 0.75rem; font-weight: 700; }
.ingredient-heading { margin: 0.75rem 0 0.25rem; font-size: 1rem; font-weight: 700; }
.not-adjusted { display: inline-block; font-size: 0.75em; font-weight: 700; letter-spacing: 0.02em; line-height: 1.3;
  padding: 0 0.3em; border: 1px solid currentColor; border-radius: 4px; white-space: nowrap; }
.edit-times { display: flex; flex-wrap: wrap; gap: 0 0.75rem; }
.edit-times span { flex: 1 1 7rem; min-width: 0; }
/* v0.27.7 (R-216): the recipe card's one "More" fold: its parts set apart by a line, Delete the very last and further
   away; the notice for someone who turned "Email adjusted amounts" off shows only when the servings change */
details.card-more > summary h2 { font-size: 1.25rem; }
.card-more-part { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 0.25rem; }
.card-more-part > h3 { margin-top: 0.75rem; }
.card-more-delete { margin-top: 2.5rem; }
.email-original-only .notice[hidden] { display: none; }
.edit-times input { width: 100%; }
.picker-section { border: 1px solid var(--border); border-radius: 10px; margin: 0.4rem 0; padding: 0 0.75rem; }
.picker-section > summary { display: flex; align-items: center; gap: 0.4rem; min-height: 44px; cursor: pointer;
  font-weight: 600; list-style: none; }
.picker-section > summary::-webkit-details-marker { display: none; }
.picker-section > summary::after { content: "\25B8"; margin-left: auto; transition: transform 0.15s; }
.picker-section[open] > summary::after { transform: rotate(90deg); }
.picker-section[open] { padding-bottom: 0.5rem; }
.picker-card { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 44px; margin: 0; padding: 0.35rem 0.6rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); text-align: left;
  font-weight: 500; overflow-wrap: anywhere; cursor: pointer; }
button.picker-card { font: inherit; }
.picker-card:has(input:checked) { border-color: var(--link); box-shadow: inset 0 0 0 2px var(--link); }
.picker-attach { margin: 0; }
.picker-none { min-height: 44px; }
.rolodex-picker input[type=search] { width: 100%; padding: 0.55rem; font: inherit; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--ink); }
.imported-skipped li { margin: 0.3rem 0; overflow-wrap: anywhere; }

/* ---- v0.22.0: Save to HFE Rolodex ---- */
/* The setup page (numbered steps, the drag button, the code box) and the review page (/recipes/capture). Phone first;
   Canvas / CanvasText colors, so light and dark both work. */
.save-hfe-steps { padding-left: 1.4rem; }
.save-hfe-steps > li { margin: 0.6rem 0; overflow-wrap: anywhere; }
.save-hfe-steps kbd, .save-hfe kbd { display: inline-block; padding: 0 0.35rem; border: 1px solid var(--border);
  border-radius: 4px; font: inherit; font-size: 0.9em; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); }
.save-hfe-drag { margin: 0.6rem 0; }
a.button.save-hfe-bookmarklet { display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1.1rem;
  cursor: grab; font-weight: 600; }
.save-hfe-note { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0; }
.save-hfe-note.save-hfe-note-on { color: var(--ink); font-weight: 600; }
.save-hfe-code { margin: 0.75rem 0; max-width: 100%; }
.save-hfe-code label { display: block; margin-top: 0.4rem; font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.save-hfe-copy { min-height: 44px; }
.save-hfe-copy[hidden] { display: none; }
.save-hfe-copied { margin-left: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.save-hfe-textarea { width: 100%; max-width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem; word-break: break-all; }
.save-hfe-facts { padding-left: 1.2rem; }
.save-hfe-facts li { margin: 0.5rem 0; }
.capture-form[hidden], #capture-empty[hidden], #capture-text-part[hidden] { display: none; }
.capture-form label { display: block; margin-top: 0.75rem; }
.capture-form input[type=text], .capture-form textarea, .capture-form select { width: 100%; max-width: 100%; }
.capture-form h3 { margin: 1rem 0 0; font-size: 1rem; }
.capture-form h3 label { margin-top: 0; }
.capture-from { margin: 0.25rem 0; overflow-wrap: anywhere; }
.capture-source { color: var(--muted); word-break: break-all; }
.capture-text-note { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0; }
/* v0.27.48 (Karl): Save / Save and go back / Save and close tab, side by side, wrapping on a phone; the saved page */
.capture-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.capture-buttons button { min-height: 44px; }
.capture-buttons-help { margin-top: 0.5rem; }
.capture-saved-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.capture-saved-links .button { min-height: 44px; display: inline-flex; align-items: center; }
.capture-form button[type=submit] { margin-top: 1rem; min-height: 44px; }
/* ---- v0.22.0: import preview ---- */
.import-summary { margin: 0.5rem 0; }
.import-list-heading, .import-skipped-heading { margin-top: 1.5rem; font-size: 1.15rem; }
.import-rows { display: grid; gap: 0.6rem; margin: 0.5rem 0; }
.import-row { border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.75rem; background: var(--surface);
  color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.import-row:has(.import-pick input:checked) { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.import-row.import-dup { border-style: dashed; }
.import-row.import-dup:has(input[value=new]:checked) { border-style: solid; border-color: var(--link); }
.import-pick { min-height: 44px; margin-top: 0; font-weight: 600; }
.import-pick input, .import-dup-choice input { width: 1.25rem; height: 1.25rem; flex: none; margin: 0; }
p.import-title { font-weight: 600; margin: 0.4rem 0 0.1rem; }
.import-dup-note { margin: 0.1rem 0 0.25rem; color: color-mix(in srgb, var(--c-amber) 62%, var(--ink)); font-weight: 600; }
.import-dup-choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.import-dup-choice legend { padding: 0; font-size: 0.9rem; color: var(--muted); }
.import-dup-choice label.check { min-height: 44px; margin-top: 0; }
.import-facts { display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; margin: 0.25rem 0; font-size: 0.92rem; }
.import-facts > div { display: flex; gap: 0.3rem; min-width: 0; }
.import-facts dt { color: var(--muted); font-weight: 400; }
.import-facts dt::after { content: ":"; }
.import-facts dd { margin: 0; min-width: 0; }
.import-facts .import-section { font-weight: 600; }
.import-facts .import-section .help { font-weight: 400; margin: 0; }
.import-dropped { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.import-actions { margin-top: 1rem; }
.import-actions button { width: 100%; min-height: 48px; margin: 0; }
.import-cancel { margin-top: 0.5rem; }
.import-cancel button { width: 100%; min-height: 44px; margin: 0; }
@media (min-width: 700px) {
  .import-actions button, .import-cancel button { width: auto; }
}
/* ---- end v0.22.0: import preview ---- */

/* ---- v0.22.3: the Rolodex page's folds (Add a recipe, Find a card) ---- */
.rolodex-head details.fold, .rolodex-find details.fold, .rolodex-add-card details.fold { margin: 0.75rem 0 0.5rem; }
.rolodex-head details.fold > summary h2, .rolodex-find details.fold > summary h2,
.rolodex-add-card details.fold > summary h2 { display: flex; flex-wrap: wrap;
  align-items: center; gap: 0.3rem; font-size: 1.15rem; }
details.fold.rolodex-add > h3, details.fold.rolodex-add h3 { margin: 1rem 0 0.25rem; font-size: 1rem; }
.rolodex-filtered { margin: 0.25rem 0 0.5rem; overflow-wrap: anywhere; }

/* ---- v0.22.2: "This takes a little time" (recipes/_reading_time.html) and the card's own reading status ---- */
.reading-time { margin: 0.75rem 0; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 6px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--ink); overflow-wrap: anywhere; }
.reading-time > h2, .reading-time > h3, .reading-time > h4 { margin: 0 0 0.35rem; font-size: 1rem; }
.reading-time p { margin: 0.3rem 0; }
.reading-status { margin: 0.5rem 0; overflow-wrap: anywhere; }
.reading-status-label { font-weight: 600; }
.tag.reading-state { margin-left: 0; font-weight: 600; color: var(--ink); }
.reading-state-reading, .reading-state-waiting { border-color: var(--accent); }
.reading-state-check { border-color: var(--c-amber); }
.reading-state-ready { border-color: var(--c-green); }

/* ---- v0.23.0: time zones ---- */
/* R-064: My profile's box (green when the same, red when not) and the calendar's slim banner */
.zone-box.zone-same { border-left: 6px solid var(--c-green); }
.zone-box.zone-differ { border-left: 6px solid var(--danger); }
/* v0.23.1 (R-062, R-208): the travel prompt card, the away clock chip, the time zone switches */
.travel-answers { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.travel-answers button { margin-top: 0; }
.travel-answers button.link { min-height: 44px; }
.away-clock { margin: 0.5rem 0 0; text-align: right; }
.away-clock a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem; border: 1px solid var(--border);
  border-radius: 999px; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.away-clock a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.zone-settings fieldset { border: 0; padding: 0; margin: 0.75rem 0 0; }
.zone-settings legend { font-weight: 600; }
.zone-settings label.check { min-height: 44px; }
.zone-banner { margin: 0 0 0.5rem; padding: 0.35rem 0.6rem; border-left: 4px solid var(--danger); font-size: 0.95rem; }

/* ---- v0.24.2: Admin > Current health check ---- */
/* Every level is also said in words (the badge text); the colours only help. */
.hc-level { display: inline-block; padding: 0 0.4rem; border-radius: 0.3rem; font-weight: 600; font-size: 0.9rem; border: 1px solid var(--border); }
.hc-level.hc-ok { border-color: var(--c-green); }
.hc-level.hc-amber { border-color: var(--c-amber); background: color-mix(in srgb, var(--c-amber) 15%, var(--surface)); }
.hc-level.hc-red { border-color: var(--danger); background: var(--danger-bg); }
.hc-level.hc-unknown { border-style: dashed; }
.hc-headline { font-size: 1.15rem; padding: 0.4rem 0.6rem; border-left: 6px solid var(--c-green); }
.hc-headline.hc-amber { border-left-color: var(--c-amber); }
.hc-headline.hc-red { border-left-color: var(--danger); }
.hc-looks, .hc-list, .hc-cores, .hc-procs { padding-left: 1.2rem; }
.hc-cores { list-style: none; padding-left: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.2rem 0.8rem; }
.hc-cores meter { width: 4rem; vertical-align: middle; }
.hc-core-label { font-size: 0.85rem; }
.hc-spark { height: 2.5rem; max-width: 100%; }
.hc-spark-svg { width: 100%; height: 100%; }
.hc-spark-svg polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hc-table { border-collapse: collapse; width: 100%; }
.hc-table th, .hc-table td { padding: 0.25rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }

/* ---- v0.22.7 (R-186, R-210): caregiver extras ---- */
/* R-226 release 2 (R-241, D-72): the caregiver mark, on an event a caregiver made, changed or put back, for the person and
   their caregivers only: a small BLACK DOT WITH A PURPLE GLOW and a text tag ("Added by caregiver" / "Changed by caregiver"),
   never colour alone. It replaces R-210's red. The glow carries the dot on dark pages; the tag's words use the page's own
   text colour (full contrast in every Look, light and dark), its outline the glow colour. A past row grays like every past row.
   The week strip's tiny dots carry no mark, and the month grid shows the dot alone (no room for the words; they stay for
   screen readers): the day's list, the list view and the event page show the words. */
:root { --care-glow: #7b2fbf; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --care-glow: #c58cff; } }
:root[data-theme="dark"] { --care-glow: #c58cff; }
.care-mark-wrap { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 0.3rem; vertical-align: middle; }
.care-mark { display: inline-block; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #000;
  box-shadow: 0 0 0 2px var(--care-glow), 0 0 6px 2px var(--care-glow); }
.care-mark-tag { display: inline-block; padding: 0 0.35rem; border: 1px solid var(--care-glow); border-radius: 4px;
  font-size: 0.8rem; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.cell-events .care-mark-wrap { display: inline; margin-right: 0.2rem; }   /* the month grid: no room for the words: the dot alone */
.cell-events .care-mark { vertical-align: middle; }
.cell-events .care-mark-tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; padding: 0; border: 0; }
li.past .care-mark-tag { color: var(--past-gray); border-color: var(--past-gray); }   /* (P-81: grey, as before) */
li.past .care-mark { box-shadow: 0 0 0 2px var(--past-gray); }
/* The Today screen (a normal page: every Look applies): large type, the next thing marked by a thick edge AND the word
   "Next" (or "Now"); nothing moves. Overlap warnings: a "!" mark and the words, never colour alone. */
.caring-today { font-size: 1.2rem; }
.caring-date { font-size: 1.3rem; font-weight: 600; margin-top: 0; }
.caring-list { list-style: none; margin: 1rem 0; padding: 0; }
.caring-item { padding: 0.75rem 0.9rem; margin: 0 0 0.75rem; border: 1px solid var(--border); border-radius: 8px; }
.caring-item p { margin: 0.2rem 0; }
.caring-item.caring-next { border: 4px solid var(--link); }
.caring-next-word { font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.caring-time { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.caring-title { font-size: 1.5rem; overflow-wrap: anywhere; }
.caring-title a { display: inline-block; min-height: 44px; }
.caring-taker { font-size: 1.2rem; }
.caring-change summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.caring-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.caring-pick select { min-height: 44px; max-width: 100%; }
.caring-warning { padding: 0.5rem 0.75rem; border: 2px solid var(--danger); border-radius: 8px; background: var(--danger-bg);
  color: var(--ink); font-weight: 600; }
.caring-mark { display: inline-flex; align-items: center; justify-content: center; width: 1.4em; height: 1.4em;
  margin-right: 0.4rem; border-radius: 50%; background: var(--danger); color: var(--surface); font-weight: 800; }
.caring-people { list-style: none; padding: 0; }
.caring-people li { margin: 0 0 0.75rem; }
.caring-event { margin-top: 1rem; }

/* ---- v0.27.6 (R-212, D-21, D-39): Classic's own three findings, fixed. Classic only (<html data-classic>: no Look,
   not a care page) and never a care section on a shared page: a Look and every care page stay exactly as they are.
   tests/looks/test_classic.py checks the colours; the browser check now holds Classic to 44 px and 4.5:1 too. ---- */
/* 1. the error words OUTSIDE forms: #b4532a is 3.76:1 on dark; a lighter tone in dark mode only (5.97:1). Inside a form
   the errors keep form .error's own colour (var(--danger)), as before. */
@media (prefers-color-scheme: dark) {
  :root[data-classic]:not([data-theme="light"]) .error:not(:where(form, #care, #care-reminder, .care-leaving) *) {
    color: #d9774c; } }
:root[data-classic][data-theme="dark"] .error:not(:where(form, #care, #care-reminder, .care-leaving) *) { color: #d9774c; }
/* 2. a past event on a chosen (or today's) tinted day: 65% ink instead of 60% (5.1:1 or more in every colour) */
:root[data-classic] .cell.chosen { --past-gray: color-mix(in srgb, var(--ink) 65%, var(--surface)); }   /* (P-81: the care mark's) */
/* 3. touch targets: buttons, fields, file pickers and search boxes at least 44 px tall (the same list of exceptions as
   the Looks: link-style, icon, close, heart, picker and help buttons keep their own size). In :where(), so it adds no
   weight: a control that was already taller (the 56 px passkey button, the 48 px import buttons) stays as it was. */
:where(:root[data-classic]) :where(button:not(.link, .icon-button, .search-toggle, .update-bar-close, .required-bar-close, .heart-btn, .picker-card, .help-q, .guest-x):not(:where(#care, #care-reminder, .care-leaving) *)) { min-height: 44px; }
:where(:root[data-classic]) :where(:is(input:not([type="hidden"], [type="radio"], [type="checkbox"], [type="range"]), select, textarea):not(:where(#care, #care-reminder, .care-leaving) *)) { min-height: 44px; }

/* ---- v0.27.2 (R-206): the Nature background's settings (My profile > Look and logo, and the place screen) ------- */
.nature-form { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 0.5rem; }
.nature-way { margin-top: 1.75rem; }
.nature-way h2 { margin-bottom: 0.25rem; }
.nature-promise { padding-left: 1.25rem; margin: 0.5rem 0; }
.nature-promise li { margin: 0.25rem 0; }
.nature-zip-form input { max-width: 10rem; }
/* R-269: the Nature background's first-time card (looks/_nature_ask.html) */
.nature-ask form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.5rem 0.75rem 0.5rem 0; }
.nature-ask .nature-zip-form .nature-note { flex-basis: 100%; margin: 0; }
.nature-other { margin: 0.75rem 0 0; }
.nature-other a { display: inline-block; padding: 0.6rem 0; }     /* a comfortable tap */

/* ---- P-80 (R-271): the shopping list. Tap targets 44 px; a checked item is struck through AND says "Checked off"
   (its section), never colour alone; works in every Look, light and dark (the page's own tokens). ---- */
.shopping-list-name { margin-bottom: 0.25rem; }
/* P-106: "Check off everything" and P-98's "Clear entire list" side by side (they wrap on a narrow phone) */
.shopping-check-all, .shopping-clear-all { display: inline-block; margin: 0.25rem 0.5rem 0.25rem 0; }
.shopping-check-all[hidden], .shopping-clear-all[hidden] { display: none; }
.shopping-check-all a.button, .shopping-clear-all a.button, .shopping-check-all-page form .button { display: inline-flex; align-items: center;
  min-height: 44px; margin-right: 0; vertical-align: middle; }
.shopping-section { font-size: 1rem; margin: 1rem 0 0.25rem; color: var(--muted); }
.shopping-items { list-style: none; padding: 0; margin: 0; }
.shopping-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.15rem 0; border-top: 1px solid var(--border); }
.shopping-items .shopping-item:first-child { border-top: 0; }
.shopping-check, .shopping-delete { margin: 0; flex: none; }
.shopping-tick { min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center;
  justify-content: center; background: transparent; color: var(--ink); border: 0; box-shadow: none; }
.shopping-tick .tick-box { width: 1.4rem; height: 1.4rem; border: 2px solid var(--ink); border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; line-height: 1; }
.shopping-what { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.shopping-name { font-weight: 600; }
.shopping-who { display: block; font-size: 0.8rem; }
.shopping-item.done .shopping-name, .shopping-item.done .shopping-qty { text-decoration: line-through; }
.shopping-item.done .shopping-what { color: var(--muted); }
/* R-299 (Karl, D-288): a line for a get-together coming up soon: the whole row red (the error colour every Look
   already makes readable), with its words ("today", "in 2 days") so it is not colour alone */
.shopping-item.soon { background: var(--danger-bg); box-shadow: inset 4px 0 0 var(--danger); padding-left: 0.4rem; }
.shopping-item.soon .shopping-name, .shopping-item.soon .shopping-qty, .shopping-soon-tag { color: var(--danger); }
.shopping-soon-tag { font-weight: 600; font-size: 0.9rem; }
.shopping-priority-head { color: var(--danger); }
.shopping-delete button.link { min-height: 44px; padding: 0 0.5rem; }
.shopping-amount { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.shopping-amount > span { flex: 1 1 8rem; min-width: 0; }
.shopping-recipes { padding-left: 1.2rem; }
.shopping-recipes li { min-height: 44px; display: list-item; padding: 0.4rem 0; }
/* P-84: the lists (General and a get-together's), "Add to General list", the "Grabbing all" question */
.shopping-lists ul { list-style: none; padding: 0; margin: 0.25rem 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.shopping-lists li { min-height: 44px; display: inline-flex; align-items: center; gap: 0.35rem; }
.shopping-lists a[aria-current="page"] { font-weight: 700; text-decoration: none; }
.shopping-item { flex-wrap: wrap; }
.shopping-actions { display: inline-flex; flex-wrap: wrap; align-items: center; flex: none; }
.shopping-general { margin: 0; }
.shopping-general button.link { min-height: 44px; padding: 0 0.5rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.shopping-general .tick-box { width: 1.1rem; height: 1.1rem; border: 2px solid currentColor; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; line-height: 1; }
.shopping-gotten, .shopping-in-general { font-size: 0.9rem; color: var(--muted); }
.shopping-gotten::before, .shopping-in-general::before { content: "· "; }
.shopping-ask { flex: 1 1 100%; margin: 0.25rem 0 0.5rem 2.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.shopping-ask p { flex: 1 1 100%; margin: 0; }
.shopping-ask button { min-height: 44px; }
.shopping-ask-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.shopping-ask-buttons form { margin: 0; }
@media (max-width: 30rem) { .shopping-ask { margin-left: 0; } }

/* ---- v0.27.50 (Karl, Nov 17, P-90): the top bar's links as BUTTONS shaped like the section boxes (details.fold:
   a 1px border in --border, 10px corners; Clean 14px, Material 12px as their folds: looks.css), the current page filled in,
   no underlines. My profile, Family (Karl, Nov 19) and HFE Settings fold under the person's picture and name (.who-menu; top-bar.js closes it on a tap
   elsewhere or Escape). Wide screens only: on phones the row is the Menu (its corners follow the Look since v0.27.53). ---- */
.site-header > nav.nav-row { gap: 0.4rem; }
.nav-row > a:not(.bell), .nav-row > form button.link, .nav-row > .who-menu > summary {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 0.6rem; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--nav-btn-radius, 10px); background: transparent; color: var(--link);
  text-decoration: none; font: inherit; line-height: 1.2; cursor: pointer; white-space: nowrap; }
.nav-row > a.who, .nav-row > .who-menu > summary { color: var(--muted); padding-left: 0.35rem; max-width: 14rem; overflow: visible; }
.nav-row > a.who.active, .nav-row > .who-menu > summary.active { color: var(--surface); }
.nav-row > .who-menu > summary .who-name { min-width: 0; }
@media (max-width: 1180px) {      /* 961-1180 px: a little tighter so the row and the full site name both fit */
  .site-header > nav.nav-row { gap: 0.2rem; }
  .nav-row > a:not(.bell), .nav-row > form button.link, .nav-row > .who-menu > summary { padding: 0 0.35rem; }
  .nav-row > a.who, .nav-row > .who-menu > summary { max-width: 10.5rem; }
}
@media (max-width: 1040px) {      /* 961-1040 px: the full row leaves the site name too little room: "HFE", as on phones */
  .brand { flex: none; overflow: visible; }
  .brand-long { display: none; }
  .brand-short { display: inline; }
}
.nav-row > a:not(.bell):hover, .nav-row > form button.link:hover, .nav-row > .who-menu > summary:hover {
  background: color-mix(in srgb, var(--link) 12%, transparent); }
.nav-row > a.active:not(.bell), .nav-row > a.who.active, .nav-row > .who-menu > summary.active {
  border-color: var(--link); background: var(--link); color: var(--surface); font-weight: 700; }   /* filled as My Rolodex's current section button */
.nav-row > a.who.active::after { display: none; }       /* the filled box marks it; no bar under it */
.nav-row > a.who:hover .who-name { text-decoration: none; }  /* a button: no underline on hover either */
.nav-row .who.active .av { box-shadow: 0 0 0 2px var(--surface); }   /* the photo stays seen on the filled button */
.nav-row > a:focus-visible, .nav-row > form button.link:focus-visible, .nav-row > .who-menu > summary:focus-visible,
.who-panel a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.who-menu { position: relative; }
.who-menu > summary { list-style: none; user-select: none; max-width: 14rem; }
.who-menu > summary::-webkit-details-marker { display: none; }
.who-caret::after { content: "\25BE"; font-size: 0.85em; }
.who-menu[open] .who-caret::after { content: "\25B4"; }
.who-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; display: flex; flex-direction: column;
  min-width: 11rem; padding: 0.35rem; gap: 0.25rem; background: var(--menu-surface, var(--surface));
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 16px rgb(0 0 0 / 0.25); }
.who-panel a { display: flex; align-items: center; min-height: 44px; padding: 0 0.6rem; border-radius: 8px;
  color: var(--link); text-decoration: none; white-space: nowrap; }
.who-panel a:hover { background: color-mix(in srgb, var(--link) 12%, transparent); }
.who-panel a.active { font-weight: 700; background: color-mix(in srgb, var(--link) 20%, transparent); }
@media print { .who-panel { display: none; } }

/* ---- v0.27.51 (P-91, D-262): the recipe card: sections, rating and "I made this" save as they change; "Email me
   the recipe" and "Add to shopping list" where Save was. ---- */
[data-autosave-button][hidden], .card-suggested[hidden] { display: none; }
.card-said { margin: 0 0 0.5rem; }
.autosave-status { margin: 0.25rem 0 0; min-height: 1.2em; color: var(--muted); font-size: 0.9rem; }
.autosave-status:empty { min-height: 0; }
.autosave-status.autosave-failed { color: var(--danger); font-weight: 600; }
/* R-295: the check mark and "Saved" fade after about 2 seconds; the line keeps its space (nothing jumps) */
.autosave-status.autosave-done { color: var(--ok, var(--muted)); transition: opacity 0.6s ease; }
.autosave-status.autosave-faded { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .autosave-status.autosave-done { transition: none; } }
.card-rating .autosave-status { flex-basis: 100%; }
.card-actions { margin-top: 0.75rem; }
.card-actions-buttons { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.card-actions-buttons form { margin: 0; }
.card-actions-buttons .email-me { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.card-actions-buttons button { min-height: 44px; }
.card-actions .email-me-for { margin: 0.35rem 0 0; }
.card-actions .help { margin-top: 0.35rem; }

.review-start a { font-weight: 600; }
.review-line.review-start-here, input#servings.review-start-here { outline: 3px solid var(--link); outline-offset: 3px; }

/* ---- v0.27.52 (Karl, Nov 17, P-92, D-263): the notification bell boxed like the other top-bar buttons (the same
   border and corners per Look, 44 px, the current page filled), in the PC row and the phone bar; the unread count
   inside the box; the phone bar keeps its own tighter padding at 420 px and less (only the box is added here). ---- */
.nav-row > a.bell, .site-header > a.bell.bar-updates {
  box-sizing: border-box; min-width: 44px; min-height: 44px;
  border: 1px solid var(--border); border-radius: var(--nav-btn-radius, 10px); background: transparent; }
.nav-row > a.bell { padding: 0 0.5rem; }
.nav-row > a.bell:hover, .site-header > a.bell.bar-updates:hover {
  background: color-mix(in srgb, var(--link) 12%, transparent); }
.nav-row > a.bell.active, .site-header > a.bell.bar-updates.active { border-color: var(--link); background: var(--link); }
.nav-row > a.bell .count, .site-header > a.bell.bar-updates .count { top: 2px; right: 2px; }   /* inside the box */
.nav-row > a.bell:has(.count) .bell-icon, .site-header > a.bell.bar-updates:has(.count) .bell-icon {
  margin-right: 0.45rem; }                             /* (gate round 1: a 2-digit count no longer covers the bell) */
.nav-row > a.bell.active .bell-icon, .site-header > a.bell.bar-updates.active .bell-icon {
  filter: drop-shadow(0 0 2px var(--surface)); }       /* (gate round 1: the bell stays seen on the filled box) */
.site-header > a.bell.bar-updates:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
@media (max-width: 1180px) { .nav-row > a.bell { padding: 0 0.35rem; } }

/* ---- v0.27.53 (Karl, Nov 17, P-93, D-264): on phones the Menu button's corners follow the Look like the other
   top-bar buttons and the bell (was a fixed 6 px); nothing else about it changes. ---- */
.site-header .nav-menu > summary { border-radius: var(--nav-btn-radius, 10px); }

/* ---- v0.27.55 (Karl, P-95): Admin > Test weather: the sky behind a small, solid box (readable over every sky), the
   name big in the middle, 44 px arrows. ---- */
:root[data-nature="on"] main.test-weather-page { background: transparent; }   /* the sky shows; the boxes stay solid */
main.test-weather-page .admin-nav-label { width: fit-content; padding: 0.1rem 0.6rem; border-radius: 10px;
  background: var(--surface); }                                   /* (gate round 1: readable over a night sky) */
main.test-weather-page > h1 { width: fit-content; max-width: 100%; padding: 0.2rem 0.8rem; border-radius: 12px;
  background: var(--surface); }
.test-weather-name { width: fit-content; max-width: 100%; margin: 1rem auto; padding: 0.2rem 1rem; text-align: center;
  font-size: clamp(2.2rem, 8vw, 4.5rem); font-weight: 800; line-height: 1.15; color: #fff;
  background: rgb(0 0 0 / 0.5); border-radius: 14px; overflow-wrap: anywhere; }
.test-weather-box, .test-weather-cycle { max-width: 30rem; margin: 1rem auto; padding: 0.5rem 1rem 1rem;
  border-radius: 14px; background: var(--surface); }
.tw-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.tw-form label { flex-basis: 100%; }
.tw-form input { width: 8rem; min-height: 44px; }
.tw-form button { min-height: 44px; }
.tw-error { color: var(--danger); font-weight: 600; }
.tw-result { margin-bottom: 0.75rem; }                          /* (round 2: apart from the help below) */
.tw-cycle-row { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.tw-arrow { min-width: 44px; min-height: 44px; font-size: 1.6rem; line-height: 1; }
/* P-105: the preview's wind slider (a 44px-tall track to grab, its value beside it) */
.tw-wind-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.tw-wind-row input[type="range"] { flex: 1 1 12rem; min-height: 44px; margin: 0; }
.tw-wind-row output { min-width: 8rem; font-weight: 600; }
.tw-count { min-width: 6rem; text-align: center; font-weight: 600; }
.tw-time-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem; }   /* v0.27.56 */
.tw-time-row select { min-height: 44px; }
@media print { .test-weather-name { color: inherit; background: none; } }   /* (round 1: no sky in print) */

/* ---- v0.22.2: the icon picker ---- */
/* Admin > Event types: choosing a type's icon (eventtypes/_icon_picker.html, static/icon-picker.js). Without the
   script: a radio button per icon (16 px icon + name) in a fieldset per group. With it (.ip-js): tabs, a search box
   and a grid of 44 px icon buttons that are still radio inputs. Colors are the site's tokens, so light and dark work. */
fieldset.icon-picker { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.icon-picker > legend.ip-legend { font-weight: 500; padding: 0; }
.icon-picker > legend.ip-legend .current-value .icon { width: 18px; height: 18px; }   /* v0.22.2: the selection */
.icon-picker .ip-current, .icon-picker .ip-chosen { margin: 0.4rem 0; }
.icon-picker .ip-current .type-label, .icon-picker .ip-chosen .type-label { margin-left: 0.2rem; font-size: 1rem;
  color: var(--ink); font-weight: 600; }
.icon-picker .ip-current .icon, .icon-picker .ip-chosen .icon { width: 20px; height: 20px; }
.icon-picker .ip-chosen[hidden], .icon-picker .ip-search[hidden], .icon-picker .ip-tabs[hidden],
.icon-picker .ip-group[hidden], .icon-picker .ip-option[hidden] { display: none; }
.icon-picker .ip-search label { margin-top: 0.5rem; }
.icon-picker .ip-search input[type="search"] { width: 100%; max-width: 24rem; padding: 0.6rem; font: inherit;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); }
.icon-picker .ip-status { margin: 0.25rem 0; min-height: 0; color: var(--muted); font-size: 0.9rem; }
.icon-picker .ip-status:empty { display: none; }
fieldset.ip-group { border: 0; padding: 0; margin: 0.75rem 0 0; min-width: 0; }
fieldset.ip-group > legend { font-weight: 600; padding: 0; }
.ip-grid { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.icon-picker label.ip-option { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; margin: 0;
  font-weight: 400; cursor: pointer; }
.ip-option input { margin: 0; }
.ip-tile { display: inline-flex; align-items: center; gap: 0.3rem; }

/* With the script: tabs, a grid of icon buttons. */
.ip-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0 0.25rem; }
button.ip-tab { margin: 0; min-height: 44px; padding: 0.3rem 0.75rem; font-size: 0.9rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
button.ip-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ip-tab:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.ip-js fieldset.ip-group { margin-top: 0.5rem; }
.ip-js fieldset.ip-group > legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ip-js.ip-searching fieldset.ip-group > legend { position: static; width: auto; height: auto; margin: 0 0 0.25rem;
  overflow: visible; clip: auto; white-space: normal; font-size: 0.9rem; color: var(--muted); }
.ip-js .ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 0.3rem; }
.ip-js label.ip-option { position: relative; display: block; min-height: 0; }
.ip-js .ip-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  cursor: pointer; }
.ip-js .ip-tile { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.ip-js .ip-tile .icon { width: 24px; height: 24px; }
.ip-js .ip-name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ip-js .ip-option:hover .ip-tile { border-color: var(--link); }
.ip-js .ip-option input:checked + .ip-tile { border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.ip-js .ip-option input:focus-visible + .ip-tile { outline: 3px solid var(--link); outline-offset: 2px; }
.icon-form > button[type="submit"] + a { margin-left: 0.75rem; }

/* v0.24.0 (R-080, R-081): Past events: a past event's album that its people may put in order */
.past-grid .photo-cell { display: flex; flex-direction: column; gap: 0.25rem; }
.past-grid .photo-cell.dragging { opacity: 0.5; }
.past-move { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.past-move form { margin: 0; }
.past-odd { margin: 0; }
.past-odd .note { margin: 0.25rem 0; }

/* v0.27.8 (R-217): Photos > Past events as a list by year (each year a remembered fold); the clean-up card on Admin >
   Photos. (v0.27.28: the Photos page's box of 5 recent past events became the timeline: see ".albums-tools".) */
details.past-year > summary { gap: .25rem; flex-wrap: wrap; }
details.past-year > summary h2 { font-size: 1.2rem; }
.past-list { list-style: none; padding: 0; margin: 0; }
.past-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .25rem 0;
  border-top: 1px solid var(--border); }
.past-row:first-child { border-top: 0; }
.past-row-link { flex: 1 1 14rem; min-width: 0; min-height: 44px; display: flex; flex-direction: column;
  justify-content: center; text-decoration: none; color: inherit; }
.past-row-link .album-title, .past-row-link .album-meta { padding: 0; }
.past-row-link:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
a.button.past-delete { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 1rem; }
#past-delete form a.button { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; }
#past-delete form button { min-height: 44px; }
.past-cleanup-form input[type=number] { width: 7rem; min-height: 44px; padding: 0.4rem; font: inherit;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); }
.past-cleanup-form fieldset { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.past-cleanup-form legend { font-weight: 500; padding: 0; }
.past-cleanup-form label.check { min-height: 44px; margin-top: 0; }
.past-cleanup-form button { min-height: 44px; }
.past-cleanup-list .help { overflow-wrap: anywhere; }

/* v0.27.9 (R-218): HFE Settings in folds (each group's own Save; the owner's event length inline in Events and
   calendar); Admin > Mail status: the Email outbox's table in a box of its own height, with its own scroll bar and a
   header row that stays put (the box, not the table, scrolls: a keyboard reaches it and moves it with the arrows) */
.settings-group details.fold > form button[type=submit], .settings-inline button[type=submit] { min-height: 44px; }
.settings-inline { margin-top: 1.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.settings-inline h3 { margin: 0.5rem 0 0.25rem; font-size: 1.05rem; }
.outbox-scroll { max-height: min(26rem, 70vh); overflow: auto; margin-top: 0.5rem; border: 1px solid var(--border);
  border-radius: 6px; overscroll-behavior: contain; }
.outbox-scroll:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.outbox-scroll table.outbox { display: table; overflow: visible; margin-top: 0; }
.outbox-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--card, var(--surface));
  box-shadow: inset 0 -1px 0 var(--border); }

/* P-69 Terms gate (release A): the Terms text box (scrolled to its end before Accept), the boxes, the placeholder note */
.terms-text { max-height: 55vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px;
  padding: 0.75rem 1rem; margin: 0.75rem 0; background: var(--surface); }
.terms-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.terms-page .terms-text { max-height: none; overflow: visible; border: 0; padding: 0; }
.terms-end { font-style: italic; margin-top: 1rem; }
.terms-boxes { border: 0; padding: 0; margin: 0.75rem 0; }
.terms-box { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.5rem 0; font-weight: normal; }
.terms-box input { margin-top: 0.25rem; flex: none; }

/* R-297 (round 1): Supplies' buttons and choices are tap-size */
.supplies .supply-claims button.link, .supplies-admin button.link { min-height: 44px; padding: 0 0.5rem; }
.supplies-form label.check { min-height: 44px; display: inline-flex; align-items: center; gap: 0.4rem; }
.supply-row input[type="text"] { max-width: 6rem; }
/* R-298 (Karl, D-287 answer 9): the countdown beside an upcoming event's date */
.event-away { font-weight: 600; white-space: nowrap; }
/* R-298 (D-287): the Thanksgiving sheet's colours on the food slots: red while a category has open spots, green when
   full (its words say "N open" / "full" too: never colour alone) */
.food-slot-head.slot-open { color: var(--danger); }
.food-slot-head.slot-full { color: var(--ok); }
.food-still-open { font-weight: 600; color: var(--danger); }
.food-still-open.all-taken { color: var(--ok); }

/* R-295 part 2: the event form's food and supplies, saved with their own button */
.event-form-parts { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; margin: 1rem 0; }
